pub struct PrefixProver<F: Field, EF: ExtensionField<F>> { /* private fields */ }Expand description
Stacked-sumcheck prover with prefix-first variable binding.
§Flow
- Round one runs in SIMD-packed form.
- Every later round runs on the residual product polynomial.
Trait Implementations§
Source§impl<F: Clone + Field, EF: Clone + ExtensionField<F>> Clone for PrefixProver<F, EF>
impl<F: Clone + Field, EF: Clone + ExtensionField<F>> Clone for PrefixProver<F, EF>
Source§fn clone(&self) -> PrefixProver<F, EF>
fn clone(&self) -> PrefixProver<F, EF>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F: Debug + Field, EF: Debug + ExtensionField<F>> Debug for PrefixProver<F, EF>
impl<F: Debug + Field, EF: Debug + ExtensionField<F>> Debug for PrefixProver<F, EF>
Source§impl<F: TwoAdicField, EF: ExtensionField<F>> Layout<F, EF> for PrefixProver<F, EF>
impl<F: TwoAdicField, EF: ExtensionField<F>> Layout<F, EF> for PrefixProver<F, EF>
Source§fn num_variables(&self) -> usize
fn num_variables(&self) -> usize
Returns the number of variables of the stacked polynomial.
Source§fn num_variables_table(&self, id: usize) -> usize
fn num_variables_table(&self, id: usize) -> usize
Returns the number of variables of table id.
Source§fn eval<Ch>(
&mut self,
table_idx: usize,
polys: &[usize],
challenger: &mut Ch,
) -> Vec<EF>where
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
fn eval<Ch>(
&mut self,
table_idx: usize,
polys: &[usize],
challenger: &mut Ch,
) -> Vec<EF>where
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
Records opening claims for the selected columns of table_idx.
§Arguments
table_idx— source table index.polys— columns to open; must be non-empty.challenger— Fiat–Shamir transcript.
§Fiat–Shamir
- Samples the opening point internally from the challenger.
- Absorbs the evaluations into the transcript before returning.
- The verifier’s
add_claimperforms the symmetric absorption.
§Panics
- Columns list must be non-empty.
Source§fn add_virtual_eval<Ch>(&mut self, challenger: &mut Ch) -> EFwhere
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
fn add_virtual_eval<Ch>(&mut self, challenger: &mut Ch) -> EFwhere
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
Samples a virtual evaluation on the full stacked polynomial.
§Why
The WHIR protocol occasionally pins the stacked polynomial at a fresh random point for soundness amplification. Prefix mode evaluates the stacked polynomial directly — no per-column weighting needed.
Source§fn into_sumcheck<Ch>(
self,
sumcheck_data: &mut SumcheckData<F, EF>,
pow_bits: usize,
challenger: &mut Ch,
) -> (SumcheckProver<F, EF>, Point<EF>)where
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
fn into_sumcheck<Ch>(
self,
sumcheck_data: &mut SumcheckData<F, EF>,
pow_bits: usize,
challenger: &mut Ch,
) -> (SumcheckProver<F, EF>, Point<EF>)where
Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>,
Finalises preprocessing and returns the residual sumcheck prover.
§Returns
- Residual sumcheck prover over the packed product polynomial.
- Folding challenges sampled during preprocessing.
§Algorithm
Phase | Action
------+-----------------------------------------------
1 | Sample the batching challenge a.
2 | running sum = sum_{i} a^i * eval_i.
3 | weight poly = sum_{i} a^i * eq(z_i, X).
4 | Fold round 1 in SIMD-packed arithmetic.
5 | Drive rounds 2..folding on the product polynomial.§Precondition
- Each table’s arity is at least log_2(W), with W the packing width.
- Guarantees every per-slot packed accumulation spans a whole packed element.
Source§fn num_claims(&self) -> usize
fn num_claims(&self) -> usize
Returns the total number of concrete openings recorded so far.
Source§fn from_witness(witness: Witness<F>) -> Self
fn from_witness(witness: Witness<F>) -> Self
Builds this layout from a committed witness.
Source§fn new_witness(tables: Vec<Table<F>>, folding: usize) -> Witness<F>
fn new_witness(tables: Vec<Table<F>>, folding: usize) -> Witness<F>
Builds a witness structure for this layout from source tables.
Source§fn commit<Dft, MT, Challenger>(
dft: &Dft,
mmcs: &MT,
challenger: &mut Challenger,
witness: Witness<F>,
folding: usize,
starting_log_inv_rate: usize,
) -> (Self, MT::Commitment, MT::ProverData<DenseMatrix<F>>)
fn commit<Dft, MT, Challenger>( dft: &Dft, mmcs: &MT, challenger: &mut Challenger, witness: Witness<F>, folding: usize, starting_log_inv_rate: usize, ) -> (Self, MT::Commitment, MT::ProverData<DenseMatrix<F>>)
Commits to the witness and returns the layout. Read more
Source§fn strategy() -> LayoutStrategy
fn strategy() -> LayoutStrategy
Returns the verifier strategy required to replay this committed layout.
Source§fn variable_order() -> VariableOrder
fn variable_order() -> VariableOrder
Returns the variable order.
Source§impl<F, EF> ZkLayout<F, EF> for PrefixProver<F, EF>where
F: TwoAdicField,
EF: ExtensionField<F>,
impl<F, EF> ZkLayout<F, EF> for PrefixProver<F, EF>where
F: TwoAdicField,
EF: ExtensionField<F>,
Source§fn concrete_claims(&self) -> impl Iterator<Item = &ProverMultiClaim<F, EF>>
fn concrete_claims(&self) -> impl Iterator<Item = &ProverMultiClaim<F, EF>>
Walks concrete claims in placement order.
Source§fn virtual_claims(&self) -> &[ProverVirtualClaim<EF>]
fn virtual_claims(&self) -> &[ProverVirtualClaim<EF>]
Returns the virtual-claim slice.
Source§fn batched_sum(&self, alpha: EF) -> EF
fn batched_sum(&self, alpha: EF) -> EF
Returns the alpha-batched plain sum.
Source§fn zk_residual_handoff(
self,
rs: &Point<EF>,
alpha: EF,
eps: EF,
) -> ProductPolynomial<F, EF>where
EF: TwoAdicField,
fn zk_residual_handoff(
self,
rs: &Point<EF>,
alpha: EF,
eps: EF,
) -> ProductPolynomial<F, EF>where
EF: TwoAdicField,
Builds the residual product polynomial, scaled by the combining challenge. Read more
Auto Trait Implementations§
impl<F, EF> Freeze for PrefixProver<F, EF>
impl<F, EF> RefUnwindSafe for PrefixProver<F, EF>where
F: RefUnwindSafe,
EF: RefUnwindSafe,
<EF as ExtensionField<F>>::ExtensionPacking: RefUnwindSafe,
impl<F, EF> Send for PrefixProver<F, EF>
impl<F, EF> Sync for PrefixProver<F, EF>
impl<F, EF> Unpin for PrefixProver<F, EF>
impl<F, EF> UnsafeUnpin for PrefixProver<F, EF>
impl<F, EF> UnwindSafe for PrefixProver<F, EF>
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