pub struct MultiDegreeSumcheck<F>(/* private fields */);Implementations§
Source§impl<F: FromPrimitiveWithConfig> MultiDegreeSumcheck<F>
impl<F: FromPrimitiveWithConfig> MultiDegreeSumcheck<F>
Sourcepub fn prove_as_subprotocol(
transcript: &mut impl Transcript,
groups: Vec<MultiDegreeSumcheckGroup<F>>,
num_vars: usize,
config: &F::Config,
) -> (MultiDegreeSumcheckProof<F>, Vec<SumcheckProverState<F>>)where
F: InnerTransparentField + Send + Sync,
F::Inner: ConstTranscribable + Zero,
F::Modulus: ConstTranscribable,
pub fn prove_as_subprotocol(
transcript: &mut impl Transcript,
groups: Vec<MultiDegreeSumcheckGroup<F>>,
num_vars: usize,
config: &F::Config,
) -> (MultiDegreeSumcheckProof<F>, Vec<SumcheckProverState<F>>)where
F: InnerTransparentField + Send + Sync,
F::Inner: ConstTranscribable + Zero,
F::Modulus: ConstTranscribable,
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: OneMultiDegreeSumcheckGroupper 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:
MultiDegreeSumcheckProof<F>: The proof (group messages, claimed sums, degrees).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 == 0orgroupsis empty.
Sourcepub fn verify_as_subprotocol(
transcript: &mut impl Transcript,
num_vars: usize,
proof: &MultiDegreeSumcheckProof<F>,
config: &F::Config,
) -> Result<MultiDegreeSubClaims<F>, SumCheckError<F>>
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: TheMultiDegreeSumcheckProofproduced by the prover.config: Field configuration.
§Returns
Ok(MultiDegreeSubClaims<F>): Shared evaluation pointr*and per-group expected evaluations. The caller must verify each group’s MLE combination atr*equals its expected evaluation.Err(SumCheckError<F>): If any round check fails.
§Panics
- Panics if
num_vars == 0or 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> 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
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>
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>
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