pub struct GrindingSites {
pub out_of_domain: usize,
pub batch_combination: usize,
pub lookup_challenge: usize,
}Expand description
Where a STARK grinds, in bits per site.
Every field defaults to 0 — a protocol declares only the sites it
actually uses, and a default-constructed value is neutral.
Each site is consumed by the term whose round it opens:
Self::out_of_domainis applied to the DEEP-ALI term bycrate::stark::proven_security_report,crate::stark::conjectured_security_report, andcrate::stark::legacy_security_report.Self::batch_combinationis applied to the batched-openings term bycrate::stark::proven_security_report,crate::stark::conjectured_security_report, andcrate::stark::legacy_security_report.Self::lookup_challengeis applied to the LogUp fingerprint term bycrate::logup::security_term.
The low-degree test’s own grinding sites (e.g. FRI’s query- and
commit-phase proof-of-work) are not modeled here: a
crate::ldt::LowDegreeTest implementation carries those itself
(FriRegime::query_pow_bits / FriRegime::commit_pow_bits) and folds
them into the terms it returns, so the composite never re-applies them —
a site in this struct for them would be read back out unchanged, never
consulted.
A protocol grinding at a site this crate does not model builds its own
crate::report::SecurityTerm, applies boost to it, and passes it
through extras — no change to this struct is needed.
Fields§
§out_of_domain: usizeBits ground before the DEEP out-of-domain point is sampled.
batch_combination: usizeBits ground before the challenge that random-linear-combines the committed codewords into the single low-degree-test instance.
This is the opening-batching challenge of the polynomial commitment
scheme (alpha in p3_fri::TwoAdicFriPcs::open), not a FRI
folding challenge — those are FriRegime::commit_pow_bits, carried by
the low-degree test itself. It is credited only to the term
crate::report::BATCH_LABEL names, which exists only when more than
one codeword is batched (InstanceShape::num_batched_functions >= 2);
with nothing to batch there is no such round and these bits buy
nothing.
The proven, conjectured, and legacy composites all model this round. They grade it in different proximity regimes, but the prover pays the same work regardless.
lookup_challenge: usizeBits ground before the lookup / permutation argument’s challenges are sampled.
Implementations§
Source§impl GrindingSites
impl GrindingSites
Sourcepub const NONE: Self
pub const NONE: Self
No grinding at any site — the neutral element, usable in const
contexts where Default::default is not available.
Trait Implementations§
Source§impl Clone for GrindingSites
impl Clone for GrindingSites
impl Copy for GrindingSites
Source§impl Debug for GrindingSites
impl Debug for GrindingSites
Source§impl Default for GrindingSites
impl Default for GrindingSites
impl Eq for GrindingSites
Source§impl PartialEq for GrindingSites
impl PartialEq for GrindingSites
Source§impl Serialize for GrindingSites
impl Serialize for GrindingSites
impl StructuralPartialEq for GrindingSites
Auto Trait Implementations§
impl Freeze for GrindingSites
impl RefUnwindSafe for GrindingSites
impl Send for GrindingSites
impl Sync for GrindingSites
impl Unpin for GrindingSites
impl UnsafeUnpin for GrindingSites
impl UnwindSafe for GrindingSites
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