Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: non-native sumcheck verifier #1042

Merged
merged 11 commits into from
Feb 22, 2024
Merged

feat: non-native sumcheck verifier #1042

merged 11 commits into from
Feb 22, 2024

Conversation

ivokub
Copy link
Collaborator

@ivokub ivokub commented Feb 8, 2024

Description

This PR implements implements first iteration of the non-native sumcheck verifier in-circuit. For that we have implemented:

  • polynomial helpers for multilinear and univariate polynomials (non-native)
  • sumcheck verifier (non-native)
  • sumcheck prover (field-agnostic)
  • some initial claim implementations

The implementation follows the current field-specific sumcheck implementation quite closely, but trying to decouple it from the GKR. Namely, we define similar eqEval claims as in native GKR, but instead of deferring the final round evaluation to the next claim, we evaluate it directly. This type of claim allows to check multivariate polynomials over many instances.

This PR is not yet a full implementation - particularly, we still do not provide any public methods to construct sumcheck proofs. I'm still trying to figure out a safe and convenient way for that. The idea is that the circuit designer should never have to call the sumcheck prover manually, but instead has to only define the multivariate polynomial (something implementing gate interface) and the inputs, and the framework does all the rest (evaluates the gate at the inputs, computes the random challenges for taking random linear combination of the evaluation values, runs the sumcheck prover in a hint to obtain the proof and finally runs the in-circuit sumcheck verifier). But this is API design work which can be decoupled from sumcheck prover/verifier correctness review.

Related #834

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this been tested?

  • Sumcheck test with default evaluatable functions (multilinear and multivariate functions)
  • Polynomial tests

How has this been benchmarked?

Not yet benchmarked. Will add when prover is coupled.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ivokub ivokub added new feature consolidate strengthen an existing feature labels Feb 8, 2024
@ivokub ivokub added this to the v0.10.0 milestone Feb 8, 2024
@ivokub ivokub requested a review from Tabaie February 8, 2024 00:11
@ivokub ivokub self-assigned this Feb 8, 2024
std/math/polynomial/polynomial.go Show resolved Hide resolved
std/recursion/sumcheck/challenge.go Show resolved Hide resolved
std/recursion/sumcheck/claim_intf.go Show resolved Hide resolved
std/recursion/sumcheck/challenge.go Show resolved Hide resolved
std/recursion/sumcheck/polynomial.go Outdated Show resolved Hide resolved
std/recursion/sumcheck/polynomial.go Show resolved Hide resolved
@Tabaie Tabaie self-requested a review February 22, 2024 16:19
@ivokub
Copy link
Collaborator Author

ivokub commented Feb 22, 2024

Thanks for the review!

@ivokub ivokub merged commit 7cfcd5a into master Feb 22, 2024
7 checks passed
@ivokub ivokub deleted the feat/gkr-ecdsa branch February 22, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consolidate strengthen an existing feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants