pub struct Fri {
pub expansion_factor: usize,
pub num_collinearity_checks: usize,
pub domain: ArithmeticDomain,
}
Fields§
§expansion_factor: usize
§num_collinearity_checks: usize
§domain: ArithmeticDomain
Implementations§
Source§impl Fri
impl Fri
pub fn new( domain: ArithmeticDomain, expansion_factor: usize, num_collinearity_checks: usize, ) -> Result<Self, FriSetupError>
Sourcepub fn prove(
&self,
codeword: &[XFieldElement],
proof_stream: &mut ProofStream,
) -> Result<Vec<usize>, FriProvingError>
pub fn prove( &self, codeword: &[XFieldElement], proof_stream: &mut ProofStream, ) -> Result<Vec<usize>, FriProvingError>
Create a FRI proof and return a-indices of revealed elements of round 0.
Sourcepub fn verify(
&self,
proof_stream: &mut ProofStream,
) -> Result<Vec<(usize, XFieldElement)>, FriValidationError>
pub fn verify( &self, proof_stream: &mut ProofStream, ) -> Result<Vec<(usize, XFieldElement)>, FriValidationError>
Verify low-degreeness of the polynomial on the proof stream. Returns the indices and revealed elements of the codeword at the top level of the FRI proof.
pub fn num_rounds(&self) -> usize
pub fn last_round_max_degree(&self) -> usize
pub fn first_round_max_degree(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fri
impl RefUnwindSafe for Fri
impl Send for Fri
impl Sync for Fri
impl Unpin for Fri
impl UnwindSafe for Fri
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more