Skip to main content

Layout

Trait Layout 

Source
pub trait Layout<F: TwoAdicField, EF: ExtensionField<F>>: Sized {
    // Required methods
    fn from_witness(witness: Witness<F>) -> Self;
    fn new_witness(tables: Vec<Table<F>>, folding: usize) -> Witness<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>>)
       where Dft: TwoAdicSubgroupDft<F>,
             MT: Mmcs<F>,
             Challenger: CanObserve<MT::Commitment>;
    fn num_claims(&self) -> usize;
    fn strategy() -> LayoutStrategy;
    fn folding(&self) -> usize;
    fn num_variables(&self) -> usize;
    fn num_variables_table(&self, id: usize) -> usize;
    fn eval<Ch>(
        &mut self,
        table_idx: usize,
        polys: &[usize],
        challenger: &mut Ch,
    ) -> Vec<EF>
       where Ch: FieldChallenger<F> + GrindingChallenger<Witness = F>;
    fn add_virtual_eval<Ch>(&mut self, challenger: &mut Ch) -> 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>;

    // Provided method
    fn variable_order() -> VariableOrder { ... }
}
Expand description

Stacked-sumcheck prover layout

Required Methods§

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.

§Arguments
  • dft — base-field DFT used to encode the codeword.
  • mmcs — Merkle commitment scheme over the base field.
  • challenger — Fiat–Shamir transcript; absorbs the Merkle root.
  • witness — stacked committed polynomial plus its tables.
  • folding — folding factor consumed by the first WHIR round.
  • starting_log_inv_rate — initial log-inverse rate of the RS code.
Source

fn num_claims(&self) -> usize

Returns the total number of concrete openings recorded so far.

Source

fn strategy() -> LayoutStrategy

Returns the verifier strategy required to replay this committed layout.

Source

fn folding(&self) -> usize

Returns the number of variables of first round

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.

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.

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

Processes initial rounds of sumcheck and returns the residual sumcheck prover.

§Returns
  • Residual sumcheck prover over the unpacked product polynomial.
  • Folding challenges sampled during preprocessing.

Provided Methods§

Source

fn variable_order() -> VariableOrder

Returns the variable order.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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

Source§

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