test_invalid_length_pairing()¶
Documentation for tests/prague/eip2537_bls_12_381_precompiles/test_bls12_variable_length_input_contracts.py::test_invalid_length_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_length_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 incorrect input length was used.
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
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | |
Parametrized Test Cases¶
The interactive table below is also available as a standalone page.
| Test ID (Abbreviated) | precompile_gas_list | precompile_data_length_list | precompile_address | expected_output | input_length_modifier |
|---|---|---|---|---|---|
| ...fork_Prague-full_discount_table-state_test-precompile_address_15--input_one_byte_too_short | [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-state_test-precompile_address_15--input_one_byte_too_long | [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--input_one_byte_too_short | [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--input_one_byte_too_long | [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--input_one_byte_too_short | [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--input_one_byte_too_long | [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--input_one_byte_too_short | [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--input_one_byte_too_long | [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 |