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/switch groth16 key #1357

Open
wants to merge 53 commits into
base: master
Choose a base branch
from

Conversation

lucasmenendez
Copy link

Description

This PR implements SwitchVerificationKey for groth16 recursion. By including two verification keys for similar circuits, it allows recursive verification of multiple proofs for both circuits, seamlessly switching between their corresponding verification keys as needed.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

There are three similar tests that verify that two proofs from two different circuits are in the third circuit. Each test uses different curves for the inner and outer circuits:

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

Sorry, something went wrong.

@ivokub ivokub self-requested a review January 9, 2025 08:19
@ivokub
Copy link
Collaborator

ivokub commented Jan 9, 2025

I'm a bit behind on reviews and will get to it soon

@ivokub ivokub force-pushed the feat/switch-groth16-key branch from 6ffa023 to 4e1aa27 Compare January 28, 2025 09:16
@ivokub
Copy link
Collaborator

ivokub commented Jan 28, 2025

I'm a bit behind on reviews and will get to it soon

I rebased on top of master and fixed conflicting changes. I'll still have a look at the Groth16 test and add tests for MuxG2/MuxGt. And I'd like to write documentation example. But in general looks good.

@lucasmenendez
Copy link
Author

Super nice!!

I'm a bit behind on reviews and will get to it soon

I rebased on top of master and fixed conflicting changes. I'll still have a look at the Groth16 test and add tests for MuxG2/MuxGt. And I'd like to write documentation example. But in general looks good.

yelhousni and others added 21 commits January 31, 2025 16:13

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
…al()` (Consensys#1339)

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Partially verified

This commit is signed with the committer’s verified signature.
lucasmenendez’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
This reverts commit b04a688.

Build fails when dependencies not installed.

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Partially verified

This commit is signed with the committer’s verified signature.
lucasmenendez’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
…ensys#1352)

Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
Signed-off-by: wangjingcun <wangjingcun@aliyun.com>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
Signed-off-by: hishope <csqiye@126.com>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
…nsys#1338)

Signed-off-by: ChengenH <hce19970702@gmail.com>
taikoonwang and others added 26 commits January 31, 2025 16:13

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
Co-authored-by: Gautam Botrel <gautam.botrel@gmail.com>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
…nsensys#1364)

Co-authored-by: Gautam Botrel <gautam.botrel@gmail.com>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
Signed-off-by: linchizhen <jiayanbing@yeah.net>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
Co-authored-by: Youssef El Housni <youssef.elhousni@consensys.net>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
…sensys#1365)

Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
Signed-off-by: oliveredget <188809800+oliveredget@users.noreply.github.com>
Signed-off-by: dashangcun <907225865@qq.com>
Signed-off-by: zhuhaicity <zhuhai@52it.net>
Signed-off-by: hidewrong <hidewrong@outlook.com>
Co-authored-by: oliveredget <188809800+oliveredget@users.noreply.github.com>
Co-authored-by: dashangcun <907225865@qq.com>
Co-authored-by: ZhuHaiCheng <zhuhai@52it.net>
Co-authored-by: hidewrong <hidewrong@outlook.com>
Co-authored-by: VolodymyrBg <aqdrgg19@gmail.com>

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez
@lucasmenendez lucasmenendez force-pushed the feat/switch-groth16-key branch from 1f67b21 to 59fb979 Compare January 31, 2025 15:17

Verified

This commit was signed with the committer’s verified signature.
lucasmenendez Lucas Menéndez

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@lucasmenendez lucasmenendez marked this pull request as ready for review March 18, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet