-
Notifications
You must be signed in to change notification settings - Fork 122
feat: BLS12-381 precompiles glue #915
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #915 +/- ##
=========================================
Coverage 65.21% 65.21%
Complexity 1476 1476
=========================================
Files 369 369
Lines 14354 14354
Branches 1378 1378
=========================================
Hits 9361 9361
Misses 4393 4393
Partials 600 600
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
371dab0 to
e8420b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds integration for BLS12-381 precompiles from gnark with the ZKEVM arithmetization system, along with comprehensive test data generation capabilities.
- Introduces ZKEVM-specific wrapper functions for BLS precompile operations (G1/G2 add, MSM, pairing, mapping, point evaluation)
- Adds extensive CSV test data for BLS point evaluation operations with various success and failure scenarios
- Includes CSV test data for BLS G2 field element to curve point mapping operations
Reviewed Changes
Copilot reviewed 41 out of 45 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| prover/zkevm/prover/bls/zkevm_modules.go | Provides ZKEVM integration wrappers for all BLS precompile operations |
| prover/zkevm/prover/bls/testdata/bls_pointeval_inputs-0.csv | Test data for BLS point evaluation with 50 test cases covering success/failure scenarios |
| prover/zkevm/prover/bls/testdata/bls_g2_map_inputs.csv | Test data for BLS G2 mapping operations with 4 test cases |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ecd4be9 to
7ca263d
Compare
4625177 to
5fdb039
Compare
|
BLS glue itself is ready, but there are a few blockers:
I also have some temp branch locally where I have tested implementation against actual traces, but it updates go-corset and I don't want to force it right now in this PR as different versions seem to be incompatible with each other. |
Adds glue for integrating BLS precompiles from gnark with the data provided in the arithmetization.
go generate prover/zkevm/prover/bls/testdataand then run the tests inprover/zkevm/prover/blsChecklist
Note
Integrates BLS12-381 precompile modules (G1/G2 add, msm, map, pairing, point-eval) into zkEVM and adds generators/fixtures for comprehensive tests.
zkevm(Settings,ZkEvm, constructors):G1/G2 add,G1/G2 msm,G1/G2 map,pairing check, andpoint evaluation.prover/zkevm/prover/bls/testdata(including trusted setup) to cover success/failure cases for add/msm/map/pairing/point-eval.Written by Cursor Bugbot for commit 5fdb039. This will update automatically on new commits. Configure here.