diff --git a/src/ethereum_test_forks/forks/forks.py b/src/ethereum_test_forks/forks/forks.py index 523983ce2c..c3c868fd8d 100644 --- a/src/ethereum_test_forks/forks/forks.py +++ b/src/ethereum_test_forks/forks/forks.py @@ -1133,16 +1133,14 @@ def precompiles(cls, block_number: int = 0, timestamp: int = 0) -> List[Address] At Prague, pre-compile for BLS operations are added: G1ADD = 0x0B - G1MUL = 0x0C - G1MSM = 0x0D - G2ADD = 0x0E - G2MUL = 0x0F - G2MSM = 0x10 - PAIRING = 0x11 - MAP_FP_TO_G1 = 0x12 - MAP_FP2_TO_G2 = 0x13 - """ - return list(Address(i) for i in range(0xB, 0x13 + 1)) + super(Prague, cls).precompiles( + G1MSM = 0x0C + G2ADD = 0x0D + G2MSM = 0x0E + PAIRING = 0x0F + MAP_FP_TO_G1 = 0x10 + MAP_FP2_TO_G2 = 0x11 + """ + return list(Address(i) for i in range(0xB, 0x11 + 1)) + super(Prague, cls).precompiles( block_number, timestamp ) diff --git a/tests/prague/eip2537_bls_12_381_precompiles/spec.py b/tests/prague/eip2537_bls_12_381_precompiles/spec.py index 1e3bc044ba..122dfe50da 100644 --- a/tests/prague/eip2537_bls_12_381_precompiles/spec.py +++ b/tests/prague/eip2537_bls_12_381_precompiles/spec.py @@ -116,14 +116,12 @@ class Spec: # Addresses G1ADD = 0x0B - G1MUL = 0x0C - G1MSM = 0x0D - G2ADD = 0x0E - G2MUL = 0x0F - G2MSM = 0x10 - PAIRING = 0x11 - MAP_FP_TO_G1 = 0x12 - MAP_FP2_TO_G2 = 0x13 + G1MSM = 0x0C + G2ADD = 0x0D + G2MSM = 0x0E + PAIRING = 0x0F + MAP_FP_TO_G1 = 0x10 + MAP_FP2_TO_G2 = 0x11 # Gas constants G1ADD_GAS = 375 @@ -288,10 +286,8 @@ def pairing_gas(input_length: int) -> int: GAS_CALCULATION_FUNCTION_MAP = { Spec.G1ADD: lambda _: Spec.G1ADD_GAS, - Spec.G1MUL: lambda _: Spec.G1MUL_GAS, Spec.G1MSM: msm_gas_func_gen(BLS12Group.G1, len(PointG1() + Scalar()), Spec.G1MUL_GAS), Spec.G2ADD: lambda _: Spec.G2ADD_GAS, - Spec.G2MUL: lambda _: Spec.G2MUL_GAS, Spec.G2MSM: msm_gas_func_gen(BLS12Group.G2, len(PointG2() + Scalar()), Spec.G2MUL_GAS), Spec.PAIRING: pairing_gas, Spec.MAP_FP_TO_G1: lambda _: Spec.MAP_FP_TO_G1_GAS, diff --git a/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g1mul.py b/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g1mul.py index 7744137acd..b2a3277f91 100644 --- a/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g1mul.py +++ b/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g1mul.py @@ -17,7 +17,7 @@ pytestmark = [ pytest.mark.valid_from("Prague"), - pytest.mark.parametrize("precompile_address", [Spec.G1MUL], ids=[""]), + pytest.mark.parametrize("precompile_address", [Spec.G1MSM], ids=[""]), ] diff --git a/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g2mul.py b/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g2mul.py index f1ebe2873d..299d58d308 100644 --- a/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g2mul.py +++ b/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g2mul.py @@ -17,7 +17,7 @@ pytestmark = [ pytest.mark.valid_from("Prague"), - pytest.mark.parametrize("precompile_address", [Spec.G2MUL], ids=[""]), + pytest.mark.parametrize("precompile_address", [Spec.G2MSM], ids=[""]), ] diff --git a/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_precompiles_before_fork.py b/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_precompiles_before_fork.py index cf0d6d7662..130f0c7c70 100644 --- a/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_precompiles_before_fork.py +++ b/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_precompiles_before_fork.py @@ -29,11 +29,6 @@ Spec.INF_G1 + Scalar(0), id="G1MSM", ), - pytest.param( - Spec.G1MUL, - Spec.INF_G1 + Scalar(0), - id="G1MUL", - ), pytest.param( Spec.G2ADD, Spec.INF_G2 + Spec.INF_G2, @@ -44,11 +39,6 @@ Spec.INF_G2 + Scalar(0), id="G2MSM", ), - pytest.param( - Spec.G2MUL, - Spec.INF_G2 + Scalar(0), - id="G2MUL", - ), pytest.param( Spec.PAIRING, Spec.INF_G1 + Spec.INF_G2,