Test Bls12 Variable Length Input Contracts¶
Documentation for tests/prague/eip2537_bls_12_381_precompiles/[email protected]
.
Generate fixtures for these test cases for Osaka with:
fill -v tests/prague/eip2537_bls_12_381_precompiles/test_bls12_variable_length_input_contracts.py --fork Osaka
Tests minimum gas and input length for BLS12_G1MSM, BLS12_G2MSM, BLS12_PAIRING precompiles of EIP-2537: Precompile for BLS12-381 curve operations
Tests minimum gas and input length for BLS12_G1MSM, BLS12_G2MSM, BLS12_PAIRING precompiles of EIP-2537: Precompile for BLS12-381 curve operations.
Test Functions Overview¶
Name | Type | Cases (Osaka) | Description |
---|---|---|---|
test_valid_gas_g1msm |
state_test | 4 | Test the BLS12_G1MSM discount gas table in full, by expecting the call to succeed for |
test_invalid_zero_gas_g1msm |
state_test | 1 | Test the BLS12_G1MSM precompile calling it with zero gas. |
test_invalid_gas_g1msm |
state_test | 4 | Test the BLS12_G1MSM discount gas table in full, by expecting the call to fail for |
test_invalid_zero_length_g1msm |
state_test | 1 | Test the BLS12_G1MSM precompile by passing an input with zero length. |
test_invalid_length_g1msm |
state_test | 8 | Test the BLS12_G1MSM discount gas table in full, by expecting the call to fail for |
test_valid_gas_g2msm |
state_test | 7 | Test the BLS12_G2MSM discount gas table in full, by expecting the call to succeed for |
test_invalid_zero_gas_g2msm |
state_test | 1 | Test the BLS12_G2MSM precompile calling it with zero gas. |
test_invalid_gas_g2msm |
state_test | 7 | Test the BLS12_G2MSM discount gas table in full, by expecting the call to fail for |
test_invalid_zero_length_g2msm |
state_test | 1 | Test the BLS12_G2MSM precompile by passing an input with zero length. |
test_invalid_length_g2msm |
state_test | 14 | Test the BLS12_G2MSM discount gas table in full, by expecting the call to fail for |
test_valid_gas_pairing |
state_test | 1 | Test the BLS12_PAIRING precompile, by expecting the call to succeed for all possible input |
test_invalid_zero_gas_pairing |
state_test | 1 | Test the BLS12_PAIRING precompile calling it with zero gas. |
test_invalid_gas_pairing |
state_test | 1 | Test the BLS12_PAIRING precompile, by expecting the call to fail for all possible input |
test_invalid_zero_length_pairing |
state_test | 1 | Test the BLS12_PAIRING precompile by passing an input with zero length. |
test_invalid_length_pairing |
state_test | 2 | Test the BLS12_PAIRING precompile, by expecting the call to fail for all possible input |