pub struct ProverState<C: SetConfig> {
pub randomness: Vec<C::Element>,
pub mles: Vec<DenseMultilinearExtension<C::Element>>,
pub num_vars: usize,
pub max_degree: usize,
pub round: usize,
pub asserted_sum: Option<C::Element>,
pub skip_next_fold: bool,
}Expand description
Sumcheck Prover State, generic over the field config C.
Fields§
§randomness: Vec<C::Element>Sampled randomness given by the verifier.
mles: Vec<DenseMultilinearExtension<C::Element>>Stores the list of multilinear extensions the sumcheck polynomial is comprised of.
num_vars: usizeNumber of variables.
max_degree: usizeMax degree.
round: usizeThe current round number.
asserted_sum: Option<C::Element>Claimed sum for the first round polynomial.
skip_next_fold: boolWhen true, the next Self::prove_round invocation pushes the
verifier challenge into randomness but skips the
fix_variables fold of mles. Used by round-1 fast
paths (see that pre-fold the MLEs as part of their setup.
The flag is reset to false after the skipped fold.
Implementations§
Source§impl<C: SetConfig> ProverState<C>
impl<C: SetConfig> ProverState<C>
Source§impl<C: SemiringConfig> ProverState<C>
impl<C: SemiringConfig> ProverState<C>
Sourcepub fn prove_round(
&mut self,
v_msg: &Option<C::Element>,
comb_fn: impl Fn(&[C::Element]) -> C::Element + Send + Sync,
config: &C,
) -> ProverMsg<C::Element>
pub fn prove_round( &mut self, v_msg: &Option<C::Element>, comb_fn: impl Fn(&[C::Element]) -> C::Element + Send + Sync, config: &C, ) -> ProverMsg<C::Element>
Receive message from verifier, generate prover message, and proceed to next round.
Adapted Jolt’s sumcheck implementation, with some additions like round 1 fast path.
Auto Trait Implementations§
impl<C> Freeze for ProverState<C>where
<C as SetConfig>::Element: Freeze,
impl<C> RefUnwindSafe for ProverState<C>where
<C as SetConfig>::Element: RefUnwindSafe,
impl<C> Send for ProverState<C>
impl<C> Sync for ProverState<C>
impl<C> Unpin for ProverState<C>where
<C as SetConfig>::Element: Unpin,
impl<C> UnsafeUnpin for ProverState<C>where
<C as SetConfig>::Element: UnsafeUnpin,
impl<C> UnwindSafe for ProverState<C>where
<C as SetConfig>::Element: 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
Mutably borrows from an owned value. Read more
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