pub struct Verifier<F: Field, EF: ExtensionField<F>> { /* private fields */ }Expand description
Verifier-side layout and claim registry.
Implementations§
Source§impl<F: Field, EF: ExtensionField<F>> Verifier<F, EF>
impl<F: Field, EF: ExtensionField<F>> Verifier<F, EF>
Sourcepub fn new(tables: &[TableShape], strategy: LayoutStrategy) -> Self
pub fn new(tables: &[TableShape], strategy: LayoutStrategy) -> Self
Reconstructs the verifier-side layout from table shapes.
§Algorithm
- Sort table indices by arity ascending.
- Iterate reversed, so largest tables get placed first.
- Each column occupies one slot of size
2^arity. - Stacked arity equals
log2of total stacked size, rounded up.
Sourcepub const fn strategy(&self) -> LayoutStrategy
pub const fn strategy(&self) -> LayoutStrategy
Return the layout strategy this verifier was constructed with.
Downstream protocols read it to dispatch on the binding direction without threading the strategy through their own state.
Sourcepub fn num_variables_table(&self, table_idx: usize) -> usize
pub fn num_variables_table(&self, table_idx: usize) -> usize
Returns the arity of the source table at the given index.
Sourcepub fn add_claim<Ch>(
&mut self,
table_idx: usize,
polys: &[usize],
evals: &[EF],
challenger: &mut Ch,
)where
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
pub fn add_claim<Ch>(
&mut self,
table_idx: usize,
polys: &[usize],
evals: &[EF],
challenger: &mut Ch,
)where
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
Records concrete opening claims for one table.
§Arguments
table_idx— source table index.polys— column indices that were opened; must be non-empty.evals— claimed evaluations, aligned with the column list.challenger— Fiat–Shamir transcript.
§Fiat–Shamir
- Samples the opening point internally from the challenger.
- Absorbs the evaluations into the transcript.
- Mirrors exactly the prover’s
evalabsorption order.
§Panics
- Columns list must be non-empty.
- Column list and evaluation list must have equal length.
- Every column index must be in range for this table.
Sourcepub fn add_virtual_eval<Ch>(&mut self, eval: EF, challenger: &mut Ch)where
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
pub fn add_virtual_eval<Ch>(&mut self, eval: EF, challenger: &mut Ch)where
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
Records a virtual evaluation claim on the full stacked polynomial.
§Fiat–Shamir
- Samples the opening point from the challenger.
- Absorbs the evaluation into the transcript.
- Mirrors exactly the prover’s
add_virtual_evalabsorption order.
Sourcepub fn sum(&self, alpha: EF) -> EF
pub fn sum(&self, alpha: EF) -> EF
Computes the batched claimed sum across concrete and virtual openings.
sum = sum_{i} alpha^i * eval_i§Traversal order
- Concrete openings first, walked in stacked-polynomial order.
- Virtual claims continue the alpha sequence after the concrete ones.
Sourcepub fn constraint(&self, alpha: EF) -> Constraint<F, EF>
pub fn constraint(&self, alpha: EF) -> Constraint<F, EF>
Builds the verifier-side equality constraint batching every claim.
§Contributions
- Concrete opening: equality at the selector-lifted claim point.
- Virtual claim: equality at the full stacked point.
Trait Implementations§
Auto Trait Implementations§
impl<F, EF> Freeze for Verifier<F, EF>
impl<F, EF> RefUnwindSafe for Verifier<F, EF>where
F: RefUnwindSafe,
EF: RefUnwindSafe,
impl<F, EF> Send for Verifier<F, EF>
impl<F, EF> Sync for Verifier<F, EF>
impl<F, EF> Unpin for Verifier<F, EF>
impl<F, EF> UnsafeUnpin for Verifier<F, EF>
impl<F, EF> UnwindSafe for Verifier<F, EF>where
F: UnwindSafe,
EF: UnwindSafe,
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§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>
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