Improvements to Abstract Sumcheck Module
What:
-
abstract_sumcheck
module'sprove
function now returnsReducedClaim<F>
rather thanEvalcheckClaim<F>
-
abstract_sumcheck
module'sbatch_prove
function now returnVec<ReducedClaim<F>>
rather thanVec<EvalcheckClaim<F>>
- Drive-by improvements (e.g. improving GKR sumcheck test, e.g. sorting (and unsorting) the
Vec<ReducedClaim<F>>
output of theabstract_sumcheck::batch_prove
protocol to ensure that the order of output matches the order of the input provers (or input claims)) - Highlighting this last thing --> before this PR evalcheck claims are being returned in a different order than the input abstract sumcheck provers/claims are being passed in. This has not been an issue yet and it's not technically wrong, but a user of batch_prove could reasonably desire the invariant that the ith input claim maps to the ith output claim.
Why:
- Not all modules that used
AbstractSumcheck
wants the prove output to includeEvalcheckClaim
. One such example is thegkr_sumcheck
module, as the multilinears involved in thegkr_sumcheck
protocol are not necessarily committed to, existing only in the head. - Code in
abstract_sumcheck
module need not be aware ofevalcheck
ororacle
at all - ... with the exception of one useful helper method (
pub fn finalize_evalcheck_claim<F: Field>
) that has been placed inabstract_sumcheck::abstract_sumcheck
module for code deduplication (this method turns aReducedClaim<F>
into anEvalcheck<F>
when givenCompositePolyOracle<F>
advice
Useful Future Improvements (Out of scope for this PR):
- Refactor
batch_prove
in all three modules (sumcheck
,zerocheck
,gkr_sumcheck
) to take in witnesses and claims rather than an iterator yieldingAbstractSumcheckProver
- Once we make these refactors in
sumcheck
andzerocheck
modules to take inwitnesses
andclaims
, we can removeoracle
as a field from theSumcheckProver
andZerocheckProver
Edited by Kabir Peshawaria