pub struct BinaryPcsRegime { /* private fields */ }Expand description
Validated mirror of the binary PCS schedule. Constructed by the protocol crate.
Implementations§
Source§impl BinaryPcsRegime
impl BinaryPcsRegime
Sourcepub const fn new(
challenge_field_bits: usize,
num_variables: usize,
log_inv_rate: usize,
log_folding_factor: usize,
num_queries: usize,
query_pow_bits: usize,
) -> Option<Self>
pub const fn new( challenge_field_bits: usize, num_variables: usize, log_inv_rate: usize, log_folding_factor: usize, num_queries: usize, query_pow_bits: usize, ) -> Option<Self>
Reject empty, overflowing, rate-one, or query-free schedules.
The challenge width must be a power-of-two tower level, one byte or wider. Every algebraic error below is measured against it.
Sourcepub fn queries_for_target(
security_level: usize,
log_inv_rate: usize,
query_pow_bits: usize,
) -> usize
pub fn queries_for_target( security_level: usize, log_inv_rate: usize, query_pow_bits: usize, ) -> usize
Query count reserving half the requested error for queries. Full enumeration has
zero query error and releases that reserve in Self::max_opening_claims.
Sourcepub const fn challenge_field_bits(&self) -> usize
pub const fn challenge_field_bits(&self) -> usize
Bit width of the field every challenge is drawn from.
Sourcepub const fn query_pow_bits(&self) -> usize
pub const fn query_pow_bits(&self) -> usize
The only credited grinding site: immediately before query sampling.
Sourcepub const fn queries_are_exhaustive(&self) -> bool
pub const fn queries_are_exhaustive(&self) -> bool
Whether every first-batch coset is authenticated, eliminating query error.
Sourcepub const fn field_error_numerator(&self) -> u128
pub const fn field_error_numerator(&self) -> u128
Sum of every fold and sumcheck error, as a numerator over the challenge field size.
Sourcepub const fn field_security_bits(&self) -> usize
pub const fn field_security_bits(&self) -> usize
Whole-bit lower bound before adding opening claims or query error.
Sourcepub const fn max_security_bits(&self) -> usize
pub const fn max_security_bits(&self) -> usize
Field ceiling after reserving query error, before opening-claim batching.
Sourcepub fn query_security_bits(&self) -> f64
pub fn query_security_bits(&self) -> f64
Query security before grinding; infinity when all cosets are checked.
Sourcepub fn max_opening_claims(&self, security_level: usize) -> usize
pub fn max_opening_claims(&self, security_level: usize) -> usize
Conservative claim capacity for a positive total-error target.
Returns zero if the base error already exceeds its budget, queries are too weak, or the target is unsupported. In particular, subtraction underflow does not grant a spurious one-claim allowance. Configurations must reject zero capacity themselves.
Sourcepub fn opening_error(&self, num_claims: usize) -> ErrorBits
pub fn opening_error(&self, num_claims: usize) -> ErrorBits
Union of the opening-claim, fold, sumcheck, and query errors.
Under unique decoding the candidate polynomial is unique at commitment time. This error therefore needs no candidate-list multiplier when composed with an AIR.
Sourcepub fn opening_term(&self, num_claims: usize) -> SecurityTerm
pub fn opening_term(&self, num_claims: usize) -> SecurityTerm
The opening error, labelled for a report.
Trait Implementations§
Source§impl Clone for BinaryPcsRegime
impl Clone for BinaryPcsRegime
impl Copy for BinaryPcsRegime
Source§impl Debug for BinaryPcsRegime
impl Debug for BinaryPcsRegime
impl Eq for BinaryPcsRegime
Source§impl PartialEq for BinaryPcsRegime
impl PartialEq for BinaryPcsRegime
impl StructuralPartialEq for BinaryPcsRegime
Auto Trait Implementations§
impl Freeze for BinaryPcsRegime
impl RefUnwindSafe for BinaryPcsRegime
impl Send for BinaryPcsRegime
impl Sync for BinaryPcsRegime
impl Unpin for BinaryPcsRegime
impl UnsafeUnpin for BinaryPcsRegime
impl UnwindSafe for BinaryPcsRegime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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