-
Notifications
You must be signed in to change notification settings - Fork 366
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
Optimized BN254 Groth16 Solidity template with compressed proof support #810
Conversation
Hi -- thanks for the contrib! FYI; there is something planned (not started yet) to update the Groth16 verifier to support the |
|
Received the first iteration yesterday and am now implementing the three suggestions (there where no issues):
I've asked if I can share the report. |
@gbotrel From my side this is ready to merge. LMK what next steps are. |
@gbotrel I also have a wip branch on |
@kustosz so, we are now running solidity integration test within gnark main repo CI; Line 21 in 0896fe1
so if you can add the test for the compress proof in there and it passes the CI looks good to merge on our side. Q: @Tabaie @ThomasPiellard I suspect plugging the multi commit on top of that shouldn't be an issue? |
Thanks for the pointer, will get this sorted tomorrow! |
just to be clear: the CI here won't pass until Consensys/gnark-solidity-checker#1 gets merged (or at least put on a branch in that repo so we can refer to it in CI config here) |
New verifier BN254 Groth16 Solidity template that is more gas efficient and supports compressed proofs (efficient on rollups).
External audit scheduled for this week.
It has two public functions
verifyProof
andverifyCompressedProof
.The
verifyProof
is heavily gas optimized and should be drop-in replacement for the existing function (except it will always revert on invalid proof, instead of sometimes returning false).The
verifyCompressedProof
is optimized for reducing calldata, and less optimized for compute. This is to keep readability in the much more complex math. The intended use case is rollups where calldata is relatively much more expensive than compute.