From 47f7b24a648fc234efcd3639ef96bee351b99d22 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Mon, 5 May 2025 19:48:50 -0300 Subject: [PATCH 01/12] zkevm: add ecrecover attack Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 78 ++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index 107cf428124..4fe0bd28f74 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -10,7 +10,8 @@ import pytest from ethereum_test_forks import Fork -from ethereum_test_tools import Alloc, Block, BlockchainTestFiller, Environment, Transaction +from ethereum_test_tools import (Alloc, Block, BlockchainTestFiller, Bytecode, + Environment, Transaction) from ethereum_test_tools.vm.opcode import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "TODO" @@ -18,13 +19,14 @@ MAX_CODE_SIZE = 24 * 1024 KECCAK_RATE = 136 +ECRECOVER_GAS_COST = 3_000 @pytest.mark.valid_from("Cancun") @pytest.mark.parametrize( "gas_limit", [ - 36_000_000, + Environment().gas_limit, ], ) def test_worst_keccak( @@ -144,24 +146,60 @@ def test_worst_modexp( iter_complexity = exp.bit_length() - 1 gas_cost = math.floor((mul_complexity * iter_complexity) / 3) attack_block = Op.POP(Op.STATICCALL(gas_cost, 0x5, 0, 32 * 6, 0, 0)) + code = code_loop_precompile_call(calldata, attack_block) - # The attack contract is: JUMPDEST + [attack_block]* + PUSH0 + JUMP - jumpdest = Op.JUMPDEST - jump_back = Op.JUMP(len(calldata)) - max_iters_loop = (MAX_CODE_SIZE - len(calldata) - len(jumpdest) - len(jump_back)) // len( - attack_block + code_address = pre.deploy_contract(code=code) + + tx = Transaction( + to=code_address, + gas_limit=gas_limit, + sender=pre.fund_eoa(), ) - code = calldata + jumpdest + sum([attack_block] * max_iters_loop) + jump_back - if len(code) > MAX_CODE_SIZE: - # Must never happen, but keep it as a sanity check. - raise ValueError(f"Code size {len(code)} exceeds maximum code size {MAX_CODE_SIZE}") - code_address = pre.deploy_contract(code=code) + blockchain_test( + env=env, + pre=pre, + post={}, + blocks=[Block(txs=[tx])], + ) + + +@pytest.mark.zkevm +@pytest.mark.valid_from("Cancun") +@pytest.mark.parametrize( + "gas_limit", + [ + Environment().gas_limit, + ], +) +def test_worst_ecrecover( + blockchain_test: BlockchainTestFiller, + pre: Alloc, + fork: Fork, + gas_limit: int, +): + """Test running a block with as many ECRECOVER calls as possible.""" + env = Environment(gas_limit=gas_limit) + + # Calldata + calldata = ( + Op.MSTORE(0 * 32, 0x38D18ACB67D25C8BB9942764B62F18E17054F66A817BD4295423ADF9ED98873E) + + Op.MSTORE(1 * 32, 27) + + Op.MSTORE(2 * 32, 0x38D18ACB67D25C8BB9942764B62F18E17054F66A817BD4295423ADF9ED98873E) + + Op.MSTORE(3 * 32, 0x789D1DD423D25F0772D2748D60F7E4B81BB14D086EBA8E8E8EFB6DCFF8A4AE02) + ) + + attack_block = Op.STATICCALL(ECRECOVER_GAS_COST, 0x1, 0, 32 * 4, 0, 0) + Op.POP + code = code_loop_precompile_call(calldata, attack_block) + code_address = pre.deploy_contract(code=bytes(code)) tx = Transaction( to=code_address, gas_limit=gas_limit, + gas_price=10, sender=pre.fund_eoa(), + data=[], + value=0, ) blockchain_test( @@ -170,3 +208,19 @@ def test_worst_modexp( post={}, blocks=[Block(txs=[tx])], ) + + +def code_loop_precompile_call(calldata: Bytecode, attack_block: Bytecode): + """Create a code loop that calls a precompile with the given calldata.""" + # The attack contract is: JUMPDEST + [attack_block]* + PUSH0 + JUMP + jumpdest = Op.JUMPDEST + jump_back = Op.JUMP(len(calldata)) + max_iters_loop = (MAX_CODE_SIZE - len(calldata) - len(jumpdest) - len(jump_back)) // len( + attack_block + ) + code = calldata + jumpdest + sum([attack_block] * max_iters_loop) + jump_back + if len(code) > MAX_CODE_SIZE: + # Must never happen, but keep it as a sanity check. + raise ValueError(f"Code size {len(code)} exceeds maximum code size {MAX_CODE_SIZE}") + + return code From a47f8001446ca38c48176b623bad757d0ae0df42 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Mon, 5 May 2025 19:49:17 -0300 Subject: [PATCH 02/12] lints Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index 4fe0bd28f74..ad0fcb75962 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -10,8 +10,14 @@ import pytest from ethereum_test_forks import Fork -from ethereum_test_tools import (Alloc, Block, BlockchainTestFiller, Bytecode, - Environment, Transaction) +from ethereum_test_tools import ( + Alloc, + Block, + BlockchainTestFiller, + Bytecode, + Environment, + Transaction, +) from ethereum_test_tools.vm.opcode import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "TODO" From 9c9a63ff03c1a44a5f251af571b736ab43e96311 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Mon, 5 May 2025 21:02:08 -0300 Subject: [PATCH 03/12] fix gas limits Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_bytecode.py | 14 +++----------- tests/zkevm/test_worst_compute.py | 4 ++-- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/zkevm/test_worst_bytecode.py b/tests/zkevm/test_worst_bytecode.py index 99dbd7644ba..644876748a2 100644 --- a/tests/zkevm/test_worst_bytecode.py +++ b/tests/zkevm/test_worst_bytecode.py @@ -10,17 +10,9 @@ import pytest from ethereum_test_forks import Fork -from ethereum_test_tools import ( - Account, - Alloc, - Block, - BlockchainTestFiller, - Environment, - Hash, - Transaction, - While, - compute_create2_address, -) +from ethereum_test_tools import (Account, Alloc, Block, BlockchainTestFiller, + Environment, Hash, Transaction, While, + compute_create2_address) from ethereum_test_tools.vm.opcode import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "TODO" diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index ad0fcb75962..cbebab7aa7b 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -195,7 +195,7 @@ def test_worst_ecrecover( + Op.MSTORE(3 * 32, 0x789D1DD423D25F0772D2748D60F7E4B81BB14D086EBA8E8E8EFB6DCFF8A4AE02) ) - attack_block = Op.STATICCALL(ECRECOVER_GAS_COST, 0x1, 0, 32 * 4, 0, 0) + Op.POP + attack_block = Op.POP(Op.STATICCALL(ECRECOVER_GAS_COST, 0x1, 0, 32 * 4, 0, 0)) code = code_loop_precompile_call(calldata, attack_block) code_address = pre.deploy_contract(code=bytes(code)) @@ -218,7 +218,7 @@ def test_worst_ecrecover( def code_loop_precompile_call(calldata: Bytecode, attack_block: Bytecode): """Create a code loop that calls a precompile with the given calldata.""" - # The attack contract is: JUMPDEST + [attack_block]* + PUSH0 + JUMP + # The attack contract is: CALLDATA_PREP + #JUMPDEST + [attack_block]* + JUMP(#) jumpdest = Op.JUMPDEST jump_back = Op.JUMP(len(calldata)) max_iters_loop = (MAX_CODE_SIZE - len(calldata) - len(jumpdest) - len(jump_back)) // len( From 024b8a9ae3cfc80a12aa9282bdfdfb3c3fdcf7df Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Mon, 5 May 2025 22:49:43 -0300 Subject: [PATCH 04/12] generic precompiles with only data parameter Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 89 +++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index cbebab7aa7b..635204faa65 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -11,6 +11,7 @@ from ethereum_test_forks import Fork from ethereum_test_tools import ( + Address, Alloc, Block, BlockchainTestFiller, @@ -113,6 +114,94 @@ def test_worst_keccak( ) +@pytest.mark.zkevm +@pytest.mark.valid_from("Cancun") +@pytest.mark.parametrize( + "gas_limit", + [ + Environment().gas_limit, + ], +) +@pytest.mark.parametrize( + "address,static_cost,per_word_dynamic_cost,bytes_per_unit_of_work", + [ + pytest.param(0x02, 60, 12, 64, id="SHA2-256"), + pytest.param(0x03, 600, 120, 64, id="RIPEMD-160"), + pytest.param(0x04, 15, 3, 1, id="IDENTITY"), + ], +) +def test_worst_precompile_only_data_input( + blockchain_test: BlockchainTestFiller, + pre: Alloc, + fork: Fork, + gas_limit: int, + address: Address, + static_cost: int, + per_word_dynamic_cost: int, + bytes_per_unit_of_work: int, +): + """Test running a block with as many precompile calls which have a single `data` input.""" + env = Environment(gas_limit=gas_limit) + + # Intrinsic gas cost is paid once. + intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() + available_gas = gas_limit - intrinsic_gas_calculator() + + gsc = fork.gas_costs() + mem_exp_gas_calculator = fork.memory_expansion_gas_calculator() + + # Discover the optimal input size to maximize precompile calls, not precompile permutations. + max_work = 0 + optimal_input_length = 0 + for input_length in range(1, 1_000_000, 32): + staticcall_parameters_gas = ( + gsc.G_BASE # PUSH0 = arg offset + + gsc.G_BASE # PUSH0 = arg size + + gsc.G_BASE # PUSH0 = arg size + + gsc.G_VERY_LOW # PUSH0 = arg offset + + gsc.G_VERY_LOW # PUSHN = address + + gsc.G_BASE # GAS + ) + iteration_gas_cost = ( + staticcall_parameters_gas + + +static_cost # Precompile static cost + + math.ceil(input_length / 32) * per_word_dynamic_cost # Precompile dynamic cost + + gsc.G_BASE # POP + ) + # From the available gas, we substract the mem expansion costs considering we know the + # current input size length. + available_gas_after_expansion = max( + 0, available_gas - mem_exp_gas_calculator(new_bytes=input_length) + ) + # Calculate how many calls we can do. + num_calls = available_gas_after_expansion // iteration_gas_cost + total_work = num_calls * math.ceil(input_length / bytes_per_unit_of_work) + + # If we found an input size that is better (reg permutations/gas), then save it. + if total_work > max_work: + max_work = total_work + optimal_input_length = input_length + + calldata = Op.CODECOPY(0, 0, optimal_input_length) + attack_block = Op.POP(Op.STATICCALL(Op.GAS, address, 0, optimal_input_length, 0, 0)) + code = code_loop_precompile_call(calldata, attack_block) + + code_address = pre.deploy_contract(code=code) + + tx = Transaction( + to=code_address, + gas_limit=gas_limit, + sender=pre.fund_eoa(), + ) + + blockchain_test( + env=env, + pre=pre, + post={}, + blocks=[Block(txs=[tx])], + ) + + @pytest.mark.zkevm @pytest.mark.valid_from("Cancun") @pytest.mark.parametrize( From 27d036cca33d095cec97b39958e7db186ed7f572 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Tue, 6 May 2025 10:35:16 -0300 Subject: [PATCH 05/12] remove zkevm marks Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index 635204faa65..017a2a99c5b 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -10,15 +10,8 @@ import pytest from ethereum_test_forks import Fork -from ethereum_test_tools import ( - Address, - Alloc, - Block, - BlockchainTestFiller, - Bytecode, - Environment, - Transaction, -) +from ethereum_test_tools import (Address, Alloc, Block, BlockchainTestFiller, + Bytecode, Environment, Transaction) from ethereum_test_tools.vm.opcode import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "TODO" @@ -114,7 +107,6 @@ def test_worst_keccak( ) -@pytest.mark.zkevm @pytest.mark.valid_from("Cancun") @pytest.mark.parametrize( "gas_limit", @@ -202,7 +194,6 @@ def test_worst_precompile_only_data_input( ) -@pytest.mark.zkevm @pytest.mark.valid_from("Cancun") @pytest.mark.parametrize( "gas_limit", @@ -259,7 +250,6 @@ def test_worst_modexp( ) -@pytest.mark.zkevm @pytest.mark.valid_from("Cancun") @pytest.mark.parametrize( "gas_limit", From 97de8f5db6d4cb4206dc20e564fbc9fc3ef9a5d1 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Tue, 6 May 2025 10:53:21 -0300 Subject: [PATCH 06/12] lints Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index 017a2a99c5b..a752c714b3b 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -10,8 +10,15 @@ import pytest from ethereum_test_forks import Fork -from ethereum_test_tools import (Address, Alloc, Block, BlockchainTestFiller, - Bytecode, Environment, Transaction) +from ethereum_test_tools import ( + Address, + Alloc, + Block, + BlockchainTestFiller, + Bytecode, + Environment, + Transaction, +) from ethereum_test_tools.vm.opcode import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "TODO" From 9838111f0b13d2257486f30390a45dba27c2f4a8 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Thu, 15 May 2025 08:57:31 -0300 Subject: [PATCH 07/12] lints Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_bytecode.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/zkevm/test_worst_bytecode.py b/tests/zkevm/test_worst_bytecode.py index 644876748a2..99dbd7644ba 100644 --- a/tests/zkevm/test_worst_bytecode.py +++ b/tests/zkevm/test_worst_bytecode.py @@ -10,9 +10,17 @@ import pytest from ethereum_test_forks import Fork -from ethereum_test_tools import (Account, Alloc, Block, BlockchainTestFiller, - Environment, Hash, Transaction, While, - compute_create2_address) +from ethereum_test_tools import ( + Account, + Alloc, + Block, + BlockchainTestFiller, + Environment, + Hash, + Transaction, + While, + compute_create2_address, +) from ethereum_test_tools.vm.opcode import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "TODO" From 71db03a706c27b3f1b9831b2513e32f3a64fd48b Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Thu, 15 May 2025 09:03:09 -0300 Subject: [PATCH 08/12] cleanups Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 48 +++++++------------------------ 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index a752c714b3b..f98c3ccebe8 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -30,24 +30,17 @@ @pytest.mark.valid_from("Cancun") -@pytest.mark.parametrize( - "gas_limit", - [ - Environment().gas_limit, - ], -) def test_worst_keccak( blockchain_test: BlockchainTestFiller, pre: Alloc, fork: Fork, - gas_limit: int, ): """Test running a block with as many KECCAK256 permutations as possible.""" - env = Environment(gas_limit=gas_limit) + env = Environment() # Intrinsic gas cost is paid once. intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() - available_gas = gas_limit - intrinsic_gas_calculator() + available_gas = env.gas_limit - intrinsic_gas_calculator() gsc = fork.gas_costs() mem_exp_gas_calculator = fork.memory_expansion_gas_calculator() @@ -99,7 +92,7 @@ def test_worst_keccak( tx = Transaction( to=code_address, - gas_limit=gas_limit, + gas_limit=env.gas_limit, gas_price=10, sender=pre.fund_eoa(), data=[], @@ -115,12 +108,6 @@ def test_worst_keccak( @pytest.mark.valid_from("Cancun") -@pytest.mark.parametrize( - "gas_limit", - [ - Environment().gas_limit, - ], -) @pytest.mark.parametrize( "address,static_cost,per_word_dynamic_cost,bytes_per_unit_of_work", [ @@ -133,18 +120,17 @@ def test_worst_precompile_only_data_input( blockchain_test: BlockchainTestFiller, pre: Alloc, fork: Fork, - gas_limit: int, address: Address, static_cost: int, per_word_dynamic_cost: int, bytes_per_unit_of_work: int, ): """Test running a block with as many precompile calls which have a single `data` input.""" - env = Environment(gas_limit=gas_limit) + env = Environment() # Intrinsic gas cost is paid once. intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() - available_gas = gas_limit - intrinsic_gas_calculator() + available_gas = env.gas_limit - intrinsic_gas_calculator() gsc = fork.gas_costs() mem_exp_gas_calculator = fork.memory_expansion_gas_calculator() @@ -189,7 +175,7 @@ def test_worst_precompile_only_data_input( tx = Transaction( to=code_address, - gas_limit=gas_limit, + gas_limit=env.gas_limit, sender=pre.fund_eoa(), ) @@ -202,20 +188,13 @@ def test_worst_precompile_only_data_input( @pytest.mark.valid_from("Cancun") -@pytest.mark.parametrize( - "gas_limit", - [ - Environment().gas_limit, - ], -) def test_worst_modexp( blockchain_test: BlockchainTestFiller, pre: Alloc, fork: Fork, - gas_limit: int, ): """Test running a block with as many MODEXP calls as possible.""" - env = Environment(gas_limit=gas_limit) + env = Environment() base_mod_length = 32 exp_length = 32 @@ -245,7 +224,7 @@ def test_worst_modexp( tx = Transaction( to=code_address, - gas_limit=gas_limit, + gas_limit=env.gas_limit, sender=pre.fund_eoa(), ) @@ -258,20 +237,13 @@ def test_worst_modexp( @pytest.mark.valid_from("Cancun") -@pytest.mark.parametrize( - "gas_limit", - [ - Environment().gas_limit, - ], -) def test_worst_ecrecover( blockchain_test: BlockchainTestFiller, pre: Alloc, fork: Fork, - gas_limit: int, ): """Test running a block with as many ECRECOVER calls as possible.""" - env = Environment(gas_limit=gas_limit) + env = Environment() # Calldata calldata = ( @@ -287,7 +259,7 @@ def test_worst_ecrecover( tx = Transaction( to=code_address, - gas_limit=gas_limit, + gas_limit=env.gas_limit, gas_price=10, sender=pre.fund_eoa(), data=[], From eaaff2135a74378224eb83234c456d1bed264745 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Thu, 15 May 2025 09:10:15 -0300 Subject: [PATCH 09/12] variable rename Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index f98c3ccebe8..b09d8547d16 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -139,7 +139,7 @@ def test_worst_precompile_only_data_input( max_work = 0 optimal_input_length = 0 for input_length in range(1, 1_000_000, 32): - staticcall_parameters_gas = ( + parameters_gas = ( gsc.G_BASE # PUSH0 = arg offset + gsc.G_BASE # PUSH0 = arg size + gsc.G_BASE # PUSH0 = arg size @@ -148,7 +148,7 @@ def test_worst_precompile_only_data_input( + gsc.G_BASE # GAS ) iteration_gas_cost = ( - staticcall_parameters_gas + parameters_gas + +static_cost # Precompile static cost + math.ceil(input_length / 32) * per_word_dynamic_cost # Precompile dynamic cost + gsc.G_BASE # POP From 48fb3d24d20dc76273e6405837f3e199989bfc6f Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Thu, 15 May 2025 11:22:04 -0300 Subject: [PATCH 10/12] fix comment Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index b09d8547d16..d3aa4c46ceb 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -10,15 +10,8 @@ import pytest from ethereum_test_forks import Fork -from ethereum_test_tools import ( - Address, - Alloc, - Block, - BlockchainTestFiller, - Bytecode, - Environment, - Transaction, -) +from ethereum_test_tools import (Address, Alloc, Block, BlockchainTestFiller, + Bytecode, Environment, Transaction) from ethereum_test_tools.vm.opcode import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "TODO" @@ -135,7 +128,7 @@ def test_worst_precompile_only_data_input( gsc = fork.gas_costs() mem_exp_gas_calculator = fork.memory_expansion_gas_calculator() - # Discover the optimal input size to maximize precompile calls, not precompile permutations. + # Discover the optimal input size to maximize precompile work, not precompile calls. max_work = 0 optimal_input_length = 0 for input_length in range(1, 1_000_000, 32): From 328b7f49f56e0a1b05d915f4e6a918e8391d22db Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Thu, 15 May 2025 11:55:56 -0300 Subject: [PATCH 11/12] lints Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index d3aa4c46ceb..f0e0fcec55e 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -10,8 +10,15 @@ import pytest from ethereum_test_forks import Fork -from ethereum_test_tools import (Address, Alloc, Block, BlockchainTestFiller, - Bytecode, Environment, Transaction) +from ethereum_test_tools import ( + Address, + Alloc, + Block, + BlockchainTestFiller, + Bytecode, + Environment, + Transaction, +) from ethereum_test_tools.vm.opcode import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "TODO" From e6f84ef897e04400f34b6c73f3a291e1ebe7d3b5 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Fri, 16 May 2025 12:42:59 -0300 Subject: [PATCH 12/12] review feedback Signed-off-by: Ignacio Hagopian --- tests/zkevm/test_worst_compute.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/zkevm/test_worst_compute.py b/tests/zkevm/test_worst_compute.py index f0e0fcec55e..bd8a695f881 100644 --- a/tests/zkevm/test_worst_compute.py +++ b/tests/zkevm/test_worst_compute.py @@ -93,10 +93,7 @@ def test_worst_keccak( tx = Transaction( to=code_address, gas_limit=env.gas_limit, - gas_price=10, sender=pre.fund_eoa(), - data=[], - value=0, ) blockchain_test( @@ -260,10 +257,7 @@ def test_worst_ecrecover( tx = Transaction( to=code_address, gas_limit=env.gas_limit, - gas_price=10, sender=pre.fund_eoa(), - data=[], - value=0, ) blockchain_test(