-
Notifications
You must be signed in to change notification settings - Fork 127
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.67% 65.56% -0.11%
+ Complexity 1522 1476 -46
============================================
Files 389 390 +1
Lines 14117 14546 +429
Branches 1454 1444 -10
============================================
+ Hits 9271 9537 +266
- Misses 4236 4409 +173
+ Partials 610 600 -10
*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
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
commit c5117f9 Author: Ivo Kubjas <[email protected]> Date: Wed Nov 19 02:48:12 2025 +0000 feat: add default circuit sizes commit 439b911 Author: Ivo Kubjas <[email protected]> Date: Sun Nov 16 21:08:48 2025 +0000 fix: more unique constraint names commit be09cf7 Author: Ivo Kubjas <[email protected]> Date: Sun Nov 16 20:52:05 2025 +0000 fix: incorrect limb count for scalar commit 206ee01 Author: Ivo Kubjas <[email protected]> Date: Sun Nov 16 20:48:05 2025 +0000 fix: ensure unique constraints commit afbfaee Author: Ivo Kubjas <[email protected]> Date: Sun Nov 16 20:43:31 2025 +0000 fix: store new rangechecker commit dd4e1eb Author: Ivo Kubjas <[email protected]> Date: Sun Nov 16 20:20:59 2025 +0000 chore: clarify error message commit f76c7c4 Author: Ivo Kubjas <[email protected]> Date: Sun Nov 16 20:18:36 2025 +0000 chore: remove excessive logging commit b83d78c Author: Ivo Kubjas <[email protected]> Date: Sun Nov 16 20:14:15 2025 +0000 fix: compilation errors commit 6f60e01 Merge: 5fdb039 cbf344e Author: Ivo Kubjas <[email protected]> Date: Sun Nov 16 20:12:33 2025 +0000 Merge branch 'main' into feat/bls-glue commit 5fdb039 Author: Ivo Kubjas <[email protected]> Date: Fri Sep 26 08:14:18 2025 +0000 test: make source local commit 4d526ed Author: Ivo Kubjas <[email protected]> Date: Mon Sep 29 22:18:09 2025 +0000 feat: integrate BLS precompile with zkevm commit 81a8876 Author: Ivo Kubjas <[email protected]> Date: Mon Sep 29 22:17:48 2025 +0000 docs: limits documentation commit a102526 Author: Ivo Kubjas <[email protected]> Date: Mon Sep 29 22:17:26 2025 +0000 feat: precise bls source getters commit d312c3d Author: Ivo Kubjas <[email protected]> Date: Mon Sep 29 13:14:35 2025 +0000 test: regenerate testdata commit b392c30 Author: Ivo Kubjas <[email protected]> Date: Mon Sep 29 11:36:29 2025 +0000 fix: align G2 tower order with gnark commit e823165 Author: Ivo Kubjas <[email protected]> Date: Fri Sep 26 13:09:09 2025 +0000 feat: remove circuit number limits commit 152d2a0 Author: Ivo Kubjas <[email protected]> Date: Wed Sep 24 11:28:54 2025 +0000 test: update included test files commit 3bf1ff6 Author: Ivo Kubjas <[email protected]> Date: Wed Sep 24 10:49:29 2025 +0000 fix: change ordering of serialized values commit c1bb5b6 Author: Ivo Kubjas <[email protected]> Date: Thu Sep 18 09:36:56 2025 +0000 chore: go mod tidy commit 9b138df Author: Ivo Kubjas <[email protected]> Date: Fri Sep 5 11:37:24 2025 +0000 test: add BLS testdata generator commit 44d9251 Author: Ivo Kubjas <[email protected]> Date: Tue Sep 2 11:05:12 2025 +0000 test: include minimal number of test files commit 81d4abf Author: Ivo Kubjas <[email protected]> Date: Fri Aug 29 15:09:24 2025 +0000 feat: add BLS precompile glue commit 6902d28 Author: Ivo Kubjas <[email protected]> Date: Fri Aug 29 15:09:01 2025 +0000 feat: csvtraces fill up to column size commit ae6bc69 Author: Ivo Kubjas <[email protected]> Date: Fri Aug 29 15:07:38 2025 +0000 fix: gnark schema walker field commit 896ba98 Author: Ivo Kubjas <[email protected]> Date: Fri Aug 29 15:07:17 2025 +0000 fix: typed builder commit af228c7 Author: Ivo Kubjas <[email protected]> Date: Fri Aug 29 15:06:50 2025 +0000 fix: remove unused test engine option commit 8bbd5ba Author: Ivo Kubjas <[email protected]> Date: Fri Aug 29 15:06:38 2025 +0000 fix: gnark logderiv interface change commit 2d1d55e Author: Ivo Kubjas <[email protected]> Date: Fri Aug 29 15:05:50 2025 +0000 chore: cherry pick gkr changes from smallfield commit b6a374a Author: Ivo Kubjas <[email protected]> Date: Thu Sep 18 09:35:46 2025 +0000 chore: gnark dependency update
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 precompiles (G1/G2 add, MSM, map, pairing, point-eval) into zkEVM and adds exhaustive testdata generators/fixtures.
BlsG1Add,BlsG2Add,BlsG1Msm,BlsG2Msm,BlsG1Map,BlsG2Map,BlsPairingCheck,PointEvalinzkevm.go(construction and prover assignment).SettingswithBlslimits insettings.go.prover/zkevm/prover/bls/zkevm_modules.gousing zkEVM range-check options.prover/zkevm/prover/bls/testdata/*, incl. trusted setup loader and unit test.bls_pairing_inputs-0.csv,bls_pointeval_inputs-0.csv.Written by Cursor Bugbot for commit dbfe394. This will update automatically on new commits. Configure here.