diff --git a/src/ethereum/prague/vm/precompiled_contracts/__init__.py b/src/ethereum/prague/vm/precompiled_contracts/__init__.py index a2b323cab2..8ab92bb0f3 100644 --- a/src/ethereum/prague/vm/precompiled_contracts/__init__.py +++ b/src/ethereum/prague/vm/precompiled_contracts/__init__.py @@ -27,10 +27,8 @@ "BLAKE2F_ADDRESS", "POINT_EVALUATION_ADDRESS", "BLS12_G1_ADD_ADDRESS", - "BLS12_G1_MULTIPLY_ADDRESS", "BLS12_G1_MSM_ADDRESS", "BLS12_G2_ADD_ADDRESS", - "BLS12_G2_MULTIPLY_ADDRESS", "BLS12_G2_MSM_ADDRESS", "BLS12_PAIRING_ADDRESS", "BLS12_MAP_FP_TO_G1_ADDRESS", @@ -48,11 +46,9 @@ BLAKE2F_ADDRESS = hex_to_address("0x09") POINT_EVALUATION_ADDRESS = hex_to_address("0x0a") BLS12_G1_ADD_ADDRESS = hex_to_address("0x0b") -BLS12_G1_MULTIPLY_ADDRESS = hex_to_address("0x0c") -BLS12_G1_MSM_ADDRESS = hex_to_address("0x0d") -BLS12_G2_ADD_ADDRESS = hex_to_address("0x0e") -BLS12_G2_MULTIPLY_ADDRESS = hex_to_address("0x0f") -BLS12_G2_MSM_ADDRESS = hex_to_address("0x10") -BLS12_PAIRING_ADDRESS = hex_to_address("0x11") -BLS12_MAP_FP_TO_G1_ADDRESS = hex_to_address("0x12") -BLS12_MAP_FP2_TO_G2_ADDRESS = hex_to_address("0x13") +BLS12_G1_MSM_ADDRESS = hex_to_address("0x0c") +BLS12_G2_ADD_ADDRESS = hex_to_address("0x0d") +BLS12_G2_MSM_ADDRESS = hex_to_address("0x0e") +BLS12_PAIRING_ADDRESS = hex_to_address("0x0f") +BLS12_MAP_FP_TO_G1_ADDRESS = hex_to_address("0x10") +BLS12_MAP_FP2_TO_G2_ADDRESS = hex_to_address("0x11") diff --git a/src/ethereum/prague/vm/precompiled_contracts/bls12_381/bls12_381_g1.py b/src/ethereum/prague/vm/precompiled_contracts/bls12_381/bls12_381_g1.py index 1474e72a70..2ddd634897 100644 --- a/src/ethereum/prague/vm/precompiled_contracts/bls12_381/bls12_381_g1.py +++ b/src/ethereum/prague/vm/precompiled_contracts/bls12_381/bls12_381_g1.py @@ -65,34 +65,6 @@ def bls12_g1_add(evm: Evm) -> None: evm.output = G1_to_bytes(result) -def bls12_g1_multiply(evm: Evm) -> None: - """ - The bls12_381 G1 multiplication precompile. - - Parameters - ---------- - evm : - The current EVM frame. - - Raises - ------ - InvalidParameter - If the input length is invalid. - """ - data = evm.message.data - if len(data) != LENGTH_PER_PAIR: - raise InvalidParameter("Invalid Input Length") - - # GAS - charge_gas(evm, Uint(12000)) - - # OPERATION - p, m = decode_G1_scalar_pair(data) - result = multiply(p, m) - - evm.output = G1_to_bytes(result) - - def bls12_g1_msm(evm: Evm) -> None: """ The bls12_381 G1 multi-scalar multiplication precompile. diff --git a/src/ethereum/prague/vm/precompiled_contracts/bls12_381/bls12_381_g2.py b/src/ethereum/prague/vm/precompiled_contracts/bls12_381/bls12_381_g2.py index e5dcaede0c..bb147a25ed 100644 --- a/src/ethereum/prague/vm/precompiled_contracts/bls12_381/bls12_381_g2.py +++ b/src/ethereum/prague/vm/precompiled_contracts/bls12_381/bls12_381_g2.py @@ -65,34 +65,6 @@ def bls12_g2_add(evm: Evm) -> None: evm.output = G2_to_bytes(result) -def bls12_g2_multiply(evm: Evm) -> None: - """ - The bls12_381 G2 multiplication precompile. - - Parameters - ---------- - evm : - The current EVM frame. - - Raises - ------ - InvalidParameter - If the input length is invalid. - """ - data = evm.message.data - if len(data) != LENGTH_PER_PAIR: - raise InvalidParameter("Invalid Input Length") - - # GAS - charge_gas(evm, Uint(45000)) - - # OPERATION - p, m = decode_G2_scalar_pair(data) - result = multiply(p, m) - - evm.output = G2_to_bytes(result) - - def bls12_g2_msm(evm: Evm) -> None: """ The bls12_381 G2 multi-scalar multiplication precompile. diff --git a/src/ethereum/prague/vm/precompiled_contracts/mapping.py b/src/ethereum/prague/vm/precompiled_contracts/mapping.py index 155055d49e..3094d8dff2 100644 --- a/src/ethereum/prague/vm/precompiled_contracts/mapping.py +++ b/src/ethereum/prague/vm/precompiled_contracts/mapping.py @@ -21,10 +21,8 @@ BLAKE2F_ADDRESS, BLS12_G1_ADD_ADDRESS, BLS12_G1_MSM_ADDRESS, - BLS12_G1_MULTIPLY_ADDRESS, BLS12_G2_ADD_ADDRESS, BLS12_G2_MSM_ADDRESS, - BLS12_G2_MULTIPLY_ADDRESS, BLS12_MAP_FP2_TO_G2_ADDRESS, BLS12_MAP_FP_TO_G1_ADDRESS, BLS12_PAIRING_ADDRESS, @@ -40,13 +38,11 @@ from .bls12_381.bls12_381_g1 import ( bls12_g1_add, bls12_g1_msm, - bls12_g1_multiply, bls12_map_fp_to_g1, ) from .bls12_381.bls12_381_g2 import ( bls12_g2_add, bls12_g2_msm, - bls12_g2_multiply, bls12_map_fp2_to_g2, ) from .bls12_381.bls12_381_pairing import bls12_pairing @@ -69,10 +65,8 @@ BLAKE2F_ADDRESS: blake2f, POINT_EVALUATION_ADDRESS: point_evaluation, BLS12_G1_ADD_ADDRESS: bls12_g1_add, - BLS12_G1_MULTIPLY_ADDRESS: bls12_g1_multiply, BLS12_G1_MSM_ADDRESS: bls12_g1_msm, BLS12_G2_ADD_ADDRESS: bls12_g2_add, - BLS12_G2_MULTIPLY_ADDRESS: bls12_g2_multiply, BLS12_G2_MSM_ADDRESS: bls12_g2_msm, BLS12_PAIRING_ADDRESS: bls12_pairing, BLS12_MAP_FP_TO_G1_ADDRESS: bls12_map_fp_to_g1,