pub struct SumcheckData<F, EF> {
pub polynomial_evaluations: Vec<[EF; 2]>,
pub pow_witnesses: Vec<F>,
}Expand description
Sumcheck polynomial data
Stores the polynomial evaluations for sumcheck rounds in a compact format.
Each round stores [h(0), h(inf)] where h(1) is derived as claimed_sum - h(0).
Fields§
§polynomial_evaluations: Vec<[EF; 2]>Polynomial evaluations for each sumcheck round.
Each entry is [h(0), h(inf)]:
h(0)is the constant term.h(inf)is the leading coefficient (evaluation at infinity).
h(1) is derived as claimed_sum - h(0) by the verifier.
Length: folding_factor
pow_witnesses: Vec<F>PoW witnesses for each sumcheck round Length: folding_factor
Implementations§
Source§impl<F, EF> SumcheckData<F, EF>
impl<F, EF> SumcheckData<F, EF>
Sourcepub fn polynomial_evaluations(&self) -> &[[EF; 2]]
pub fn polynomial_evaluations(&self) -> &[[EF; 2]]
Returns the polynomial evaluations [h(0), h(inf)] for each round.
Sourcepub const fn num_rounds(&self) -> usize
pub const fn num_rounds(&self) -> usize
Returns the number of rounds stored in this proof data.
Sourcepub fn observe_and_sample<Challenger, BF>(
&mut self,
challenger: &mut Challenger,
c0: EF,
c_inf: EF,
pow_bits: usize,
) -> EFwhere
BF: Field,
EF: ExtensionField<BF>,
F: Clone,
Challenger: FieldChallenger<BF> + GrindingChallenger<Witness = F>,
pub fn observe_and_sample<Challenger, BF>(
&mut self,
challenger: &mut Challenger,
c0: EF,
c_inf: EF,
pow_bits: usize,
) -> EFwhere
BF: Field,
EF: ExtensionField<BF>,
F: Clone,
Challenger: FieldChallenger<BF> + GrindingChallenger<Witness = F>,
Commits polynomial coefficients to the transcript and returns a challenge.
This helper function handles the Fiat-Shamir interaction for a sumcheck round.
§Arguments
challenger- Fiat-Shamir transcript.c0- Constant coefficienth(0).c_inf- Leading coefficienth(inf).pow_bits- PoW difficulty (0 to skip grinding).
§Returns
The sampled challenge r.
Sourcepub fn verify_rounds<Challenger>(
&self,
challenger: &mut Challenger,
claimed_sum: &mut EF,
pow_bits: usize,
) -> Result<Point<EF>, SumcheckError>where
F: TwoAdicField,
EF: ExtensionField<F> + TwoAdicField,
Challenger: FieldChallenger<F> + GrindingChallenger<Witness = F>,
pub fn verify_rounds<Challenger>(
&self,
challenger: &mut Challenger,
claimed_sum: &mut EF,
pow_bits: usize,
) -> Result<Point<EF>, SumcheckError>where
F: TwoAdicField,
EF: ExtensionField<F> + TwoAdicField,
Challenger: FieldChallenger<F> + GrindingChallenger<Witness = F>,
Verifies standard sumcheck rounds and extracts folding randomness from the transcript.
§Returns
A Point of folding randomness values.
Trait Implementations§
Source§impl<F: Clone, EF: Clone> Clone for SumcheckData<F, EF>
impl<F: Clone, EF: Clone> Clone for SumcheckData<F, EF>
Source§fn clone(&self) -> SumcheckData<F, EF>
fn clone(&self) -> SumcheckData<F, EF>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<F: Default, EF: Default> Default for SumcheckData<F, EF>
impl<F: Default, EF: Default> Default for SumcheckData<F, EF>
Source§fn default() -> SumcheckData<F, EF>
fn default() -> SumcheckData<F, EF>
Source§impl<'de, F, EF> Deserialize<'de> for SumcheckData<F, EF>where
F: Deserialize<'de>,
EF: Deserialize<'de>,
impl<'de, F, EF> Deserialize<'de> for SumcheckData<F, EF>where
F: Deserialize<'de>,
EF: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl<F, EF> Freeze for SumcheckData<F, EF>
impl<F, EF> RefUnwindSafe for SumcheckData<F, EF>where
F: RefUnwindSafe,
EF: RefUnwindSafe,
impl<F, EF> Send for SumcheckData<F, EF>
impl<F, EF> Sync for SumcheckData<F, EF>
impl<F, EF> Unpin for SumcheckData<F, EF>
impl<F, EF> UnsafeUnpin for SumcheckData<F, EF>
impl<F, EF> UnwindSafe for SumcheckData<F, EF>where
F: UnwindSafe,
EF: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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