test_invalid_gas_pairing()¶
Documentation for tests/prague/eip2537_bls_12_381_precompiles/test_bls12_variable_length_input_contracts.py::test_invalid_gas_pairing@88e9fb8f.
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::test_invalid_gas_pairing --fork Osaka
Test the BLS12_PAIRING precompile, by expecting the call to fail for all possible input lengths (up to k == PAIRINGS_TO_TEST) because the appropriate amount of gas is not provided.
If any of the calls succeeds, the test will fail.
Source code in tests/prague/eip2537_bls_12_381_precompiles/test_bls12_variable_length_input_contracts.py
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | |
Parametrized Test Cases¶
This test case is only parametrized by fork and fixture format.
| Test ID (Abbreviated) | precompile_gas_list | precompile_data_length_list | precompile_address | expected_output | gas_modifier |
|---|---|---|---|---|---|
| ...fork_Prague-full_discount_table-state_test-precompile_address_15--insufficient_gas | [70300, 102900, 135500, 168100, 200700, 233300, 265900, 298500, 331100, 363700, 396300, 428900, 461500, 494100, 526700, 559300, 591900, 624500, 657100, 689700] | [384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912, 7296, 7680] | 15 | -1 | |
| ...fork_Prague-full_discount_table-blockchain_test_from_state_test-precompile_address_15--insufficient_gas | [70300, 102900, 135500, 168100, 200700, 233300, 265900, 298500, 331100, 363700, 396300, 428900, 461500, 494100, 526700, 559300, 591900, 624500, 657100, 689700] | [384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912, 7296, 7680] | 15 | -1 | |
| ...fork_Osaka-discount_table_1_of_1-state_test-precompile_address_15--insufficient_gas | [70300, 102900, 135500, 168100, 200700, 233300, 265900, 298500, 331100, 363700, 396300, 428900, 461500, 494100, 526700, 559300, 591900, 624500, 657100, 689700] | [384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912, 7296, 7680] | 15 | -1 | |
| ...fork_Osaka-discount_table_1_of_1-blockchain_test_from_state_test-precompile_address_15--insufficient_gas | [70300, 102900, 135500, 168100, 200700, 233300, 265900, 298500, 331100, 363700, 396300, 428900, 461500, 494100, 526700, 559300, 591900, 624500, 657100, 689700] | [384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912, 7296, 7680] | 15 | -1 |