pub struct ProdcheckProver<'a, A: Allocator, P: PackedField> { /* private fields */ }Expand description
Witness-based prover for the product check protocol.
This prover reduces the claim that a multilinear polynomial evaluates to a product over a Boolean hypercube to a single multilinear evaluation claim.
Implementations§
Source§impl<'a, A, F, P> ProdcheckProver<'a, A, P>
impl<'a, A, F, P> ProdcheckProver<'a, A, P>
Sourcepub fn new(
k: usize,
alloc: &'a A,
witness: FieldVec<P, A>,
) -> (Self, FieldVec<P, A>)
pub fn new( k: usize, alloc: &'a A, witness: FieldVec<P, A>, ) -> (Self, FieldVec<P, A>)
Creates a new ProdcheckProver.
Returns (prover, products) where products is the final layer containing the
products over all k variables.
§Arguments
k- The number of variables over which the product is taken. Each reduction step reduces one variable by computing pairwise products.witness- The witness polynomial
§Preconditions
witness.log_len() >= k
Sourcepub fn layer_prover(
self,
claim: MultilinearEvalClaim<F>,
) -> (impl MleCheckProver<F> + 'a, Option<Self>)
pub fn layer_prover( self, claim: MultilinearEvalClaim<F>, ) -> (impl MleCheckProver<F> + 'a, Option<Self>)
Pops the last layer and returns an MLE-check prover for it.
Returns (layer_prover, remaining) where:
layer_proveris an MLE-check prover for the popped layerremainingisSome(self)if there are more layers,Noneotherwise
Sourcepub fn prove(
self,
claim: MultilinearEvalClaim<F>,
channel: &mut impl IPProverChannel<F>,
) -> MultilinearEvalClaim<F>
pub fn prove( self, claim: MultilinearEvalClaim<F>, channel: &mut impl IPProverChannel<F>, ) -> MultilinearEvalClaim<F>
Runs the product check protocol and returns the final evaluation claim.
This consumes the prover and runs sumcheck reductions from the smallest layer back to the largest.
§Arguments
claim- The initial multilinear evaluation claimchannel- The channel for sending prover messages and sampling challenges
§Preconditions
claim.point.len() == witness.log_len() - k(where k is the number of reduction layers)
Trait Implementations§
Auto Trait Implementations§
impl<'a, A, P> Freeze for ProdcheckProver<'a, A, P>
impl<'a, A, P> RefUnwindSafe for ProdcheckProver<'a, A, P>
impl<'a, A, P> Send for ProdcheckProver<'a, A, P>
impl<'a, A, P> Sync for ProdcheckProver<'a, A, P>
impl<'a, A, P> Unpin for ProdcheckProver<'a, A, P>
impl<'a, A, P> UnsafeUnpin for ProdcheckProver<'a, A, P>
impl<'a, A, P> UnwindSafe for ProdcheckProver<'a, A, P>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
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 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> ⓘ
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