Struct starky::config::StarkConfig
source · pub struct StarkConfig {
pub security_bits: usize,
pub num_challenges: usize,
pub fri_config: FriConfig,
}
Expand description
A configuration containing the different parameters used by the STARK prover.
Fields§
§security_bits: usize
The targeted security level for the proofs generated with this configuration.
num_challenges: usize
The number of challenge points to generate, for IOPs that have soundness errors of (roughly)
degree / |F|
.
fri_config: FriConfig
The configuration of the FRI sub-protocol.
Implementations§
source§impl StarkConfig
impl StarkConfig
sourcepub const fn new(
security_bits: usize,
num_challenges: usize,
fri_config: FriConfig
) -> Self
pub const fn new( security_bits: usize, num_challenges: usize, fri_config: FriConfig ) -> Self
Returns a custom STARK configuration.
sourcepub const fn standard_fast_config() -> Self
pub const fn standard_fast_config() -> Self
A typical configuration with a rate of 2, resulting in fast but large proofs. Targets ~100 bit conjectured security.
sourcepub fn fri_params(&self, degree_bits: usize) -> FriParams
pub fn fri_params(&self, degree_bits: usize) -> FriParams
Outputs the FriParams
used during the FRI sub-protocol by this StarkConfig
.
sourcepub fn check_config<F: RichField + Extendable<D>, const D: usize>(
&self
) -> Result<()>
pub fn check_config<F: RichField + Extendable<D>, const D: usize>( &self ) -> Result<()>
Checks that this STARK configuration is consistent, i.e. that the different parameters meet the targeted security level.
Trait Implementations§
source§impl Clone for StarkConfig
impl Clone for StarkConfig
source§fn clone(&self) -> StarkConfig
fn clone(&self) -> StarkConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StarkConfig
impl Debug for StarkConfig
Auto Trait Implementations§
impl Freeze for StarkConfig
impl RefUnwindSafe for StarkConfig
impl Send for StarkConfig
impl Sync for StarkConfig
impl Unpin for StarkConfig
impl UnwindSafe for StarkConfig
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> 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