test(evm): add FEVM BLS12_381 precompile tests and contracts#13343
Conversation
Add Solidity test contracts and compiled artifacts for BLS12-381 operations: - G1AddTest, G1MsmTest - G2AddTest, G2MsmTest - MapFpToG1Test, MapFp2ToG2Test - PairingTest Include corresponding .hex artifacts and a compile script (itests/contracts/bls12/compile.sh). Update itests/fevm_test.go to run and validate these precompile tests.
There was a problem hiding this comment.
Please update the PR title to match https://github.com/filecoin-project/lotus/blob/master/CONTRIBUTING.md#pr-title-conventions
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive test coverage for BLS12-381 precompiles in the FEVM (Filecoin Ethereum Virtual Machine) integration tests. It includes Solidity test contracts for all BLS12-381 cryptographic operations and integrates them into the test suite.
- Adds 7 Solidity test contracts covering all BLS12-381 precompile operations (G1/G2 addition, MSM, field mapping, and pairing)
- Includes compiled bytecode (.hex files) and compilation script for easy regeneration
- Integrates BLS12-381 precompile testing into the existing FEVM test framework
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| itests/fevm_test.go | Adds new test function to run all BLS12-381 precompile tests |
| itests/contracts/bls12/compile.sh | Shell script to compile Solidity contracts to bytecode |
| itests/contracts/bls12/*.sol | Seven Solidity test contracts for BLS12-381 operations |
| itests/contracts/bls12/*.hex | Compiled bytecode artifacts for each test contract |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…as the first line to explicitly specify the shell interpreter.
There was a problem hiding this comment.
Please update the PR title to match https://github.com/filecoin-project/lotus/blob/master/CONTRIBUTING.md#pr-title-conventions
…ject/lotus into test/fevm-bls12-precompiles
PR title now matches the required format.
PR title now matches the required format.
Add Solidity test contracts and compiled artifacts for BLS12-381 operations:
G1AddTest, G1MsmTest
G2AddTest, G2MsmTest
MapFpToG1Test, MapFp2ToG2Test
PairingTest
Include corresponding .hex artifacts and a compile script (itests/contracts/bls12/compile.sh).
Update itests/fevm_test.go to run and validate these precompile tests.