Add BLS12-381 precompiles & update precompiles#138
Merged
YoshihitoAso merged 1 commit intodev-2.7from Mar 17, 2026
Merged
Conversation
Register EIP-2537 BLS12-381 precompiles and update precompile setup and tests. Changes include: - Add bls12-381 precompiles (G1/G2 add, multi-exp, pairing, map) and export PrecompiledContractsBLS. - Remove legacy G1/G2 Mul precompiles and associated test fixtures. - Normalize precompile addresses to explicit hex byte forms and update tests/benchmarks accordingly. - Rename and use separate discount tables for G1/G2 multi-exp gas calculations and adjust gas math. - Add subgroup validation for points in multi-exponentiation implementations. - Update test vectors' gas values and testdata JSONs to match new pricing and addresses. - Update README to mention bls12-381 support and AWS Secrets Manager/KMS node key support. - Misc: adjust protocol params and fuzzing test to align with the new precompile set. These changes implement BLS precompile support and keep tests and benchmarks consistent with the new contract set and gas parameters.
purplesmoke05
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #137
This pull request introduces improvements and fixes to the precompiled contract address handling, and adds support for BLS12-381 signature verification precompiles.
BLS12-381 precompile support:
core/vm/contracts.go, including G1Add, G1MultiExp, G2Add, G2MultiExp, Pairing, MapG1, and MapG2.Removal of unused precompiles: