Skip to main content

PrefixProver

Struct PrefixProver 

Source
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>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<F: Debug + Field, EF: Debug + ExtensionField<F>> Debug for PrefixProver<F, EF>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F: TwoAdicField, EF: ExtensionField<F>> Layout<F, EF> for PrefixProver<F, EF>

Source§

fn num_variables(&self) -> usize

Returns the number of variables of the stacked polynomial.

Source§

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>,

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_claim performs the symmetric absorption.
§Panics
  • Columns list must be non-empty.
Source§

fn add_virtual_eval<Ch>(&mut self, challenger: &mut Ch) -> EF
where 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>,

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

Returns the total number of concrete openings recorded so far.

Source§

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>

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>>)
where Dft: TwoAdicSubgroupDft<F>, MT: Mmcs<F>, Challenger: CanObserve<MT::Commitment>,

Commits to the witness and returns the layout. Read more
Source§

fn folding(&self) -> usize

Returns the number of variables of first round
Source§

fn strategy() -> LayoutStrategy

Returns the verifier strategy required to replay this committed layout.
Source§

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>,

Source§

fn concrete_claims(&self) -> impl Iterator<Item = &ProverMultiClaim<F, EF>>

Walks concrete claims in placement order.
Source§

fn virtual_claims(&self) -> &[ProverVirtualClaim<EF>]

Returns the virtual-claim slice.
Source§

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,

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>

§

impl<F, EF> Send for PrefixProver<F, EF>

§

impl<F, EF> Sync for PrefixProver<F, EF>

§

impl<F, EF> Unpin for PrefixProver<F, EF>
where F: Unpin, EF: Unpin, <EF as ExtensionField<F>>::ExtensionPacking: Unpin,

§

impl<F, EF> UnsafeUnpin for PrefixProver<F, EF>

§

impl<F, EF> UnwindSafe for PrefixProver<F, EF>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more