pub struct FriOptions { /* private fields */ }Expand description
FRI protocol config options for proof generation and verification.
Implementations§
Source§impl FriOptions
impl FriOptions
Sourcepub fn new(
blowup_factor: usize,
folding_factor: usize,
remainder_max_degree: usize,
) -> Self
pub fn new( blowup_factor: usize, folding_factor: usize, remainder_max_degree: usize, ) -> Self
Returns a new FriOptions struct instantiated with the specified parameters.
§Panics
Panics if:
blowup_factoris not a power of two.folding_factoris not 2, 4, 8, or 16.
Sourcepub fn domain_offset<B: StarkField>(&self) -> B
pub fn domain_offset<B: StarkField>(&self) -> B
Returns the offset by which the evaluation domain is shifted.
The domain is shifted by multiplying every element in the domain by this offset.
Currently, the offset is hard-coded to be the primitive element in the field specified by
type parameter B.
Sourcepub fn folding_factor(&self) -> usize
pub fn folding_factor(&self) -> usize
Returns the factor by which the degree of a polynomial is reduced with each FRI layer.
In combination with remainder_max_degree_plus_1 this property defines how many FRI layers
are needed for an evaluation domain of a given size.
Sourcepub fn remainder_max_degree(&self) -> usize
pub fn remainder_max_degree(&self) -> usize
Returns maximum allowed remainder polynomial degree.
In combination with folding_factor this property defines how many FRI layers are needed
for an evaluation domain of a given size.
Sourcepub fn blowup_factor(&self) -> usize
pub fn blowup_factor(&self) -> usize
Returns a blowup factor of the evaluation domain.
Specifically, if the polynomial for which the FRI protocol is executed is of degree d
where d is one less than a power of two, then the evaluation domain size will be
equal to (d + 1) * blowup_factor.
Sourcepub fn num_fri_layers(&self, domain_size: usize) -> usize
pub fn num_fri_layers(&self, domain_size: usize) -> usize
Computes and return the number of FRI layers required for a domain of the specified size.
The number of layers for a given domain size is defined by the folding_factor and
remainder_max_degree and blowup_factor settings.
Trait Implementations§
Source§impl Clone for FriOptions
impl Clone for FriOptions
Source§fn clone(&self) -> FriOptions
fn clone(&self) -> FriOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more