Skip to main content

SumcheckRoundEvaluator

Trait SumcheckRoundEvaluator 

Source
pub trait SumcheckRoundEvaluator<F: Field, P: PackedField<Scalar = F>>: Send + Sync {
    // Required methods
    fn degree(&self) -> usize;
    fn accumulate(
        &self,
        chunk: &EvaluationChunk<'_, P>,
        accum: &mut [<P as WideMul>::Output],
    );
    fn interpolate(
        &self,
        ctx: &RoundContext<'_, P>,
        accum: &[P],
        claim: F,
    ) -> RoundCoeffs<F>;
}
Expand description

Per-round-polynomial logic for one plain sumcheck claim over store columns.

The driving SharedSumcheckProver makes one parallel pass over column chunks per round; the hot loops stay monomorphized inside each evaluator and only the per-chunk Self::accumulate entry is virtual. Within a round the calls are: Self::accumulate from parallel workers into per-worker accumulator slices, then Self::interpolate once on the slot-wise summed slice. The driving prover, not the evaluator, holds the round claim and reduces the round polynomial against the verifier challenge.

The driving prover owns the accumulator and sizes it from the degree.

  • Accumulation writes wide, unreduced slots, so a per-chunk sum costs no reduction.
  • The prover sums the workers’ slices slot-wise, then reduces once per round.
  • Interpolation reads the reduced slots.

An evaluator implements neither the allocation nor the merging. It only writes its own slots and interpolates them. The slot layout within one evaluator’s run is private to it.

Evaluators are stateless across rounds: they hold no round claim and never fold. The prover passes the round claim into Self::interpolate and recovers it back out of the emitted round polynomial itself (as $R(0) + R(1)$), so the whole claim ↔ coeffs state machine lives in the prover’s RoundState.

The auto_impl(Box) derive forwards the trait through Box, so a heterogeneous group of evaluators can drive a shared prover as Vec<Box<dyn SumcheckRoundEvaluator<F, P>>> while a homogeneous group avoids boxing.

Required Methods§

Source

fn degree(&self) -> usize

The number of accumulator slots this evaluator’s claim uses.

This is the count of sampled round-polynomial evaluations the accumulation pass collects; the remaining evaluation is recovered from the round’s sum claim in Self::interpolate. The driving prover reserves this many slots for the evaluator. It is the degree of the accumulated (prime/composite) polynomial, which for an eq-factored MLE-check evaluator is the prime degree, not the emitted round-polynomial degree.

Source

fn accumulate( &self, chunk: &EvaluationChunk<'_, P>, accum: &mut [<P as WideMul>::Output], )

Accumulates one chunk of the halved hypercube into accum.

The driving prover prepares chunk — the split, per-chunk column halves and eq-indicator expansions — so the evaluator only reads its columns by ColId and eq trackers by EqId. accum is this evaluator’s run of Self::degree wide slots, zero-initialized on the first chunk and carried across the worker’s chunks.

Source

fn interpolate( &self, ctx: &RoundContext<'_, P>, accum: &[P], claim: F, ) -> RoundCoeffs<F>

Interpolates this round’s polynomial from the accumulator and the round claim.

§Arguments
  • ctx - This round’s scalar state: the unbound-variable count, and a registered tracker’s equality coordinate and prefix.
  • accum - This evaluator’s slots, summed across every worker and reduced.
  • claim - This evaluator’s round claim.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<F: Field, P: PackedField<Scalar = F>, T: SumcheckRoundEvaluator<F, P> + ?Sized> SumcheckRoundEvaluator<F, P> for Box<T>
where Box<T>: Send + Sync,

Source§

fn degree(&self) -> usize

Source§

fn accumulate( &self, chunk: &EvaluationChunk<'_, P>, accum: &mut [<P as WideMul>::Output], )

Source§

fn interpolate( &self, ctx: &RoundContext<'_, P>, accum: &[P], claim: F, ) -> RoundCoeffs<F>

Implementors§

Source§

impl<F, P, Inner> SumcheckRoundEvaluator<F, P> for MleToSumCheckEvaluator<Inner>
where F: Field, P: PackedField<Scalar = F>, Inner: MleCheckRoundEvaluator<F, P>,

Source§

impl<F: Field, P: PackedField<Scalar = F>> SumcheckRoundEvaluator<F, P> for BivariateProductEvaluator