| @pytest.mark.parametrize( |
| "z,y,kzg_commitment,kzg_proof,versioned_hash", |
| [ |
| (BLS_MODULUS, 0, INF_POINT, INF_POINT, auto), |
| (0, BLS_MODULUS, INF_POINT, INF_POINT, auto), |
| (Z, 0, INF_POINT, INF_POINT[:-1], auto), |
| (Z, 0, INF_POINT, INF_POINT[0:1], auto), |
| (Z, 0, INF_POINT, INF_POINT + bytes([0]), auto), |
| (Z, 0, INF_POINT, INF_POINT + bytes([0] * 1023), auto), |
| (bytes(), bytes(), bytes(), bytes(), bytes()), |
| (0, 0, 0, 0, 0), |
| (0, 0, 0, 0, auto), |
| (Z, 0, INF_POINT, INF_POINT, kzg_to_versioned_hash(0xC0 << 376, 0x00)), |
| (Z, 0, INF_POINT, INF_POINT, kzg_to_versioned_hash(0xC0 << 376, 0x02)), |
| (Z, 0, INF_POINT, INF_POINT, kzg_to_versioned_hash(0xC0 << 376, 0xFF)), |
| ], |
| ids=[ |
| "out_of_bounds_z", |
| "out_of_bounds_y", |
| "correct_proof_1_input_too_short", |
| "correct_proof_1_input_too_short_2", |
| "correct_proof_1_input_too_long", |
| "correct_proof_1_input_extra_long", |
| "null_inputs", |
| "zeros_inputs", |
| "zeros_inputs_correct_versioned_hash", |
| "correct_proof_1_incorrect_versioned_hash_version_0x00", |
| "correct_proof_1_incorrect_versioned_hash_version_0x02", |
| "correct_proof_1_incorrect_versioned_hash_version_0xff", |
| ], |
| ) |
| @pytest.mark.parametrize("success", [False]) |
| @pytest.mark.valid_from("Cancun") |
| def test_invalid_precompile_calls( |
| blockchain_test: BlockchainTestFiller, |
| pre: Dict, |
| tx: Transaction, |
| post: Dict, |
| ): |