pub struct BatchProver<F: Field, Prover> { /* private fields */ }
Expand description
Prover for a front-loaded batch sumcheck protocol execution.
Prover that satisfies the verification logic in
crate::protocols::sumcheck::front_loaded
. See that module for protocol information.
This exposes a round-by-round interface so that the protocol call be interleaved with other interactive protocols, sharing the same sequence of challenges. The verification logic must be invoked with a specific sequence of calls, continuing for as many rounds as necessary until all claims are finished.
- construct a new verifier with
BatchProver::new
- if all rounds are complete, call
BatchProver::finish
, otherwise proceed - call
BatchProver::send_round_proof
- sample a random challenge and call
BatchProver::receive_challenge
with it - repeat from step 2
Implementations§
Source§impl<F, Prover> BatchProver<F, Prover>where
F: TowerField,
Prover: SumcheckProver<F>,
impl<F, Prover> BatchProver<F, Prover>where
F: TowerField,
Prover: SumcheckProver<F>,
Sourcepub fn new<Transcript>(
provers: Vec<Prover>,
transcript: &mut Transcript,
) -> Result<Self, Error>where
Transcript: CanSample<F>,
pub fn new<Transcript>(
provers: Vec<Prover>,
transcript: &mut Transcript,
) -> Result<Self, Error>where
Transcript: CanSample<F>,
Constructs a new prover for the front-loaded batched sumcheck.
The constructor samples batching coefficients from the proof transcript.
§Throws
- if the claims are not sorted in ascending order by number of variables
Sourcepub fn send_round_proof<Transcript>(
&mut self,
transcript: &mut Transcript,
) -> Result<(), Error>where
Transcript: CanWrite,
pub fn send_round_proof<Transcript>(
&mut self,
transcript: &mut Transcript,
) -> Result<(), Error>where
Transcript: CanWrite,
Computes the round message and writes it to the proof transcript.
Sourcepub fn receive_challenge(&mut self, challenge: F) -> Result<(), Error>
pub fn receive_challenge(&mut self, challenge: F) -> Result<(), Error>
Finishes an interaction round by reducing the instance with the verifier challenge.
Trait Implementations§
Auto Trait Implementations§
impl<F, Prover> Freeze for BatchProver<F, Prover>
impl<F, Prover> RefUnwindSafe for BatchProver<F, Prover>
impl<F, Prover> Send for BatchProver<F, Prover>
impl<F, Prover> Sync for BatchProver<F, Prover>
impl<F, Prover> Unpin for BatchProver<F, Prover>
impl<F, Prover> UnwindSafe for BatchProver<F, Prover>
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
§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>
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