Closed dmpierre closed 11 months ago
Is this ready for review @dmpierre ?
Is this ready for review @dmpierre ?
Yes thanks! Forgot to assign, so just added Arnau as well
Added a raw sum-check implementation in the meantime, might help to get rid of hyperplonk
altogether. Started benchmarking it. I will be working on optimizing this over the next few days. Would be happy to hear your thoughts!
@arnaucube pinged me about code duplication. So I'll save time and review once the changes have been addressed!
Could you ping once done @dmpierre ??
@arnaucube pinged me about code duplication. So I'll save time and review once the changes have been addressed!
Could you ping once done @dmpierre ??
I think we are getting closer! We eventually go for implementing a more generic trait over hyperplonk
directly.
Keeping our own sum-check implementation for later since it will require additional work on top of it if we want to use it - things like removing the dependency to VirtualPolynomial
, scattered in quite a few key places (we will have to re-implement some strategic polynomial subroutines to do that).
edited before merging
We want
folding_schemes
to have a sum-check implementation generic over hash functions.To achieve this, we re-use
hyperplonk
's sumcheck implementation. To be able to make it generic over any hash, we tweak it to be generic over our own [Transcript
]() trait (not the one found inhyperplonk
).This PR: 1) re-defines
SumCheck
,SumCheckProver
andSumCheckVerifier
traits to be generic over aCurveGroup
, withprove
andverify
methods generic overfolding_schemes::Transcript
. 2) sets theIOPProverState
andIOPVerifier
states to be generic over aCurveGroup
.Also, we change
hyperplonk
calls to its transcript object when re-implementing theprove
andverify
method cited above:transcript.append_serializable_element
becomestranscript.absorb
(example) ortranscript.absorb_vec
when needed (example).transcript.get_and_append_challenge
becomestranscript.get_challenge
(example)The main disadvantage from taking this route is codebase inflation. However, we gain the short-term ability to have a somewhat robust and generic sum-check implementation. Still, although practical, it seems like a temporary implementation which might be re-evaluated in the future (e.g. implementing our own sum-check from scratch,
hyperplonk
's implementation might have possible low-hanging optimizations).