Skip to main content

MultiDegreeSumcheck

Struct MultiDegreeSumcheck 

Source
pub struct MultiDegreeSumcheck<F>(/* private fields */);

Implementations§

Source§

impl<F: FromPrimitiveWithConfig> MultiDegreeSumcheck<F>

Source

pub fn prove_as_subprotocol( transcript: &mut impl Transcript, groups: Vec<MultiDegreeSumcheckGroup<F>>, num_vars: usize, config: &F::Config, ) -> (MultiDegreeSumcheckProof<F>, Vec<SumcheckProverState<F>>)

Multi-degree sumcheck prover.

Runs the prover side of the sumcheck protocol for G degree groups sharing one verifier challenge per round. Proves the claim:

$$ \sum_{x \in {0, 1}^{\text{num\_vars}}} G_g(x) = \text{claimed\_sum}_g \quad \forall g $$

where $G_g(x) = \text{comb\_fn}_g(\text{mles}_g(x))$ is the combination function for group $g$ applied to its MLEs.

It is designed to be used as a subprotocol within a larger system. since it takes the FS transcript (transcript argument) as input and returns the internal ProverState alongside the sumcheck proof.

Claimed sums are derived by the prover during the first round.

§Arguments
  • transcript: Fiat-Shamir transcript.
  • groups: One MultiDegreeSumcheckGroup per degree bucket, each carrying its MLEs and combination function.
  • num_vars: Number of variables (must be consistent across all groups).
  • config: Field configuration.
§Returns

A tuple containing:

  1. MultiDegreeSumcheckProof<F>: The proof (group messages, claimed sums, degrees).
  2. Vec<ProverState<F>>: Per-group prover states — needed by the caller to evaluate MLEs at the shared point after the sumcheck.
§Panics
  • Panics if num_vars == 0 or groups is empty.
Source

pub fn verify_as_subprotocol( transcript: &mut impl Transcript, num_vars: usize, proof: &MultiDegreeSumcheckProof<F>, config: &F::Config, ) -> Result<MultiDegreeSubClaims<F>, SumCheckError<F>>

Multi-degree sumcheck verifier.

Runs the verifier side of the sumcheck protocol for G degree groups sharing one verifier challenge per round. Verifies the claim:

$$ \sum_{x \in {0, 1}^{\text{num\_vars}}} G_g(x) = \text{claimed\_sum}_g \quad \forall g $$

where $G_g(x) = \text{comb\_fn}_g(\text{mles}_g(x))$.

It is designed to be used as a subprotocol within a larger system. If successful, it returns Subclaim for each group, a final equation that the outer protocol must satisfy for the overall sumcheck proof to be valid.

Mirrors the prover transcript exactly: absorbs metadata, then per-round absorbs all group messages, samples one shared challenge, and calls VerifierState::check_and_generate_subclaim per group. Per-group degrees are read from the proof — no external degree parameter needed.

§Arguments
  • transcript: Fiat-Shamir transcript (must match prover state at the start of the sumcheck).
  • num_vars: Number of variables (sumcheck rounds).
  • proof: The MultiDegreeSumcheckProof produced by the prover.
  • config: Field configuration.
§Returns
  • Ok(MultiDegreeSubClaims<F>): Shared evaluation point r* and per-group expected evaluations. The caller must verify each group’s MLE combination at r* equals its expected evaluation.
  • Err(SumCheckError<F>): If any round check fails.
§Panics
  • Panics if num_vars == 0 or the proof has no groups.

Auto Trait Implementations§

§

impl<F> Freeze for MultiDegreeSumcheck<F>

§

impl<F> RefUnwindSafe for MultiDegreeSumcheck<F>
where F: RefUnwindSafe,

§

impl<F> Send for MultiDegreeSumcheck<F>
where F: Send,

§

impl<F> Sync for MultiDegreeSumcheck<F>
where F: Sync,

§

impl<F> Unpin for MultiDegreeSumcheck<F>
where F: Unpin,

§

impl<F> UnsafeUnpin for MultiDegreeSumcheck<F>

§

impl<F> UnwindSafe for MultiDegreeSumcheck<F>
where F: UnwindSafe,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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
§

impl<F, T> IntoWithConfig<F> for T
where F: PrimeField + FromWithConfig<T>,

§

fn into_with_cfg(self, cfg: &<F as PrimeField>::Config) -> F

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V