pub trait AbstractSumcheckProversState<F: Field> {
type Error: Error + From<Error>;
type PackedWitnessField: PackedField<Scalar: From<F> + Into<F>>;
type Claim: AbstractSumcheckClaim<F>;
type Witness: AbstractSumcheckWitness<Self::PackedWitnessField>;
type Prover;
// Required methods
fn pre_execute_rounds(
&mut self,
prev_rd_challenge: Option<F>,
) -> Result<(), Self::Error>;
fn new_prover(
&mut self,
claim: Self::Claim,
witness: Self::Witness,
seq_id: usize,
) -> Result<Self::Prover, Self::Error>;
fn prover_execute_round(
&self,
prover: &mut Self::Prover,
prev_rd_challenge: Option<F>,
) -> Result<AbstractSumcheckRound<F>, Self::Error>;
fn prover_finalize(
prover: Self::Prover,
prev_rd_challenge: Option<F>,
) -> Result<ReducedClaim<F>, Self::Error>;
}
Expand description
A trait that oversees the batched sumcheck execution
Implementations are expected to be used to:
- Manage common witness state (typically by perusing
super::CommonProversState
) - Create new prover instances at the beginning of a each round (via
new_prover
) - Perform common pre-round update steps (via
pre_execute_rounds
) - Advance the state of individual prover instances (via
prover_execute_round
andprover_finalize
)
See the implementation super::batch_prove
for more details.
Required Associated Types§
type Error: Error + From<Error>
type PackedWitnessField: PackedField<Scalar: From<F> + Into<F>>
type Claim: AbstractSumcheckClaim<F>
type Witness: AbstractSumcheckWitness<Self::PackedWitnessField>
type Prover
Required Methods§
fn pre_execute_rounds( &mut self, prev_rd_challenge: Option<F>, ) -> Result<(), Self::Error>
fn new_prover( &mut self, claim: Self::Claim, witness: Self::Witness, seq_id: usize, ) -> Result<Self::Prover, Self::Error>
fn prover_execute_round( &self, prover: &mut Self::Prover, prev_rd_challenge: Option<F>, ) -> Result<AbstractSumcheckRound<F>, Self::Error>
fn prover_finalize( prover: Self::Prover, prev_rd_challenge: Option<F>, ) -> Result<ReducedClaim<F>, Self::Error>
Object Safety§
This trait is not object safe.