From 2f56dfc2f178549bb782e59a7aa86d9f631e1526 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 28 May 2026 19:43:31 -0600 Subject: [PATCH 01/46] feat(test-specs): Allow implicit gas-limit --- .../plugins/filler/tests/test_filler.py | 10 +++--- .../filler/tests/test_verify_sync_marker.py | 6 ++-- .../fixtures/tests/test_base.py | 2 ++ .../fixtures/tests/test_blockchain.py | 35 +++++++++++++++---- .../src/execution_testing/specs/blockchain.py | 25 ++++++++++++- .../src/execution_testing/specs/state.py | 13 +++++-- .../specs/tests/test_transaction.py | 2 +- .../test_types/tests/test_transactions.py | 11 ++++++ .../test_types/tests/test_types.py | 12 +++++-- .../test_types/transaction_types.py | 11 ++++-- 10 files changed, 104 insertions(+), 23 deletions(-) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/tests/test_filler.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/tests/test_filler.py index 73e97d70f62..29f8d06f939 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/tests/test_filler.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/tests/test_filler.py @@ -58,13 +58,13 @@ def count_keys_in_fixture(file_path: Path) -> int: # noqa: D103 @pytest.mark.valid_until("Shanghai") def test_paris_one(state_test) -> None: state_test(env=Environment(), - pre={TestAddress: Account(balance=1_000_000)}, post={}, tx=Transaction()) + pre={TestAddress: Account(balance=1_000_000)}, post={}, tx=Transaction(gas_limit=0x5208)) @pytest.mark.valid_from("Paris") @pytest.mark.valid_until("Shanghai") def test_paris_two(state_test) -> None: state_test(env=Environment(), - pre={TestAddress: Account(balance=1_000_000)}, post={}, tx=Transaction()) + pre={TestAddress: Account(balance=1_000_000)}, post={}, tx=Transaction(gas_limit=0x5208)) """ ) test_count_paris = 4 @@ -79,14 +79,14 @@ def test_paris_two(state_test) -> None: @pytest.mark.valid_until("Shanghai") def test_shanghai_one(state_test) -> None: state_test(env=Environment(), - pre={TestAddress: Account(balance=1_000_000)}, post={}, tx=Transaction()) + pre={TestAddress: Account(balance=1_000_000)}, post={}, tx=Transaction(gas_limit=0x5208)) @pytest.mark.parametrize("x", [1, 2, 3]) @pytest.mark.valid_from("Paris") @pytest.mark.valid_until("Shanghai") def test_shanghai_two(state_test, x) -> None: state_test(env=Environment(), - pre={TestAddress: Account(balance=1_000_000)}, post={}, tx=Transaction()) + pre={TestAddress: Account(balance=1_000_000)}, post={}, tx=Transaction(gas_limit=0x5208)) """ ) @@ -988,7 +988,7 @@ def test_benchmark_one(state_test) -> None: env=Environment(), pre={TestAddress: Account(balance=1_000_000)}, post={}, - tx=Transaction(), + tx=Transaction(gas_limit=0x5208), ) """ ) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/tests/test_verify_sync_marker.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/tests/test_verify_sync_marker.py index 4e4fff33402..15b44ac53e5 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/tests/test_verify_sync_marker.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/tests/test_verify_sync_marker.py @@ -23,7 +23,7 @@ def test_verify_sync_default(blockchain_test) -> None: blockchain_test( pre={TestAddress: TEST_ADDRESS}, post={}, - blocks=[Block(txs=[Transaction()])] + blocks=[Block(txs=[Transaction(gas_limit=0x5208)])] ) @@ -33,7 +33,7 @@ def test_verify_sync_with_marker(blockchain_test) -> None: blockchain_test( pre={TestAddress: TEST_ADDRESS}, post={}, - blocks=[Block(txs=[Transaction()])] + blocks=[Block(txs=[Transaction(gas_limit=0x5208)])] ) @pytest.mark.valid_at("Cancun") @@ -52,7 +52,7 @@ def test_verify_sync_with_param_marks(blockchain_test, has_exception) -> None: post={}, blocks=[ Block( - txs=[Transaction()], + txs=[Transaction(gas_limit=0x5208)], rlp_modifier=Header(gas_limit=0) if has_exception else None, exception=BlockException.INCORRECT_BLOCK_FORMAT if has_exception else None, ) diff --git a/packages/testing/src/execution_testing/fixtures/tests/test_base.py b/packages/testing/src/execution_testing/fixtures/tests/test_base.py index b14ccc7d2a2..a05dd2210d2 100644 --- a/packages/testing/src/execution_testing/fixtures/tests/test_base.py +++ b/packages/testing/src/execution_testing/fixtures/tests/test_base.py @@ -98,6 +98,7 @@ def test_json_dict() -> None: ), transactions=[ Transaction( + gas_limit=0x5208, max_fee_per_gas=7, ).with_signature_and_sender(), ], @@ -133,6 +134,7 @@ def test_json_dict() -> None: ), transactions=[ Transaction( + gas_limit=0x5208, max_fee_per_gas=7, ).with_signature_and_sender(), ], diff --git a/packages/testing/src/execution_testing/fixtures/tests/test_blockchain.py b/packages/testing/src/execution_testing/fixtures/tests/test_blockchain.py index 445222f0369..6e398deadce 100644 --- a/packages/testing/src/execution_testing/fixtures/tests/test_blockchain.py +++ b/packages/testing/src/execution_testing/fixtures/tests/test_blockchain.py @@ -78,7 +78,7 @@ pytest.param( True, FixtureTransaction.from_transaction( - Transaction().with_signature_and_sender() + Transaction(gas_limit=0x5208).with_signature_and_sender() ), { "type": "0x00", @@ -99,7 +99,10 @@ pytest.param( True, FixtureTransaction.from_transaction( - Transaction(to=None).with_signature_and_sender() + Transaction( + to=None, + gas_limit=0x5208, + ).with_signature_and_sender() ), { "type": "0x00", @@ -120,7 +123,7 @@ pytest.param( True, FixtureTransaction.from_transaction( - Transaction(ty=1).with_signature_and_sender() + Transaction(ty=1, gas_limit=0x5208).with_signature_and_sender() ), { "type": "0x01", @@ -143,7 +146,7 @@ True, FixtureTransaction.from_transaction( Transaction( - ty=2, max_fee_per_gas=7 + ty=2, max_fee_per_gas=7, gas_limit=0x5208 ).with_signature_and_sender() ), { @@ -172,6 +175,7 @@ max_fee_per_gas=7, max_fee_per_blob_gas=1, blob_versioned_hashes=[], + gas_limit=0x5208, ).with_signature_and_sender() ), { @@ -208,6 +212,7 @@ signer=EOA(key=TestPrivateKey), ) ], + gas_limit=0x5208, ).with_signature_and_sender() ), { @@ -256,6 +261,7 @@ max_fee_per_gas=20, max_fee_per_blob_gas=30, blob_versioned_hashes=[0, 1], + gas_limit=0x5208, ).with_signature_and_sender() ), { @@ -401,7 +407,9 @@ ), txs=[ FixtureTransaction.from_transaction( - Transaction().with_signature_and_sender() + Transaction( + gas_limit=0x5208 + ).with_signature_and_sender() ) ], ), @@ -475,7 +483,10 @@ ), txs=[ FixtureTransaction.from_transaction( - Transaction(to=None).with_signature_and_sender() + Transaction( + to=None, + gas_limit=0x5208, + ).with_signature_and_sender() ) ], ), @@ -615,6 +626,7 @@ max_fee_per_gas=20, max_fee_per_blob_gas=30, blob_versioned_hashes=[0, 1], + gas_limit=0x5208, ).with_signature_and_sender(), ], withdrawals=[ @@ -642,6 +654,7 @@ "transactions": [ Transaction( to=0x1234, +gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -701,6 +714,7 @@ transactions=[ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -767,6 +781,7 @@ "transactions": [ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -861,6 +876,7 @@ transactions=[ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -926,6 +942,7 @@ "transactions": [ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -1209,6 +1226,7 @@ def test_json_deserialization( transactions=[ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -1253,6 +1271,7 @@ def test_json_deserialization( "transactions": [ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -1312,6 +1331,7 @@ def test_json_deserialization( transactions=[ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -1358,6 +1378,7 @@ def test_json_deserialization( "transactions": [ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -1419,6 +1440,7 @@ def test_json_deserialization( transactions=[ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -1484,6 +1506,7 @@ def test_json_deserialization( "transactions": [ Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index 343c224dc1e..b28c7843536 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -823,7 +823,30 @@ def generate_block_data( block_number=env.number, timestamp=env.timestamp ) env = env.set_fork_requirements(fork) - txs = [tx.with_signature_and_sender() for tx in block.txs] + txs = block.txs[:] + if any(tx.gas_limit is None for tx in block.txs): + available_gas = env.gas_limit + tx_unset_gas_limit_count = 0 + for tx in block.txs: + if tx.gas_limit is None: + tx_unset_gas_limit_count += 1 + else: + available_gas -= tx.gas_limit + if available_gas <= 0: + raise Exception( + "test correctness: unable to automatically calculate gas " + "limit for transactions (No remaining gas)." + ) + max_gas_limit = available_gas // tx_unset_gas_limit_count + tx_gas_limit_cap = fork.transaction_gas_limit_cap() + if fork.is_eip_enabled(8037): + tx_gas_limit_cap = None + if tx_gas_limit_cap: + max_gas_limit = min(max_gas_limit, tx_gas_limit_cap) + for i in range(len(txs)): + if txs[i].gas_limit is None: + txs[i] = txs[i].with_gas_limit(max_gas_limit) + txs = [tx.with_signature_and_sender() for tx in txs] if failing_tx_count := len([tx for tx in txs if tx.error]) > 0: if failing_tx_count > 1: diff --git a/packages/testing/src/execution_testing/specs/state.py b/packages/testing/src/execution_testing/specs/state.py index b0c456a3590..acbad117025 100644 --- a/packages/testing/src/execution_testing/specs/state.py +++ b/packages/testing/src/execution_testing/specs/state.py @@ -356,7 +356,14 @@ def make_state_test_fixture( ) env = self.env.set_fork_requirements(fork) - tx = self.tx.with_signature_and_sender(keep_secret_key=True) + tx = self.tx + if tx.gas_limit is None: + tx_gas_limit_cap = fork.transaction_gas_limit_cap() + if fork.is_eip_enabled(8037): + tx_gas_limit_cap = None + gas_limit = tx_gas_limit_cap if tx_gas_limit_cap else env.gas_limit + tx = tx.with_gas_limit(gas_limit) + tx = tx.with_signature_and_sender(keep_secret_key=True) pre_alloc = Alloc.merge( Alloc.model_validate(fork.pre_allocation()), self.pre, @@ -420,13 +427,13 @@ def make_state_test_fixture( base_tool_result=base_tool_result, base_tool_alloc=base_tool_alloc, fork=fork, - current_gas_limit=self.tx.gas_limit - 1, + current_gas_limit=tx.gas_limit - 1, pre_alloc=pre_alloc, env=env, ignore_gas_differences=ignore_gas_differences, ): minimum_gas_limit = 0 - maximum_gas_limit = int(self.tx.gas_limit) + maximum_gas_limit = int(tx.gas_limit) while minimum_gas_limit < maximum_gas_limit: current_gas_limit = ( maximum_gas_limit + minimum_gas_limit diff --git a/packages/testing/src/execution_testing/specs/tests/test_transaction.py b/packages/testing/src/execution_testing/specs/tests/test_transaction.py index abc58a3421a..95df5252d04 100644 --- a/packages/testing/src/execution_testing/specs/tests/test_transaction.py +++ b/packages/testing/src/execution_testing/specs/tests/test_transaction.py @@ -20,7 +20,7 @@ @pytest.mark.parametrize( "name, tx, fork", [ - pytest.param("simple_type_0", Transaction(), Shanghai), + pytest.param("simple_type_0", Transaction(gas_limit=0x5208), Shanghai), ], ) def test_transaction_test_filling( diff --git a/packages/testing/src/execution_testing/test_types/tests/test_transactions.py b/packages/testing/src/execution_testing/test_types/tests/test_transactions.py index 156b6cea65c..bb1b579b38a 100644 --- a/packages/testing/src/execution_testing/test_types/tests/test_transactions.py +++ b/packages/testing/src/execution_testing/test_types/tests/test_transactions.py @@ -20,6 +20,7 @@ ( Transaction( ty=0, + gas_limit=21000, nonce=0, gas_price=1000000000, protected=False, @@ -37,6 +38,7 @@ ( Transaction( ty=0, + gas_limit=21000, nonce=0, gas_price=1000000000, protected=False, @@ -55,6 +57,7 @@ ( Transaction( ty=0, + gas_limit=21000, nonce=0, gas_price=1000000000, protected=True, @@ -72,6 +75,7 @@ ( Transaction( ty=1, + gas_limit=21000, nonce=0, gas_price=1000000000, ), @@ -88,6 +92,7 @@ ( Transaction( ty=1, + gas_limit=21000, nonce=0, gas_price=1000000000, access_list=[], @@ -105,6 +110,7 @@ ( Transaction( ty=1, + gas_limit=21000, nonce=0, gas_price=1000000000, access_list=[ @@ -129,6 +135,7 @@ ( Transaction( ty=1, + gas_limit=21000, nonce=0, gas_price=1000000000, to=None, @@ -151,6 +158,7 @@ ( Transaction( ty=2, + gas_limit=21000, nonce=0, access_list=[ AccessList(address=0x123, storage_keys=[0x456, 0x789]) @@ -173,6 +181,7 @@ ( Transaction( ty=2, + gas_limit=21000, nonce=0, to=None, access_list=[ @@ -196,6 +205,7 @@ ( Transaction( ty=3, + gas_limit=21000, nonce=0, access_list=[ AccessList(address=0x123, storage_keys=[0x456, 0x789]) @@ -220,6 +230,7 @@ ( Transaction( ty=3, + gas_limit=21000, nonce=0, access_list=[ AccessList(address=0x123, storage_keys=[0x456, 0x789]) diff --git a/packages/testing/src/execution_testing/test_types/tests/test_types.py b/packages/testing/src/execution_testing/test_types/tests/test_types.py index 4770b941a61..3abe5dce247 100644 --- a/packages/testing/src/execution_testing/test_types/tests/test_types.py +++ b/packages/testing/src/execution_testing/test_types/tests/test_types.py @@ -573,7 +573,7 @@ def test_account_merge( ), pytest.param( True, - Transaction().with_signature_and_sender(), + Transaction(gas_limit=0x5208).with_signature_and_sender(), { "type": "0x0", "chainId": "0x1", @@ -594,6 +594,7 @@ def test_account_merge( True, Transaction( to=None, + gas_limit=0x5208, ).with_signature_and_sender(), { "type": "0x0", @@ -615,6 +616,7 @@ def test_account_merge( True, Transaction( to="", + gas_limit=0x5208, ).with_signature_and_sender(), { "type": "0x0", @@ -636,6 +638,7 @@ def test_account_merge( True, Transaction( to=0x1234, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( @@ -952,7 +955,7 @@ def test_model_copy(model: CopyValidateModel) -> None: "value, expected", [ pytest.param( - Transaction().with_signature_and_sender(), + Transaction(gas_limit=0x5208).with_signature_and_sender(), Bytes( "0xf85f800a8252089400000000000000000000000000000000000000aa808026a0cc61d852649c34" "cc0b71803115f38036ace257d2914f087bf885e6806a664fbda02020cb35f5d7731ab540d6261450" @@ -962,6 +965,7 @@ def test_model_copy(model: CopyValidateModel) -> None: ), pytest.param( Transaction( + gas_limit=0x5208, access_list=[AccessList(address=0, storage_keys=[0, 1])], ).with_signature_and_sender(), Bytes( @@ -976,6 +980,7 @@ def test_model_copy(model: CopyValidateModel) -> None: pytest.param( Transaction( access_list=[AccessList(address=0, storage_keys=[0, 1])], + gas_limit=0x5208, max_fee_per_gas=10, max_priority_fee_per_gas=5, ).with_signature_and_sender(), @@ -991,6 +996,7 @@ def test_model_copy(model: CopyValidateModel) -> None: pytest.param( Transaction( access_list=[AccessList(address=1, storage_keys=[2, 3])], + gas_limit=0x5208, max_fee_per_gas=10, max_priority_fee_per_gas=5, max_fee_per_blob_gas=20, @@ -1010,6 +1016,7 @@ def test_model_copy(model: CopyValidateModel) -> None: pytest.param( Transaction( access_list=[AccessList(address=0, storage_keys=[0, 1])], + gas_limit=0x5208, max_fee_per_gas=10, max_priority_fee_per_gas=5, authorization_list=[ @@ -1034,6 +1041,7 @@ def test_model_copy(model: CopyValidateModel) -> None: pytest.param( Transaction( access_list=[AccessList(address=0, storage_keys=[0, 1])], + gas_limit=0x5208, max_fee_per_gas=10, max_priority_fee_per_gas=5, authorization_list=[ diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index bc3d0794f3f..b923ba3e245 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -310,8 +310,8 @@ def strip_hash_from_t8n_output(cls, data: Any) -> Any: data.pop("hash", None) return data - gas_limit: HexNumber = Field( - HexNumber(21_000), + gas_limit: HexNumber | None = Field( + None, serialization_alias="gas", validation_alias=AliasChoices("gas_limit", "gasLimit", "gas"), ) @@ -571,6 +571,10 @@ def sign(self: "Transaction") -> None: # Signer remains `None` in this case pass + def with_gas_limit(self, gas_limit: int) -> Self: + """Return a new copy of the transaction with a defined gas limit.""" + return self.model_copy(update={"gas_limit": HexNumber(gas_limit)}) + def with_signature_and_sender( self, *, keep_secret_key: bool = False ) -> Self: @@ -599,6 +603,9 @@ def with_signature_and_sender( if self.secret_key is None: raise ValueError("secret_key must be set to sign a transaction") + if self.gas_limit is None: + raise ValueError("gas_limit must be set to sign a transaction") + # Get the signing bytes signing_hash = self.rlp_signing_bytes().keccak256() From 917925c9090c40cff4e0cc277adbe52a2c58cc2b Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 28 May 2026 19:44:25 -0600 Subject: [PATCH 02/46] feat(tests): Remove gas-limit from some tests --- .../test_fork_transition.py | 37 ++--------- .../test_max_code_size.py | 15 +---- .../eip8024_dupn_swapn_exchange/test_swapn.py | 52 +++++---------- .../eip2929_gas_cost_increases/test_call.py | 41 ++++++------ tests/berlin/eip2930_access_list/test_acl.py | 17 ----- .../eip214_staticcall/test_staticcall.py | 25 ------- .../test_tstorage_clear_after_tx.py | 13 +--- .../test_tstorage_create_contexts.py | 12 ---- .../test_beacon_root_contract.py | 31 +-------- .../eip4844_blobs/test_blobhash_opcode.py | 17 ----- .../test_blobhash_opcode_contexts.py | 23 +++---- tests/cancun/eip5656_mcopy/test_mcopy.py | 13 +--- .../eip5656_mcopy/test_mcopy_contexts.py | 7 +- tests/frontier/opcodes/test_dup.py | 9 --- .../test_warm_coinbase.py | 20 ++---- tests/shanghai/eip3855_push0/test_push0.py | 65 ++++--------------- .../eip4895_withdrawals/test_withdrawals.py | 45 +++---------- 17 files changed, 82 insertions(+), 360 deletions(-) diff --git a/tests/amsterdam/eip7954_increase_max_contract_size/test_fork_transition.py b/tests/amsterdam/eip7954_increase_max_contract_size/test_fork_transition.py index ca41e6b9308..10931708eeb 100644 --- a/tests/amsterdam/eip7954_increase_max_contract_size/test_fork_transition.py +++ b/tests/amsterdam/eip7954_increase_max_contract_size/test_fork_transition.py @@ -38,8 +38,7 @@ def test_max_code_size_fork_transition( fork: TransitionFork, ) -> None: """Ensure the new max code size limit activates at the fork boundary.""" - post_fork = fork.transitions_to() - code_size = post_fork.max_code_size() + code_size = fork.transitions_to().max_code_size() deploy_code = Op.JUMPDEST * code_size initcode = Initcode(deploy_code=deploy_code) @@ -49,9 +48,6 @@ def test_max_code_size_fork_transition( create_address_pre = compute_create_address(address=alice, nonce=0) create_address_post = compute_create_address(address=bob, nonce=0) - post_fork_gas_limit = ( - post_fork.transaction_gas_limit_cap() or 0 - ) + post_fork.create_state_gas(code_size=code_size) blocks = [ Block( timestamp=14_999, @@ -60,7 +56,6 @@ def test_max_code_size_fork_transition( sender=alice, to=None, data=initcode, - gas_limit=fork.transitions_from().transaction_gas_limit_cap(), ) ], ), @@ -71,7 +66,6 @@ def test_max_code_size_fork_transition( sender=bob, to=None, data=initcode, - gas_limit=post_fork_gas_limit, ) ], ), @@ -93,8 +87,7 @@ def test_max_code_size_via_create_fork_transition( create_opcode: Op, ) -> None: """Ensure the new max code size limit activates at the fork via opcodes.""" - post_fork = fork.transitions_to() - code_size = post_fork.max_code_size() + code_size = fork.transitions_to().max_code_size() deploy_code = Op.JUMPDEST * code_size initcode = Initcode(deploy_code=deploy_code) initcode_bytes = bytes(initcode) @@ -142,7 +135,6 @@ def test_max_code_size_via_create_fork_transition( sender=alice, to=factory_pre, data=initcode_bytes, - gas_limit=fork.transitions_from().transaction_gas_limit_cap(), ) ], ), @@ -153,10 +145,6 @@ def test_max_code_size_via_create_fork_transition( sender=bob, to=factory_post, data=initcode_bytes, - gas_limit=( - (post_fork.transaction_gas_limit_cap() or 0) - + post_fork.create_state_gas(code_size=code_size) - ), ) ], ), @@ -199,7 +187,6 @@ def test_max_initcode_size_fork_transition( sender=alice, to=None, data=initcode, - gas_limit=fork.transitions_from().transaction_gas_limit_cap(), error=initcode_too_large, ) ], @@ -213,7 +200,6 @@ def test_max_initcode_size_fork_transition( sender=bob, to=None, data=initcode, - gas_limit=fork.transitions_to().transaction_gas_limit_cap(), ) ], ), @@ -283,7 +269,6 @@ def test_max_initcode_size_via_create_fork_transition( sender=alice, to=factory_pre, data=initcode_bytes, - gas_limit=fork.transitions_from().transaction_gas_limit_cap(), ) ], ), @@ -294,7 +279,6 @@ def test_max_initcode_size_via_create_fork_transition( sender=bob, to=factory_post, data=initcode_bytes, - gas_limit=fork.transitions_to().transaction_gas_limit_cap(), ) ], ), @@ -319,12 +303,10 @@ def test_max_code_size_with_max_initcode_fork_transition( fork: TransitionFork, ) -> None: """Ensure max code + max initcode activates at the fork boundary.""" - post_fork = fork.transitions_to() - code_size = post_fork.max_code_size() - deploy_code = Op.JUMPDEST * code_size + deploy_code = Op.JUMPDEST * fork.transitions_to().max_code_size() initcode = Initcode( deploy_code=deploy_code, - initcode_length=post_fork.max_initcode_size(), + initcode_length=fork.transitions_to().max_initcode_size(), ) alice = pre.fund_eoa() @@ -342,7 +324,6 @@ def test_max_code_size_with_max_initcode_fork_transition( sender=alice, to=None, data=initcode, - gas_limit=fork.transitions_from().transaction_gas_limit_cap(), error=initcode_too_large, ) ], @@ -355,10 +336,6 @@ def test_max_code_size_with_max_initcode_fork_transition( sender=bob, to=None, data=initcode, - gas_limit=( - (post_fork.transaction_gas_limit_cap() or 0) - + post_fork.create_state_gas(code_size=code_size) - ), ) ], ), @@ -380,7 +357,6 @@ def test_parent_max_code_size_across_fork( parent = fork.transitions_from() assert parent is not None, "Parent fork must be defined for this test" - post_fork = fork.transitions_to() code_size = parent.max_code_size() deploy_code = Op.JUMPDEST * code_size initcode = Initcode(deploy_code=deploy_code) @@ -399,7 +375,6 @@ def test_parent_max_code_size_across_fork( sender=alice, to=None, data=initcode, - gas_limit=fork.transitions_from().transaction_gas_limit_cap(), ) ], ), @@ -410,10 +385,6 @@ def test_parent_max_code_size_across_fork( sender=bob, to=None, data=initcode, - gas_limit=( - (post_fork.transaction_gas_limit_cap() or 0) - + post_fork.create_state_gas(code_size=code_size) - ), ) ], ), diff --git a/tests/amsterdam/eip7954_increase_max_contract_size/test_max_code_size.py b/tests/amsterdam/eip7954_increase_max_contract_size/test_max_code_size.py index d49848e9492..44bcc33e84b 100644 --- a/tests/amsterdam/eip7954_increase_max_contract_size/test_max_code_size.py +++ b/tests/amsterdam/eip7954_increase_max_contract_size/test_max_code_size.py @@ -52,10 +52,6 @@ def test_max_code_size( sender=alice, to=None, data=initcode, - gas_limit=( - (fork.transaction_gas_limit_cap() or 0) - + fork.create_state_gas(code_size=code_size) - ), ) post: dict[Any, Account | None] = {} @@ -112,10 +108,6 @@ def test_max_code_size_via_create( sender=alice, to=factory, data=initcode_bytes, - gas_limit=( - (fork.transaction_gas_limit_cap() or 0) - + fork.create_state_gas(code_size=code_size) - ), ) created = code_size <= fork.max_code_size() @@ -184,8 +176,7 @@ def test_max_code_size_with_max_initcode( fork: Fork, ) -> None: """Ensure max-size code deploys when initcode is also at max size.""" - code_size = fork.max_code_size() - deploy_code = Op.JUMPDEST * code_size + deploy_code = Op.JUMPDEST * fork.max_code_size() initcode = Initcode( deploy_code=deploy_code, initcode_length=fork.max_initcode_size(), @@ -198,10 +189,6 @@ def test_max_code_size_with_max_initcode( sender=alice, to=None, data=initcode, - gas_limit=( - (fork.transaction_gas_limit_cap() or 0) - + fork.create_state_gas(code_size=code_size) - ), ) post = {create_address: Account(code=deploy_code)} diff --git a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py index 7103c75f6dc..47d1735bb87 100644 --- a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py +++ b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py @@ -12,7 +12,6 @@ Bytecode, EIPChecklist, Fork, - Header, Op, StateTestFiller, Transaction, @@ -145,7 +144,6 @@ def test_swapn_valid_immediates( def test_swapn_preserves_other_stack_items( pre: Alloc, state_test: StateTestFiller, - fork: Fork, ) -> None: """Test SWAPN only swaps the specified items, leaving others unchanged.""" sender = pre.fund_eoa() @@ -155,16 +153,6 @@ def test_swapn_preserves_other_stack_items( stack_index = 17 stack_height = stack_index + 1 # Need 18 items - # Compute expected storage values (post-swap stack reads). - expected_storage: dict = {} - for i in range(stack_height): - if i == 0: - expected_storage[i] = 0x1000 # Was at bottom, now at top - elif i == stack_height - 1: - expected_storage[i] = 0x1011 # Was at top, now at bottom - else: - expected_storage[i] = 0x1000 + (stack_height - 1 - i) - # Create a stack with 18 distinct values code = Bytecode() for i in range(stack_height): @@ -174,39 +162,31 @@ def test_swapn_preserves_other_stack_items( # Pass stack index directly - encoder will handle encoding code += Op.SWAPN[stack_index] - # Store all values; metadata pins each slot's 0->non-zero - # transition so `code.gas_cost(fork)` accounts for SSTORE state - # gas under EIP-8037. + # Store all values to verify only the swapped ones changed for i in range(stack_height): - code += Op.PUSH1(i) + Op.SSTORE.with_metadata( - key_warm=False, - original_value=0, - current_value=0, - new_value=expected_storage[i], - ) + code += Op.PUSH1(i) + Op.SSTORE code += Op.STOP contract_address = pre.deploy_contract(code=code) - intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() - code_state = code.state_cost(fork) - code_regular = code.gas_cost(fork) - code_state + tx = Transaction(to=contract_address, sender=sender) - tx = Transaction( - to=contract_address, - sender=sender, - gas_limit=intrinsic_cost + code_regular + code_state, - ) + # After swap: position 1 and position 18 are swapped + # Original stack (top to bottom): 0x1011, 0x1010, ..., 0x1001, 0x1000 + # After SWAPN[0]: 0x1000, 0x1010, ..., 0x1001, 0x1011 + expected_storage = {} + for i in range(stack_height): + if i == 0: + expected_storage[i] = 0x1000 # Was at bottom, now at top + elif i == stack_height - 1: + expected_storage[i] = 0x1011 # Was at top, now at bottom + else: + expected_storage[i] = 0x1000 + (stack_height - 1 - i) - expected_gas_used = max(intrinsic_cost + code_regular, code_state) + post = {contract_address: Account(storage=expected_storage)} - state_test( - pre=pre, - post={contract_address: Account(storage=expected_storage)}, - tx=tx, - blockchain_test_header_verify=Header(gas_used=expected_gas_used), - ) + state_test(pre=pre, post=post, tx=tx) def test_swapn_stack_underflow( diff --git a/tests/berlin/eip2929_gas_cost_increases/test_call.py b/tests/berlin/eip2929_gas_cost_increases/test_call.py index ab3e21d1d03..d9e1c562bf7 100644 --- a/tests/berlin/eip2929_gas_cost_increases/test_call.py +++ b/tests/berlin/eip2929_gas_cost_increases/test_call.py @@ -27,32 +27,31 @@ def test_call_insufficient_balance( """ destination = pre.fund_eoa(1) warm_code = Op.BALANCE(destination, address_warm=True) - contract_code = Op.SSTORE( - 0, - Op.CALL( - gas=Op.GAS, - address=destination, - value=1, - args_offset=0, - args_size=0, - ret_offset=0, - ret_size=0, + contract_address = pre.deploy_contract( + # Perform the aborted external calls + Op.SSTORE( + 0, + Op.CALL( + gas=Op.GAS, + address=destination, + value=1, + args_offset=0, + args_size=0, + ret_offset=0, + ret_size=0, + ), + ) + # Measure the gas cost for BALANCE operation + + CodeGasMeasure( + code=warm_code, + extra_stack_items=1, # BALANCE puts balance on stack + sstore_key=1, ), - ) + CodeGasMeasure( - code=warm_code, - extra_stack_items=1, # BALANCE puts balance on stack - sstore_key=1, + balance=0, ) - contract_address = pre.deploy_contract(contract_code, balance=0) - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() tx = Transaction( to=contract_address, - gas_limit=( - intrinsic_calc() - + contract_code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ), sender=pre.fund_eoa(), ) diff --git a/tests/berlin/eip2930_access_list/test_acl.py b/tests/berlin/eip2930_access_list/test_acl.py index 0564b93ad17..f8cec0ed3f5 100644 --- a/tests/berlin/eip2930_access_list/test_acl.py +++ b/tests/berlin/eip2930_access_list/test_acl.py @@ -85,28 +85,12 @@ def test_account_storage_warm_cold_state( sender = pre.fund_eoa() - contract_creation = False tx_data = b"" - intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() - - # CodeGasMeasure SSTOREs the measured cost; budget for one - # first-time SSTORE whose state gas scales with cpsb on Amsterdam. - tx_gas_limit = ( - intrinsic_gas_calculator( - calldata=tx_data, - contract_creation=contract_creation, - access_list=access_lists, - ) - + 100_000 - + Op.SSTORE(new_value=1).state_cost(fork) - ) - tx = Transaction( ty=1, data=tx_data, to=contract_address, - gas_limit=tx_gas_limit, access_list=access_lists, sender=sender, ) @@ -317,7 +301,6 @@ def test_repeated_address_acl( contract = pre.deploy_contract(sload0_measure + sload1_measure) tx = Transaction( - gas_limit=500_000, to=contract, value=0, sender=sender, diff --git a/tests/byzantium/eip214_staticcall/test_staticcall.py b/tests/byzantium/eip214_staticcall/test_staticcall.py index caf1f15c5f1..0e1430a66ab 100644 --- a/tests/byzantium/eip214_staticcall/test_staticcall.py +++ b/tests/byzantium/eip214_staticcall/test_staticcall.py @@ -143,21 +143,9 @@ def test_staticcall_reentrant_call_to_precompile( target = pre.deploy_contract(code=target_code, balance=target_balance) tx_value = 100 - # The outer SSTORE (slot 0 = STATICCALL result) needs state work even - # though STATICCALL forwards 63/64 of remaining gas to the reentrant - # frame. Lift past the EIP-7825 cap so the EIP-8037 reservoir hosts - # the SSTORE state. - gas_cap = fork.transaction_gas_limit_cap() - sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) - if gas_cap is not None and sstore_state_gas > 0: - gas_limit = gas_cap + sstore_state_gas - else: - gas_limit = 1_000_000 - tx = Transaction( sender=alice, to=target, - gas_limit=gas_limit, value=tx_value, protected=True, ) @@ -324,7 +312,6 @@ def test_staticcall_call_to_precompile( tx=Transaction( sender=alice, to=contract_a, - gas_limit=500_000, value=tx_value, protected=True, ), @@ -453,22 +440,11 @@ def test_staticcall_nested_call_to_precompile( account_expectations=account_expectations ) - # Six SSTOREs across A and B, plus CALL/STATICCALL forwarding 63/64 - # at each frame. Lift past the EIP-7825 cap so the EIP-8037 reservoir - # holds the SSTORE state work for both contracts. - gas_cap = fork.transaction_gas_limit_cap() - sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) - if gas_cap is not None and sstore_state_gas > 0: - gas_limit = gas_cap + 6 * sstore_state_gas - else: - gas_limit = 500_000 - state_test( pre=pre, tx=Transaction( sender=alice, to=contract_b, - gas_limit=gas_limit, value=tx_value, protected=True, ), @@ -669,7 +645,6 @@ def test_staticcall_call_to_precompile_from_contract_init( tx=Transaction( sender=alice, to=contract_a, - gas_limit=4_000_000, value=tx_value, data=bytes(initcode), protected=True, diff --git a/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py b/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py index 77b6bc20d00..21f4eebfc41 100644 --- a/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py +++ b/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py @@ -7,7 +7,6 @@ Block, BlockchainTestFiller, Environment, - Fork, Initcode, Op, Transaction, @@ -22,7 +21,6 @@ @pytest.mark.valid_from("Cancun") def test_tstore_clear_after_deployment_tx( blockchain_test: BlockchainTestFiller, - fork: Fork, pre: Alloc, ) -> None: """ @@ -40,12 +38,7 @@ def test_tstore_clear_after_deployment_tx( sender = pre.fund_eoa() - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 - deployment_tx = Transaction( - gas_limit=gas_limit, data=code, to=None, sender=sender, @@ -53,11 +46,7 @@ def test_tstore_clear_after_deployment_tx( address = deployment_tx.created_contract - invoke_contract_tx = Transaction( - gas_limit=gas_limit, - to=address, - sender=sender, - ) + invoke_contract_tx = Transaction(to=address, sender=sender) txs = [deployment_tx, invoke_contract_tx] diff --git a/tests/cancun/eip1153_tstore/test_tstorage_create_contexts.py b/tests/cancun/eip1153_tstore/test_tstorage_create_contexts.py index f382fcaba45..bd69ce23086 100644 --- a/tests/cancun/eip1153_tstore/test_tstorage_create_contexts.py +++ b/tests/cancun/eip1153_tstore/test_tstorage_create_contexts.py @@ -244,7 +244,6 @@ def test_contract_creation( sender=sender, to=creator_address, data=initcode, - gas_limit=1_000_000, ) post = { @@ -328,21 +327,10 @@ def test_tstore_rollback_on_failed_create( ) caller_address = pre.deploy_contract(caller_code, storage={0: 1, 1: 1}) - gas_limit = 16_000_000 - if fork.is_eip_enabled(8037): - gas_limit_cap = fork.transaction_gas_limit_cap() or gas_limit - code_deposit_state = fork.code_deposit_state_gas( - code_size=max_code_size + 0x0A - ) - new_account_state = fork.gas_costs().NEW_ACCOUNT - state_gas = 2 * (code_deposit_state + new_account_state) - gas_limit = gas_limit_cap + state_gas - sender = pre.fund_eoa() tx = Transaction( sender=sender, to=caller_address, - gas_limit=gas_limit, access_list=[ AccessList(address=caller_address, storage_keys=[0, 1]), ], diff --git a/tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py b/tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py index dc4888003f8..3150ca50ee7 100644 --- a/tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py +++ b/tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py @@ -27,7 +27,6 @@ Block, BlockchainTestFiller, Bytecode, - Fork, Hash, Op, Storage, @@ -319,7 +318,6 @@ def test_beacon_root_selfdestruct( beacon_root: bytes, timestamp: int, pre: Alloc, - fork: Fork, tx: Transaction, post: Dict, ) -> None: @@ -333,20 +331,15 @@ def test_beacon_root_selfdestruct( balance=0xBA1, ) # self destruct caller - selfdestruct_call_forwarded_gas = 100_000 - self_destruct_caller_code = Op.CALL( - gas=selfdestruct_call_forwarded_gas, - address=self_destruct_actor_address, - ) + Op.SSTORE(0, Op.BALANCE(Spec.BEACON_ROOTS_ADDRESS)) self_destruct_caller_address = pre.deploy_contract( - self_destruct_caller_code + Op.CALL(gas=100_000, address=self_destruct_actor_address) + + Op.SSTORE(0, Op.BALANCE(Spec.BEACON_ROOTS_ADDRESS)) ) post = { self_destruct_caller_address: Account( storage=Storage({0: 0xBA1}), # type: ignore ) } - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() blockchain_test( pre=pre, blocks=[ @@ -355,14 +348,6 @@ def test_beacon_root_selfdestruct( Transaction( sender=pre.fund_eoa(), to=self_destruct_caller_address, - # Caller's static cost + forwarded inner gas + EIP-1706 - # stipend slack on the trailing SSTORE. - gas_limit=( - intrinsic_calc() - + self_destruct_caller_code.gas_cost(fork) - + selfdestruct_call_forwarded_gas - + Op.SSTORE(new_value=1).state_cost(fork) - ), ) ] ) @@ -416,7 +401,6 @@ def test_beacon_root_selfdestruct( def test_multi_block_beacon_root_timestamp_calls( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, timestamps_factory: Callable[[], Iterator[int]], beacon_roots: Iterator[bytes], block_count: int, @@ -451,7 +435,6 @@ def test_multi_block_beacon_root_timestamp_calls( all_timestamps: List[int] = [] sender = pre.fund_eoa() - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() for timestamp, beacon_root, _i in zip( timestamps, @@ -510,14 +493,6 @@ def test_multi_block_beacon_root_timestamp_calls( post[current_call_account_address] = Account( storage=current_call_account_expected_storage, ) - # Bytecode's regular+state cost + N forwarded call_gas envelopes - # (one per `t` in all_timestamps) + EIP-1706 stipend slack. - block_gas_limit = ( - intrinsic_calc(calldata=Hash(timestamp)) - + current_call_account_code.gas_cost(fork) - + len(all_timestamps) * call_gas - + Op.SSTORE(new_value=1).state_cost(fork) - ) blocks.append( Block( txs=[ @@ -525,7 +500,6 @@ def test_multi_block_beacon_root_timestamp_calls( sender=sender, to=current_call_account_address, data=Hash(timestamp), - gas_limit=block_gas_limit, ) ], parent_beacon_block_root=beacon_root, @@ -661,7 +635,6 @@ def test_beacon_root_transition( sender=sender, to=current_call_account_address, data=Hash(timestamp), - gas_limit=1_000_000, ) ], parent_beacon_block_root=beacon_root if transitioned else None, diff --git a/tests/cancun/eip4844_blobs/test_blobhash_opcode.py b/tests/cancun/eip4844_blobs/test_blobhash_opcode.py index b8b5733a4c6..b5acc5d5d51 100644 --- a/tests/cancun/eip4844_blobs/test_blobhash_opcode.py +++ b/tests/cancun/eip4844_blobs/test_blobhash_opcode.py @@ -202,7 +202,6 @@ def test_blobhash_gas_cost( "sender": sender, "to": address, "data": Hash(0), - "gas_limit": 500_000, "max_fee_per_blob_gas": (fork.min_base_fee_per_blob_gas() * 10) if tx_type == 3 else None, @@ -265,10 +264,6 @@ def test_blobhash_scenarios( ) sender = pre.fund_eoa() - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 - blocks: List[Block] = [] post = {} for i in range(total_blocks): @@ -281,7 +276,6 @@ def test_blobhash_scenarios( sender=sender, to=address, data=Hash(0), - gas_limit=gas_limit, access_list=[], max_fee_per_blob_gas=( fork.min_base_fee_per_blob_gas() * 10 @@ -333,11 +327,6 @@ def test_blobhash_invalid_blob_index( scenario_name=scenario, max_blobs_per_tx=max_blobs_per_tx ) sender = pre.fund_eoa() - - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 - blocks: List[Block] = [] post = {} for i in range(total_blocks): @@ -351,7 +340,6 @@ def test_blobhash_invalid_blob_index( ty=Spec.BLOB_TX_TYPE, sender=sender, to=address, - gas_limit=gas_limit, data=Hash(0), access_list=[], max_fee_per_blob_gas=( @@ -399,17 +387,12 @@ def test_blobhash_multiple_txs_in_block( addresses = [pre.deploy_contract(blobhash_bytecode) for _ in range(4)] sender = pre.fund_eoa() - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 - def blob_tx(address: Address, tx_type: int) -> Transaction: return Transaction( ty=tx_type, sender=sender, to=address, data=Hash(0), - gas_limit=gas_limit, access_list=[] if tx_type >= 1 else None, max_fee_per_blob_gas=(fork.min_base_fee_per_blob_gas() * 10) if tx_type >= 3 diff --git a/tests/cancun/eip4844_blobs/test_blobhash_opcode_contexts.py b/tests/cancun/eip4844_blobs/test_blobhash_opcode_contexts.py index 8c9ab56b99f..6a2c7c3498b 100644 --- a/tests/cancun/eip4844_blobs/test_blobhash_opcode_contexts.py +++ b/tests/cancun/eip4844_blobs/test_blobhash_opcode_contexts.py @@ -90,7 +90,6 @@ def deploy_contract( indexes: The indexes to request using the BLOBHASH opcode """ - indexes = list(indexes) match self: case ( BlobhashContext.BLOBHASH_SSTORE @@ -313,19 +312,11 @@ def test_blobhash_opcode_contexts( case _: raise Exception(f"Unknown test case {test_case}") - # Budget covers all branches (simple SSTOREs, CREATE / CREATE2 - # initcode + deploy) plus per-blob SSTOREs whose state cost - # scales with cpsb under EIP-8037 (`sstore_state_gas()` is 0 - # otherwise). - gas_limit = 500_000 + max_blobs_per_tx * Op.SSTORE(new_value=1).state_cost( - fork - ) state_test( pre=pre, tx=Transaction( ty=Spec.BLOB_TX_TYPE, to=tx_to, - gas_limit=gas_limit, max_fee_per_blob_gas=fork.min_base_fee_per_blob_gas() * 10, blob_versioned_hashes=simple_blob_hashes, sender=pre.fund_eoa(), @@ -341,12 +332,16 @@ def test_blobhash_opcode_contexts_tx_types( state_test: StateTestFiller, ) -> None: """ - Test that the `BLOBHASH` opcode returns zero in non-blob transaction - types. + Tests that the `BLOBHASH` opcode functions correctly when called in + different contexts. - Verify BLOBHASH behavior across transaction types 0, 1, and 2 in - various calling contexts including top-level, CALL, DELEGATECALL, - STATICCALL, CALLCODE, initcode, CREATE, and CREATE2. + - `BLOBHASH` opcode on the top level of the call stack. + - `BLOBHASH` opcode on the max value. + - `BLOBHASH` opcode on `CALL`, `DELEGATECALL`, `STATICCALL`, and + `CALLCODE`. + - `BLOBHASH` opcode on Initcode. + - `BLOBHASH` opcode on `CREATE` and `CREATE2`. + - `BLOBHASH` opcode on transaction types 0, 1 and 2. """ blobhash_sstore_address = BlobhashContext.BLOBHASH_SSTORE.deploy_contract( pre=pre, indexes=[0] diff --git a/tests/cancun/eip5656_mcopy/test_mcopy.py b/tests/cancun/eip5656_mcopy/test_mcopy.py index 93cd8b4d34f..9c87d23ccbf 100644 --- a/tests/cancun/eip5656_mcopy/test_mcopy.py +++ b/tests/cancun/eip5656_mcopy/test_mcopy.py @@ -11,7 +11,6 @@ Alloc, Bytecode, Environment, - Fork, Hash, Op, StateTestFiller, @@ -116,20 +115,12 @@ def code_address(pre: Alloc, code_bytecode: Bytecode) -> Address: @pytest.fixture def tx( # noqa: D103 - pre: Alloc, - fork: Fork, - code_address: Address, - dest: int, - src: int, - length: int, + pre: Alloc, code_address: Address, dest: int, src: int, length: int ) -> Transaction: - # The test SSTOREs each memory word it reads, so budget for ~10 - # first-time SSTOREs whose state gas scales with cpsb on Amsterdam. return Transaction( sender=pre.fund_eoa(), to=code_address, data=Hash(dest) + Hash(src) + Hash(length), - gas_limit=1_000_000 + 10 * Op.SSTORE(new_value=1).state_cost(fork), ) @@ -239,7 +230,6 @@ def test_valid_mcopy_operations( def test_mcopy_repeated( state_test: StateTestFiller, pre: Alloc, - fork: Fork, dest: int, src: int, length: int, @@ -303,7 +293,6 @@ def test_mcopy_repeated( sender=pre.fund_eoa(), to=contract, data=Hash(dest) + Hash(src) + Hash(length), - gas_limit=1_000_000 + 2 * Op.SSTORE(new_value=1).state_cost(fork), ), ) diff --git a/tests/cancun/eip5656_mcopy/test_mcopy_contexts.py b/tests/cancun/eip5656_mcopy/test_mcopy_contexts.py index ff7d369e96c..662adc0902a 100644 --- a/tests/cancun/eip5656_mcopy/test_mcopy_contexts.py +++ b/tests/cancun/eip5656_mcopy/test_mcopy_contexts.py @@ -14,7 +14,6 @@ Alloc, Bytecode, Environment, - Fork, Op, StateTestFiller, Storage, @@ -139,14 +138,10 @@ def callee_address(pre: Alloc, callee_bytecode: Bytecode) -> Address: # noqa: D @pytest.fixture -def tx(pre: Alloc, fork: Fork, caller_address: Address) -> Transaction: # noqa: D103 - gas_limit = 1_000_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 +def tx(pre: Alloc, caller_address: Address) -> Transaction: # noqa: D103 return Transaction( sender=pre.fund_eoa(), to=caller_address, - gas_limit=gas_limit, ) diff --git a/tests/frontier/opcodes/test_dup.py b/tests/frontier/opcodes/test_dup.py index fd146d99c8b..69113494d39 100644 --- a/tests/frontier/opcodes/test_dup.py +++ b/tests/frontier/opcodes/test_dup.py @@ -66,18 +66,9 @@ def test_dup( account = pre.deploy_contract(account_code) - intrinsic = fork.transaction_intrinsic_cost_calculator() tx = Transaction( - ty=0x0, to=account, - gas_limit=( - intrinsic() - + account_code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ), - gas_price=10, protected=fork.supports_protected_txs(), - data="", sender=sender, ) diff --git a/tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py b/tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py index 561e7225fd6..9d36f59096e 100644 --- a/tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py +++ b/tests/shanghai/eip3651_warm_coinbase/test_warm_coinbase.py @@ -91,15 +91,8 @@ def test_warm_coinbase_call_out_of_gas( ) caller_address = pre.deploy_contract(caller_code) - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() tx = Transaction( to=caller_address, - gas_limit=( - intrinsic_calc() - + caller_code.gas_cost(fork) - + call_gas_exact - + Op.SSTORE(new_value=1).state_cost(fork) - ), sender=sender, ) @@ -191,14 +184,8 @@ def test_warm_coinbase_gas_usage( # Coinbase is warm after EIP-3651 (Shanghai+), cold before expected_gas = Op.BALANCE(address_warm=(fork >= Shanghai)).gas_cost(fork) - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() tx = Transaction( to=measure_address, - gas_limit=( - intrinsic_calc() - + code_gas_measure.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ), sender=sender, ) @@ -210,4 +197,9 @@ def test_warm_coinbase_gas_usage( ) } - state_test(env=env, pre=pre, post=post, tx=tx) + state_test( + env=env, + pre=pre, + post=post, + tx=tx, + ) diff --git a/tests/shanghai/eip3855_push0/test_push0.py b/tests/shanghai/eip3855_push0/test_push0.py index c08208e28aa..919952673f4 100644 --- a/tests/shanghai/eip3855_push0/test_push0.py +++ b/tests/shanghai/eip3855_push0/test_push0.py @@ -14,7 +14,6 @@ Bytecode, CodeGasMeasure, Environment, - Fork, Op, StateTestFiller, Transaction, @@ -84,25 +83,12 @@ def test_push0_contracts( pre: Alloc, post: Alloc, sender: EOA, - fork: Fork, contract_code: Bytecode, expected_storage: Account, ) -> None: """Tests PUSH0 within various deployed contracts.""" push0_contract = pre.deploy_contract(contract_code) - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - tx = Transaction( - to=push0_contract, - # `contract_code.gas_cost(fork)` covers regular + (under EIP-8037) - # state work for the parametrized snippets; add EIP-1706 slack for - # the trailing SSTORE. - gas_limit=( - intrinsic_calc() - + contract_code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ), - sender=sender, - ) + tx = Transaction(to=push0_contract, sender=sender) post[push0_contract] = expected_storage state_test(env=env, pre=pre, post=post, tx=tx) @@ -129,36 +115,24 @@ def push0_contract_callee(self, pre: Alloc) -> Address: ) return push0_contract - PUSH0_CALL_FORWARDED_GAS = 100_000 - - @pytest.fixture - def push0_contract_caller_code( - self, call_opcode: Op, push0_contract_callee: Address - ) -> Bytecode: - """Bytecode for the caller contract.""" - return ( - Op.SSTORE( - 0, - call_opcode( - gas=self.PUSH0_CALL_FORWARDED_GAS, - address=push0_contract_callee, - ), - ) - + Op.SSTORE(0, 1) - + Op.RETURNDATACOPY(0x1F, 0, 1) - + Op.SSTORE(1, Op.MLOAD(0)) - ) - @pytest.fixture def push0_contract_caller( - self, pre: Alloc, push0_contract_caller_code: Bytecode + self, pre: Alloc, call_opcode: Op, push0_contract_callee: Address ) -> Address: """ Deploy the contract that calls the callee PUSH0 contract into `pre`. This fixture returns its address. """ - return pre.deploy_contract(push0_contract_caller_code) + call_code = ( + Op.SSTORE( + 0, call_opcode(gas=100_000, address=push0_contract_callee) + ) + + Op.SSTORE(0, 1) + + Op.RETURNDATACOPY(0x1F, 0, 1) + + Op.SSTORE(1, Op.MLOAD(0)) + ) + return pre.deploy_contract(call_code) @pytest.mark.xdist_group(name="bigmem") @pytest.mark.parametrize( @@ -179,23 +153,8 @@ def test_push0_contract_during_call_contexts( post: Alloc, sender: EOA, push0_contract_caller: Address, - push0_contract_caller_code: Bytecode, - fork: Fork, ) -> None: """Test PUSH0 during various call contexts.""" - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - tx = Transaction( - to=push0_contract_caller, - # Caller's static cost (3 SSTOREs + CALL static + RETURNDATACOPY - # + MLOAD) plus the forwarded inner-call gas, plus EIP-1706 - # stipend slack on the trailing SSTORE. - gas_limit=( - intrinsic_calc() - + push0_contract_caller_code.gas_cost(fork) - + self.PUSH0_CALL_FORWARDED_GAS - + Op.SSTORE(new_value=1).state_cost(fork) - ), - sender=sender, - ) + tx = Transaction(to=push0_contract_caller, sender=sender) post[push0_contract_caller] = Account(storage={0x00: 0x01, 0x01: 0xFF}) state_test(env=env, pre=pre, post=post, tx=tx) diff --git a/tests/shanghai/eip4895_withdrawals/test_withdrawals.py b/tests/shanghai/eip4895_withdrawals/test_withdrawals.py index 207e864c663..8c4c62adf60 100644 --- a/tests/shanghai/eip4895_withdrawals/test_withdrawals.py +++ b/tests/shanghai/eip4895_withdrawals/test_withdrawals.py @@ -142,30 +142,21 @@ def test_use_value_in_tx( def test_use_value_in_contract( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test sending value from contract that has not received a withdrawal.""" sender = pre.fund_eoa() recipient = pre.fund_eoa(1) - contract_code = Op.SSTORE( - Op.NUMBER, - Op.CALL(address=recipient, value=1000000000), - ) - contract_address = pre.deploy_contract(contract_code) - - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - tx_gas = ( - intrinsic_calc() - + contract_code.gas_cost(fork) - + fork.gas_costs().CALL_VALUE - + Op.SSTORE(new_value=1).state_cost(fork) + contract_address = pre.deploy_contract( + Op.SSTORE( + Op.NUMBER, + Op.CALL(address=recipient, value=1000000000), + ) ) (tx_0, tx_1) = ( Transaction( sender=sender, value=0, - gas_limit=tx_gas, to=contract_address, ) for _ in range(2) @@ -203,7 +194,7 @@ def test_use_value_in_contract( def test_balance_within_block( - blockchain_test: BlockchainTestFiller, pre: Alloc, fork: Fork + blockchain_test: BlockchainTestFiller, pre: Alloc ) -> None: """ Test withdrawal balance increase within the same block in a contract call. @@ -215,19 +206,12 @@ def test_balance_within_block( sender = pre.fund_eoa() recipient = pre.fund_eoa(ONE_GWEI) contract_address = pre.deploy_contract(save_balance_on_block_number) - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - tx_gas = ( - intrinsic_calc(calldata=Hash(recipient, left_padding=True)) - + save_balance_on_block_number.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ) blocks = [ Block( txs=[ Transaction( sender=sender, - gas_limit=tx_gas, to=contract_address, data=Hash(recipient, left_padding=True), ) @@ -245,7 +229,6 @@ def test_balance_within_block( txs=[ Transaction( sender=sender, - gas_limit=tx_gas, to=contract_address, data=Hash(recipient, left_padding=True), ) @@ -530,29 +513,21 @@ def test_newly_created_contract( def test_no_evm_execution( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test withdrawals don't trigger EVM execution.""" sender = pre.fund_eoa() - contract_code = Op.SSTORE(Op.NUMBER, 1) - contracts = [pre.deploy_contract(contract_code) for _ in range(4)] - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - tx_gas = ( - intrinsic_calc() - + contract_code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ) + contracts = [ + pre.deploy_contract(Op.SSTORE(Op.NUMBER, 1)) for _ in range(4) + ] blocks = [ Block( txs=[ Transaction( sender=sender, - gas_limit=tx_gas, to=contracts[2], ), Transaction( sender=sender, - gas_limit=tx_gas, to=contracts[3], ), ], @@ -575,12 +550,10 @@ def test_no_evm_execution( txs=[ Transaction( sender=sender, - gas_limit=tx_gas, to=contracts[0], ), Transaction( sender=sender, - gas_limit=tx_gas, to=contracts[1], ), ], From 8bf5bdec25a0aab8a2836f901be8d296e4720e0d Mon Sep 17 00:00:00 2001 From: marioevz Date: Mon, 1 Jun 2026 13:46:45 -0600 Subject: [PATCH 03/46] fix(tests): Fix Osaka, Paris, Prague --- tests/common/precompile_fixtures.py | 24 --- .../eip7883_modexp_gas_increase/conftest.py | 27 +-- .../test_modexp_thresholds.py | 2 - .../test_blob_base_fee.py | 37 +--- ...blob_reserve_price_with_bpo_transitions.py | 6 +- .../test_max_block_rlp_size.py | 4 +- .../test_count_leading_zeros.py | 136 ++------------- .../conftest.py | 22 --- .../test_p256verify.py | 4 - .../test_p256verify_before_fork.py | 22 --- .../test_collision_selfdestruct.py | 4 - .../test_initcollision.py | 4 - .../test_revert_in_create.py | 8 - .../security/test_selfdestruct_balance_bug.py | 38 +--- .../conftest.py | 1 - .../test_bls12_precompiles_before_fork.py | 22 --- ...t_bls12_variable_length_input_contracts.py | 62 ------- tests/prague/eip6110_deposits/conftest.py | 19 +- tests/prague/eip6110_deposits/helpers.py | 20 +-- .../prague/eip6110_deposits/test_deposits.py | 20 +-- .../conftest.py | 9 +- .../helpers.py | 48 +----- .../test_withdrawal_requests.py | 9 - .../test_withdrawal_requests_during_fork.py | 4 +- .../prague/eip7251_consolidations/conftest.py | 5 +- .../prague/eip7251_consolidations/helpers.py | 48 +----- .../test_consolidations.py | 13 -- .../test_consolidations_during_fork.py | 4 +- .../prague/eip7702_set_code_tx/test_calls.py | 26 --- tests/prague/eip7702_set_code_tx/test_gas.py | 2 - .../eip7702_set_code_tx/test_set_code_txs.py | 162 +----------------- .../test_set_code_txs_2.py | 113 +----------- 32 files changed, 76 insertions(+), 849 deletions(-) diff --git a/tests/common/precompile_fixtures.py b/tests/common/precompile_fixtures.py index 8831668ecba..15594333eca 100644 --- a/tests/common/precompile_fixtures.py +++ b/tests/common/precompile_fixtures.py @@ -14,7 +14,6 @@ Address, Alloc, Bytecode, - Fork, Op, Storage, Transaction, @@ -174,37 +173,14 @@ def post( } -@pytest.fixture -def tx_gas_limit(fork: Fork, input_data: bytes, precompile_gas: int) -> int: - """ - Transaction gas limit used for the test (Can be overridden in the test). - """ - intrinsic_gas_cost_calculator = ( - fork.transaction_intrinsic_cost_calculator() - ) - memory_expansion_gas_calculator = fork.memory_expansion_gas_calculator() - # `call_contract_code` performs up to 3 SSTOREs per call - # (succeeds-flag, output-length, output-hash); under EIP-8037 - # each adds `sstore_state_gas()` of state work (0 otherwise). - extra_gas = 100_000 + 3 * Op.SSTORE(new_value=1).state_cost(fork) - return ( - extra_gas - + intrinsic_gas_cost_calculator(calldata=input_data) - + memory_expansion_gas_calculator(new_bytes=len(input_data)) - + precompile_gas - ) - - @pytest.fixture def tx( input_data: bytes, - tx_gas_limit: int, call_contract_address: Address, sender: EOA, ) -> Transaction: """Transaction for the test.""" return Transaction( - gas_limit=tx_gas_limit, data=input_data, to=call_contract_address, sender=sender, diff --git a/tests/osaka/eip7883_modexp_gas_increase/conftest.py b/tests/osaka/eip7883_modexp_gas_increase/conftest.py index 1242efb8010..4f824901b99 100644 --- a/tests/osaka/eip7883_modexp_gas_increase/conftest.py +++ b/tests/osaka/eip7883_modexp_gas_increase/conftest.py @@ -15,7 +15,6 @@ Transaction, keccak256, ) -from execution_testing.forks import London, Osaka from ...byzantium.eip198_modexp_precompile.helpers import ModExpInput from .spec import Spec, Spec7883 @@ -231,11 +230,13 @@ def precompile_gas( Calculate gas cost for the ModExp precompile and verify it matches expected gas. """ - spec = Spec if fork < Osaka else Spec7883 + spec = Spec if not fork.is_eip_enabled(7883) else Spec7883 try: calculated_gas = spec.calculate_gas_cost(modexp_input) if gas_old is not None and gas_new is not None: - expected_gas = gas_old if fork < Osaka else gas_new + expected_gas = ( + gas_old if not fork.is_eip_enabled(7883) else gas_new + ) base_len = len(modexp_input.base) exp_len = len(modexp_input.exponent) mod_len = len(modexp_input.modulus) @@ -253,7 +254,7 @@ def precompile_gas( except Exception: # Used for `test_modexp_invalid_inputs` we expect the call to not # succeed. Return is for completeness. - return 500 if fork >= Osaka else 200 + return 500 if fork.is_eip_enabled(7883) else 200 @pytest.fixture @@ -264,36 +265,18 @@ def precompile_gas_modifier() -> int: @pytest.fixture def tx( - fork: Fork, pre: Alloc, gas_measure_contract: Address, modexp_input: ModExpInput, - tx_gas_limit: int, ) -> Transaction: """Transaction to measure gas consumption of the ModExp precompile.""" return Transaction( - ty=0x02 if fork >= London else 0x00, sender=pre.fund_eoa(), to=gas_measure_contract, data=bytes(modexp_input), - gas_limit=tx_gas_limit, ) -@pytest.fixture -def tx_gas_limit( - total_tx_gas_needed: int, fork: Fork, env: Environment -) -> int: - """ - Transaction gas limit used for the test (Can be overridden in the test). - """ - if fork.is_eip_enabled(8037): - # EIP-8037: tx gas limit can exceed TX_MAX_GAS_LIMIT. - return min(total_tx_gas_needed, env.gas_limit) - tx_gas_limit_cap = fork.transaction_gas_limit_cap() or env.gas_limit - return min(tx_gas_limit_cap, total_tx_gas_needed) - - @pytest.fixture def post( gas_measure_contract: Address, diff --git a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py index 8f7e704891f..a31b86c2e19 100644 --- a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py +++ b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py @@ -398,7 +398,6 @@ def test_modexp_used_in_transaction_entry_points( pre: Alloc, tx: Transaction, modexp_input: bytes, - tx_gas_limit: int, call_values: int, ) -> None: """ @@ -409,7 +408,6 @@ def test_modexp_used_in_transaction_entry_points( to=Spec.MODEXP_ADDRESS, sender=pre.fund_eoa(), data=bytes(modexp_input), - gas_limit=tx_gas_limit, value=call_values, ) state_test(pre=pre, tx=tx, post={}) diff --git a/tests/osaka/eip7918_blob_reserve_price/test_blob_base_fee.py b/tests/osaka/eip7918_blob_reserve_price/test_blob_base_fee.py index 8a51a238574..9a8b60f1837 100644 --- a/tests/osaka/eip7918_blob_reserve_price/test_blob_base_fee.py +++ b/tests/osaka/eip7918_blob_reserve_price/test_blob_base_fee.py @@ -14,7 +14,6 @@ Alloc, Block, BlockchainTestFiller, - Bytecode, Environment, Fork, Hash, @@ -35,34 +34,14 @@ @pytest.fixture def sender(pre: Alloc) -> Address: """Sender account with enough balance for tests.""" - return pre.fund_eoa(10**18) + return pre.fund_eoa() @pytest.fixture -def destination_code() -> Bytecode: - """Bytecode that stores the blob base fee at slot 0.""" - return Op.SSTORE(0, Op.BLOBBASEFEE) - - -@pytest.fixture -def destination_account(pre: Alloc, destination_code: Bytecode) -> Address: +def destination_account(pre: Alloc) -> Address: """Contract that stores the blob base fee for verification.""" - return pre.deploy_contract(destination_code) - - -@pytest.fixture -def tx_gas(fork: Fork, destination_code: Bytecode) -> int: - """ - Gas limit sized exactly for the destination's single SSTORE 0->non-zero - plus the EIP-1706 stipend slack and (under EIP-8037) one - `sstore_state_gas` of reservoir headroom. - """ - intrinsic = fork.transaction_intrinsic_cost_calculator() - return ( - intrinsic() - + destination_code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ) + code = Op.SSTORE(0, Op.BLOBBASEFEE) + return pre.deploy_contract(code) @pytest.fixture @@ -84,7 +63,6 @@ def blob_hashes_per_tx(blobs_per_tx: int) -> List[Hash]: def tx( sender: Address, destination_account: Address, - tx_gas: int, tx_value: int, blob_hashes_per_tx: List[Hash], block_base_fee_per_gas: int, @@ -96,7 +74,6 @@ def tx( sender=sender, to=destination_account, value=tx_value, - gas_limit=tx_gas, max_fee_per_gas=block_base_fee_per_gas, max_priority_fee_per_gas=0, max_fee_per_blob_gas=tx_max_fee_per_blob_gas, @@ -109,7 +86,6 @@ def tx( def block( tx: Transaction, fork: Fork, - destination_code: Bytecode, parent_excess_blobs: int, parent_blobs: int, block_base_fee_per_gas: int, @@ -125,14 +101,9 @@ def block( parent_blob_count=parent_blobs, parent_base_fee_per_gas=block_base_fee_per_gas, ) - intrinsic = fork.transaction_intrinsic_cost_calculator() - code_state = destination_code.state_cost(fork) - code_regular = destination_code.gas_cost(fork) - code_state - expected_gas_used = max(intrinsic() + code_regular, code_state) return Block( txs=[tx], header_verify=Header( - gas_used=expected_gas_used, excess_blob_gas=expected_excess_blob_gas, blob_gas_used=blob_count * blob_gas_per_blob, ), diff --git a/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py b/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py index 810bc410635..c2a2ee94c64 100644 --- a/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py +++ b/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py @@ -262,7 +262,11 @@ def parent_block_txs( parent_base_fee_per_gas=parent_base_fee_per_gas, required_base_fee_per_gas=transition_block_base_fee_per_gas, ) - blob_txs_execution_gas = sum(tx.gas_limit for tx in parent_block_blob_txs) + blob_txs_execution_gas = 0 + for tx in parent_block_blob_txs: + tx_gas_limit = tx.gas_limit + assert tx_gas_limit is not None + blob_txs_execution_gas += tx_gas_limit assert blob_txs_execution_gas <= required_gas_used extra_tx_gas_limit = required_gas_used - blob_txs_execution_gas assert extra_tx_gas_limit >= 21_000 diff --git a/tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py b/tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py index 21120f10cff..d47e6c7114f 100644 --- a/tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py +++ b/tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py @@ -560,7 +560,9 @@ def _exact_size_transactions_impl( transactions.append(last_tx) nonce += 1 - total_gas_used += last_tx.gas_limit + last_tx_gas_limit = last_tx.gas_limit + assert last_tx_gas_limit is not None + total_gas_used += last_tx_gas_limit current_size = get_block_rlp_size( fork, diff --git a/tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py b/tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py index 496667236e1..7b294c31b1b 100644 --- a/tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py +++ b/tests/osaka/eip7939_count_leading_zeros/test_count_leading_zeros.py @@ -14,7 +14,6 @@ EIPChecklist, Environment, Fork, - Header, Op, StateTestFiller, Storage, @@ -118,7 +117,6 @@ def test_clz_opcode_scenarios( tx = Transaction( to=contract_address, sender=sender, - gas_limit=200_000, ) post = { contract_address: Account(storage={"0x00": expected_clz}), @@ -143,7 +141,7 @@ def test_clz_gas_cost( storage={"0x00": "0xdeadbeef"}, ) sender = pre.fund_eoa() - tx = Transaction(to=contract_address, sender=sender, gas_limit=200_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( # Cost measured is CLZ + PUSH1 storage={"0x00": Op.CLZ.gas_cost(fork)} @@ -182,7 +180,7 @@ def test_clz_gas_cost_boundary( storage={"0x00": "0xdeadbeef"}, ) - tx = Transaction(to=call_address, sender=pre.fund_eoa(), gas_limit=200_000) + tx = Transaction(to=call_address, sender=pre.fund_eoa()) post = { call_address: Account(storage={"0x00": 0 if gas_cost_delta < 0 else 1}) @@ -206,11 +204,7 @@ def test_clz_stack_underflow(state_test: StateTestFiller, pre: Alloc) -> None: code=Op.SSTORE(0, Op.CALL(gas=0xFFFF, address=callee_address)), storage={"0x00": "0xdeadbeef"}, ) - tx = Transaction( - to=caller_address, - sender=sender, - gas_limit=200_000, - ) + tx = Transaction(to=caller_address, sender=sender) post = { caller_address: Account( storage={"0x00": 0} # Call failed due to stack underflow @@ -234,45 +228,23 @@ def test_clz_stack_not_overflow( code += Op.PUSH0 * (max_stack_items - 2) for i in range(256): - # `i=255` writes 0 to slot 255 (CLZ(1<<255) == 0); pin metadata so - # `gas_cost(fork)` picks the no-op SSTORE branch instead of the - # default cold zero->non-zero assumption. - sstore = Op.SSTORE.with_metadata( - key_warm=False, - original_value=0, - current_value=0, - new_value=255 - i, - ) - code += Op.PUSH1(i) + Op.CLZ(1 << i) + Op.SWAP1 + sstore + code += Op.PUSH1(i) + Op.CLZ(1 << i) + Op.SWAP1 + Op.SSTORE code_address = pre.deploy_contract(code=code) post[code_address] = Account(storage={i: 255 - i for i in range(256)}) - intrinsic = fork.transaction_intrinsic_cost_calculator() - code_state = code.state_cost(fork) - code_regular = code.gas_cost(fork) - code_state - # Trailing SSTORE is a no-op (~2100); EIP-1706 requires gas_left >= - # CALL_STIPEND+1 at entry, so reserve that as slack on top of exact. - eip_1706_slack = fork.gas_costs().CALL_STIPEND + 1 tx = Transaction( to=code_address, sender=pre.fund_eoa(), - gas_limit=(intrinsic() + code_regular + code_state + eip_1706_slack), ) - expected_gas_used = max(intrinsic() + code_regular, code_state) - state_test( - pre=pre, - post=post, - tx=tx, - blockchain_test_header_verify=Header(gas_used=expected_gas_used), - ) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("Osaka") def test_clz_push_operation_same_value( - state_test: StateTestFiller, pre: Alloc, fork: Fork + state_test: StateTestFiller, pre: Alloc ) -> None: """Test CLZ opcode returns the same value via different push operations.""" storage = {} @@ -289,19 +261,7 @@ def test_clz_push_operation_same_value( code_address = pre.deploy_contract(code=code) - intrinsic = fork.transaction_intrinsic_cost_calculator() - code_state = code.state_cost(fork) - code_regular = code.gas_cost(fork) - code_state - tx = Transaction( - to=code_address, - sender=pre.fund_eoa(), - gas_limit=( - intrinsic() - + code_regular - + code_state - + Op.SSTORE(new_value=1).state_cost(fork) - ), - ) + tx = Transaction(to=code_address, sender=pre.fund_eoa()) post = { code_address: Account( @@ -309,13 +269,7 @@ def test_clz_push_operation_same_value( ) } - expected_gas_used = max(intrinsic() + code_regular, code_state) - state_test( - pre=pre, - post=post, - tx=tx, - blockchain_test_header_verify=Header(gas_used=expected_gas_used), - ) + state_test(pre=pre, post=post, tx=tx) @EIPChecklist.Opcode.Test.ForkTransition.Invalid() @@ -344,7 +298,6 @@ def test_clz_fork_transition( to=caller_address, sender=sender, nonce=0, - gas_limit=200_000, ) ], ), @@ -355,7 +308,6 @@ def test_clz_fork_transition( to=caller_address, sender=sender, nonce=1, - gas_limit=200_000, ) ], ), @@ -366,7 +318,6 @@ def test_clz_fork_transition( to=caller_address, sender=sender, nonce=2, - gas_limit=200_000, ) ], ), @@ -412,7 +363,6 @@ def test_clz_fork_transition( def test_clz_jump_operation( state_test: StateTestFiller, pre: Alloc, - fork: Fork, opcode: Op, valid_jump: bool, jumpi_condition: bool, @@ -442,29 +392,7 @@ def test_clz_jump_operation( storage={"0x00": "0xdeadbeef"}, ) - intrinsic = fork.transaction_intrinsic_cost_calculator() - # The inner CALL forwards a fixed 0xFFFF (65535) regular gas — too - # tight for callee's SSTORE state to spill into. Lift `gas_limit` past - # the EIP-7825 cap so the EIP-8037 reservoir holds the callee's state - # work and parent's SSTORE state, plus EIP-1706 slack. - gas_cap = fork.transaction_gas_limit_cap() - state_needed = caller_code.state_cost(fork) + callee_code.state_cost(fork) - if gas_cap is not None and state_needed > 0: - gas_limit = ( - gas_cap + state_needed + Op.SSTORE(new_value=1).state_cost(fork) - ) - else: - gas_limit = ( - intrinsic() - + caller_code.gas_cost(fork) - + caller_forwarded_gas - + Op.SSTORE(new_value=1).state_cost(fork) - ) - tx = Transaction( - to=caller_address, - sender=pre.fund_eoa(), - gas_limit=gas_limit, - ) + tx = Transaction(to=caller_address, sender=pre.fund_eoa()) expected_clz = 255 - bits @@ -488,7 +416,6 @@ def test_clz_jump_operation( def test_clz_from_set_code( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test the CLZ opcode in a set-code transaction.""" storage = Storage() @@ -504,10 +431,7 @@ def test_clz_from_set_code( set_code_to_address = pre.deploy_contract(set_code) - # 4 first-time SSTOREs in the delegated code each add - # `sstore_state_gas` under EIP-8037 (0 otherwise). tx = Transaction( - gas_limit=200_000 + 4 * Op.SSTORE(new_value=1).state_cost(fork), to=auth_signer, value=0, authorization_list=[ @@ -581,11 +505,7 @@ def test_clz_code_copy_operation( } ) } - tx = Transaction( - to=clz_contract_address, - sender=pre.fund_eoa(), - gas_limit=200_000, - ) + tx = Transaction(to=clz_contract_address, sender=pre.fund_eoa()) state_test(pre=pre, post=post, tx=tx) @@ -644,11 +564,7 @@ def test_clz_with_memory_operation( ), } - tx = Transaction( - to=clz_contract_address, - sender=pre.fund_eoa(), - gas_limit=200_000, - ) + tx = Transaction(to=clz_contract_address, sender=pre.fund_eoa()) state_test(pre=pre, post=post, tx=tx) @@ -669,12 +585,7 @@ def test_clz_initcode_context(state_test: StateTestFiller, pre: Alloc) -> None: contract_address = compute_create_address(address=sender_address, nonce=0) - tx = Transaction( - to=None, - gas_limit=6_000_000, - data=init_code, - sender=sender_address, - ) + tx = Transaction(to=None, data=init_code, sender=sender_address) post = { contract_address: Account(storage=storage), @@ -687,7 +598,7 @@ def test_clz_initcode_context(state_test: StateTestFiller, pre: Alloc) -> None: @pytest.mark.valid_from("Osaka") @pytest.mark.parametrize("opcode", [Op.CREATE, Op.CREATE2]) def test_clz_initcode_create( - state_test: StateTestFiller, pre: Alloc, fork: Fork, opcode: Op + state_test: StateTestFiller, pre: Alloc, opcode: Op ) -> None: """Test CLZ opcode behavior in initcode executed via CREATE/CREATE2.""" bits = [0, 1, 64, 128, 255] # expected values: [255, 254, 191, 127, 0] @@ -715,16 +626,8 @@ def test_clz_initcode_create( opcode=opcode, ) - # CREATE charges NEW_ACCOUNT plus 5 first-time SSTOREs in the - # deployed contract; both terms add state gas under EIP-8037 - # (0 otherwise). tx = Transaction( to=factory_contract_address, - gas_limit=( - 200_000 - + fork.gas_costs().NEW_ACCOUNT - + 5 * Op.SSTORE(new_value=1).state_cost(fork) - ), data=ext_code, sender=sender_address, ) @@ -769,7 +672,6 @@ class CallingContext: def test_clz_call_operation( state_test: StateTestFiller, pre: Alloc, - fork: Fork, opcode: Op, context: CallingContext, ) -> None: @@ -798,13 +700,7 @@ def test_clz_call_operation( callee_address = pre.deploy_contract(code=callee_code) - # 3 first-time SSTOREs in the callee (when context != no_context) - # and 3 more in the caller (when context == callee_context); each - # adds `sstore_state_gas` under EIP-8037 (0 otherwise). - sstore_state = Op.SSTORE(new_value=1).state_cost(fork) - subcall_gas = 0xFFFF + 3 * sstore_state caller_code = opcode( - gas=subcall_gas, address=callee_address, ret_offset=0, ret_size=len(test_cases) * 0x20, @@ -817,11 +713,7 @@ def test_clz_call_operation( caller_address = pre.deploy_contract(code=caller_code) - tx = Transaction( - to=caller_address, - sender=pre.fund_eoa(), - gas_limit=200_000 + 6 * sstore_state, - ) + tx = Transaction(to=caller_address, sender=pre.fund_eoa()) post = {} diff --git a/tests/osaka/eip7951_p256verify_precompiles/conftest.py b/tests/osaka/eip7951_p256verify_precompiles/conftest.py index 3b5ff9c3d99..f79cc77a4d1 100644 --- a/tests/osaka/eip7951_p256verify_precompiles/conftest.py +++ b/tests/osaka/eip7951_p256verify_precompiles/conftest.py @@ -148,37 +148,15 @@ def post( } -@pytest.fixture -def tx_gas_limit(fork: Fork, input_data: bytes, precompile_gas: int) -> int: - """ - Transaction gas limit used for the test (Can be overridden in the test). - """ - intrinsic_gas_cost_calculator = ( - fork.transaction_intrinsic_cost_calculator() - ) - memory_expansion_gas_calculator = fork.memory_expansion_gas_calculator() - extra_gas = 100_000 - if fork.is_eip_enabled(8037): - extra_gas = 500_000 - return ( - extra_gas - + intrinsic_gas_cost_calculator(calldata=input_data) - + memory_expansion_gas_calculator(new_bytes=len(input_data)) - + precompile_gas - ) - - @pytest.fixture def tx( input_data: bytes, - tx_gas_limit: int, call_contract_address: Address, sender: EOA, ) -> Transaction: """Transaction for the test.""" return Transaction( ty=0x02, - gas_limit=tx_gas_limit, data=input_data, to=call_contract_address, sender=sender, diff --git a/tests/osaka/eip7951_p256verify_precompiles/test_p256verify.py b/tests/osaka/eip7951_p256verify_precompiles/test_p256verify.py index 77fc1abf0f3..8667f465f6b 100644 --- a/tests/osaka/eip7951_p256verify_precompiles/test_p256verify.py +++ b/tests/osaka/eip7951_p256verify_precompiles/test_p256verify.py @@ -1120,7 +1120,6 @@ def test_precompile_will_return_success_with_tx_value( contract_address = pre.deploy_contract(call_256verify_bytecode) tx = Transaction( sender=sender, - gas_limit=1000000, to=contract_address, value=1000, data=input_data, @@ -1262,9 +1261,7 @@ def test_contract_creation_transaction( tx = Transaction( sender=sender, - gas_limit=1000000, to=None, - value=0, data=contract_bytecode + input_data, ) @@ -1345,7 +1342,6 @@ def test_contract_initcode( tx = Transaction( sender=sender, - gas_limit=(1_000_000 if fork.is_eip_enabled(8037) else 200_000), to=factory_contract_address, value=0, data=call_256verify_bytecode + input_data, diff --git a/tests/osaka/eip7951_p256verify_precompiles/test_p256verify_before_fork.py b/tests/osaka/eip7951_p256verify_precompiles/test_p256verify_before_fork.py index 1c8b5f141b8..da8efdfd589 100644 --- a/tests/osaka/eip7951_p256verify_precompiles/test_p256verify_before_fork.py +++ b/tests/osaka/eip7951_p256verify_precompiles/test_p256verify_before_fork.py @@ -37,28 +37,6 @@ def precompile_gas(vector_gas_value: int | None, fork: TransitionFork) -> int: return gas -@pytest.fixture -def tx_gas_limit( - fork: TransitionFork, input_data: bytes, precompile_gas: int -) -> int: - """ - Transaction gas limit used for the test (Can be overridden in the test). - """ - intrinsic_gas_cost_calculator = ( - fork.transitions_from().transaction_intrinsic_cost_calculator() - ) - memory_expansion_gas_calculator = ( - fork.transitions_from().memory_expansion_gas_calculator() - ) - extra_gas = 100_000 - return ( - extra_gas - + intrinsic_gas_cost_calculator(calldata=input_data) - + memory_expansion_gas_calculator(new_bytes=len(input_data)) - + precompile_gas - ) - - @pytest.mark.parametrize( "precompile_address,input_data,precompile_gas_modifier", [ diff --git a/tests/paris/eip7610_create_collision/test_collision_selfdestruct.py b/tests/paris/eip7610_create_collision/test_collision_selfdestruct.py index 2c6e3886d7e..a0f58bbbf18 100644 --- a/tests/paris/eip7610_create_collision/test_collision_selfdestruct.py +++ b/tests/paris/eip7610_create_collision/test_collision_selfdestruct.py @@ -115,13 +115,9 @@ def test_selfdestruct_after_create2_collision( env=env, pre=pre, post=post, - # 3 first-time SSTOREs (deployer's create2_result and - # controller's two outcome flags) each charge state gas under - # EIP-8037 (0 otherwise). tx=Transaction( sender=sender, to=controller, - gas_limit=2_000_000 + 3 * Op.SSTORE(new_value=1).state_cost(fork), data=initcode, ), ) diff --git a/tests/paris/eip7610_create_collision/test_initcollision.py b/tests/paris/eip7610_create_collision/test_initcollision.py index 04b0677e46c..544a7442d44 100644 --- a/tests/paris/eip7610_create_collision/test_initcollision.py +++ b/tests/paris/eip7610_create_collision/test_initcollision.py @@ -76,14 +76,11 @@ def test_init_collision_create_tx( Test that a contract creation transaction exceptionally aborts when the target address has a non-empty storage, balance, nonce, or code. """ - # Contract-creation tx: intrinsic includes NEW_ACCOUNT state gas - # under EIP-8037 (0 otherwise). tx = Transaction( sender=pre.fund_eoa(), ty=tx_type, to=None, data=initcode, - gas_limit=200_000 + fork.gas_costs().NEW_ACCOUNT, ) created_contract_address = tx.created_contract @@ -152,7 +149,6 @@ def test_init_collision_create_opcode( sender=pre.fund_eoa(), to=contract_creator_address, data=initcode, - gas_limit=2_000_000, ) pre[created_contract_address] = Account( diff --git a/tests/paris/eip7610_create_collision/test_revert_in_create.py b/tests/paris/eip7610_create_collision/test_revert_in_create.py index 676ea852e14..d733a1bddc9 100644 --- a/tests/paris/eip7610_create_collision/test_revert_in_create.py +++ b/tests/paris/eip7610_create_collision/test_revert_in_create.py @@ -7,7 +7,6 @@ Account, Alloc, Bytecode, - Fork, Initcode, Op, StateTestFiller, @@ -64,7 +63,6 @@ def test_collision_with_create2_revert_in_initcode( sender=sender, to=None, data=initcode, - gas_limit=10_000_000, ) # Pre-existing account with storage - this causes collision per EIP-7610. @@ -108,7 +106,6 @@ def test_create2_collision_storage( state_test: StateTestFiller, pre: Alloc, create2_initcode: Bytecode, - fork: Fork, ) -> None: """ Test that CREATE2 fails when targeting an address with pre-existing @@ -129,16 +126,11 @@ def test_create2_collision_storage( ) sender = pre.fund_eoa() - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( sender=sender, to=None, data=deployer_code, value=1, - gas_limit=gas_limit, ) deployer_address = tx.created_contract diff --git a/tests/paris/security/test_selfdestruct_balance_bug.py b/tests/paris/security/test_selfdestruct_balance_bug.py index ec68a734a95..719f78d3c93 100644 --- a/tests/paris/security/test_selfdestruct_balance_bug.py +++ b/tests/paris/security/test_selfdestruct_balance_bug.py @@ -19,7 +19,6 @@ Block, BlockchainTestFiller, CalldataCase, - Fork, Initcode, Op, Switch, @@ -30,7 +29,7 @@ @pytest.mark.valid_from("Constantinople") def test_tx_selfdestruct_balance_bug( - blockchain_test: BlockchainTestFiller, pre: Alloc, fork: Fork + blockchain_test: BlockchainTestFiller, pre: Alloc ) -> None: """ Test that the vulnerability is not present by checking the balance of the @@ -96,56 +95,31 @@ def test_tx_selfdestruct_balance_bug( sender = pre.fund_eoa() - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - inner_call_gas = 100_000 # cc forwards this to each aa CALL - # Tx1 budget: cc bytecode + CREATE'd initcode execution + NEW_ACCOUNT - # state for the CREATE + the two forwarded inner CALL gas envelopes, - # plus EIP-1706 stipend slack for the trailing SSTORE. - cc_tx_gas = ( - intrinsic_calc(calldata=aa_code) - + cc_code.gas_cost(fork) - + aa_code.gas_cost(fork) - + fork.gas_costs().NEW_ACCOUNT - + 2 * inner_call_gas - + Op.SSTORE(new_value=1).state_cost(fork) - ) - # Balance-check tx: one zero->non-zero SSTORE. - balance_tx_gas = ( - intrinsic_calc() - + balance_code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ) - # Plain value transfer to a (post-EIP-6780) non-existent account. - aa_value_tx_gas = intrinsic_calc() - blocks = [ Block( txs=[ - # Sender invokes caller, caller invokes 0xaa. + # Sender invokes caller, caller invokes 0xaa: + # calling with 1 wei call Transaction( sender=sender, to=cc_address, data=aa_code, - gas_limit=cc_tx_gas, ), - # Capture aa's balance after tx 1 (post selfdestruct). + # Dummy tx to store balance of 0xaa after first TX. Transaction( sender=sender, to=balance_address_1, - gas_limit=balance_tx_gas, ), - # Sender calls aa with 5 wei; aa no longer has code. + # Sender calls 0xaa with 5 wei. Transaction( sender=sender, to=aa_location, - gas_limit=aa_value_tx_gas, value=5, ), - # Capture aa's balance after tx 3. + # Dummy tx to store balance of 0xaa after second TX. Transaction( sender=sender, to=balance_address_2, - gas_limit=balance_tx_gas, ), ], ), diff --git a/tests/prague/eip2537_bls_12_381_precompiles/conftest.py b/tests/prague/eip2537_bls_12_381_precompiles/conftest.py index 3c2777df3c7..eb0c3ad4cb7 100644 --- a/tests/prague/eip2537_bls_12_381_precompiles/conftest.py +++ b/tests/prague/eip2537_bls_12_381_precompiles/conftest.py @@ -13,7 +13,6 @@ precompile_gas_modifier, # noqa: F401 sender, # noqa: F401 tx, # noqa: F401 - tx_gas_limit, # noqa: F401 ) from .helpers import BLSPointGenerator from .spec import build_gas_calculation_function_map 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 ac69e5a7299..f0808bd3273 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 @@ -49,28 +49,6 @@ def precompile_gas( return calculated_gas -@pytest.fixture -def tx_gas_limit( - fork: TransitionFork, input_data: bytes, precompile_gas: int -) -> int: - """ - Transaction gas limit used for the test (Can be overridden in the test). - """ - intrinsic_gas_cost_calculator = ( - fork.transitions_from().transaction_intrinsic_cost_calculator() - ) - memory_expansion_gas_calculator = ( - fork.transitions_from().memory_expansion_gas_calculator() - ) - extra_gas = 100_000 - return ( - extra_gas - + intrinsic_gas_cost_calculator(calldata=input_data) - + memory_expansion_gas_calculator(new_bytes=len(input_data)) - + precompile_gas - ) - - @pytest.mark.parametrize( "precompile_address,input_data", [ diff --git a/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_variable_length_input_contracts.py b/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_variable_length_input_contracts.py index 40769eaf3de..8d4a4002710 100644 --- a/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_variable_length_input_contracts.py +++ b/tests/prague/eip2537_bls_12_381_precompiles/test_bls12_variable_length_input_contracts.py @@ -13,7 +13,6 @@ from execution_testing import ( Alloc, Bytecode, - Environment, Fork, Op, ParameterSet, @@ -67,21 +66,6 @@ def input_length_modifier() -> int: return 0 -@pytest.fixture -def env(fork: Fork, tx: Transaction) -> Environment: - """Environment used for all tests.""" - env = Environment() - tx_gas_limit_cap = fork.transaction_gas_limit_cap() - if tx_gas_limit_cap is not None: - assert tx.gas_limit <= tx_gas_limit_cap, ( - "tx exceeds gas limit cap: " - f"{int(tx.gas_limit)} > {tx_gas_limit_cap}" - ) - if tx.gas_limit > env.gas_limit: - env = Environment(gas_limit=tx.gas_limit) - return env - - @pytest.fixture def call_contract_code( precompile_address: int, @@ -189,22 +173,6 @@ def tx_gas_limit_calculator( ) -@pytest.fixture -def tx_gas_limit( - fork: Fork, - input_data: bytes, - precompile_gas_list: List[int], - precompile_data_length_list: List[int], -) -> int: - """ - Transaction gas limit used for the test (Can be overridden in the test). - """ - assert len(input_data) == 0, "Expected empty data in the transaction." - return tx_gas_limit_calculator( - fork, precompile_gas_list, max(precompile_data_length_list) - ) - - def get_split_discount_table_by_fork( gas_fn: Callable, discount_table_length: int, element_length: int ) -> Callable[[Fork], List[ParameterSet]]: @@ -303,7 +271,6 @@ def get_range_cost(min_index: int, max_index: int) -> int: @pytest.mark.slow() def test_valid_gas_g1msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -316,7 +283,6 @@ def test_valid_gas_g1msm( If any of the calls fail, the test will fail. """ state_test( - env=env, pre=pre, tx=tx, post=post, @@ -337,14 +303,12 @@ def test_valid_gas_g1msm( @pytest.mark.parametrize("precompile_address", [Spec.G1MSM]) def test_invalid_zero_gas_g1msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, ) -> None: """Test the BLS12_G1MSM precompile calling it with zero gas.""" state_test( - env=env, pre=pre, tx=tx, post=post, @@ -365,7 +329,6 @@ def test_invalid_zero_gas_g1msm( @pytest.mark.eels_base_coverage def test_invalid_gas_g1msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -378,7 +341,6 @@ def test_invalid_gas_g1msm( If any of the calls succeeds, the test will fail. """ state_test( - env=env, pre=pre, tx=tx, post=post, @@ -399,14 +361,12 @@ def test_invalid_gas_g1msm( @pytest.mark.parametrize("precompile_address", [Spec.G1MSM]) def test_invalid_zero_length_g1msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, ) -> None: """Test the BLS12_G1MSM precompile by passing an input with zero length.""" state_test( - env=env, pre=pre, tx=tx, post=post, @@ -430,7 +390,6 @@ def test_invalid_zero_length_g1msm( @pytest.mark.parametrize("precompile_address", [Spec.G1MSM]) def test_invalid_length_g1msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -443,7 +402,6 @@ def test_invalid_length_g1msm( If any of the calls succeeds, the test will fail. """ state_test( - env=env, pre=pre, tx=tx, post=post, @@ -462,7 +420,6 @@ def test_invalid_length_g1msm( @pytest.mark.slow() def test_valid_gas_g2msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -475,7 +432,6 @@ def test_valid_gas_g2msm( If any of the calls fail, the test will fail. """ state_test( - env=env, pre=pre, tx=tx, post=post, @@ -496,14 +452,12 @@ def test_valid_gas_g2msm( @pytest.mark.parametrize("precompile_address", [Spec.G2MSM]) def test_invalid_zero_gas_g2msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, ) -> None: """Test the BLS12_G2MSM precompile calling it with zero gas.""" state_test( - env=env, pre=pre, tx=tx, post=post, @@ -524,7 +478,6 @@ def test_invalid_zero_gas_g2msm( @pytest.mark.eels_base_coverage def test_invalid_gas_g2msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -537,7 +490,6 @@ def test_invalid_gas_g2msm( If any of the calls succeeds, the test will fail. """ state_test( - env=env, pre=pre, tx=tx, post=post, @@ -558,14 +510,12 @@ def test_invalid_gas_g2msm( @pytest.mark.parametrize("precompile_address", [Spec.G2MSM]) def test_invalid_zero_length_g2msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, ) -> None: """Test the BLS12_G2MSM precompile by passing an input with zero length.""" state_test( - env=env, pre=pre, tx=tx, post=post, @@ -589,7 +539,6 @@ def test_invalid_zero_length_g2msm( @pytest.mark.parametrize("precompile_address", [Spec.G2MSM]) def test_invalid_length_g2msm( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -602,7 +551,6 @@ def test_invalid_length_g2msm( If any of the calls succeeds, the test will fail. """ state_test( - env=env, pre=pre, tx=tx, post=post, @@ -621,7 +569,6 @@ def test_invalid_length_g2msm( @pytest.mark.slow() def test_valid_gas_pairing( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -633,7 +580,6 @@ def test_valid_gas_pairing( If any of the calls fails, the test will fail. """ state_test( - env=env, pre=pre, tx=tx, post=post, @@ -654,14 +600,12 @@ def test_valid_gas_pairing( @pytest.mark.parametrize("precompile_address", [Spec.PAIRING]) def test_invalid_zero_gas_pairing( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, ) -> None: """Test the BLS12_PAIRING precompile calling it with zero gas.""" state_test( - env=env, pre=pre, tx=tx, post=post, @@ -681,7 +625,6 @@ def test_invalid_zero_gas_pairing( @pytest.mark.parametrize("precompile_address", [Spec.PAIRING]) def test_invalid_gas_pairing( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -694,7 +637,6 @@ def test_invalid_gas_pairing( If any of the calls succeeds, the test will fail. """ state_test( - env=env, pre=pre, tx=tx, post=post, @@ -715,7 +657,6 @@ def test_invalid_gas_pairing( @pytest.mark.parametrize("precompile_address", [Spec.PAIRING]) def test_invalid_zero_length_pairing( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -724,7 +665,6 @@ def test_invalid_zero_length_pairing( Test the BLS12_PAIRING precompile by passing an input with zero length. """ state_test( - env=env, pre=pre, tx=tx, post=post, @@ -748,7 +688,6 @@ def test_invalid_zero_length_pairing( @pytest.mark.parametrize("precompile_address", [Spec.PAIRING]) def test_invalid_length_pairing( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: dict, tx: Transaction, @@ -761,7 +700,6 @@ def test_invalid_length_pairing( If any of the calls succeeds, the test will fail. """ state_test( - env=env, pre=pre, tx=tx, post=post, diff --git a/tests/prague/eip6110_deposits/conftest.py b/tests/prague/eip6110_deposits/conftest.py index c9ec19524f8..6e50c4f2e36 100644 --- a/tests/prague/eip6110_deposits/conftest.py +++ b/tests/prague/eip6110_deposits/conftest.py @@ -30,30 +30,13 @@ def prepared_requests( @pytest.fixture def txs( - fork: Fork, prepared_requests: List[DepositInteractionBase], ) -> List[Transaction]: """List of transactions to include in the block.""" txs = [] for r in prepared_requests: txs += r.transactions() - # EIP-7976 (enabled with EIP-8037 on Amsterdam) raises calldata - # floor cost, pushing the intrinsic above the hardcoded - # tx_gas_limit of the large-calldata OOG fixtures. Lift each - # tx's gas_limit to the new intrinsic only when it falls below; - # the tx still OOGs on its first execution opcode, preserving - # the fixture's no-deposits-applied outcome. - if not (fork.is_eip_enabled(7976) and fork.is_eip_enabled(8037)): - return txs - current_calc = fork.transaction_intrinsic_cost_calculator() - bumped: List[Transaction] = [] - for tx in txs: - current_intrinsic = current_calc(calldata=tx.data) - if tx.gas_limit < current_intrinsic: - bumped.append(tx.copy(gas_limit=current_intrinsic)) - else: - bumped.append(tx) - return bumped + return txs @pytest.fixture diff --git a/tests/prague/eip6110_deposits/helpers.py b/tests/prague/eip6110_deposits/helpers.py index e20b7b64966..973a8b34b06 100644 --- a/tests/prague/eip6110_deposits/helpers.py +++ b/tests/prague/eip6110_deposits/helpers.py @@ -85,7 +85,7 @@ class DepositRequest(DepositRequestBase): valid: bool = True """Whether the deposit request is valid or not.""" - gas_limit: int = 1_000_000 + gas_limit: int | None = None """Gas limit for the call.""" calldata_modifier: Callable[[bytes], bytes] = lambda x: x """Calldata modifier function.""" @@ -218,8 +218,6 @@ def with_source_address(self, source_address: Address) -> "DepositRequest": class DepositInteractionBase: """Base class for all types of deposit transactions we want to test.""" - sender_balance: int = 32_000_000_000_000_000_000 * 100 - """Balance of the account that sends the transaction.""" sender_account: EOA | None = None """Account that sends the transaction.""" requests: List[DepositRequest] @@ -260,7 +258,6 @@ def transactions(self) -> List[Transaction]: return [ Transaction( gas_limit=request.gas_limit, - gas_price=0x07, to=request.interaction_contract_address, value=request.value, data=request.calldata, @@ -271,7 +268,7 @@ def transactions(self) -> List[Transaction]: def update_pre(self, pre: Alloc) -> Self: """Return a copy of self with `sender_account` populated.""" - return replace(self, sender_account=pre.fund_eoa(self.sender_balance)) + return replace(self, sender_account=pre.fund_eoa()) def valid_requests(self, current_minimum_fee: int) -> List[DepositRequest]: """ @@ -289,8 +286,6 @@ def valid_requests(self, current_minimum_fee: int) -> List[DepositRequest]: class DepositContract(DepositInteractionBase): """Class used to describe a deposit originated from a contract.""" - tx_gas_limit: int = 1_000_000 - """Gas limit for the transaction.""" tx_value: int = 0 """Value to send with the transaction.""" @@ -326,7 +321,7 @@ def contract_code(self) -> Bytecode: 0, current_offset, len(r.calldata) ) + Op.POP( self.call_type( - Op.GAS if r.gas_limit == -1 else r.gas_limit, + Op.GAS if r.gas_limit is None else r.gas_limit, r.interaction_contract_address, *value_arg, 0, @@ -342,8 +337,6 @@ def transactions(self) -> List[Transaction]: """Return a transaction for the deposit request.""" return [ Transaction( - gas_limit=self.tx_gas_limit, - gas_price=0x07, to=self.entry_address, value=self.tx_value, data=b"".join(r.calldata for r in self.requests), @@ -356,12 +349,7 @@ def update_pre(self, pre: Alloc) -> Self: Return a copy of self with the allocated sender/contract/entry addresses populated. """ - required_balance = self.sender_balance - if self.tx_value > 0: - required_balance = max( - required_balance, self.tx_value + self.tx_gas_limit * 7 - ) - sender_account = pre.fund_eoa(required_balance) + sender_account = pre.fund_eoa() contract_address = pre.deploy_contract( code=self.contract_code, balance=self.contract_balance ) diff --git a/tests/prague/eip6110_deposits/test_deposits.py b/tests/prague/eip6110_deposits/test_deposits.py index a27f3ab7288..61ceccee4e0 100644 --- a/tests/prague/eip6110_deposits/test_deposits.py +++ b/tests/prague/eip6110_deposits/test_deposits.py @@ -13,7 +13,6 @@ Block, BlockchainTestFiller, BlockException, - Environment, Macros, Op, ) @@ -58,7 +57,6 @@ index=0x0, ) ], - sender_balance=120_000_001_000_000_000 * 10**9, ), ], id="single_deposit_from_eoa_huge_amount", @@ -319,7 +317,6 @@ ) for i in range(450) ], - tx_gas_limit=16_777_216, ), ], id="many_deposits_from_contract", @@ -391,7 +388,6 @@ withdrawal_credentials=0x02, amount=1_000_000_000, signature=0x03, - gas_limit=1_000_000, index=0x0, ), ], @@ -409,7 +405,6 @@ amount=1_000_000_000, signature=0x03, index=0x0, - gas_limit=1_000_000, ), DepositRequest( pubkey=0x01, @@ -491,11 +486,16 @@ ) for i in range(450) ], - tx_gas_limit=10_000_000, ), ], id="many_deposits_from_contract_oog", - marks=pytest.mark.slow, + marks=[ + pytest.mark.slow, + pytest.mark.xfail( + reason="Test needs update: amount of successful deposits " + "depends on fork gas schedule" + ), + ], ), pytest.param( [ @@ -712,7 +712,6 @@ ) ], call_depth=271, - tx_gas_limit=16_777_216, ), ], id="single_deposit_from_contract_call_depth_high", @@ -923,12 +922,7 @@ def test_deposit( blocks: List[Block], ) -> None: """Test making a deposit to the beacon chain deposit contract.""" - total_gas_limit = sum(tx.gas_limit for tx in blocks[0].txs) - env = Environment() - if total_gas_limit > env.gas_limit: - env = Environment(gas_limit=total_gas_limit) blockchain_test( - genesis_environment=env, pre=pre, post={}, blocks=blocks, diff --git a/tests/prague/eip7002_el_triggerable_withdrawals/conftest.py b/tests/prague/eip7002_el_triggerable_withdrawals/conftest.py index 441f4117382..ffcfd918794 100644 --- a/tests/prague/eip7002_el_triggerable_withdrawals/conftest.py +++ b/tests/prague/eip7002_el_triggerable_withdrawals/conftest.py @@ -13,10 +13,7 @@ TransitionFork, ) -from .helpers import ( - WithdrawalRequest, - WithdrawalRequestInteractionBase, -) +from .helpers import WithdrawalRequest, WithdrawalRequestInteractionBase from .spec import Spec @@ -123,9 +120,7 @@ def blocks( assert not block_included_requests blocks.append( Block( - txs=sum( - (r.transactions(block_fork) for r in block_requests), [] - ), + txs=sum((r.transactions() for r in block_requests), []), header_verify=header_verify, timestamp=timestamp, ) diff --git a/tests/prague/eip7002_el_triggerable_withdrawals/helpers.py b/tests/prague/eip7002_el_triggerable_withdrawals/helpers.py index 41303a82805..f8d9d1464ff 100644 --- a/tests/prague/eip7002_el_triggerable_withdrawals/helpers.py +++ b/tests/prague/eip7002_el_triggerable_withdrawals/helpers.py @@ -10,7 +10,6 @@ Address, Alloc, Bytecode, - Fork, Op, Transaction, ) @@ -33,7 +32,7 @@ class WithdrawalRequest(WithdrawalRequestBase): """ valid: bool = True """Whether the withdrawal request is valid or not.""" - gas_limit: int = 1_000_000 + gas_limit: int | None = None """Gas limit for the call.""" calldata_modifier: Callable[[bytes], bytes] = lambda x: x """Calldata modifier function.""" @@ -74,14 +73,12 @@ def with_source_address( class WithdrawalRequestInteractionBase: """Base class for all types of withdrawal transactions we want to test.""" - sender_balance: int = 1_000_000_000_000_000_000 - """Balance of the account that sends the transaction.""" sender_account: EOA | None = None """Account that will send the transaction.""" requests: List[WithdrawalRequest] """Withdrawal request to be included in the block.""" - def transactions(self, fork: Fork | None = None) -> List[Transaction]: + def transactions(self) -> List[Transaction]: """Return a transaction for the withdrawal request.""" raise NotImplementedError @@ -110,16 +107,14 @@ class WithdrawalRequestTransaction(WithdrawalRequestInteractionBase): owned account. """ - def transactions(self, fork: Fork | None = None) -> List[Transaction]: + def transactions(self) -> List[Transaction]: """Return a transaction for the withdrawal request.""" - del fork assert self.sender_account is not None, ( "Sender account not initialized" ) return [ Transaction( gas_limit=request.gas_limit, - gas_price=1_000_000_000, to=request.interaction_contract_address, value=request.value, data=request.calldata, @@ -130,7 +125,7 @@ def transactions(self, fork: Fork | None = None) -> List[Transaction]: def update_pre(self, pre: Alloc) -> Self: """Return a copy of self with `sender_account` populated.""" - return replace(self, sender_account=pre.fund_eoa(self.sender_balance)) + return replace(self, sender_account=pre.fund_eoa()) def valid_requests( self, current_minimum_fee: int @@ -150,13 +145,6 @@ def valid_requests( class WithdrawalRequestContract(WithdrawalRequestInteractionBase): """Class used to describe a withdrawal originated from a contract.""" - tx_gas_limit: int = 3_000_000 - """ - Gas limit for the transaction. Sized to comfortably cover - `MAX_WITHDRAWAL_REQUESTS_PER_BLOCK` zero-to-nonzero state-set - charges per tx under EIP-8037 plus regular dispatch overhead. - """ - contract_balance: int = 1_000_000_000_000_000_000 """ Balance of the contract that will make the call to the pre-deploy contract. @@ -174,13 +162,6 @@ class WithdrawalRequestContract(WithdrawalRequestInteractionBase): """Frame depth of the pre-deploy contract when it executes the call.""" extra_code: Bytecode = field(default_factory=Bytecode) """Extra code to be added to the contract code.""" - fund_state_reservoir: bool = False - """ - When True (and EIP-8037 is active), pad `tx_gas_limit` by exactly the - per-request state-set work so the excess funds the EIP-8037 reservoir. - Use only when `tx_gas_limit` is held at the cap (reservoir would - otherwise be empty) and state work must not drain the regular pool. - """ @property def contract_code(self) -> Bytecode: @@ -195,7 +176,7 @@ def contract_code(self) -> Bytecode: 0, current_offset, len(r.calldata) ) + Op.POP( self.call_type( - Op.GAS if r.gas_limit == -1 else r.gas_limit, + Op.GAS if r.gas_limit is None else r.gas_limit, r.interaction_contract_address, *value_arg, 0, @@ -207,27 +188,12 @@ def contract_code(self) -> Bytecode: current_offset += len(r.calldata) return code + self.extra_code - def transactions(self, fork: Fork | None = None) -> List[Transaction]: + def transactions(self) -> List[Transaction]: """Return a transaction for the withdrawal request.""" assert self.entry_address is not None, "Entry address not initialized" - gas_limit = self.tx_gas_limit - if fork is not None and fork.is_eip_enabled(8037): - # Per request the system contract writes 3 entry slots - # (source, pubkey, amount); plus a queue-tail bump and - # one slot of headroom per tx. - sstores_per_request = 3 - queue_tail_and_slack_sstores = 2 - sstores = ( - len(self.requests) * sstores_per_request - + queue_tail_and_slack_sstores - ) - gas_limit += sstores * Op.SSTORE(new_value=1).state_cost(fork) return [ Transaction( - gas_limit=gas_limit, - gas_price=1_000_000_000, to=self.entry_address, - value=0, data=b"".join(r.calldata for r in self.requests), sender=self.sender_account, ) @@ -238,7 +204,7 @@ def update_pre(self, pre: Alloc) -> Self: Return a copy of self with the allocated sender/contract/entry addresses populated. """ - sender_account = pre.fund_eoa(self.sender_balance) + sender_account = pre.fund_eoa() contract_address = pre.deploy_contract( code=self.contract_code, balance=self.contract_balance ) diff --git a/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests.py b/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests.py index 15a071d2fe6..2b13ec75d54 100644 --- a/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests.py +++ b/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests.py @@ -327,13 +327,6 @@ ), ], call_depth=264, - tx_gas_limit=16_777_216, - # tx_gas_limit is held at the cap to test the - # 63/64 drain over the deep call chain. EIP-8037 - # state-set work is funded via the reservoir - # rather than the regular pool, which would - # corrupt the boundary the test pins. - fund_state_reservoir=True, ), ], ], @@ -444,7 +437,6 @@ amount=Spec.MAX_AMOUNT - 1 if i % 2 == 0 else 0, - gas_limit=1_000_000, fee=Spec.get_fee(0), valid=True, ) @@ -468,7 +460,6 @@ if i % 2 == 0 else 0, fee=Spec.get_fee(0), - gas_limit=1_000_000, valid=True, ) for i in range( diff --git a/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests_during_fork.py b/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests_during_fork.py index 2f8118690ed..6805a8b6061 100644 --- a/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests_during_fork.py +++ b/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests_during_fork.py @@ -115,7 +115,9 @@ def test_withdrawal_requests_during_fork( tx_gas_price = deploy_tx.gas_price assert tx_gas_price is not None - deployer_required_balance = deploy_tx.gas_limit * tx_gas_price + tx_gas_limit = deploy_tx.gas_limit + assert tx_gas_limit is not None + deployer_required_balance = tx_gas_limit * tx_gas_price pre.fund_address( Spec.WITHDRAWAL_REQUEST_PREDEPLOY_SENDER, deployer_required_balance diff --git a/tests/prague/eip7251_consolidations/conftest.py b/tests/prague/eip7251_consolidations/conftest.py index 0f79323993c..27604e746a2 100644 --- a/tests/prague/eip7251_consolidations/conftest.py +++ b/tests/prague/eip7251_consolidations/conftest.py @@ -121,10 +121,7 @@ def blocks( assert not block_included_requests blocks.append( Block( - txs=sum( - (r.transactions(active_fork) for r in block_requests), - [], - ), + txs=sum((r.transactions() for r in block_requests), []), header_verify=header_verify, timestamp=timestamp, ) diff --git a/tests/prague/eip7251_consolidations/helpers.py b/tests/prague/eip7251_consolidations/helpers.py index 625092fff93..a5c94caf79e 100644 --- a/tests/prague/eip7251_consolidations/helpers.py +++ b/tests/prague/eip7251_consolidations/helpers.py @@ -10,7 +10,6 @@ Address, Alloc, Bytecode, - Fork, Op, Transaction, ) @@ -28,7 +27,7 @@ class ConsolidationRequest(ConsolidationRequestBase): """Fee to be paid to the system contract for the consolidation request.""" valid: bool = True """Whether the consolidation request is valid or not.""" - gas_limit: int = 1_000_000 + gas_limit: int | None = None """Gas limit for the call.""" calldata_modifier: Callable[[bytes], bytes] = lambda x: x """Calldata modifier function.""" @@ -69,14 +68,12 @@ class ConsolidationRequestInteractionBase: Base class for all types of consolidation transactions we want to test. """ - sender_balance: int = 1_000_000_000_000_000_000 - """Balance of the account that sends the transaction.""" sender_account: EOA | None = None """Account that will send the transaction.""" requests: List[ConsolidationRequest] """Consolidation requests to be included in the block.""" - def transactions(self, fork: Fork | None = None) -> List[Transaction]: + def transactions(self) -> List[Transaction]: """Return a transaction for the consolidation request.""" raise NotImplementedError @@ -105,16 +102,14 @@ class ConsolidationRequestTransaction(ConsolidationRequestInteractionBase): owned account. """ - def transactions(self, fork: Fork | None = None) -> List[Transaction]: + def transactions(self) -> List[Transaction]: """Return a transaction for the consolidation request.""" - del fork assert self.sender_account is not None, ( "Sender account not initialized" ) return [ Transaction( gas_limit=request.gas_limit, - gas_price=1_000_000_000, to=request.interaction_contract_address, value=request.value, data=request.calldata, @@ -125,7 +120,7 @@ def transactions(self, fork: Fork | None = None) -> List[Transaction]: def update_pre(self, pre: Alloc) -> Self: """Return a copy of self with `sender_account` populated.""" - return replace(self, sender_account=pre.fund_eoa(self.sender_balance)) + return replace(self, sender_account=pre.fund_eoa()) def valid_requests( self, current_minimum_fee: int @@ -145,9 +140,6 @@ def valid_requests( class ConsolidationRequestContract(ConsolidationRequestInteractionBase): """Class used to describe a consolidation originated from a contract.""" - tx_gas_limit: int = 10_000_000 - """Gas limit for the transaction.""" - contract_balance: int = 1_000_000_000_000_000_000 """ Balance of the contract that will make the call to the pre-deploy contract. @@ -165,13 +157,6 @@ class ConsolidationRequestContract(ConsolidationRequestInteractionBase): """Frame depth of the pre-deploy contract when it executes the call.""" extra_code: Bytecode = field(default_factory=Bytecode) """Extra code to be added to the contract code.""" - fund_state_reservoir: bool = False - """ - When True (and EIP-8037 is active), pad `tx_gas_limit` by exactly the - per-request state-set work so the excess funds the EIP-8037 reservoir. - Use only when `tx_gas_limit` is held at the cap (reservoir would - otherwise be empty) and state work must not drain the regular pool. - """ @property def contract_code(self) -> Bytecode: @@ -186,7 +171,7 @@ def contract_code(self) -> Bytecode: 0, current_offset, len(r.calldata) ) + Op.POP( self.call_type( - Op.GAS if r.gas_limit == -1 else r.gas_limit, + Op.GAS if r.gas_limit is None else r.gas_limit, r.interaction_contract_address, *value_arg, 0, @@ -198,30 +183,11 @@ def contract_code(self) -> Bytecode: current_offset += len(r.calldata) return code + self.extra_code - def transactions(self, fork: Fork | None = None) -> List[Transaction]: + def transactions(self) -> List[Transaction]: """Return a transaction for the consolidation request.""" assert self.entry_address is not None, "Entry address not initialized" - gas_limit = self.tx_gas_limit - if ( - self.fund_state_reservoir - and fork is not None - and fork.is_eip_enabled(8037) - ): - # Per request the system contract writes 4 entry slots - # (source, src_pubkey, tgt_pubkey, fee); plus a queue-tail - # bump and one slot of headroom per tx. Fund the reservoir - # for the full state-set work so it stays off `gas_left`. - sstores_per_request = 4 - queue_tail_and_slack_sstores = 2 - sstores = ( - len(self.requests) * sstores_per_request - + queue_tail_and_slack_sstores - ) - gas_limit += sstores * Op.SSTORE(new_value=1).state_cost(fork) return [ Transaction( - gas_limit=gas_limit, - gas_price=1_000_000_000, to=self.entry_address, value=0, data=b"".join(r.calldata for r in self.requests), @@ -234,7 +200,7 @@ def update_pre(self, pre: Alloc) -> Self: Return a copy of self with the allocated sender/contract/entry addresses populated. """ - sender_account = pre.fund_eoa(self.sender_balance) + sender_account = pre.fund_eoa() contract_address = pre.deploy_contract( code=self.contract_code, balance=self.contract_balance ) diff --git a/tests/prague/eip7251_consolidations/test_consolidations.py b/tests/prague/eip7251_consolidations/test_consolidations.py index 07d6d37e7fc..a9d7af6b380 100644 --- a/tests/prague/eip7251_consolidations/test_consolidations.py +++ b/tests/prague/eip7251_consolidations/test_consolidations.py @@ -21,9 +21,6 @@ TestAddress2, ) -from ...amsterdam.eip8037_state_creation_gas_cost_increase.spec import ( - Spec as Spec8037, -) from .helpers import ( ConsolidationRequest, ConsolidationRequestContract, @@ -379,20 +376,12 @@ source_pubkey=i * 2, target_pubkey=i * 2 + 1, fee=Spec.get_fee(0), - gas_limit=6_000_000, ) for i in range( Spec.MAX_CONSOLIDATION_REQUESTS_PER_BLOCK * 5 ) ], call_depth=100, - tx_gas_limit=Spec8037.TX_MAX_GAS_LIMIT, - # tx_gas_limit is held at the cap to test the - # 63/64 drain over the deep call chain. EIP-8037 - # state-set work is funded via the reservoir - # rather than the regular pool, which would - # corrupt the boundary the test pins. - fund_state_reservoir=True, ), ], ], @@ -468,7 +457,6 @@ ConsolidationRequest( source_pubkey=i * 2, target_pubkey=i * 2 + 1, - gas_limit=1_000_000, fee=Spec.get_fee(0), valid=True, ) @@ -491,7 +479,6 @@ source_pubkey=i * 2, target_pubkey=i * 2 + 1, fee=Spec.get_fee(0), - gas_limit=1_000_000, valid=True, ) for i in range( diff --git a/tests/prague/eip7251_consolidations/test_consolidations_during_fork.py b/tests/prague/eip7251_consolidations/test_consolidations_during_fork.py index 3a883580737..139dc7366a4 100644 --- a/tests/prague/eip7251_consolidations/test_consolidations_during_fork.py +++ b/tests/prague/eip7251_consolidations/test_consolidations_during_fork.py @@ -116,7 +116,9 @@ def test_consolidation_requests_during_fork( tx_gas_price = deploy_tx.gas_price assert tx_gas_price is not None - deployer_required_balance = deploy_tx.gas_limit * tx_gas_price + tx_gas_limit = deploy_tx.gas_limit + assert tx_gas_limit is not None + deployer_required_balance = tx_gas_limit * tx_gas_price pre.fund_address( Spec.CONSOLIDATION_REQUEST_PREDEPLOY_SENDER, deployer_required_balance diff --git a/tests/prague/eip7702_set_code_tx/test_calls.py b/tests/prague/eip7702_set_code_tx/test_calls.py index ec41ee684f2..ad2befc5857 100644 --- a/tests/prague/eip7702_set_code_tx/test_calls.py +++ b/tests/prague/eip7702_set_code_tx/test_calls.py @@ -9,7 +9,6 @@ Address, Alloc, Environment, - Fork, Op, StateTestFiller, Transaction, @@ -85,7 +84,6 @@ def target_address( def test_delegate_call_targets( state_test: StateTestFiller, pre: Alloc, - fork: Fork, target_account_type: TargetAccountType, target_address: Address, delegate: bool, @@ -111,28 +109,6 @@ def test_delegate_call_targets( slot_call_result, Op.DELEGATECALL(address=target_address) ) + Op.SSTORE(slot_code_worked, value_code_worked) - intrinsic = fork.transaction_intrinsic_cost_calculator() - # The DELEGATECALL forwards 63/64 of remaining gas; LEGACY_CONTRACT_INVALID - # consumes the lot, leaving only 1/64 to host the caller's two SSTORE state - # writes. Lift gas_limit past the EIP-7825 cap so the EIP-8037 reservoir - # holds the SSTORE state work and the inner-call burn doesn't drain it. - gas_cap = fork.transaction_gas_limit_cap() - state_needed = delegate_call_code.state_cost(fork) + 2 * Op.SSTORE( - new_value=1 - ).state_cost(fork) - base_gas = ( - intrinsic( - calldata=delegate_call_code, - contract_creation=call_from_initcode, - ) - + delegate_call_code.gas_cost(fork) - + 4_000_000 # forwarded inner-call envelope - ) - if gas_cap is not None and state_needed > 0: - gas_limit = gas_cap + state_needed - else: - gas_limit = base_gas - if call_from_initcode: # Call from initcode caller_contract = delegate_call_code + Op.RETURN(0, 0) @@ -140,7 +116,6 @@ def test_delegate_call_targets( sender=sender_address, to=None, data=caller_contract, - gas_limit=gas_limit, ) calling_contract_address = tx.created_contract else: @@ -151,7 +126,6 @@ def test_delegate_call_targets( tx = Transaction( sender=sender_address, to=calling_contract_address, - gas_limit=gas_limit, ) calling_storage = { diff --git a/tests/prague/eip7702_set_code_tx/test_gas.py b/tests/prague/eip7702_set_code_tx/test_gas.py index 3ff7866ea6a..1c0e111ecf8 100644 --- a/tests/prague/eip7702_set_code_tx/test_gas.py +++ b/tests/prague/eip7702_set_code_tx/test_gas.py @@ -1111,7 +1111,6 @@ def test_account_warming( ) tx = Transaction( - gas_limit=1_000_000, to=callee_address, authorization_list=authorization_list if authorization_list else None, access_list=access_list, @@ -1215,7 +1214,6 @@ def test_self_set_code_cost( callee_storage[slot_call_cost] = 200 if not pre_authorized else 2700 tx = Transaction( - gas_limit=1_000_000, to=callee_address, authorization_list=[ AuthorizationTuple( diff --git a/tests/prague/eip7702_set_code_tx/test_set_code_txs.py b/tests/prague/eip7702_set_code_tx/test_set_code_txs.py index 06e86c41a85..293cbe16b49 100644 --- a/tests/prague/eip7702_set_code_tx/test_set_code_txs.py +++ b/tests/prague/eip7702_set_code_tx/test_set_code_txs.py @@ -112,7 +112,6 @@ def test_self_sponsored_set_code( ) tx = Transaction( - gas_limit=10_000_000, to=sender, value=tx_value, authorization_list=[ @@ -165,7 +164,6 @@ def test_self_sponsored_set_code( def test_set_code_to_sstore( state_test: StateTestFiller, pre: Alloc, - fork: Fork, suffix: Bytecode, succeeds: bool, tx_value: int, @@ -191,15 +189,7 @@ def test_set_code_to_sstore( set_code, ) - # 3 first-time SSTOREs plus auth+delegation; each SSTORE adds - # `sstore_state_gas` under EIP-8037, and an empty-account - # authority adds NEW_ACCOUNT (both 0 otherwise). tx = Transaction( - gas_limit=( - 500_000 - + fork.gas_costs().NEW_ACCOUNT - + 3 * Op.SSTORE(new_value=1).state_cost(fork) - ), to=auth_signer, value=tx_value, authorization_list=[ @@ -246,7 +236,6 @@ def test_set_code_to_non_empty_storage_non_zero_nonce( ) tx = Transaction( - gas_limit=500_000, to=auth_signer, value=0, authorization_list=[ @@ -285,7 +274,6 @@ def test_set_code_to_non_empty_storage_non_zero_nonce( def test_set_code_to_sstore_then_sload( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, access_list_in_tx: str | None, ) -> None: """ @@ -307,11 +295,7 @@ def test_set_code_to_sstore_then_sload( ) set_code_2_address = pre.deploy_contract(set_code_2) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this tx_1 = Transaction( - gas_limit=gas_limit, to=auth_signer, value=0, authorization_list=[ @@ -337,7 +321,6 @@ def test_set_code_to_sstore_then_sload( else [] ) tx_2 = Transaction( - gas_limit=gas_limit, to=auth_signer, value=0, authorization_list=[ @@ -382,7 +365,6 @@ def test_set_code_to_sstore_then_sload( def test_set_code_to_tstore_reentry( state_test: StateTestFiller, pre: Alloc, - fork: Fork, call_opcode: Op, return_opcode: Op, ) -> None: @@ -403,11 +385,7 @@ def test_set_code_to_tstore_reentry( ) set_code_to_address = pre.deploy_contract(set_code) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this tx = Transaction( - gas_limit=gas_limit, to=auth_signer, value=0, authorization_list=[ @@ -448,7 +426,6 @@ def test_set_code_to_tstore_reentry( def test_set_code_to_tstore_available_at_correct_address( state_test: StateTestFiller, pre: Alloc, - fork: Fork, call_opcode: Op, call_eoa_first: bool, ) -> None: @@ -480,11 +457,7 @@ def make_call(call_type: Op, call_eoa: bool) -> Bytecode: target_call_chain_address = pre.deploy_contract(chain_code) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this tx = Transaction( - gas_limit=gas_limit, to=target_call_chain_address, value=0, authorization_list=[ @@ -538,7 +511,6 @@ def test_set_code_to_self_destruct( ) tx = Transaction( - gas_limit=10_000_000, to=auth_signer, value=0, authorization_list=[ @@ -615,7 +587,6 @@ def test_creating_tx_to_contract_creator( ) tx = Transaction( - gas_limit=10_000_000, to=None, value=0, data=initcode, @@ -704,12 +675,8 @@ def test_delegated_eoa_can_send_creating_tx( ) assert initcode_len == len(initcode) - gas_limit = 200_000 + (Op.SSTORE(key_warm=False) * 7).gas_cost(fork) - if fork.is_eip_enabled(8037): - gas_limit = 10_000_000 tx = Transaction( ty=tx_type, - gas_limit=gas_limit, to=None, value=0, data=initcode, @@ -765,7 +732,6 @@ def test_set_code_to_contract_creator( creator_code_address = pre.deploy_contract(creator_code) tx = Transaction( - gas_limit=10_000_000, to=auth_signer, value=0, data=initcode, @@ -840,7 +806,6 @@ def test_set_code_to_self_caller( set_code_to_address = pre.deploy_contract(set_code) tx = Transaction( - gas_limit=10_000_000, to=auth_signer, value=value, authorization_list=[ @@ -983,7 +948,6 @@ def test_set_code_call_set_code( set_code_to_address_2 = pre.deploy_contract(set_code_2) tx = Transaction( - gas_limit=10_000_000, to=auth_signer_1, value=value, authorization_list=[ @@ -1046,7 +1010,6 @@ def test_address_from_set_code( set_code_to_address = pre.deploy_contract(set_code) tx = Transaction( - gas_limit=10_000_000, to=auth_signer, value=0, authorization_list=[ @@ -1085,7 +1048,6 @@ def test_tx_into_self_delegating_set_code( auth_signer = pre.fund_eoa(auth_account_start_balance) tx = Transaction( - gas_limit=10_000_000, to=auth_signer, value=0, authorization_list=[ @@ -1123,7 +1085,6 @@ def test_tx_into_chain_delegating_set_code( auth_signer_2 = pre.fund_eoa(auth_account_start_balance) tx = Transaction( - gas_limit=10_000_000, to=auth_signer_1, value=0, authorization_list=[ @@ -1176,7 +1137,6 @@ def test_call_into_self_delegating_set_code( entry_address = pre.deploy_contract(entry_code) tx = Transaction( - gas_limit=10_000_000, to=entry_address, value=0, authorization_list=[ @@ -1264,7 +1224,6 @@ def test_call_into_chain_delegating_set_code( entry_address = pre.deploy_contract(entry_code) tx = Transaction( - gas_limit=10_000_000, to=entry_address, value=0, authorization_list=[ @@ -1410,7 +1369,6 @@ def test_ext_code_on_set_code( callee_storage[slot_ext_balance_result] = balance tx = Transaction( - gas_limit=10_000_000, to=callee_address, authorization_list=[ AuthorizationTuple( @@ -1483,7 +1441,6 @@ def test_ext_code_on_self_set_code( set_code_storage[slot_ext_balance_result] = balance tx = Transaction( - gas_limit=10_000_000, to=auth_signer, authorization_list=[ AuthorizationTuple( @@ -1569,7 +1526,6 @@ def test_set_code_address_and_authority_warm_state( ) tx = Transaction( - gas_limit=1_000_000, to=callee_address, authorization_list=[ AuthorizationTuple( @@ -1646,7 +1602,6 @@ def test_set_code_address_and_authority_warm_state_call_types( callee_storage[slot_call_success] = 1 tx = Transaction( - gas_limit=1_000_000, to=callee_address, authorization_list=[ AuthorizationTuple( @@ -1717,7 +1672,6 @@ def test_ext_code_on_self_delegating_set_code( callee_storage[slot_ext_balance_result] = balance tx = Transaction( - gas_limit=10_000_000, to=callee_address, authorization_list=[ AuthorizationTuple( @@ -1811,7 +1765,6 @@ def test_ext_code_on_chain_delegating_set_code( callee_storage[slot_ext_balance_result_2] = auth_signer_2_balance tx = Transaction( - gas_limit=10_000_000, to=callee_address, authorization_list=[ AuthorizationTuple( @@ -1880,7 +1833,6 @@ def test_self_code_on_set_code( storage[slot_self_balance_result] = balance tx = Transaction( - gas_limit=10_000_000, to=auth_signer, authorization_list=[ AuthorizationTuple( @@ -1959,7 +1911,6 @@ def test_set_code_to_account_deployed_in_same_tx( ) tx = Transaction( - gas_limit=10_000_000, to=contract_creator_address, value=0, data=initcode, @@ -2070,7 +2021,6 @@ def test_set_code_to_self_destructing_account_deployed_in_same_tx( ) tx = Transaction( - gas_limit=10_000_000, to=contract_creator_address, value=0, data=initcode, @@ -2133,7 +2083,6 @@ def test_set_code_multiple_first_valid_authorization_tuples_same_signer( ] tx = Transaction( - gas_limit=10_000_000, to=auth_signer, value=0, authorization_list=[ @@ -2185,7 +2134,6 @@ def test_set_code_multiple_valid_authorization_tuples_same_signer_increasing_non ] tx = Transaction( - gas_limit=10_000_000, # TODO: Reduce gas limit of all tests to=auth_signer, value=0, authorization_list=[ @@ -2238,7 +2186,6 @@ def test_set_code_multiple_valid_authorization_tuples_same_signer_increasing_non ] tx = Transaction( - gas_limit=10_000_000, # TODO: Reduce gas limit of all tests to=auth_signer, value=0, authorization_list=[ @@ -2288,7 +2235,6 @@ def test_set_code_multiple_valid_authorization_tuples_first_invalid_same_signer( ] tx = Transaction( - gas_limit=10_000_000, to=auth_signer, value=0, authorization_list=[ @@ -2337,7 +2283,6 @@ def test_set_code_all_invalid_authorization_tuples( ] tx = Transaction( - gas_limit=10_000_000, to=auth_signer, value=0, authorization_list=[ @@ -2365,7 +2310,6 @@ def test_set_code_all_invalid_authorization_tuples( def test_set_code_using_chain_specific_id( state_test: StateTestFiller, pre: Alloc, - fork: Fork, chain_config: ChainConfig, ) -> None: """ @@ -2379,11 +2323,7 @@ def test_set_code_using_chain_specific_id( set_code = Op.SSTORE(success_slot, 1) + Op.STOP set_code_to_address = pre.deploy_contract(set_code) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this tx = Transaction( - gas_limit=gas_limit, to=auth_signer, value=0, authorization_list=[ @@ -2436,7 +2376,6 @@ def test_set_code_using_chain_specific_id( def test_set_code_using_valid_synthetic_signatures( state_test: StateTestFiller, pre: Alloc, - fork: Fork, chain_config: ChainConfig, v: int, r: int, @@ -2462,11 +2401,7 @@ def test_set_code_using_valid_synthetic_signatures( auth_signer = authorization_tuple.signer - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this tx = Transaction( - gas_limit=gas_limit, to=auth_signer, value=0, authorization_list=[authorization_tuple], @@ -2530,7 +2465,6 @@ def test_set_code_using_valid_synthetic_signatures( def test_valid_tx_invalid_auth_signature( state_test: StateTestFiller, pre: Alloc, - fork: Fork, chain_config: ChainConfig, v: int, r: int, @@ -2555,12 +2489,7 @@ def test_valid_tx_invalid_auth_signature( s=s, ) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( - gas_limit=gas_limit, to=callee_address, value=0, authorization_list=[authorization_tuple], @@ -2582,8 +2511,8 @@ def test_valid_tx_invalid_auth_signature( def test_signature_s_out_of_range( state_test: StateTestFiller, pre: Alloc, - fork: Fork, chain_config: ChainConfig, + fork: Fork, ) -> None: """ Test sending a transaction with an authorization tuple where the signature @@ -2611,12 +2540,7 @@ def test_signature_s_out_of_range( entry_code = Op.SSTORE(success_slot, 1) + Op.STOP entry_address = pre.deploy_contract(entry_code) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( - gas_limit=gas_limit, to=entry_address, value=0, authorization_list=[authorization_tuple], @@ -2691,7 +2615,6 @@ class InvalidChainID(StrEnum): def test_valid_tx_invalid_chain_id( state_test: StateTestFiller, pre: Alloc, - fork: Fork, chain_config: ChainConfig, invalid_chain_id_case: InvalidChainID, ) -> None: @@ -2732,12 +2655,7 @@ def test_valid_tx_invalid_chain_id( ) entry_address = pre.deploy_contract(entry_code) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( - gas_limit=gas_limit, to=entry_address, value=0, authorization_list=[authorization], @@ -2790,9 +2708,9 @@ def test_valid_tx_invalid_chain_id( def test_nonce_validity( state_test: StateTestFiller, pre: Alloc, - fork: Fork, account_nonce: int, authorization_nonce: int, + fork: Fork, ) -> None: """ Test sending a transaction where the nonce field of an authorization almost @@ -2826,12 +2744,7 @@ def test_nonce_validity( ) entry_address = pre.deploy_contract(entry_code) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( - gas_limit=gas_limit, to=entry_address, value=0, authorization_list=[authorization], @@ -2946,7 +2859,6 @@ def test_nonce_validity( def test_nonce_overflow_after_first_authorization( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test sending a transaction with two authorization where the first one bumps @@ -2983,12 +2895,7 @@ def test_nonce_overflow_after_first_authorization( ) entry_address = pre.deploy_contract(entry_code) - gas_limit = 200_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( - gas_limit=gas_limit, to=entry_address, value=0, authorization_list=authorization_list, @@ -3053,7 +2960,6 @@ def test_set_code_to_log( set_to_address = pre.deploy_contract(set_to_code) tx = Transaction( - gas_limit=10_000_000, to=sender, value=0, authorization_list=[ @@ -3116,7 +3022,6 @@ def test_set_code_to_precompile( tx = Transaction( sender=pre.fund_eoa(), - gas_limit=500_000, to=caller_code_address, authorization_list=[ AuthorizationTuple( @@ -3381,19 +3286,9 @@ def test_set_code_to_system_contract( caller_code_address = pre.deploy_contract(caller_code) sender = pre.fund_eoa() - # The 7002/7251 system contracts enqueue multiple state entries per - # request (4 and 5 slots respectively); pad gas_limit by that many - # SSTORE state-set worths so the EIP-8037 reservoir absorbs the work - # rather than draining the tx's regular pool through DELEGATECALL. - sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) - extra_state_slots = { - Address(Spec7002.WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS): 4, - Address(Spec7251.CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS): 5, - }.get(Address(system_contract), 0) txs = [ Transaction( sender=sender, - gas_limit=500_000 + extra_state_slots * sstore_state_gas, to=caller_code_address, value=call_value, data=caller_payload, @@ -3469,7 +3364,6 @@ def test_eoa_tx_after_set_code( first_eoa_tx = Transaction( sender=pre.fund_eoa(), - gas_limit=500_000, to=auth_signer, value=0, authorization_list=[ @@ -3490,7 +3384,6 @@ def test_eoa_tx_after_set_code( Transaction( ty=tx_type, sender=auth_signer, - gas_limit=500_000, to=auth_signer, value=0, protected=True, @@ -3498,7 +3391,6 @@ def test_eoa_tx_after_set_code( Transaction( ty=tx_type, sender=auth_signer, - gas_limit=500_000, to=auth_signer, value=0, protected=False, @@ -3510,7 +3402,6 @@ def test_eoa_tx_after_set_code( Transaction( ty=tx_type, sender=auth_signer, - gas_limit=500_000, to=auth_signer, value=0, access_list=[ @@ -3526,7 +3417,6 @@ def test_eoa_tx_after_set_code( Transaction( ty=tx_type, sender=auth_signer, - gas_limit=500_000, to=auth_signer, value=0, max_fee_per_gas=1_000, @@ -3538,7 +3428,6 @@ def test_eoa_tx_after_set_code( Transaction( ty=tx_type, sender=auth_signer, - gas_limit=500_000, to=auth_signer, value=0, max_fee_per_gas=1_000, @@ -3604,7 +3493,6 @@ def test_reset_code( txs = [ Transaction( sender=sender, - gas_limit=500_000, to=auth_signer, value=0, authorization_list=[ @@ -3625,7 +3513,6 @@ def test_reset_code( txs.append( Transaction( sender=sender, - gas_limit=500_000, to=auth_signer, value=0, authorization_list=[ @@ -3658,7 +3545,6 @@ def test_reset_code( def test_contract_create( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test sending type-4 tx as a create transaction.""" authorization_tuple = AuthorizationTuple( @@ -3666,11 +3552,7 @@ def test_contract_create( nonce=0, signer=pre.fund_eoa(), ) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this tx = Transaction( - gas_limit=gas_limit, to=None, value=0, authorization_list=[authorization_tuple], @@ -3694,7 +3576,6 @@ def test_empty_authorization_list( ) -> None: """Test sending an invalid transaction with empty authorization list.""" tx = Transaction( - gas_limit=100_000, to=pre.deploy_contract(code=b""), value=0, authorization_list=[], @@ -3727,7 +3608,6 @@ def test_empty_authorization_list( def test_delegation_clearing( state_test: StateTestFiller, pre: Alloc, - fork: Fork, pre_set_delegation_code: Bytecode | None, self_sponsored: bool, ) -> None: @@ -3775,12 +3655,7 @@ def test_delegation_clearing( signer=auth_signer, ) - gas_limit = 200_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( - gas_limit=gas_limit, to=entry_address, value=0, authorization_list=[authorization], @@ -3827,7 +3702,6 @@ def test_delegation_clearing( def test_delegation_clearing_tx_to( state_test: StateTestFiller, pre: Alloc, - fork: Fork, pre_set_delegation_code: Bytecode | None, self_sponsored: bool, ) -> None: @@ -3853,11 +3727,7 @@ def test_delegation_clearing_tx_to( sender = pre.fund_eoa() if not self_sponsored else auth_signer - # When `auth_signer` is an empty account (non-self-sponsored - # variant) the auth charges NEW_ACCOUNT state gas under EIP-8037 - # (0 otherwise). tx = Transaction( - gas_limit=200_000 + fork.gas_costs().NEW_ACCOUNT, to=auth_signer, value=0, authorization_list=[ @@ -3894,7 +3764,6 @@ def test_delegation_clearing_tx_to( def test_delegation_clearing_and_set( state_test: StateTestFiller, pre: Alloc, - fork: Fork, pre_set_delegation_code: Bytecode | None, ) -> None: """ @@ -3920,12 +3789,7 @@ def test_delegation_clearing_and_set( sender = pre.fund_eoa() - gas_limit = 200_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( - gas_limit=gas_limit, to=auth_signer, value=0, authorization_list=[ @@ -3970,7 +3834,6 @@ def test_delegation_clearing_and_set( def test_delegation_clearing_failing_tx( state_test: StateTestFiller, pre: Alloc, - fork: Fork, entry_code: Bytecode, ) -> None: """ @@ -3990,12 +3853,7 @@ def test_delegation_clearing_failing_tx( signer=auth_signer, ) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( - gas_limit=gas_limit, to=entry_address, value=0, authorization_list=[authorization], @@ -4026,7 +3884,6 @@ def test_delegation_clearing_failing_tx( def test_deploying_delegation_designation_contract( state_test: StateTestFiller, pre: Alloc, - fork: Fork, initcode_is_delegation_designation: bool, ) -> None: """ @@ -4046,14 +3903,9 @@ def test_deploying_delegation_designation_contract( deploy_code=Spec.delegation_designation(set_to_address) ) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( sender=sender, to=None, - gas_limit=gas_limit, data=initcode, ) @@ -4116,7 +3968,6 @@ def test_creating_delegation_designation_contract( tx = Transaction( to=contract_a, - gas_limit=1_000_000, data=create_init, value=0, sender=sender, @@ -4230,7 +4081,6 @@ def test_invalid_transaction_after_authorization( txs = [ Transaction( sender=pre.fund_eoa(), - gas_limit=500_000, to=recipient, value=0, authorization_list=[ @@ -4286,7 +4136,6 @@ def test_authorization_reusing_nonce( ), Transaction( sender=sender, - gas_limit=500_000, to=recipient, value=0, authorization_list=[ @@ -4325,7 +4174,6 @@ def test_authorization_reusing_nonce( def test_set_code_from_account_with_non_delegating_code( state_test: StateTestFiller, pre: Alloc, - fork: Fork, set_code_type: AddressType, self_sponsored: bool, ) -> None: @@ -4357,12 +4205,7 @@ def test_set_code_from_account_with_non_delegating_code( raise ValueError(f"Unsupported set code type: {set_code_type}") callee_address = pre.deploy_contract(Op.SSTORE(0, 1) + Op.STOP) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 # TODO: auto gas limit will remove this - tx = Transaction( - gas_limit=gas_limit, to=callee_address, authorization_list=[ AuthorizationTuple( @@ -4428,7 +4271,6 @@ def test_set_code_transaction_fee_validations( auth_signer = pre.fund_eoa(amount=0) tx = Transaction( sender=pre.fund_eoa(), - gas_limit=500_000, to=auth_signer, value=0, max_fee_per_gas=max_fee_per_gas, diff --git a/tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py b/tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py index bb54b9b4fd3..995a6b9dadc 100644 --- a/tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py +++ b/tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py @@ -174,9 +174,6 @@ def test_pointer_to_pointer( tx = Transaction( to=pointer_a, - gas_limit=1_000_000, - data=b"", - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -240,9 +237,6 @@ def test_pointer_normal( tx = Transaction( to=pointer_a, - gas_limit=1_000_000, - data=b"", - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -256,9 +250,6 @@ def test_pointer_normal( # Other normal tx can interact with previously assigned pointers tx_2 = Transaction( to=pointer_a, - gas_limit=1_000_000, - data=b"", - value=0, sender=sender, nonce=(nonce := nonce + 1), ) @@ -266,9 +257,6 @@ def test_pointer_normal( # Event from another block tx_3 = Transaction( to=pointer_a, - gas_limit=1_000_000, - data=b"", - value=0, sender=sender, nonce=(nonce := nonce + 1), ) @@ -284,7 +272,7 @@ def test_pointer_normal( @pytest.mark.valid_from("Prague") def test_pointer_measurements( - blockchain_test: BlockchainTestFiller, pre: Alloc, fork: Fork + blockchain_test: BlockchainTestFiller, pre: Alloc ) -> None: """ Check extcode* operations on pointer before and after pointer is set. @@ -396,13 +384,8 @@ def test_pointer_measurements( + Op.STOP, ) - # The pointer-code measurement contract performs ~10 first-time - # SSTOREs; each adds `sstore_state_gas` under EIP-8037 (0 - # otherwise). The non-pointer txs reuse the same headroom. - pointer_state = 10 * Op.SSTORE(new_value=1).state_cost(fork) tx = Transaction( to=contract_measurements, - gas_limit=1_000_000 + pointer_state, data=b"", value=0, sender=sender, @@ -410,7 +393,6 @@ def test_pointer_measurements( tx_pointer = Transaction( to=contract_measurements_pointer, - gas_limit=1_000_000 + pointer_state, data=b"", value=0, sender=sender, @@ -425,7 +407,6 @@ def test_pointer_measurements( tx_pointer_call = Transaction( to=pointer, - gas_limit=1_000_000 + pointer_state, data=bytes.fromhex("11223344"), value=3, sender=sender, @@ -518,9 +499,7 @@ def test_call_to_precompile_in_pointer_context( tx = Transaction( to=contract_a, - gas_limit=3_000_000, data=[0x11] * 256, - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -626,9 +605,7 @@ def test_pointer_to_precompile( tx = Transaction( to=contract_a, - gas_limit=3_000_000, data=[0x11] * 256, - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -814,9 +791,6 @@ def test_gas_diff_pointer_vs_direct_call( tx_0 = Transaction( to=1, - gas_limit=3_000_000, - data=b"", - value=0, sender=sender, authorization_list=( [ @@ -833,9 +807,6 @@ def test_gas_diff_pointer_vs_direct_call( tx = Transaction( to=contract_test_normal, - gas_limit=3_000_000, - data=b"", - value=0, sender=sender, authorization_list=( [ @@ -863,9 +834,6 @@ def test_gas_diff_pointer_vs_direct_call( ) tx2 = Transaction( to=contract_test_pointer, - gas_limit=3_000_000, - data=b"", - value=0, sender=sender, authorization_list=( [ @@ -977,9 +945,6 @@ def test_pointer_call_followed_by_direct_call( tx = Transaction( to=contract_test_gas, - gas_limit=3_000_000, - data=b"", - value=0, sender=sender, authorization_list=( [ @@ -1057,9 +1022,6 @@ def test_pointer_to_static( tx = Transaction( to=pointer_a, - gas_limit=3_000_000, - data=b"", - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1134,9 +1096,6 @@ def test_static_to_pointer( tx = Transaction( to=contract_a, - gas_limit=3_000_000, - data=b"", - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1234,9 +1193,7 @@ def test_pointer_to_static_reentry( tx = Transaction( to=pointer_a, - gas_limit=3_000_000, data=[0x00] * 32, - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1335,9 +1292,6 @@ def test_contract_storage_to_pointer_with_storage( tx = Transaction( to=contract_a, - gas_limit=3_000_000, - data=b"", - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1370,9 +1324,7 @@ class ReentryAction(IntEnum): @pytest.mark.valid_from("Prague") -def test_pointer_reentry( - state_test: StateTestFiller, pre: Alloc, fork: Fork -) -> None: +def test_pointer_reentry(state_test: StateTestFiller, pre: Alloc) -> None: """ Check operations when reenter the pointer again. @@ -1484,23 +1436,10 @@ def test_pointer_reentry( storage_b[slot_reentry_address] = contract_b - # Many nested CALLs and SSTOREs across pointer-via-proxy reentry. - # Lift above the EIP-7825 cap so the EIP-8037 reservoir holds the - # SSTORE state work, otherwise it spills into each frame's regular - # share and the deep call chain runs out. - gas_cap = fork.transaction_gas_limit_cap() - sstore_count = 10 # rough envelope across all frames - tx_gas_limit = ( - gas_cap + sstore_count * Op.SSTORE(new_value=1).state_cost(fork) - if gas_cap is not None and fork.is_eip_enabled(8037) - else 2_000_000 - ) tx = Transaction( to=pointer_b, - gas_limit=tx_gas_limit, data=Hash(contract_b, left_padding=True) + Hash(ReentryAction.CALL_PROXY, left_padding=True), - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1540,9 +1479,6 @@ def test_eoa_init_as_pointer(state_test: StateTestFiller, pre: Alloc) -> None: tx = Transaction( to=sender, - gas_limit=200_000, - data=b"", - value=0, sender=sender, ) post = {sender: Account(storage=storage)} @@ -1634,7 +1570,6 @@ def test_call_pointer_to_created_from_create_after_oog_call_again( tx = Transaction( to=contract_main, - gas_limit=800_000, data=Op.SSTORE(storage_create.store_next(1, "create_init_code"), 1) + Op.SSTORE( storage_create.store_next(1, "call_pointer_from_init"), @@ -1642,7 +1577,6 @@ def test_call_pointer_to_created_from_create_after_oog_call_again( ) + Op.MSTORE(0, deploy_code.hex()) + Op.RETURN(32 - len(deploy_code), len(deploy_code)), - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1788,9 +1722,6 @@ def test_pointer_reverts( ) tx = Transaction( to=contract_main, - gas_limit=800_000, - data=b"", - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1833,7 +1764,6 @@ class DelegationTo(Enum): def test_double_auth( state_test: StateTestFiller, pre: Alloc, - fork: Fork, first_delegation: DelegationTo, second_delegation: DelegationTo, ) -> None: @@ -1867,9 +1797,6 @@ def test_double_auth( tx = Transaction( to=contract_main, - gas_limit=(500_000 if fork.is_eip_enabled(8037) else 200_000), - data=b"", - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1927,7 +1854,6 @@ def test_double_auth( def test_pointer_resets_an_empty_code_account_with_storage( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ So in Block1 we create a sender with empty code, but non empty storage @@ -1950,21 +1876,8 @@ def test_pointer_resets_an_empty_code_account_with_storage( ) + Op.SSTORE(pointer_storage.store_next(2, "slot2"), 2) contract_1 = pre.deploy_contract(code=contract_1_code) - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) - # The set-pointer-storage tx authorizes contract_1 then runs its two - # SSTOREs at the pointer; pad gas_limit with the auth + 2 SSTORE state - # work and EIP-1706 slack. - gas_limit = ( - intrinsic_calc(authorization_list_or_count=1) - + contract_1_code.gas_cost(fork) - + sstore_state_gas - ) tx_set_pointer_storage = Transaction( to=pointer, - gas_limit=gas_limit, - data=b"", - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1976,9 +1889,6 @@ def test_pointer_resets_an_empty_code_account_with_storage( ) tx_set_sender_storage = Transaction( to=sender, - gas_limit=gas_limit, - data=b"", - value=0, sender=sender, authorization_list=[ AuthorizationTuple( @@ -1991,9 +1901,6 @@ def test_pointer_resets_an_empty_code_account_with_storage( tx_reset_code = Transaction( to=pointer, - gas_limit=gas_limit, - data=b"", - value=0, nonce=3, sender=sender, authorization_list=[ @@ -2013,9 +1920,6 @@ def test_pointer_resets_an_empty_code_account_with_storage( contract_2 = pre.deploy_contract(code=Op.SSTORE(1, 1)) tx_send_from_empty_code_with_storage = Transaction( to=contract_2, - gas_limit=200_000, - data=b"", - value=0, nonce=5, sender=sender, ) @@ -2044,18 +1948,8 @@ def test_pointer_resets_an_empty_code_account_with_storage( address=contract_create, nonce=1 ) - # contract_create runs SSTORE(1, CREATE) then 3 CALLs into pointers - # whose deploy_code does an SSTORE + SELFDESTRUCT (1 NEW_ACCOUNT for - # CREATE, 1 SSTORE in contract_create, 3 SSTOREs across the pointer - # callees, plus 2 authorizations' state). - tx2_state = ( - fork.gas_costs().NEW_ACCOUNT - + 4 * sstore_state_gas - + fork.transaction_intrinsic_state_gas(authorization_count=2) - ) tx_create_suicide_from_pointer = Transaction( to=contract_create, - gas_limit=800_000 + tx2_state + sstore_state_gas, data=Op.SSTORE(6, 6) + Op.MSTORE(0, deploy_code.hex()) + Op.RETURN(32 - len(deploy_code), len(deploy_code)), @@ -2146,7 +2040,6 @@ def test_set_code_type_tx_pre_fork( ) tx = Transaction( - gas_limit=10_000_000, to=sender, value=tx_value, authorization_list=[ @@ -2204,9 +2097,7 @@ def test_delegation_replacement_call_previous_contract( ) tx = Transaction( - gas_limit=500_000, to=auth_signer, - value=0, authorization_list=[ AuthorizationTuple( address=set_code_to_address, From acdb5f769df7c0cdb15b5749afa42f17c0c6b903 Mon Sep 17 00:00:00 2001 From: marioevz Date: Mon, 1 Jun 2026 13:47:06 -0600 Subject: [PATCH 04/46] feat(test-forks): Fix EIP-7883 not being in Osaka --- .../forks/forks/eips/osaka/eip_7883.py | 15 +++++++++++++++ .../src/execution_testing/forks/forks/forks.py | 1 + 2 files changed, 16 insertions(+) create mode 100644 packages/testing/src/execution_testing/forks/forks/eips/osaka/eip_7883.py diff --git a/packages/testing/src/execution_testing/forks/forks/eips/osaka/eip_7883.py b/packages/testing/src/execution_testing/forks/forks/eips/osaka/eip_7883.py new file mode 100644 index 00000000000..da89b84e1e7 --- /dev/null +++ b/packages/testing/src/execution_testing/forks/forks/eips/osaka/eip_7883.py @@ -0,0 +1,15 @@ +""" +EIP-7883: ModExp Gas Cost Increase. + +Increases cost of ModExp precompile. + +https://eips.ethereum.org/EIPS/eip-7883 +""" + +from ....base_fork import BaseFork + + +class EIP7883(BaseFork): + """EIP-7883 class.""" + + pass diff --git a/packages/testing/src/execution_testing/forks/forks/forks.py b/packages/testing/src/execution_testing/forks/forks/forks.py index acaa4403176..d592dc5b1a0 100644 --- a/packages/testing/src/execution_testing/forks/forks/forks.py +++ b/packages/testing/src/execution_testing/forks/forks/forks.py @@ -1524,6 +1524,7 @@ class Osaka( eips.EIP7918, eips.EIP7594, eips.EIP7951, + eips.EIP7883, Prague, solc_name="cancun", ): From 05843a06721f76c9140164a1c56404c7d5935544 Mon Sep 17 00:00:00 2001 From: marioevz Date: Mon, 1 Jun 2026 13:47:32 -0600 Subject: [PATCH 05/46] feat(test-fill): Bump default pre.fund_eoa amount to fix deposit tests --- .../cli/pytest_commands/plugins/filler/pre_alloc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/pre_alloc.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/pre_alloc.py index c3b76bf9d90..b7d96d3beea 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/pre_alloc.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/filler/pre_alloc.py @@ -66,7 +66,7 @@ def pytest_addoption(parser: pytest.Parser) -> None: class Alloc(SharedAlloc): """Allocation of accounts in the state, pre and post test execution.""" - _eoa_fund_amount_default: int = PrivateAttr(10**21) + _eoa_fund_amount_default: int = PrivateAttr(10**27) _account_salt: Dict[Hash, int] = PrivateAttr(default_factory=dict) _stub_accounts: Dict[str, Account] = PrivateAttr(default_factory=dict) From 007554e3a3caabcd484105d6d428210f321182dd Mon Sep 17 00:00:00 2001 From: marioevz Date: Mon, 1 Jun 2026 13:48:20 -0600 Subject: [PATCH 06/46] fix(tests): Byzantium pre-compile fixtures --- tests/byzantium/eip196_ec_add_mul/conftest.py | 1 - tests/byzantium/eip197_ec_pairing/conftest.py | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/byzantium/eip196_ec_add_mul/conftest.py b/tests/byzantium/eip196_ec_add_mul/conftest.py index 42e0d29776f..bb0f331c3d4 100644 --- a/tests/byzantium/eip196_ec_add_mul/conftest.py +++ b/tests/byzantium/eip196_ec_add_mul/conftest.py @@ -16,7 +16,6 @@ precompile_gas_modifier, # noqa: F401 sender, # noqa: F401 tx, # noqa: F401 - tx_gas_limit, # noqa: F401 ) from .spec import Spec diff --git a/tests/byzantium/eip197_ec_pairing/conftest.py b/tests/byzantium/eip197_ec_pairing/conftest.py index 8f3164caadf..adb21442569 100644 --- a/tests/byzantium/eip197_ec_pairing/conftest.py +++ b/tests/byzantium/eip197_ec_pairing/conftest.py @@ -13,7 +13,6 @@ precompile_gas_modifier, # noqa: F401 sender, # noqa: F401 tx, # noqa: F401 - tx_gas_limit, # noqa: F401 ) From 9e1886feddd70e3ac07f50d5bccc6bfc54af87bf Mon Sep 17 00:00:00 2001 From: marioevz Date: Mon, 1 Jun 2026 14:36:20 -0600 Subject: [PATCH 07/46] fix(tests): Typed transaction fixture --- .../plugins/shared/transaction_fixtures.py | 5 ----- .../test_transfer_logs.py | 4 ---- .../istanbul/eip1344_chainid/test_chainid.py | 20 +------------------ 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/transaction_fixtures.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/transaction_fixtures.py index 33dd3693cf4..4143ea1fb2e 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/transaction_fixtures.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/transaction_fixtures.py @@ -25,7 +25,6 @@ def type_0_default_transaction(sender: EOA) -> Transaction: ty=0, sender=sender, gas_price=10**9, - gas_limit=100_000, data=b"\x00" * 100, protected=True, ) @@ -38,7 +37,6 @@ def type_1_default_transaction(sender: EOA) -> Transaction: ty=1, sender=sender, gas_price=10**9, - gas_limit=100_000, data=b"\x00" * 100, access_list=[ AccessList(address=0x1234, storage_keys=[0, 1, 2]), @@ -56,7 +54,6 @@ def type_2_default_transaction(sender: EOA) -> Transaction: sender=sender, max_fee_per_gas=10**10, max_priority_fee_per_gas=10**9, - gas_limit=100_000, data=b"\x00" * 200, access_list=[ AccessList(address=0x2468, storage_keys=[10, 20, 30]), @@ -74,7 +71,6 @@ def type_3_default_transaction(sender: EOA) -> Transaction: max_fee_per_gas=10**10, max_priority_fee_per_gas=10**9, max_fee_per_blob_gas=10**9, - gas_limit=100_000, data=b"\x00" * 150, access_list=[ AccessList(address=0x3690, storage_keys=[100, 200]), @@ -106,7 +102,6 @@ def type_4_default_transaction(sender: EOA, pre: Alloc) -> Transaction: sender=sender, max_fee_per_gas=10**10, max_priority_fee_per_gas=10**9, - gas_limit=500_000, data=b"\x00" * 200, access_list=[ AccessList(address=0x4567, storage_keys=[1000, 2000, 3000]), diff --git a/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py b/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py index ddceefb56dc..e832047a3a9 100644 --- a/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py +++ b/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py @@ -1269,7 +1269,6 @@ def test_transfer_with_all_tx_types( state_test: StateTestFiller, env: Environment, pre: Alloc, - fork: Fork, sender: EOA, typed_transaction: Transaction, ) -> None: @@ -1277,12 +1276,9 @@ def test_transfer_with_all_tx_types( recipient = pre.nonexistent_account() transfer_amount = 1000 - # Sending value to a nonexistent recipient charges NEW_ACCOUNT - # state gas under EIP-8037 (0 otherwise). tx = typed_transaction.copy( to=recipient, value=transfer_amount, - gas_limit=typed_transaction.gas_limit + fork.gas_costs().NEW_ACCOUNT, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, recipient, transfer_amount)] ), diff --git a/tests/istanbul/eip1344_chainid/test_chainid.py b/tests/istanbul/eip1344_chainid/test_chainid.py index d252a543da2..963a7b3ba4e 100644 --- a/tests/istanbul/eip1344_chainid/test_chainid.py +++ b/tests/istanbul/eip1344_chainid/test_chainid.py @@ -7,7 +7,6 @@ Account, Alloc, ChainConfig, - Fork, Op, StateTestFiller, Transaction, @@ -37,33 +36,16 @@ def test_chainid( state_test: StateTestFiller, pre: Alloc, - fork: Fork, chain_config: ChainConfig, typed_transaction: Transaction, ) -> None: """Test CHAINID opcode.""" chain_id = chain_config.chain_id - contract_code = Op.SSTORE(1, Op.CHAINID) + Op.STOP - contract_address = pre.deploy_contract(contract_code) - - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - # Tx-type-specific intrinsic args derived from the parametrized fixture. - intrinsic_kwargs: dict = {"calldata": typed_transaction.data} - if typed_transaction.access_list: - intrinsic_kwargs["access_list"] = typed_transaction.access_list - if typed_transaction.authorization_list: - intrinsic_kwargs["authorization_list_or_count"] = ( - typed_transaction.authorization_list - ) + contract_address = pre.deploy_contract(Op.SSTORE(1, Op.CHAINID) + Op.STOP) tx = typed_transaction.copy( chain_id=chain_id, to=contract_address, - gas_limit=( - intrinsic_calc(**intrinsic_kwargs) - + contract_code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ), ) post = { From 87e73c0dfaa156582074a0a22701420f92ccaccb Mon Sep 17 00:00:00 2001 From: marioevz Date: Mon, 1 Jun 2026 14:36:33 -0600 Subject: [PATCH 08/46] fix(tests): Typed transaction fixture (8037) --- .../test_state_gas_sstore.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py index 9ae878adea6..5d9479f4cc0 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py @@ -415,7 +415,6 @@ def test_sstore_state_gas_all_tx_types( state_test: StateTestFiller, pre: Alloc, typed_transaction: Transaction, - fork: Fork, ) -> None: """ Test SSTORE state gas works across all transaction types. @@ -425,17 +424,12 @@ def test_sstore_state_gas_all_tx_types( gas_left and state_gas_reservoir. Verify SSTORE succeeds with each type. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() contract = pre.deploy_contract( code=Op.SSTORE(storage.store_next(1), 1), ) - tx = typed_transaction.copy( - to=contract, - gas_limit=gas_limit_cap, - ) + tx = typed_transaction.copy(to=contract) post = {contract: Account(storage=storage)} state_test(pre=pre, post=post, tx=tx) From 0a3644f3b5de090b549ffa1eace9c35e9490ffba Mon Sep 17 00:00:00 2001 From: marioevz Date: Mon, 1 Jun 2026 17:07:33 -0600 Subject: [PATCH 09/46] fix(tests): Fix constantinople, frontier, homestead, istanbul --- .../tools/utility/generators.py | 9 - .../eip1014_create2/test_create2_revert.py | 12 - .../eip1014_create2/test_create_returndata.py | 2 - .../test_deterministic_deployment.py | 14 - .../eip1014_create2/test_recreate.py | 7 - .../eip1052_extcodehash/test_extcodehash.py | 253 ++---------------- .../test_shift_combinations.py | 16 +- tests/frontier/create/test_create_one_byte.py | 17 -- .../create/test_create_preimage_layout.py | 19 +- .../create/test_create_suicide_during_init.py | 1 - .../create/test_create_suicide_store.py | 1 - .../examples/test_block_intermediate_state.py | 12 +- .../frontier/identity_precompile/conftest.py | 13 - .../identity_precompile/test_identity.py | 22 +- .../test_identity_returndatasize.py | 5 +- tests/frontier/opcodes/test_all_opcodes.py | 11 - tests/frontier/opcodes/test_blockhash.py | 8 - tests/frontier/opcodes/test_call.py | 7 +- .../test_call_and_callcode_gas_calculation.py | 10 +- tests/frontier/opcodes/test_calldatacopy.py | 6 - tests/frontier/opcodes/test_calldataload.py | 21 -- tests/frontier/opcodes/test_calldatasize.py | 21 -- tests/frontier/opcodes/test_data_copy_oog.py | 17 +- tests/frontier/opcodes/test_dup.py | 4 +- tests/frontier/opcodes/test_extcodecopy.py | 1 - tests/frontier/opcodes/test_push.py | 2 - tests/frontier/opcodes/test_swap.py | 16 +- tests/frontier/precompiles/test_ecrecover.py | 13 +- .../precompiles/test_precompile_absence.py | 8 - tests/homestead/coverage/test_coverage.py | 21 +- .../identity_precompile/test_identity.py | 15 -- tests/istanbul/eip152_blake2/test_blake2.py | 18 +- .../eip152_blake2/test_blake2_delegatecall.py | 1 - 33 files changed, 49 insertions(+), 554 deletions(-) delete mode 100644 tests/frontier/identity_precompile/conftest.py diff --git a/packages/testing/src/execution_testing/tools/utility/generators.py b/packages/testing/src/execution_testing/tools/utility/generators.py index 233c84bb19a..028a114a6c4 100644 --- a/packages/testing/src/execution_testing/tools/utility/generators.py +++ b/packages/testing/src/execution_testing/tools/utility/generators.py @@ -621,15 +621,6 @@ def gas_test( LEGACY_CALL_SUCCESS ) - gas_sstore = Op.SSTORE(1, 1).gas_cost(fork=fork) - if tx_gas is None: - tx_gas = ( - 5 * gas_single_gas_run - + cold_gas - + 4 * warm_gas - + 5 * gas_sstore - + 500_000 - ) tx = Transaction( to=address_legacy_harness, gas_limit=tx_gas, sender=sender ) diff --git a/tests/constantinople/eip1014_create2/test_create2_revert.py b/tests/constantinople/eip1014_create2/test_create2_revert.py index b8a0fdbc654..23624550d55 100644 --- a/tests/constantinople/eip1014_create2/test_create2_revert.py +++ b/tests/constantinople/eip1014_create2/test_create2_revert.py @@ -7,7 +7,6 @@ Account, Alloc, Environment, - Fork, Initcode, Op, StateTestFiller, @@ -78,7 +77,6 @@ def test_create2_revert_preserves_balance( tx=Transaction( sender=sender, to=factory, - gas_limit=1_000_000, data=initcode, ), ) @@ -88,7 +86,6 @@ def test_create2_revert_preserves_balance( def test_create2_succeeds_after_reverted_create2( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test that CREATE2 succeeds after a previous CREATE2 at the same address @@ -97,13 +94,9 @@ def test_create2_succeeds_after_reverted_create2( Inner call does CREATE2 then REVERTs. Outer call then does the same CREATE2 which should succeed since the first was rolled back. """ - env = Environment() storage = Storage() salt = 1 - new_account = fork.gas_costs().NEW_ACCOUNT - sstore_state = Op.SSTORE(new_value=1).state_cost(fork) - runtime_code = Op.SSTORE(0, 1) + Op.STOP initcode = Initcode(deploy_code=runtime_code) @@ -134,7 +127,6 @@ def test_create2_succeeds_after_reverted_create2( Op.CALLDATACOPY(0, 0, Op.CALLDATASIZE) + Op.POP( Op.CALL( - gas=200_000 + new_account + sstore_state, address=creator, args_size=Op.CALLDATASIZE, ) @@ -149,7 +141,6 @@ def test_create2_succeeds_after_reverted_create2( + Op.SSTORE( storage.store_next(0, "reverter_call_result"), Op.CALL( - gas=300_000 + new_account + sstore_state, address=reverter, args_size=Op.CALLDATASIZE, ), @@ -158,7 +149,6 @@ def test_create2_succeeds_after_reverted_create2( + Op.SSTORE( storage.store_next(1, "creator_call_result"), Op.CALL( - gas=300_000 + new_account + sstore_state, address=creator, args_size=Op.CALLDATASIZE, ), @@ -170,7 +160,6 @@ def test_create2_succeeds_after_reverted_create2( sender = pre.fund_eoa() state_test( - env=env, pre=pre, post={ outer: Account(storage=storage), @@ -182,7 +171,6 @@ def test_create2_succeeds_after_reverted_create2( tx=Transaction( sender=sender, to=outer, - gas_limit=2_000_000 + 2 * (new_account + sstore_state), data=initcode, ), ) diff --git a/tests/constantinople/eip1014_create2/test_create_returndata.py b/tests/constantinople/eip1014_create2/test_create_returndata.py index 918af9cfc74..d54899f0e70 100644 --- a/tests/constantinople/eip1014_create2/test_create_returndata.py +++ b/tests/constantinople/eip1014_create2/test_create_returndata.py @@ -165,8 +165,6 @@ def test_create2_return_data( to=address_to, protected=False, data=initcode, - gas_limit=500_000, - value=0, ) state_test(pre=pre, post=post, tx=tx) diff --git a/tests/constantinople/eip1014_create2/test_deterministic_deployment.py b/tests/constantinople/eip1014_create2/test_deterministic_deployment.py index f7c502fdec1..2e3663cccb3 100644 --- a/tests/constantinople/eip1014_create2/test_deterministic_deployment.py +++ b/tests/constantinople/eip1014_create2/test_deterministic_deployment.py @@ -9,7 +9,6 @@ Alloc, Block, BlockchainTestFiller, - Fork, Hash, Op, Transaction, @@ -25,7 +24,6 @@ def test_deterministic_deployment( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test deterministic deployments for contracts using @@ -39,27 +37,15 @@ def test_deterministic_deployment( sender = pre.fund_eoa() - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - # Sized for the set-tx (Hash(1) calldata, with a nonzero byte) since - # its intrinsic is the larger of the two; `deploy_code.gas_cost(fork)` - # defaults SSTORE to cold zero->non-zero which slightly over-estimates - # the reset-tx (already-zero) — harmless. - tx_gas = ( - intrinsic_calc(calldata=Hash(1)) - + deploy_code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ) reset_tx = Transaction( sender=sender, to=contract_address, data=Hash(0), - gas_limit=tx_gas, ) set_tx = Transaction( sender=sender, to=contract_address, data=Hash(1), - gas_limit=tx_gas, ) post = { diff --git a/tests/constantinople/eip1014_create2/test_recreate.py b/tests/constantinople/eip1014_create2/test_recreate.py index f89849779b9..67281bec9d8 100644 --- a/tests/constantinople/eip1014_create2/test_recreate.py +++ b/tests/constantinople/eip1014_create2/test_recreate.py @@ -6,7 +6,6 @@ Alloc, Block, BlockchainTestFiller, - Fork, Initcode, Op, Transaction, @@ -25,7 +24,6 @@ def test_recreate( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, recreate_on_separate_block: bool, ) -> None: """ @@ -52,7 +50,6 @@ def test_recreate( initcode = Initcode(deploy_code=deploy_code) create_tx = Transaction( - gas_limit=100_000, to=creator_address, data=initcode, sender=sender, @@ -63,7 +60,6 @@ def test_recreate( ) set_storage_tx = Transaction( - gas_limit=100_000, to=created_contract_address, value=1, sender=sender, @@ -72,7 +68,6 @@ def test_recreate( blocks = [Block(txs=[create_tx, set_storage_tx])] destruct_tx = Transaction( - gas_limit=100_000, to=created_contract_address, value=0, sender=sender, @@ -80,14 +75,12 @@ def test_recreate( balance = 1 send_funds_tx = Transaction( - gas_limit=100_000, to=created_contract_address, value=balance, sender=sender, ) re_create_tx = Transaction( - gas_limit=100_000, to=creator_address, data=initcode, sender=sender, diff --git a/tests/constantinople/eip1052_extcodehash/test_extcodehash.py b/tests/constantinople/eip1052_extcodehash/test_extcodehash.py index 13373a5bafa..b8c56e839be 100644 --- a/tests/constantinople/eip1052_extcodehash/test_extcodehash.py +++ b/tests/constantinople/eip1052_extcodehash/test_extcodehash.py @@ -43,7 +43,6 @@ def test_extcodehash_self( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test EXTCODEHASH/EXTCODESIZE of the currently executing account. @@ -61,20 +60,9 @@ def test_extcodehash_self( code_address = pre.deploy_contract(code, storage=storage.canary()) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) - state_test( - pre=pre, - post={code_address: Account(storage=storage)}, - tx=tx, - ) + state_test(pre=pre, post={code_address: Account(storage=storage)}, tx=tx) @pytest.mark.ported_from( @@ -88,7 +76,6 @@ def test_extcodehash_self( def test_extcodehash_of_empty( state_test: StateTestFiller, pre: Alloc, - fork: Fork, target_exists: bool, ) -> None: """ @@ -111,15 +98,7 @@ def test_extcodehash_of_empty( code_address = pre.deploy_contract(code, storage=storage.canary()) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=(pre.fund_eoa()), - to=code_address, - value=1, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address, value=1) state_test( pre=pre, @@ -139,7 +118,6 @@ def test_extcodehash_of_empty( def test_extcodehash_empty_send_value( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test EXTCODEHASH of non-existent account before and after sending value. @@ -169,14 +147,7 @@ def test_extcodehash_empty_send_value( code, balance=10**18, storage=storage.canary() ) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -245,7 +216,6 @@ def test_extcodehash_empty_send_value( def test_extcodehash_empty_account_variants( state_test: StateTestFiller, pre: Alloc, - fork: Fork, account: Account, call_before: bool, expected_hash: bytes, @@ -285,15 +255,7 @@ def test_extcodehash_empty_account_variants( code, balance=10**18, storage=storage.canary() ) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - value=1, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address, value=1) state_test( pre=pre, @@ -314,7 +276,6 @@ def test_extcodehash_empty_account_variants( def test_extcodehash_empty_contract_creation( state_test: StateTestFiller, pre: Alloc, - fork: Fork, opcode: Op, ) -> None: """ @@ -364,14 +325,7 @@ def test_extcodehash_empty_contract_creation( ) storage[created_slot] = created_address - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -401,7 +355,6 @@ def test_extcodehash_empty_contract_creation( def test_extcodehash_codeless_with_storage( state_test: StateTestFiller, pre: Alloc, - fork: Fork, balance: int, nonce: int, ) -> None: @@ -426,18 +379,7 @@ def test_extcodehash_codeless_with_storage( code_address = pre.deploy_contract(code, storage=storage.canary()) - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - # `code.gas_cost(fork)` covers both SSTOREs (regular + state under - # EIP-8037); EIP-1706 slack for the trailing SSTORE. - gas_limit=( - intrinsic_calc() - + code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ), - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -460,7 +402,6 @@ def test_extcodehash_dynamic_account_overwrite( state_test: StateTestFiller, pre: Alloc, target_exists: bool, - fork: Fork, ) -> None: """ Test EXTCODEHASH of non-existent/no-code account, @@ -565,20 +506,10 @@ def test_extcodehash_dynamic_account_overwrite( target_storage[target_storage_slot] = 1 sender = pre.fund_eoa() - # Test does ~10 first-time SSTOREs plus a CREATE2 (NEW_ACCOUNT) - # in the caller. Both terms are 0 pre-EIP-8037 and scale with cpsb - # on Amsterdam, keeping this CPSB-agnostic. - gas_limit = ( - 400_000 - + fork.gas_costs().NEW_ACCOUNT - + 10 * Op.SSTORE(new_value=1).state_cost(fork) - ) - tx = Transaction( sender=sender, to=caller_address, data=bytes(target_address).rjust(32, b"\0"), - gas_limit=gas_limit, ) state_test( @@ -605,7 +536,6 @@ def test_extcodehash_dynamic_account_overwrite( def test_extcodehash_precompile( state_test: StateTestFiller, pre: Alloc, - fork: Fork, precompile: Address, ) -> None: """ @@ -625,14 +555,7 @@ def test_extcodehash_precompile( code_address = pre.deploy_contract(code, storage=storage.canary()) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -659,7 +582,6 @@ def test_extcodehash_precompile( def test_extcodehash_new_account( state_test: StateTestFiller, pre: Alloc, - fork: Fork, deployed_code: bytes, opcode: Opcodes, ) -> None: @@ -700,14 +622,7 @@ def test_extcodehash_new_account( ) storage[created_slot] = created_address - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -735,7 +650,6 @@ def test_extcodehash_new_account( def test_extcodehash_via_call( state_test: StateTestFiller, pre: Alloc, - fork: Fork, opcode: Opcodes, ) -> None: """ @@ -771,14 +685,7 @@ def test_extcodehash_via_call( code_address = pre.deploy_contract(code, storage=storage.canary()) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -879,14 +786,7 @@ def extcode_checks() -> Bytecode: ) storage[created_slot] = target_address - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) post: dict[Address, Account | None] = { code_address: Account(storage=storage), @@ -909,7 +809,6 @@ def extcode_checks() -> Bytecode: def test_extcodehash_changed_account( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test EXTCODEHASH/EXTCODESIZE before and after changing account state. @@ -950,14 +849,7 @@ def extcode_checks() -> Bytecode: code, balance=1, storage=storage.canary() ) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -1009,14 +901,7 @@ def test_extcodehash_max_code_size( code_address = pre.deploy_contract(code, storage=storage.canary()) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -1037,7 +922,6 @@ def test_extcodehash_max_code_size( def test_extcodehash_in_init_code( state_test: StateTestFiller, pre: Alloc, - fork: Fork, create_opcode: Opcodes | None, ) -> None: """ @@ -1065,10 +949,6 @@ def test_extcodehash_in_init_code( ) initcode = checks + Op.RETURN(0, 0) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - if create_opcode is None: # Transaction-level creation: init code runs directly. sender = pre.fund_eoa() @@ -1076,7 +956,6 @@ def test_extcodehash_in_init_code( sender=sender, to=None, data=initcode, - gas_limit=gas_limit, ) created = compute_create_address( address=sender, @@ -1098,7 +977,6 @@ def test_extcodehash_in_init_code( sender=pre.fund_eoa(), to=factory, data=initcode, - gas_limit=gas_limit, ) created = compute_create_address( address=factory, @@ -1127,7 +1005,6 @@ def test_extcodehash_in_init_code( def test_extcodehash_self_in_init( state_test: StateTestFiller, pre: Alloc, - fork: Fork, create_opcode: Opcodes | None, ) -> None: """ @@ -1151,17 +1028,12 @@ def test_extcodehash_self_in_init( ) initcode = checks + Op.RETURN(0, 0) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - if create_opcode is None: sender = pre.fund_eoa() tx = Transaction( sender=sender, to=None, data=initcode, - gas_limit=gas_limit, ) created = compute_create_address( address=sender, @@ -1182,7 +1054,6 @@ def test_extcodehash_self_in_init( sender=pre.fund_eoa(), to=factory, data=initcode, - gas_limit=gas_limit, ) created = compute_create_address( address=factory, @@ -1218,7 +1089,6 @@ def test_extcodehash_self_in_init( def test_extcodehash_dynamic_argument( state_test: StateTestFiller, pre: Alloc, - fork: Fork, target_type: str, ) -> None: """ @@ -1264,14 +1134,10 @@ def test_extcodehash_dynamic_argument( code_address = pre.deploy_contract(code, storage=storage.canary()) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 tx = Transaction( sender=pre.fund_eoa(), to=code_address, data=bytes(target_address).rjust(32, b"\0"), - gas_limit=gas_limit, ) state_test( @@ -1291,7 +1157,6 @@ def test_extcodehash_dynamic_argument( def test_extcodehash_call_to_nonexistent( state_test: StateTestFiller, pre: Alloc, - fork: Fork, call_opcode: Opcodes, ) -> None: """ @@ -1313,14 +1178,7 @@ def test_extcodehash_call_to_nonexistent( code_address = pre.deploy_contract(code, storage=storage.canary()) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -1359,14 +1217,9 @@ def test_extcodehash_call_to_selfdestruct( call_succeeds = call_opcode != Op.STATICCALL - # SELFDESTRUCT to a nonexistent beneficiary creates a new account - # whose state gas scales with cpsb on Amsterdam. Forward enough so - # the inner CALL still completes when NEW_ACCOUNT grows. - new_account = fork.gas_costs().NEW_ACCOUNT - sstore_state = Op.SSTORE(new_value=1).state_cost(fork) code = Op.SSTORE( storage.store_next(int(call_succeeds)), - call_opcode(address=target, gas=165_000 + new_account), + call_opcode(address=target), ) + Op.SSTORE( storage.store_next(target_code.keccak256()), Op.EXTCODEHASH(target), @@ -1374,12 +1227,7 @@ def test_extcodehash_call_to_selfdestruct( code_address = pre.deploy_contract(code, storage=storage.canary()) - gas_limit = 400_000 + new_account + 2 * sstore_state - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) # Pre-Cancun, CALLCODE/DELEGATECALL execute SELFDESTRUCT in the # caller's context, destroying the test contract at end of tx. @@ -1415,7 +1263,6 @@ def test_extcodehash_call_to_selfdestruct( def test_extcodehash_created_and_deleted( state_test: StateTestFiller, pre: Alloc, - fork: Fork, trigger: Opcodes, ) -> None: """ @@ -1478,14 +1325,7 @@ def extcode_checks() -> Bytecode: ) storage[created_slot] = created - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) post: dict[Address, Account | None] = { code_address: Account(storage=storage), @@ -1507,7 +1347,6 @@ def extcode_checks() -> Bytecode: def test_extcodehash_created_and_deleted_recheck_outer( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test EXTCODEHASH of a created-and-selfdestructed account rechecked @@ -1588,18 +1427,7 @@ def inner_extcode_checks() -> Bytecode: ) outer = pre.deploy_contract(outer_code, storage=outer_storage.canary()) - # Test does ~10 first-time SSTOREs (across inner and outer) plus a - # CREATE2 (NEW_ACCOUNT). Both terms scale with cpsb on Amsterdam. - gas_limit = ( - 400_000 - + fork.gas_costs().NEW_ACCOUNT - + 10 * Op.SSTORE(new_value=1).state_cost(fork) - ) - tx = Transaction( - sender=pre.fund_eoa(), - to=outer, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=outer) post: dict[Address, Account | None] = { inner: Account(storage=inner_storage), @@ -1653,14 +1481,8 @@ def test_extcodehash_subcall_selfdestruct( selfdestruct_code = Op.SELFDESTRUCT(beneficiary) target_c = pre.deploy_contract(selfdestruct_code) - # SELFDESTRUCT to a nonexistent beneficiary creates a new account - # whose state gas scales with cpsb on Amsterdam. - new_account = fork.gas_costs().NEW_ACCOUNT - sstore_state = Op.SSTORE(new_value=1).state_cost(fork) - # A: executes C's code in A's context via CALLCODE/DELEGATECALL a_code = call_opcode( - gas=350_000 + new_account, address=target_c, ret_size=32, ) @@ -1701,12 +1523,12 @@ def extcode_checks(target: Address | Bytecode) -> Bytecode: code += extcode_checks(a_target) code += Op.SSTORE( storage.store_next(1), - Op.CALL(gas=350_000 + new_account, address=a_target), + Op.CALL(address=a_target), ) code += extcode_checks(a_target) code += Op.SSTORE( storage.store_next(1), - Op.CALL(gas=350_000 + new_account, address=a_target), + Op.CALL(address=a_target), ) code_address = pre.deploy_contract(code, storage=storage.canary()) @@ -1715,13 +1537,7 @@ def extcode_checks(target: Address | Bytecode) -> Bytecode: a = compute_create_address(address=code_address, nonce=1) storage[created_slot] = a - # Test does up to ~7 first-time SSTOREs plus a CREATE for dynamic A. - gas_limit = 500_000 + new_account + 7 * sstore_state - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) # Pre-Cancun, CALLCODE/DELEGATECALL executes SELFDESTRUCT in A's # context, deleting A at end of transaction. @@ -1757,7 +1573,6 @@ def extcode_checks(target: Address | Bytecode) -> Bytecode: def test_extcodehash_subcall_create2_oog( state_test: StateTestFiller, pre: Alloc, - fork: Fork, call_opcode: Opcodes, oog: bool, ) -> None: @@ -1775,12 +1590,6 @@ def test_extcodehash_subcall_create2_oog( deploy_code_bytes = bytes(deploy_code) initcode = Initcode(deploy_code=deploy_code) - # CREATE2 charges NEW_ACCOUNT state gas; the deploy_code's SSTORE - # also charges first-time SSTORE state gas. Both scale with cpsb - # on Amsterdam. - new_account = fork.gas_costs().NEW_ACCOUNT - sstore_state = Op.SSTORE(new_value=1).state_cost(fork) - # Factory: CREATE2, optionally consume all gas to trigger OOG. factory_code = Om.MSTORE(initcode, 0) + Op.MSTORE( 0, Op.CREATE2(value=0, offset=0, size=len(initcode), salt=0) @@ -1801,7 +1610,6 @@ def test_extcodehash_subcall_create2_oog( storage.store_next(int(not oog), "call_result"), call_opcode( address=factory, - gas=200_000 + new_account + sstore_state, ret_offset=0, ret_size=32, ), @@ -1837,12 +1645,9 @@ def test_extcodehash_subcall_create2_oog( else: post[created] = Account(nonce=1, code=deploy_code) - # Caller does ~5 first-time SSTOREs plus the inner CALL+CREATE2. - gas_limit = 500_000 + new_account + 5 * sstore_state tx = Transaction( sender=pre.fund_eoa(), to=code_address, - gas_limit=gas_limit, data=created.rjust(32, b"\0"), ) @@ -1864,7 +1669,6 @@ def test_extcodehash_subcall_create2_oog( def test_extcodecopy_zero_code( state_test: StateTestFiller, pre: Alloc, - fork: Fork, target_type: str, ) -> None: """ @@ -1907,14 +1711,7 @@ def test_extcodecopy_zero_code( code_address = pre.deploy_contract(code, storage=storage.canary()) - gas_limit = 400_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=gas_limit, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) state_test( pre=pre, @@ -1988,11 +1785,7 @@ def test_codecopy_zero_in_create2( # First 32 bytes of initcode — what CODECOPY(0,0,32) returns. initcode_word0 = bytes(initcode)[:32] - tx = Transaction( - sender=pre.fund_eoa(), - to=caller, - gas_limit=1_400_000, - ) + tx = Transaction(sender=pre.fund_eoa(), to=caller) state_test( pre=pre, diff --git a/tests/constantinople/eip145_bitwise_shift/test_shift_combinations.py b/tests/constantinople/eip145_bitwise_shift/test_shift_combinations.py index 46061f495b6..f2a375020c5 100644 --- a/tests/constantinople/eip145_bitwise_shift/test_shift_combinations.py +++ b/tests/constantinople/eip145_bitwise_shift/test_shift_combinations.py @@ -7,7 +7,6 @@ from execution_testing import ( Account, Alloc, - Fork, Op, StateTestFiller, Storage, @@ -62,11 +61,7 @@ ) @pytest.mark.eels_base_coverage def test_combinations( - state_test: StateTestFiller, - pre: Alloc, - fork: Fork, - opcode: Op, - operation: Callable, + state_test: StateTestFiller, pre: Alloc, opcode: Op, operation: Callable ) -> None: """Test bitwise shift combinations.""" result = Storage() @@ -85,18 +80,9 @@ def test_combinations( + Op.STOP, ) - # Osaka (EIP-7825) caps tx gas at 16,777,216; Amsterdam - # (EIP-8037) lifts that cap and lets state gas fund the test's - # ~400 SSTOREs from the reservoir. - # TODO: auto gas limit will remove this - gas_limit = 16_000_000 - if fork.is_eip_enabled(8037): - gas_limit = 25_000_000 - tx = Transaction( sender=pre.fund_eoa(), to=address_to, - gas_limit=gas_limit, ) state_test(pre=pre, post={address_to: Account(storage=result)}, tx=tx) diff --git a/tests/frontier/create/test_create_one_byte.py b/tests/frontier/create/test_create_one_byte.py index 326bbccdc59..066d9ac440c 100644 --- a/tests/frontier/create/test_create_one_byte.py +++ b/tests/frontier/create/test_create_one_byte.py @@ -49,7 +49,6 @@ def test_create_one_byte( expect_post = Storage() new_account = fork.gas_costs().NEW_ACCOUNT - sstore_state = Op.SSTORE(new_value=1).state_cost(fork) # Each call forwards gas to the create_contract that does CREATE; # forward base + NEW_ACCOUNT (cpsb-agnostic). call_gas = 50_000 + new_account @@ -101,24 +100,8 @@ def test_create_one_byte( expect_post[opcode] = created_accounts[opcode] expect_post[256] = 1 - # Osaka (EIP-7825) caps transaction gas at - # `fork.transaction_gas_limit_cap()`. Amsterdam (EIP-8037) adds - # state gas via the reservoir on top of the cap (256 CREATEs and - # 257 first-time SSTOREs in this test). Pre-Osaka there's no cap. - gas_cap = fork.transaction_gas_limit_cap() - if fork.is_eip_enabled(8037): - assert gas_cap is not None - gas_limit = gas_cap + 256 * new_account + 257 * sstore_state - elif gas_cap is not None: - gas_limit = gas_cap - else: - gas_limit = 50_000_000 - tx = Transaction( - gas_limit=gas_limit, to=code, - data=b"", - nonce=0, sender=sender, protected=fork.supports_protected_txs(), ) diff --git a/tests/frontier/create/test_create_preimage_layout.py b/tests/frontier/create/test_create_preimage_layout.py index d0f74b0342f..899f57c022c 100644 --- a/tests/frontier/create/test_create_preimage_layout.py +++ b/tests/frontier/create/test_create_preimage_layout.py @@ -51,7 +51,6 @@ def test_create_preimage_layout_address( sender=sender, to=contract, data=nonce.to_bytes(32, "big"), - gas_limit=1_000_000, protected=fork.supports_protected_txs(), ) @@ -97,7 +96,6 @@ def test_create_preimage_layout_increment_nonce( sender=sender, to=contract, data=(1).to_bytes(32, "big"), - gas_limit=5_000_000, protected=fork.supports_protected_txs(), ) @@ -117,7 +115,6 @@ def test_create_preimage_layout_increment_nonce( def test_create_address_dynamic_nonce( pre: Alloc, state_test: StateTestFiller, - fork: Fork, ) -> None: """ Verify CreatePreimageLayout dynamic nonce encoding matches CREATE. @@ -163,18 +160,8 @@ def test_create_address_dynamic_nonce( contract = pre.deploy_contract(code=code) sender = pre.fund_eoa() - # Amsterdam EIP-8037 charges state gas per CREATE (new account). - # 260 CREATEs need ~34M state gas supplied via the reservoir. - gas_limit = 15_000_000 - if fork.create_state_gas(code_size=0) > 0: - gas_limit_cap = fork.transaction_gas_limit_cap() or gas_limit - gas_limit = gas_limit_cap + iterations * fork.create_state_gas( - code_size=0 - ) - tx = Transaction( to=contract, - gas_limit=gas_limit, sender=sender, ) @@ -259,11 +246,7 @@ def test_create_address_nonce_boundary( ) sender = pre.fund_eoa() - tx = Transaction( - to=DEPLOYER_ADDRESS, - gas_limit=15_000_000, - sender=sender, - ) + tx = Transaction(to=DEPLOYER_ADDRESS, sender=sender) post = {DEPLOYER_ADDRESS: Account(storage={0: 1})} for nonce in range(starting_nonce, starting_nonce + BOUNDARY_ITERATIONS): diff --git a/tests/frontier/create/test_create_suicide_during_init.py b/tests/frontier/create/test_create_suicide_during_init.py index ec9bc4bd64c..88ce37f0b31 100644 --- a/tests/frontier/create/test_create_suicide_during_init.py +++ b/tests/frontier/create/test_create_suicide_during_init.py @@ -91,7 +91,6 @@ def test_create_suicide_during_transaction_create( tx_value = 100 tx = Transaction( - gas_limit=1_000_000, to=None if transaction_create else contract_deploy, data=contract_initcode, value=tx_value, diff --git a/tests/frontier/create/test_create_suicide_store.py b/tests/frontier/create/test_create_suicide_store.py index 56340ef03c4..7183f38223a 100644 --- a/tests/frontier/create/test_create_suicide_store.py +++ b/tests/frontier/create/test_create_suicide_store.py @@ -143,7 +143,6 @@ def test_create_suicide_store( expect_post[slot_program_success] = 1 tx = Transaction( - gas_limit=1_000_000, to=create_contract, data=suicide_initcode, sender=sender, diff --git a/tests/frontier/examples/test_block_intermediate_state.py b/tests/frontier/examples/test_block_intermediate_state.py index 522b1b444e5..598f884219a 100644 --- a/tests/frontier/examples/test_block_intermediate_state.py +++ b/tests/frontier/examples/test_block_intermediate_state.py @@ -6,26 +6,19 @@ Alloc, Block, BlockchainTestFiller, - Environment, Transaction, ) @pytest.mark.valid_from("Frontier") -@pytest.mark.valid_before("SpuriousDragon") def test_block_intermediate_state( blockchain_test: BlockchainTestFiller, pre: Alloc ) -> None: """Verify intermediate block states.""" - env = Environment() sender = pre.fund_eoa() - tx = Transaction( - gas_limit=100_000, to=None, data=b"", sender=sender, protected=False - ) - tx_2 = Transaction( - gas_limit=100_000, to=None, data=b"", sender=sender, protected=False - ) + tx = Transaction(to=None, data=b"", sender=sender, protected=False) + tx_2 = Transaction(to=None, data=b"", sender=sender, protected=False) block_1 = Block( txs=[tx], @@ -48,7 +41,6 @@ def test_block_intermediate_state( ) blockchain_test( - genesis_environment=env, pre=pre, post=block_3.expected_post_state, blocks=[block_1, block_2, block_3], diff --git a/tests/frontier/identity_precompile/conftest.py b/tests/frontier/identity_precompile/conftest.py deleted file mode 100644 index 7056066718d..00000000000 --- a/tests/frontier/identity_precompile/conftest.py +++ /dev/null @@ -1,13 +0,0 @@ -"""Pytest (plugin) definitions local to Identity precompile tests.""" - -import pytest -from execution_testing import Fork - - -@pytest.fixture -def tx_gas_limit(fork: Fork) -> int: - """Return the gas limit for transactions.""" - # The `nonzerovalue` variants transfer 1 wei to the identity - # precompile, creating its account and charging NEW_ACCOUNT - # state gas under EIP-8037 (0 otherwise). - return 365_224 + fork.gas_costs().NEW_ACCOUNT diff --git a/tests/frontier/identity_precompile/test_identity.py b/tests/frontier/identity_precompile/test_identity.py index c4418e09937..f38b2c3409d 100644 --- a/tests/frontier/identity_precompile/test_identity.py +++ b/tests/frontier/identity_precompile/test_identity.py @@ -6,7 +6,6 @@ from execution_testing import ( Account, Alloc, - Environment, Op, StateTestFiller, Storage, @@ -121,14 +120,12 @@ def test_call_identity_precompile( call_args: CallArgs, memory_values: Tuple[int, ...], call_succeeds: bool, - tx_gas_limit: int, contract_balance: int, ) -> None: """ Test identity precompile RETURNDATA is sized correctly based on the input size. """ - env = Environment() storage = Storage() contract_bytecode = generate_identity_call_bytecode( @@ -145,15 +142,11 @@ def test_call_identity_precompile( balance=contract_balance, ) - tx = Transaction( - to=account, - sender=pre.fund_eoa(), - gas_limit=tx_gas_limit, - ) + tx = Transaction(to=account, sender=pre.fund_eoa()) post = {account: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.ported_from( @@ -192,7 +185,6 @@ def test_call_identity_precompile( ), ], ) -@pytest.mark.parametrize("tx_gas_limit", [10_000_000]) def test_call_identity_precompile_large_params( state_test: StateTestFiller, pre: Alloc, @@ -200,10 +192,8 @@ def test_call_identity_precompile_large_params( call_args: CallArgs, memory_values: Tuple[int, ...], call_succeeds: bool, - tx_gas_limit: int, ) -> None: """Test identity precompile when out of gas occurs.""" - env = Environment() storage = Storage() contract_bytecode = generate_identity_call_bytecode( @@ -219,12 +209,8 @@ def test_call_identity_precompile_large_params( storage=storage.canary(), ) - tx = Transaction( - to=account, - sender=pre.fund_eoa(), - gas_limit=tx_gas_limit, - ) + tx = Transaction(to=account, sender=pre.fund_eoa()) post = {account: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/frontier/identity_precompile/test_identity_returndatasize.py b/tests/frontier/identity_precompile/test_identity_returndatasize.py index 2a57182bae2..f9480c1818c 100644 --- a/tests/frontier/identity_precompile/test_identity_returndatasize.py +++ b/tests/frontier/identity_precompile/test_identity_returndatasize.py @@ -4,7 +4,6 @@ from execution_testing import ( Account, Alloc, - Environment, Op, StateTestFiller, Storage, @@ -40,7 +39,6 @@ def test_identity_precompile_returndata( Test identity precompile RETURNDATASIZE matches the input size regardless of the output buffer size. """ - env = Environment() storage = Storage() account = pre.deploy_contract( @@ -69,10 +67,9 @@ def test_identity_precompile_returndata( tx = Transaction( to=account, sender=pre.fund_eoa(), - gas_limit=200_000, protected=True, ) post = {account: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/frontier/opcodes/test_all_opcodes.py b/tests/frontier/opcodes/test_all_opcodes.py index 959954046fb..8429e9661d2 100644 --- a/tests/frontier/opcodes/test_all_opcodes.py +++ b/tests/frontier/opcodes/test_all_opcodes.py @@ -122,13 +122,8 @@ def test_all_opcodes( ), } - # EIP-8037 needs gas_limit > TX_MAX_GAS_LIMIT - # (16,777,216) for a state_gas_reservoir for SSTORE/CREATE. - gas_limit = 50_000_000 if fork.is_eip_enabled(8037) else 9_000_000 - tx = Transaction( sender=pre.fund_eoa(), - gas_limit=gas_limit, to=contract_address, protected=fork.supports_protected_txs(), ) @@ -141,7 +136,6 @@ def test_cover_revert(state_test: StateTestFiller, pre: Alloc) -> None: """Cover state revert from original tests for the coverage script.""" tx = Transaction( sender=pre.fund_eoa(), - gas_limit=1_000_000, data=Op.SSTORE(1, 1) + Op.REVERT(0, 0), to=None, value=0, @@ -194,7 +188,6 @@ def test_stack_overflow( ) tx = Transaction( - gas_limit=100_000, to=contract, sender=pre.fund_eoa(), protected=fork.supports_protected_txs(), @@ -258,11 +251,7 @@ def test_max_stack( + Op.STOP, storage={slot_code_worked: value_code_failed}, ) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 tx = Transaction( - gas_limit=gas_limit, to=contract, sender=pre.fund_eoa(), protected=fork.supports_protected_txs(), diff --git a/tests/frontier/opcodes/test_blockhash.py b/tests/frontier/opcodes/test_blockhash.py index 44691f81213..0c730f8edc8 100644 --- a/tests/frontier/opcodes/test_blockhash.py +++ b/tests/frontier/opcodes/test_blockhash.py @@ -52,12 +52,6 @@ def test_genesis_hash_available( contract = pre.deploy_contract(code=code) sender = pre.fund_eoa() - intrinsic = fork.transaction_intrinsic_cost_calculator() - tx_gas_limit = ( - intrinsic() - + code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ) blocks = ( [ Block( @@ -65,7 +59,6 @@ def test_genesis_hash_available( Transaction( sender=sender, to=contract, - gas_limit=tx_gas_limit, protected=fork.supports_protected_txs(), ) ] @@ -81,7 +74,6 @@ def test_genesis_hash_available( Transaction( sender=sender, to=contract, - gas_limit=tx_gas_limit, protected=fork.supports_protected_txs(), ) ] diff --git a/tests/frontier/opcodes/test_call.py b/tests/frontier/opcodes/test_call.py index 95ad749a868..53233ee9188 100644 --- a/tests/frontier/opcodes/test_call.py +++ b/tests/frontier/opcodes/test_call.py @@ -54,7 +54,6 @@ def test_call_large_offset_mstore( contract = pre.deploy_contract(call_measure + mstore_measure) tx = Transaction( - gas_limit=500_000, to=contract, value=0, sender=sender, @@ -66,7 +65,6 @@ def test_call_large_offset_mstore( # mstore cost: base cost + expansion cost mstore_cost = Op.MSTORE(new_memory_size=mem_offset + 32).gas_cost(fork) state_test( - env=Environment(), pre=pre, tx=tx, post={ @@ -129,7 +127,6 @@ def test_call_memory_expands_on_early_revert( ) tx = Transaction( - gas_limit=500_000, to=contract, value=0, sender=sender, @@ -143,7 +140,7 @@ def test_call_memory_expands_on_early_revert( Op.CALL( address_warm=False, value_transfer=True, - account_new=True, + account_new=not fork.is_eip_enabled(8037), # TODO: Gas calc check new_memory_size=ret_size, ).gas_cost(fork) - gsc.CALL_STIPEND @@ -153,7 +150,6 @@ def test_call_memory_expands_on_early_revert( # on CALL. mstore_cost = Op.MSTORE(new_memory_size=0).gas_cost(fork) state_test( - env=Environment(), pre=pre, tx=tx, post={ @@ -199,7 +195,6 @@ def test_call_large_args_offset_size_zero( contract = pre.deploy_contract(call_measure) tx = Transaction( - gas_limit=500_000, to=contract, value=0, sender=sender, diff --git a/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py b/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py index 56e94cacfc0..8645b4b3539 100644 --- a/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py +++ b/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py @@ -88,7 +88,10 @@ def sufficient_gas( metadata: dict = {"address_warm": False} if is_value_call: metadata["value_transfer"] = True - metadata["account_new"] = callee_opcode == Op.CALL + account_new = callee_opcode == Op.CALL + if fork.is_eip_enabled(8037): + account_new = False + metadata["account_new"] = account_new cost = callee_opcode(**metadata).gas_cost(fork) elif Byzantium <= fork < Berlin: cost = 700 # Pre-Berlin call cost @@ -200,14 +203,9 @@ def caller_address(pre: Alloc, caller_code: Bytecode) -> Address: @pytest.fixture def caller_tx(sender: EOA, caller_address: Address, fork: Fork) -> Transaction: """Transaction that performs the call to the caller contract.""" - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - return Transaction( to=caller_address, value=1, - gas_limit=gas_limit, sender=sender, protected=fork.supports_protected_txs(), ) diff --git a/tests/frontier/opcodes/test_calldatacopy.py b/tests/frontier/opcodes/test_calldatacopy.py index 3a54ac5cf41..2bb83462624 100644 --- a/tests/frontier/opcodes/test_calldatacopy.py +++ b/tests/frontier/opcodes/test_calldatacopy.py @@ -189,14 +189,8 @@ def test_calldatacopy( ), ) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 - tx = Transaction( data=tx_data, - gas_limit=gas_limit, - gas_price=0x0A, protected=fork.supports_protected_txs(), sender=pre.fund_eoa(), to=to, diff --git a/tests/frontier/opcodes/test_calldataload.py b/tests/frontier/opcodes/test_calldataload.py index 3d9c54ae14e..834c87d816e 100644 --- a/tests/frontier/opcodes/test_calldataload.py +++ b/tests/frontier/opcodes/test_calldataload.py @@ -74,13 +74,6 @@ def test_calldataload( ) contract_address = pre.deploy_contract(contract_code) - intrinsic = fork.transaction_intrinsic_cost_calculator() - # EIP-1706 sentry: SSTORE fails if gas_left <= CALL_STIPEND (2300) - # before its base cost is deducted, so the inner frame needs that - # much headroom on top of the SSTORE cost. - sstore_sentry_slack = fork.gas_costs().CALL_STIPEND + 1 - # Outer's CALL reserves this many gas units (`Op.SUB(Op.GAS(), N)`) - # before forwarding the rest to the inner frame. outer_call_reserve = 256 if calldata_source == "contract": outer_code = ( @@ -100,14 +93,6 @@ def test_calldataload( tx = Transaction( data=calldata, - gas_limit=( - intrinsic(calldata=calldata) - + outer_code.gas_cost(fork) - + outer_call_reserve - + contract_code.gas_cost(fork) - + sstore_sentry_slack - + Op.SSTORE(new_value=1).state_cost(fork) - ), protected=fork.supports_protected_txs(), sender=pre.fund_eoa(), to=to, @@ -116,12 +101,6 @@ def test_calldataload( else: tx = Transaction( data=calldata, - gas_limit=( - intrinsic(calldata=calldata) - + contract_code.gas_cost(fork) - + sstore_sentry_slack - + Op.SSTORE(new_value=1).state_cost(fork) - ), protected=fork.supports_protected_txs(), sender=pre.fund_eoa(), to=contract_address, diff --git a/tests/frontier/opcodes/test_calldatasize.py b/tests/frontier/opcodes/test_calldatasize.py index 8c457314366..50c8e1dbaed 100644 --- a/tests/frontier/opcodes/test_calldatasize.py +++ b/tests/frontier/opcodes/test_calldatasize.py @@ -49,13 +49,6 @@ def test_calldatasize( contract_address = pre.deploy_contract(contract_code) calldata = b"\x01" * args_size - intrinsic = fork.transaction_intrinsic_cost_calculator() - # EIP-1706 sentry: SSTORE fails if gas_left <= CALL_STIPEND (2300) - # before its base cost is deducted, so the inner frame needs that - # much headroom on top of the SSTORE cost. - sstore_sentry_slack = fork.gas_costs().CALL_STIPEND + 1 - # Outer's CALL reserves this many gas units (`Op.SUB(Op.GAS(), N)`) - # before forwarding the rest to the inner frame. outer_call_reserve = 256 if calldata_source == "contract": outer_code = Om.MSTORE(calldata, 0x0) + Op.CALL( @@ -70,14 +63,6 @@ def test_calldatasize( to = pre.deploy_contract(code=outer_code) tx = Transaction( - gas_limit=( - intrinsic() - + outer_code.gas_cost(fork) - + outer_call_reserve - + contract_code.gas_cost(fork) - + sstore_sentry_slack - + Op.SSTORE(new_value=1).state_cost(fork) - ), protected=fork.supports_protected_txs(), sender=pre.fund_eoa(), to=to, @@ -86,12 +71,6 @@ def test_calldatasize( else: tx = Transaction( data=calldata, - gas_limit=( - intrinsic(calldata=calldata) - + contract_code.gas_cost(fork) - + sstore_sentry_slack - + Op.SSTORE(new_value=1).state_cost(fork) - ), protected=fork.supports_protected_txs(), sender=pre.fund_eoa(), to=contract_address, diff --git a/tests/frontier/opcodes/test_data_copy_oog.py b/tests/frontier/opcodes/test_data_copy_oog.py index 36ab996d1dc..167b5b7d395 100644 --- a/tests/frontier/opcodes/test_data_copy_oog.py +++ b/tests/frontier/opcodes/test_data_copy_oog.py @@ -6,7 +6,6 @@ from execution_testing import ( Account, Alloc, - Environment, Op, StateTestFiller, Storage, @@ -107,17 +106,11 @@ def test_calldatacopy_word_copy_oog( tx = Transaction( to=outer_address, sender=sender, - gas_limit=500_000, # Plenty of gas for outer call ) post = {outer_address: Account(storage=storage)} - state_test( - env=Environment(), - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -176,14 +169,8 @@ def test_codecopy_word_copy_oog( tx = Transaction( to=outer_address, sender=sender, - gas_limit=500_000, ) post = {outer_address: Account(storage=storage)} - state_test( - env=Environment(), - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/frontier/opcodes/test_dup.py b/tests/frontier/opcodes/test_dup.py index 69113494d39..577ee399b4e 100644 --- a/tests/frontier/opcodes/test_dup.py +++ b/tests/frontier/opcodes/test_dup.py @@ -4,7 +4,6 @@ from execution_testing import ( Account, Alloc, - Environment, Fork, Op, StateTestFiller, @@ -51,7 +50,6 @@ def test_dup( vmTests/dup.json](https://github.com/ethereum/tests/blob/ v14.0/GeneralStateTests/VMTests/vmTests/dup.json) by Ori Pomerantz. """ - env = Environment() sender = pre.fund_eoa() post = {} @@ -103,4 +101,4 @@ def test_dup( post[account] = Account(storage=s) - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/frontier/opcodes/test_extcodecopy.py b/tests/frontier/opcodes/test_extcodecopy.py index 993996e504c..51889e4200b 100644 --- a/tests/frontier/opcodes/test_extcodecopy.py +++ b/tests/frontier/opcodes/test_extcodecopy.py @@ -73,7 +73,6 @@ def test_extcodecopy_bounds( tx = Transaction( sender=pre.fund_eoa(), to=code_address, - gas_limit=400_000, protected=fork.supports_protected_txs(), ) diff --git a/tests/frontier/opcodes/test_push.py b/tests/frontier/opcodes/test_push.py index c1e59bf9f06..ffc7f1e3447 100644 --- a/tests/frontier/opcodes/test_push.py +++ b/tests/frontier/opcodes/test_push.py @@ -75,7 +75,6 @@ def test_push( tx = Transaction( sender=pre.fund_eoa(), to=contract, - gas_limit=500_000, protected=fork.supports_protected_txs(), ) @@ -147,7 +146,6 @@ def test_stack_overflow( tx = Transaction( sender=pre.fund_eoa(), to=contract, - gas_limit=500_000, protected=fork.supports_protected_txs(), ) diff --git a/tests/frontier/opcodes/test_swap.py b/tests/frontier/opcodes/test_swap.py index 325a938ac93..0a445a7914f 100644 --- a/tests/frontier/opcodes/test_swap.py +++ b/tests/frontier/opcodes/test_swap.py @@ -70,19 +70,10 @@ def test_swap( # Deploy the contract with the generated bytecode. contract_address = pre.deploy_contract(contract_code) - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - # `contract_code.gas_cost(fork)` covers all PUSHes, the SWAP, and the - # 16 SSTOREs (regular + state under EIP-8037). Some SSTOREs write zero, - # which the default cold zero->non-zero assumption over-estimates; - # harmless. EIP-1706 slack on the trailing SSTORE. + # Create a transaction to execute the contract. tx = Transaction( sender=pre.fund_eoa(), to=contract_address, - gas_limit=( - intrinsic_calc() - + contract_code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ), protected=fork.supports_protected_txs(), ) @@ -149,15 +140,10 @@ def test_stack_underflow( # Deploy the contract with the generated bytecode. contract = pre.deploy_contract(contract_code) - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - # Create a transaction to execute the contract. tx = Transaction( sender=pre.fund_eoa(), to=contract, - gas_limit=gas_limit, protected=fork.supports_protected_txs(), ) diff --git a/tests/frontier/precompiles/test_ecrecover.py b/tests/frontier/precompiles/test_ecrecover.py index 32da8ed80ee..b98b69f42f6 100644 --- a/tests/frontier/precompiles/test_ecrecover.py +++ b/tests/frontier/precompiles/test_ecrecover.py @@ -1,13 +1,7 @@ """Tests ecrecover precompiled contract.""" import pytest -from execution_testing import ( - Account, - Alloc, - Environment, - StateTestFiller, - Transaction, -) +from execution_testing import Account, Alloc, StateTestFiller, Transaction from execution_testing.forks.helpers import Fork from execution_testing.vm import Opcodes as Op @@ -408,8 +402,6 @@ def test_precompiles( """ Tests the behavior of `ecrecover` precompiled contract. """ - env = Environment() - # Memory hash_offset = 0 v_offset = 32 @@ -438,10 +430,9 @@ def test_precompiles( tx = Transaction( to=account, sender=pre.fund_eoa(), - gas_limit=1_000_000, protected=fork.supports_protected_txs(), ) post = {account: Account(storage={0: output})} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/frontier/precompiles/test_precompile_absence.py b/tests/frontier/precompiles/test_precompile_absence.py index 7dfe9087a74..3c0c288f40d 100644 --- a/tests/frontier/precompiles/test_precompile_absence.py +++ b/tests/frontier/precompiles/test_precompile_absence.py @@ -60,16 +60,8 @@ def test_precompile_absence( call_code, storage=storage.canary() ) - # Osaka (EIP-7825) caps tx gas at 16,777,216. Amsterdam (EIP-8037) - # lifts the cap and increases SSTORE state gas; the 30M budget - # comfortably covers ~498 cold zero-to-nonzero SSTOREs. - gas_limit = 16_000_000 - if fork.is_eip_enabled(8037): - gas_limit = 30_000_000 - tx = Transaction( to=entry_point_address, - gas_limit=gas_limit, sender=pre.fund_eoa(), protected=True, ) diff --git a/tests/homestead/coverage/test_coverage.py b/tests/homestead/coverage/test_coverage.py index 423e16b0045..aa8e50be6e4 100644 --- a/tests/homestead/coverage/test_coverage.py +++ b/tests/homestead/coverage/test_coverage.py @@ -4,14 +4,7 @@ """ import pytest -from execution_testing import ( - Alloc, - Environment, - Fork, - Op, - StateTestFiller, - Transaction, -) +from execution_testing import Alloc, Fork, Op, StateTestFiller, Transaction from execution_testing.forks import Cancun REFERENCE_SPEC_GIT_PATH = "N/A" @@ -73,11 +66,8 @@ def test_coverage( if fork >= Cancun: tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), - gas_limit=100000, + sender=pre.fund_eoa(), to=address_to, - data=b"", - value=0, protected=False, access_list=[], max_fee_per_gas=10, @@ -85,12 +75,9 @@ def test_coverage( ) else: tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), - gas_limit=100000, + sender=pre.fund_eoa(), to=address_to, - data=b"", - value=0, protected=False, ) - state_test(env=Environment(), pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) diff --git a/tests/homestead/identity_precompile/test_identity.py b/tests/homestead/identity_precompile/test_identity.py index 9593a9b1e79..ad2062900e6 100644 --- a/tests/homestead/identity_precompile/test_identity.py +++ b/tests/homestead/identity_precompile/test_identity.py @@ -5,7 +5,6 @@ Account, Alloc, Environment, - Fork, Op, StateTestFiller, Transaction, @@ -18,7 +17,6 @@ def test_identity_return_overwrite( state_test: StateTestFiller, pre: Alloc, - fork: Fork, call_opcode: Op, ) -> None: """ @@ -43,15 +41,9 @@ def test_identity_return_overwrite( contract_address = pre.deploy_contract( code=code, ) - intrinsic = fork.transaction_intrinsic_cost_calculator() tx = Transaction( sender=pre.fund_eoa(), to=contract_address, - gas_limit=( - intrinsic() - + code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ), ) post = { @@ -70,7 +62,6 @@ def test_identity_return_overwrite( def test_identity_return_buffer_modify( state_test: StateTestFiller, pre: Alloc, - fork: Fork, call_opcode: Op, ) -> None: """ @@ -97,15 +88,9 @@ def test_identity_return_buffer_modify( contract_address = pre.deploy_contract( code=code, ) - intrinsic = fork.transaction_intrinsic_cost_calculator() tx = Transaction( sender=pre.fund_eoa(), to=contract_address, - gas_limit=( - intrinsic() - + code.gas_cost(fork) - + Op.SSTORE(new_value=1).state_cost(fork) - ), ) post = { diff --git a/tests/istanbul/eip152_blake2/test_blake2.py b/tests/istanbul/eip152_blake2/test_blake2.py index dd06d741c6f..073b0f7e492 100644 --- a/tests/istanbul/eip152_blake2/test_blake2.py +++ b/tests/istanbul/eip152_blake2/test_blake2.py @@ -420,7 +420,6 @@ def test_blake2b( ty=0x0, to=account, data=data, - gas_limit=1_000_000, protected=True, sender=sender, value=100000, @@ -554,22 +553,14 @@ def test_blake2b_invalid_gas( state_test(env=env, pre=pre, post=post, tx=tx) -def max_tx_gas_limit(fork: Fork) -> int: - """Maximum gas limit for a transaction (fork agnostic).""" - tx_limit = fork.transaction_gas_limit_cap() - if tx_limit is not None: - return tx_limit - return Environment().gas_limit - - -def tx_gas_limits(fork: Fork) -> List[int]: +def tx_gas_limits(fork: Fork) -> List[int | None]: """List of tx gas limits.""" # Three coverage levels for BLAKE2 + SSTORE base costs. The # contract writes two first-time SSTOREs (data_1, data_2), each # adding `sstore_state_gas` under EIP-8037 (0 otherwise). sstore_state = Op.SSTORE(new_value=1).state_cost(fork) return [ - max_tx_gas_limit(fork), + None, 90_000 + 2 * sstore_state, 110_000 + 2 * sstore_state, 200_000 + 2 * sstore_state, @@ -691,9 +682,6 @@ def test_blake2b_gas_limit( @pytest.mark.valid_from("Istanbul") @pytest.mark.parametrize("call_opcode", [Op.CALL, Op.CALLCODE]) -@pytest.mark.parametrize_by_fork( - "gas_limit", lambda fork: [max_tx_gas_limit(fork)] -) @pytest.mark.parametrize( ["data", "output"], [ @@ -778,7 +766,6 @@ def test_blake2b_large_gas_limit( state_test: StateTestFiller, pre: Alloc, call_opcode: Op, - gas_limit: int, blake2b_contract_bytecode: Bytecode, data: Blake2bInput | str | bytes, output: ExpectedOutput, @@ -798,7 +785,6 @@ def test_blake2b_large_gas_limit( ty=0x0, to=account, data=data, - gas_limit=gas_limit, protected=True, sender=sender, value=0, diff --git a/tests/istanbul/eip152_blake2/test_blake2_delegatecall.py b/tests/istanbul/eip152_blake2/test_blake2_delegatecall.py index 34dd125aa4f..aa2bd17a53a 100644 --- a/tests/istanbul/eip152_blake2/test_blake2_delegatecall.py +++ b/tests/istanbul/eip152_blake2/test_blake2_delegatecall.py @@ -45,7 +45,6 @@ def test_blake2_precompile_delegatecall( tx = Transaction( to=account, sender=pre.fund_eoa(), - gas_limit=90_000, protected=True, ) From 9c07e38ea9a6e7de2d1d1f2ee72f3e95b2f97451 Mon Sep 17 00:00:00 2001 From: marioevz Date: Tue, 2 Jun 2026 15:12:30 -0600 Subject: [PATCH 10/46] fix(tests): EIP-7708 and EIP-8024 --- .../test_burn_logs.py | 26 ------ .../test_fork_transition.py | 23 +---- .../test_transfer_logs.py | 90 +++---------------- .../eip8024_dupn_swapn_exchange/test_dupn.py | 18 ++-- .../test_eip_vectors.py | 38 ++++---- .../test_endofcode_underflow.py | 2 +- .../test_exchange.py | 26 ++---- .../test_pc_advancement.py | 10 +-- .../eip8024_dupn_swapn_exchange/test_swapn.py | 18 ++-- 9 files changed, 66 insertions(+), 185 deletions(-) diff --git a/tests/amsterdam/eip7708_eth_transfer_logs/test_burn_logs.py b/tests/amsterdam/eip7708_eth_transfer_logs/test_burn_logs.py index 1776fde3276..4485939b8d7 100644 --- a/tests/amsterdam/eip7708_eth_transfer_logs/test_burn_logs.py +++ b/tests/amsterdam/eip7708_eth_transfer_logs/test_burn_logs.py @@ -59,7 +59,6 @@ def test_selfdestruct_to_self_pre_existing_no_log( sender=sender, to=contract, value=0, - gas_limit=100_000, expected_receipt=TransactionReceipt(logs=[]), ) @@ -84,7 +83,6 @@ def test_selfdestruct_to_self_same_tx( state_test: StateTestFiller, env: Environment, pre: Alloc, - fork: Fork, sender: EOA, contract_balance: int, create_opcode: Op, @@ -127,9 +125,6 @@ def test_selfdestruct_to_self_same_tx( sender=sender, to=factory, value=contract_balance, - # Same-tx CREATE+SELFDESTRUCT charges NEW_ACCOUNT state gas - # under EIP-8037 (0 otherwise). - gas_limit=200_000 + fork.gas_costs().NEW_ACCOUNT, expected_receipt=TransactionReceipt(logs=expected_logs), ) @@ -148,7 +143,6 @@ def test_selfdestruct_to_different_address_same_tx( state_test: StateTestFiller, env: Environment, pre: Alloc, - fork: Fork, sender: EOA, contract_balance: int, create_opcode: Op, @@ -194,9 +188,6 @@ def test_selfdestruct_to_different_address_same_tx( sender=sender, to=factory, value=contract_balance, - # Same-tx CREATE+SELFDESTRUCT charges NEW_ACCOUNT state gas - # under EIP-8037 (0 otherwise). - gas_limit=200_000 + fork.gas_costs().NEW_ACCOUNT, expected_receipt=TransactionReceipt(logs=expected_logs), ) @@ -229,7 +220,6 @@ def test_selfdestruct_same_tx_via_call( state_test: StateTestFiller, env: Environment, pre: Alloc, - fork: Fork, sender: EOA, to_self: bool, call_twice: bool, @@ -322,12 +312,6 @@ def test_selfdestruct_same_tx_via_call( tx = Transaction( sender=sender, to=factory, - value=0, - # Same-tx CREATE+CALL+SELFDESTRUCT with SSTOREs for verification. - # Under EIP-8037 the SSTORE state writes and the SELFDESTRUCT - # NEW_ACCOUNT charge are paid from the shared limit; bump to - # 1_000_000 plus NEW_ACCOUNT to cover both dimensions. - gas_limit=1_000_000 + fork.gas_costs().NEW_ACCOUNT, expected_receipt=TransactionReceipt(logs=expected_logs), ) @@ -523,9 +507,7 @@ def test_finalization_burn_logs( tx = Transaction( sender=sender, to=None, - value=0, data=factory_code, - gas_limit=2_000_000, expected_receipt=TransactionReceipt( logs=execution_logs + finalization_logs ), @@ -628,9 +610,7 @@ def test_finalization_burn_logs_multi_account_ordering( tx = Transaction( sender=sender, to=None, - value=0, data=factory_code, - gas_limit=fork.transaction_gas_limit_cap(), expected_receipt=TransactionReceipt( logs=execution_logs + finalization_logs ), @@ -733,9 +713,7 @@ def test_finalization_burn_log_single_account_multiple_transfers( tx = Transaction( sender=sender, to=None, - value=0, data=factory_code, - gas_limit=fork.transaction_gas_limit_cap(), expected_receipt=TransactionReceipt( logs=execution_logs + finalization_logs ), @@ -905,15 +883,11 @@ def test_selfdestruct_finalization_after_priority_fee( # TODO: Fix calculation of the exact expected gas usage finalization_balance = None expected_logs.append(burn_log(created_address, finalization_balance)) - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 2_000_000 tx = Transaction( sender=sender, to=None, value=0, data=factory_code, - gas_limit=gas_limit, gas_price=gas_price, expected_receipt=TransactionReceipt(logs=expected_logs), ) diff --git a/tests/amsterdam/eip7708_eth_transfer_logs/test_fork_transition.py b/tests/amsterdam/eip7708_eth_transfer_logs/test_fork_transition.py index 3c95d3b6628..99ca74192fd 100644 --- a/tests/amsterdam/eip7708_eth_transfer_logs/test_fork_transition.py +++ b/tests/amsterdam/eip7708_eth_transfer_logs/test_fork_transition.py @@ -119,17 +119,6 @@ def test_burn_log_at_fork_transition( beneficiary: Account(balance=contract_balance * 3), } - # `fork` is a TransitionFork here; resolve to the post-transition - # fork (where the larger NEW_ACCOUNT applies) so the gas budget - # covers the same-tx CREATE+SELFDESTRUCT on the post-transition - # block. The pre-transition block has plenty of headroom. - pre_transition_timestamp = 14_999 - transition_timestamp = 15_000 - post_transition_timestamp = 15_001 - post_fork = fork.fork_at(timestamp=post_transition_timestamp) - gas_limit = 200_000 - if post_fork.is_eip_enabled(8037): - gas_limit += post_fork.gas_costs().NEW_ACCOUNT blocks = [ Block( timestamp=ts, @@ -137,18 +126,11 @@ def test_burn_log_at_fork_transition( Transaction( to=targets[i], sender=sender, - gas_limit=gas_limit, expected_receipt=TransactionReceipt(logs=expected_logs[i]), ) ], ) - for i, ts in enumerate( - [ - pre_transition_timestamp, - transition_timestamp, - post_transition_timestamp, - ] - ) + for i, ts in enumerate([14_999, 15_000, 15_001]) ] blockchain_test(pre=pre, blocks=blocks, post=post) @@ -175,7 +157,6 @@ def test_transfer_log_fork_transition( to=recipient, sender=sender, value=100, - gas_limit=21_000, expected_receipt=TransactionReceipt(logs=[]), ) ], @@ -187,7 +168,6 @@ def test_transfer_log_fork_transition( to=recipient, sender=sender, value=100, - gas_limit=21_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, recipient, 100)] ), @@ -201,7 +181,6 @@ def test_transfer_log_fork_transition( to=recipient, sender=sender, value=100, - gas_limit=21_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, recipient, 100)] ), diff --git a/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py b/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py index e832047a3a9..94d37f936ac 100644 --- a/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py +++ b/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py @@ -52,7 +52,6 @@ def test_simple_transfer_emits_log( sender=sender, to=recipient, value=1, - gas_limit=21_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, recipient, 1)] ), @@ -81,7 +80,6 @@ def test_transfer_to_delegated_account_emits_log( sender=sender, to=recipient, value=1, - gas_limit=100_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, recipient, 1)] ), @@ -102,7 +100,6 @@ def test_transfer_to_self_no_log( sender=sender, to=sender, value=1, - gas_limit=21_000, expected_receipt=TransactionReceipt(logs=[]), ) @@ -122,7 +119,6 @@ def test_zero_value_transfer_no_log( sender=sender, to=recipient, value=0, - gas_limit=21_000, expected_receipt=TransactionReceipt(logs=[]), ) @@ -152,14 +148,10 @@ def test_contract_creation_tx( expected_logs = ( [transfer_log(sender, created_address, tx_value)] if expect_log else [] ) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 tx = Transaction( sender=sender, to=None, value=tx_value, - gas_limit=gas_limit, data=bytes(initcode), expected_receipt=TransactionReceipt(logs=expected_logs), ) @@ -193,17 +185,10 @@ def test_contract_creation_tx_collision( value transfer, so EIP-7708 emits no Transfer log. """ sender = pre.fund_eoa() - # EIP-8037: a contract-creating tx charges intrinsic state gas for the - # new account, so the gas limit must cover it on top of the regular - # intrinsic cost. - gas_limit = 200_000 - if fork.is_eip_enabled(8037): - gas_limit += fork.create_state_gas() tx = Transaction( sender=sender, to=None, value=1000, - gas_limit=gas_limit, data=bytes(Op.RETURN(0, 0)), expected_receipt=TransactionReceipt(logs=[]), ) @@ -244,10 +229,10 @@ def test_call_opcodes_transfer_log_behavior( # Build the call based on opcode type if call_opcode in [Op.CALL, Op.CALLCODE]: # These opcodes have a value parameter - call_code = call_opcode(gas=100_000, address=callee, value=1) + call_code = call_opcode(address=callee, value=1) else: # DELEGATECALL and STATICCALL don't have value parameter - call_code = call_opcode(gas=100_000, address=callee) + call_code = call_opcode(address=callee) contract = pre.deploy_contract(call_code, balance=1) @@ -271,7 +256,6 @@ def test_call_opcodes_transfer_log_behavior( sender=sender, to=contract, value=1, - gas_limit=200_000, expected_receipt=TransactionReceipt(logs=expected_logs), ) @@ -303,7 +287,7 @@ def test_call_opcodes_insufficient_balance_no_log( callee = pre.deploy_contract(Op.STOP) contract_code = Op.SSTORE( - 0, call_opcode(gas=100_000, address=callee, value=attempted_value) + 0, call_opcode(address=callee, value=attempted_value) ) contract = pre.deploy_contract(contract_code, balance=caller_balance) @@ -311,7 +295,6 @@ def test_call_opcodes_insufficient_balance_no_log( sender=sender, to=contract, value=0, - gas_limit=200_000, expected_receipt=TransactionReceipt(logs=[]), ) @@ -337,18 +320,17 @@ def test_delegatecall_inner_call_with_value( recipient = pre.deploy_contract(Op.STOP) # B: code that CALLs recipient with value - code_b = Op.CALL(gas=50_000, address=recipient, value=1) + code_b = Op.CALL(address=recipient, value=1) contract_b = pre.deploy_contract(code_b) # A: DELEGATECALLs to B (executes B's code in A's context) - code_a = Op.DELEGATECALL(gas=100_000, address=contract_b) + code_a = Op.DELEGATECALL(address=contract_b) contract_a = pre.deploy_contract(code_a, balance=1) tx = Transaction( sender=sender, to=contract_a, value=0, - gas_limit=200_000, expected_receipt=TransactionReceipt( logs=[ # CALL from B executes in A's context, so A is the sender @@ -405,15 +387,10 @@ def test_create_opcode_emits_log( transfer_log(contract, created_address, create_value) ) - gas_limit = 200_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( sender=sender, to=contract, value=1, - gas_limit=gas_limit, expected_receipt=TransactionReceipt(logs=expected_logs), ) @@ -438,9 +415,7 @@ def test_initcode_calls_with_value( recipient = pre.deploy_contract(Op.STOP) # Initcode: CALL recipient with value, then RETURN empty code - initcode = Op.CALL(gas=50_000, address=recipient, value=1) + Op.RETURN( - 0, 0 - ) + initcode = Op.CALL(address=recipient, value=1) + Op.RETURN(0, 0) initcode_bytes = bytes(initcode) # Use Initcode helper or direct memory setup for longer initcode @@ -480,7 +455,6 @@ def test_initcode_calls_with_value( sender=sender, to=factory, value=0, - gas_limit=300_000, expected_receipt=TransactionReceipt( logs=[ # CREATE transfers value to new contract @@ -518,7 +492,6 @@ def test_create_initcode_stop_emits_log( sender=sender, to=contract, value=0, - gas_limit=500_000, expected_receipt=TransactionReceipt( logs=[transfer_log(contract, created_address, 1)] ), @@ -558,7 +531,6 @@ def test_failed_create_with_value_no_log( sender=sender, to=contract, value=1, - gas_limit=500_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, contract, 1)] ), @@ -590,7 +562,6 @@ def test_create_insufficient_balance_no_log( sender=sender, to=contract, value=1, - gas_limit=500_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, contract, 1)] ), @@ -629,6 +600,8 @@ def test_create_out_of_gas_no_log( initcode: Bytecode, ) -> None: """Test that CREATE running out of gas does NOT emit transfer log.""" + # TODO: This test can be improved to be more precise: Subcall with crafted + # gas limit. tx_value = 1000 gas_limit = 100_000 if fork.is_eip_enabled(8037): @@ -689,7 +662,6 @@ def test_stack_underflow_no_log( sender=sender, to=contract, value=1000, - gas_limit=100_000, expected_receipt=TransactionReceipt(logs=[]), # TX fails, no logs ) @@ -744,7 +716,6 @@ def test_create_collision_no_log( sender=sender, to=factory, value=0, - gas_limit=200_000, expected_receipt=TransactionReceipt( logs=[] ), # No logs - CREATE failed @@ -767,15 +738,10 @@ def test_selfdestruct_with_value_emits_log( contract_code = Op.SELFDESTRUCT(beneficiary) contract = pre.deploy_contract(contract_code, balance=contract_balance) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 - tx = Transaction( sender=sender, to=contract, value=0, - gas_limit=gas_limit, expected_receipt=TransactionReceipt( logs=[transfer_log(contract, beneficiary, contract_balance)] ), @@ -800,15 +766,10 @@ def test_selfdestruct_to_system_address( contract_code = Op.SELFDESTRUCT(Spec.SYSTEM_ADDRESS) contract = pre.deploy_contract(contract_code, balance=1) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 - tx = Transaction( sender=sender, to=contract, value=0, - gas_limit=gas_limit, expected_receipt=TransactionReceipt( logs=[transfer_log(contract, Spec.SYSTEM_ADDRESS, 1)] ), @@ -836,7 +797,7 @@ def test_zero_value_operations_no_log( target = pre.nonexistent_account() if op_type == "call": - contract_code = Op.CALL(gas=100_000, address=target, value=0) + contract_code = Op.CALL(address=target, value=0) else: contract_code = Op.SELFDESTRUCT(target) @@ -846,7 +807,6 @@ def test_zero_value_operations_no_log( sender=sender, to=contract, value=0, - gas_limit=100_000, expected_receipt=TransactionReceipt(logs=[]), ) @@ -880,7 +840,7 @@ def test_call_to_self_no_log( Op.CALLDATASIZE + Op.PUSH1(20) + Op.JUMPI - + call_opcode(gas=100_000, address=Op.ADDRESS, value=1, args_size=1) + + call_opcode(address=Op.ADDRESS, value=1, args_size=1) + Op.JUMPDEST + Op.STOP ) @@ -890,7 +850,6 @@ def test_call_to_self_no_log( sender=sender, to=contract, value=0, - gas_limit=200_000, expected_receipt=TransactionReceipt(logs=[]), ) @@ -900,7 +859,7 @@ def test_call_to_self_no_log( @pytest.mark.parametrize( "recipient_code,call_gas,call_value,recipient_balance,contract_balance", [ - pytest.param(Op.REVERT(0, 0), 50_000, 500, 0, 500, id="call_reverted"), + pytest.param(Op.REVERT(0, 0), Op.GAS, 500, 0, 500, id="call_reverted"), pytest.param(Op.JUMP(0), 100, 500, 0, 500, id="call_out_of_gas"), pytest.param( # OOG with memory expansion - tries to access large memory offset @@ -921,7 +880,7 @@ def test_call_to_self_no_log( ), pytest.param( Op.STOP, - 50_000, + Op.GAS, 2000, 0, 0, @@ -935,7 +894,7 @@ def test_failed_inner_operation_no_log( pre: Alloc, sender: EOA, recipient_code: Bytecode, - call_gas: int, + call_gas: int | Op, call_value: int, recipient_balance: int, contract_balance: int, @@ -955,7 +914,6 @@ def test_failed_inner_operation_no_log( sender=sender, to=contract, value=tx_value, - gas_limit=100_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, contract, tx_value)] ), @@ -998,7 +956,6 @@ def test_inner_call_succeeds_outer_reverts_no_log( sender=sender, to=contract, value=1, - gas_limit=500_000, expected_receipt=TransactionReceipt(logs=[]), ) @@ -1056,15 +1013,10 @@ def test_inner_create_succeeds_outer_reverts_no_log( ) entry = pre.deploy_contract(entry_code) - gas_limit = 200_000 - if fork.is_eip_enabled(8037): - gas_limit = 1_000_000 - tx = Transaction( sender=sender, to=entry, value=0, - gas_limit=gas_limit, expected_receipt=TransactionReceipt(logs=[]), ) @@ -1127,7 +1079,6 @@ def test_nested_calls_log_order( sender=sender, to=entry_contract, value=tx_value, - gas_limit=fork.transaction_gas_limit_cap(), expected_receipt=TransactionReceipt(logs=expected_logs), ) @@ -1165,7 +1116,6 @@ def test_contract_log_and_transfer_ordering( sender=sender, to=contract, value=1, - gas_limit=200_000, expected_receipt=TransactionReceipt( logs=[ # 1. TX-level transfer @@ -1209,7 +1159,6 @@ def test_reverted_transaction_no_log( sender=sender, to=contract, value=1000, - gas_limit=100_000, expected_receipt=TransactionReceipt(logs=[]), ) @@ -1255,7 +1204,6 @@ def test_transfer_to_special_address( sender=sender, to=target, value=transfer_amount, - gas_limit=100_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, target, transfer_amount)] ), @@ -1309,7 +1257,6 @@ def test_multiple_transfers_same_block( sender=sender, nonce=0, value=100, - gas_limit=21_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, recipient1, 100)] ), @@ -1319,7 +1266,6 @@ def test_multiple_transfers_same_block( sender=sender, nonce=1, value=200, - gas_limit=21_000, expected_receipt=TransactionReceipt( logs=[transfer_log(sender, recipient2, 200)] ), @@ -1358,10 +1304,6 @@ def test_selfdestruct_then_transfer_same_block( contract_code = Op.SELFDESTRUCT(beneficiary) contract = pre.deploy_contract(contract_code, balance=500) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 - blocks = [ Block( txs=[ @@ -1370,7 +1312,6 @@ def test_selfdestruct_then_transfer_same_block( sender=sender, nonce=0, value=0, - gas_limit=gas_limit, expected_receipt=TransactionReceipt( logs=[transfer_log(contract, beneficiary, 500)] ), @@ -1380,7 +1321,6 @@ def test_selfdestruct_then_transfer_same_block( sender=sender, nonce=1, value=100, - gas_limit=gas_limit, expected_receipt=TransactionReceipt( logs=[ transfer_log(sender, contract, 100), @@ -1436,7 +1376,6 @@ def test_selfdestruct_to_self_cross_tx_no_log( nonce=0, value=contract_balance, data=bytes(initcode), - gas_limit=300_000, expected_receipt=TransactionReceipt( logs=[ transfer_log( @@ -1451,7 +1390,6 @@ def test_selfdestruct_to_self_cross_tx_no_log( sender=sender, nonce=1, value=0, - gas_limit=100_000, expected_receipt=TransactionReceipt(logs=[]), ), ], @@ -1491,7 +1429,6 @@ def test_call_to_delegated_account_with_value( sender=sender, to=caller, value=0, - gas_limit=200_000, expected_receipt=TransactionReceipt( logs=[transfer_log(caller, delegated_eoa, 100)] ), @@ -1533,7 +1470,6 @@ def test_call_with_value_to_coinbase_no_priority_fee_log( sender=sender, to=caller, value=0, - gas_limit=fork.transaction_gas_limit_cap(), max_fee_per_gas=max_fee_per_gas, max_priority_fee_per_gas=max_fee_per_gas, expected_receipt=TransactionReceipt( diff --git a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_dupn.py b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_dupn.py index d3fccb9ad1c..3339b343409 100644 --- a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_dupn.py +++ b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_dupn.py @@ -61,7 +61,7 @@ def test_dupn_basic( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = {contract_address: Account(storage={0: expected_value})} @@ -101,7 +101,7 @@ def test_dupn_valid_immediates( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=10_000_000) + tx = Transaction(to=contract_address, sender=sender) post = {contract_address: Account(storage={0: expected_value})} @@ -136,7 +136,7 @@ def test_dupn_stack_underflow( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail, contract storage unchanged post = {contract_address: Account(storage={0: 0})} @@ -183,7 +183,7 @@ def test_dupn_gas_cost_boundary( storage={0: 0xDEADBEEF}, ) - tx = Transaction(to=call_address, sender=pre.fund_eoa(), gas_limit=200_000) + tx = Transaction(to=call_address, sender=pre.fund_eoa()) post = {call_address: Account(storage={0: 0 if gas_cost_delta < 0 else 1})} @@ -225,7 +225,7 @@ def test_endofcode_behavior( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # If tx succeeds, storage[0] = marker_value # Bad implementation would revert and have empty storage @@ -269,7 +269,7 @@ def test_dupn_invalid_immediate_aborts( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=10_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail - invalid immediate causes abort post = {contract_address: Account(storage={})} @@ -305,7 +305,7 @@ def test_dupn_jump_to_immediate_byte_0x5b_succeeds( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction succeeds - 0x5b is preserved as valid JUMPDEST post = {contract_address: Account(storage={0: 0x42})} @@ -340,7 +340,7 @@ def test_dupn_jump_to_valid_immediate_fails( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction fails - position 4 is a valid immediate, not JUMPDEST post = {contract_address: Account(storage={})} @@ -383,7 +383,7 @@ def test_dupn_with_dup1_sequence( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Expected: top (position 0) = 1, bottom (position 17) = 1, all others = 0 expected_storage = {} diff --git a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_eip_vectors.py b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_eip_vectors.py index 382d6d540d7..7ee9c1bf4d3 100644 --- a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_eip_vectors.py +++ b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_eip_vectors.py @@ -57,7 +57,7 @@ def test_eip_vector_dupn_duplicate_bottom( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -111,7 +111,7 @@ def test_eip_vector_swapn_swap_with_bottom( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -152,7 +152,7 @@ def test_eip_vector_exchange_swap_positions( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -190,7 +190,7 @@ def test_eip_vector_swapn_invalid_immediate_reverts( assert bytes(code) == bytes.fromhex("e75b") contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail, storage unchanged post = {contract_address: Account(storage={})} @@ -230,7 +230,7 @@ def test_eip_vector_jump_over_invalid_dupn( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should succeed post = {contract_address: Account(storage={0: 1})} @@ -266,7 +266,7 @@ def test_eip_vector_exchange_with_iszero( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -308,7 +308,7 @@ def test_eip_vector_dupn_stack_underflow( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail, storage unchanged post = {contract_address: Account(storage={})} @@ -346,7 +346,7 @@ def test_vector_dupn_followed_by_jumpdest( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # DUPN should duplicate position 17 (marker_value) post = {contract_address: Account(storage={0: marker_value})} @@ -381,7 +381,7 @@ def test_vector_dupn_invalid_0x60( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=10_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail, storage unchanged post = {contract_address: Account(storage={})} @@ -416,7 +416,7 @@ def test_vector_swapn_invalid_0x61( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=10_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail, storage unchanged post = {contract_address: Account(storage={})} @@ -450,7 +450,7 @@ def test_vector_dupn_invalid_0x5f( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=10_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail, storage unchanged post = {contract_address: Account(storage={})} @@ -490,7 +490,7 @@ def test_vector_exchange_0x9d( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # After EXCHANGE[0x9d]: positions 3 and 4 are swapped post = { @@ -544,7 +544,7 @@ def test_vector_exchange_0x2f( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # After EXCHANGE[0x2f]: positions 2 and 20 are swapped post = { @@ -596,7 +596,7 @@ def test_vector_exchange_valid_0x50( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -644,7 +644,7 @@ def test_vector_exchange_valid_0x51( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -694,7 +694,7 @@ def test_eip_vector_exchange_end_of_code( contract_address = pre.deploy_contract( code=Op.SSTORE(0, 0x42) + code + Op.STOP ) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Verify marker was stored (tx succeeded) post = {contract_address: Account(storage={0: 0x42})} @@ -737,7 +737,7 @@ def test_eip_vector_exchange_30_items( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -778,7 +778,7 @@ def test_vector_exchange_invalid_0x52( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail, storage unchanged post = {contract_address: Account(storage={})} @@ -824,7 +824,7 @@ def test_eip_vector_end_of_code( ) contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # verify marker was stored (tx succeeded) post = {contract_address: Account(storage={0: marker_value})} diff --git a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_endofcode_underflow.py b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_endofcode_underflow.py index b07d8622bbc..cfb88b2054b 100644 --- a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_endofcode_underflow.py +++ b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_endofcode_underflow.py @@ -72,7 +72,7 @@ def test_end_of_code_stack_underflow( ) contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction must fail (stack underflow), leaving storage untouched. post = {contract_address: Account(storage={})} diff --git a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_exchange.py b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_exchange.py index 3ab77031139..ae63cbfb4f9 100644 --- a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_exchange.py +++ b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_exchange.py @@ -75,11 +75,7 @@ def test_exchange_basic( contract_address = pre.deploy_contract(code=code) - gas_limit = 1_000_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 - - tx = Transaction(to=contract_address, sender=sender, gas_limit=gas_limit) + tx = Transaction(to=contract_address, sender=sender) # Build expected storage expected_storage = {} @@ -142,11 +138,7 @@ def test_exchange_valid_immediates( contract_address = pre.deploy_contract(code=code) - gas_limit = 1_000_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 - - tx = Transaction(to=contract_address, sender=sender, gas_limit=gas_limit) + tx = Transaction(to=contract_address, sender=sender) # Build expected storage expected_storage = {} @@ -199,7 +191,7 @@ def test_exchange_preserves_other_items( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -246,7 +238,7 @@ def test_exchange_stack_underflow( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail, contract storage unchanged post = {contract_address: Account(storage={})} @@ -298,7 +290,7 @@ def test_exchange_gas_cost_boundary( storage={0: 0xDEADBEEF}, ) - tx = Transaction(to=call_address, sender=pre.fund_eoa(), gas_limit=200_000) + tx = Transaction(to=call_address, sender=pre.fund_eoa()) post = {call_address: Account(storage={0: 0 if gas_cost_delta < 0 else 1})} @@ -340,7 +332,7 @@ def test_endofcode_behavior( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # If tx succeeds, storage[0] = marker_value # Bad implementation would revert and have empty storage @@ -395,7 +387,7 @@ def test_exchange_jump_to_immediate_byte( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) if immediate == 0x5B: # JUMPDEST - only case where jump succeeds post = {contract_address: Account(storage={0: 0x42})} @@ -440,7 +432,7 @@ def test_exchange_with_push_sequence( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Expected: position 9 has 0xBBBB (from pos 17), position 16 has # 0xAAAA (from pos 10), rest = 0 @@ -488,7 +480,7 @@ def test_exchange_invalid_immediate_aborts( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Execution aborted, transaction reverts post = {contract_address: Account(storage={})} diff --git a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_pc_advancement.py b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_pc_advancement.py index b98cf813e44..78b41f9792f 100644 --- a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_pc_advancement.py +++ b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_pc_advancement.py @@ -67,7 +67,7 @@ def test_dupn_pc_advances_by_2( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # The difference should be: # PUSH1(2) + SSTORE(1) + DUPN(2) + PC(1) = 6 @@ -127,7 +127,7 @@ def test_swapn_pc_advances_by_2( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -183,7 +183,7 @@ def test_exchange_pc_advances_by_2( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -241,7 +241,7 @@ def test_dupn_multiple_consecutive_pc_advancement( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -299,7 +299,7 @@ def test_mixed_opcodes_pc_advancement( code += Op.STOP contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( diff --git a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py index 47d1735bb87..adef348ccf7 100644 --- a/tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py +++ b/tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py @@ -72,7 +72,7 @@ def test_swapn_basic( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -128,7 +128,7 @@ def test_swapn_valid_immediates( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=10_000_000) + tx = Transaction(to=contract_address, sender=sender) post = { contract_address: Account( @@ -208,7 +208,7 @@ def test_swapn_stack_underflow( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail, contract storage unchanged post = {contract_address: Account(storage={})} @@ -257,7 +257,7 @@ def test_swapn_gas_cost_boundary( storage={0: 0xDEADBEEF}, ) - tx = Transaction(to=call_address, sender=pre.fund_eoa(), gas_limit=200_000) + tx = Transaction(to=call_address, sender=pre.fund_eoa()) post = {call_address: Account(storage={0: 0 if gas_cost_delta < 0 else 1})} @@ -301,7 +301,7 @@ def test_swapn_invalid_immediate_aborts( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=10_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction should fail - invalid immediate causes abort. post = {contract_address: Account(storage={})} @@ -344,7 +344,7 @@ def test_endofcode_behavior( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # If tx succeeds, storage[0] = marker_value # Bad implementation would revert and have empty storage @@ -381,7 +381,7 @@ def test_swapn_jump_to_immediate_byte_0x5b_succeeds( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction succeeds - 0x5b is preserved as valid JUMPDEST post = {contract_address: Account(storage={0: 0x42})} @@ -416,7 +416,7 @@ def test_swapn_jump_to_valid_immediate_fails( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Transaction fails - position 4 is a valid immediate, not JUMPDEST post = {contract_address: Account(storage={})} @@ -460,7 +460,7 @@ def test_swapn_with_dup1_and_push( contract_address = pre.deploy_contract(code=code) - tx = Transaction(to=contract_address, sender=sender, gas_limit=1_000_000) + tx = Transaction(to=contract_address, sender=sender) # Expected: top (position 0) = 1, bottom (position 17) = 2, rest = 0 expected_storage = {} From 76bff2d2547456c18bde2fca2cad093bae0012a4 Mon Sep 17 00:00:00 2001 From: marioevz Date: Tue, 2 Jun 2026 16:49:15 -0600 Subject: [PATCH 11/46] fix(tests): Ported static --- .../stCallCodes/test_callcall_00.py | 30 ++--------------- .../test_callcall_00_suicide_end.py | 24 ++------------ .../stCallCodes/test_callcallcall_000.py | 33 ++----------------- .../test_callcallcall_000_suicide_end.py | 27 ++------------- .../stCallCodes/test_callcallcallcode_001.py | 33 ++----------------- .../test_callcallcallcode_001_suicide_end.py | 27 ++------------- .../stCallCodes/test_callcallcode_01.py | 30 ++--------------- .../stCallCodes/test_callcallcodecall_010.py | 33 ++----------------- .../test_callcallcodecall_010_suicide_end.py | 27 ++------------- .../test_callcallcodecallcode_011.py | 33 ++----------------- .../stCallCodes/test_callcodecall_10.py | 30 ++--------------- .../test_callcodecall_10_suicide_end.py | 24 ++------------ .../stCallCodes/test_callcodecallcall_100.py | 33 ++----------------- .../test_callcodecallcall_100_suicide_end.py | 27 ++------------- .../test_callcodecallcallcode_101.py | 33 ++----------------- ...st_callcodecallcallcode_101_suicide_end.py | 27 ++------------- .../stCallCodes/test_callcodecallcode_11.py | 30 ++--------------- .../test_callcodecallcodecall_110.py | 33 ++----------------- ...st_callcodecallcodecall_110_suicide_end.py | 27 ++------------- .../test_callcodecallcodecallcode_111.py | 33 ++----------------- ...allcodecallcodecallcode_111_suicide_end.py | 27 ++------------- ..._create_init_fail_undefined_instruction.py | 19 ++--------- .../test_callcallcallcode_001.py | 33 ++----------------- .../test_callcallcode_01.py | 30 ++--------------- .../test_callcallcode_01_suicide_end.py | 24 ++------------ .../test_callcallcodecall_010.py | 33 ++----------------- .../test_callcallcodecall_010_suicide_end.py | 27 ++------------- .../test_callcallcodecallcode_011.py | 33 ++----------------- ...st_callcallcodecallcode_011_suicide_end.py | 27 ++------------- .../test_callcodecall_10.py | 30 ++--------------- .../test_callcodecall_10_suicide_end.py | 24 ++------------ .../test_callcodecallcall_100.py | 33 ++----------------- .../test_callcodecallcall_100_suicide_end.py | 27 ++------------- .../test_callcodecallcallcode_101.py | 33 ++----------------- ...st_callcodecallcallcode_101_suicide_end.py | 27 ++------------- .../test_callcodecallcode_11.py | 30 ++--------------- .../test_callcodecallcode_11_suicide_end.py | 24 ++------------ .../test_callcodecallcodecall_110.py | 33 ++----------------- ...st_callcodecallcodecall_110_suicide_end.py | 27 ++------------- .../test_callcodecallcodecallcode_111.py | 33 ++----------------- ...allcodecallcodecallcode_111_suicide_end.py | 33 ++----------------- .../test_callcallcallcode_001.py | 33 ++----------------- .../test_callcallcallcode_001_suicide_end.py | 27 ++------------- .../test_callcallcode_01.py | 30 ++--------------- .../test_callcallcode_01_suicide_end.py | 24 ++------------ .../test_callcallcodecall_010.py | 33 ++----------------- .../test_callcallcodecall_010_suicide_end.py | 27 ++------------- .../test_callcallcodecallcode_011.py | 33 ++----------------- ...st_callcallcodecallcode_011_suicide_end.py | 27 ++------------- .../test_callcodecall_10.py | 30 ++--------------- .../test_callcodecall_10_suicide_end.py | 24 ++------------ .../test_callcodecallcall_100.py | 33 ++----------------- .../test_callcodecallcall_100_suicide_end.py | 27 ++------------- .../test_callcodecallcallcode_101.py | 33 ++----------------- ...st_callcodecallcallcode_101_suicide_end.py | 27 ++------------- .../test_callcodecallcode_11.py | 30 ++--------------- .../test_callcodecallcode_11_suicide_end.py | 24 ++------------ .../test_callcodecallcodecall_110.py | 33 ++----------------- ...st_callcodecallcodecall_110_suicide_end.py | 27 ++------------- .../test_callcodecallcodecallcode_111.py | 33 ++----------------- ...allcodecallcodecallcode_111_suicide_end.py | 27 ++------------- .../stCodeSizeLimit/test_codesize_valid.py | 18 ++-------- .../stMemoryTest/test_mem0b_single_byte.py | 18 ++-------- .../stMemoryTest/test_mem31b_single_byte.py | 18 ++-------- .../stMemoryTest/test_mem32b_single_byte.py | 18 ++-------- .../stMemoryTest/test_mem32kb_single_byte.py | 18 ++-------- .../test_mem32kb_single_byte_minus_1.py | 18 ++-------- .../test_mem32kb_single_byte_minus_31.py | 18 ++-------- .../test_mem32kb_single_byte_minus_32.py | 18 ++-------- .../test_mem32kb_single_byte_minus_33.py | 18 ++-------- .../test_mem32kb_single_byte_plus_1.py | 18 ++-------- .../test_mem32kb_single_byte_plus_31.py | 18 ++-------- .../test_mem32kb_single_byte_plus_32.py | 18 ++-------- .../test_mem32kb_single_byte_plus_33.py | 18 ++-------- .../stMemoryTest/test_mem33b_single_byte.py | 18 ++-------- .../stMemoryTest/test_mem64kb_single_byte.py | 18 ++-------- .../test_mem64kb_single_byte_minus_1.py | 18 ++-------- .../test_mem64kb_single_byte_minus_31.py | 18 ++-------- .../test_mem64kb_single_byte_minus_32.py | 18 ++-------- .../test_mem64kb_single_byte_minus_33.py | 18 ++-------- .../test_mem64kb_single_byte_plus_1.py | 18 ++-------- .../test_mem64kb_single_byte_plus_31.py | 18 ++-------- .../test_mem64kb_single_byte_plus_32.py | 18 ++-------- .../test_mem64kb_single_byte_plus_33.py | 18 ++-------- .../test_modexp_0_0_0_22000.py | 19 ++--------- .../test_modexp_0_0_0_25000.py | 19 ++--------- .../test_modexp_0_0_0_35000.py | 19 ++--------- .../stRandom/test_random_statetest102.py | 11 +------ .../stRandom/test_random_statetest104.py | 11 +------ .../stRandom/test_random_statetest105.py | 11 +------ .../stRandom/test_random_statetest106.py | 11 +------ .../stRandom/test_random_statetest107.py | 11 +------ .../stRandom/test_random_statetest11.py | 11 +------ .../stRandom/test_random_statetest110.py | 11 +------ .../stRandom/test_random_statetest112.py | 11 +------ .../stRandom/test_random_statetest114.py | 11 +------ .../stRandom/test_random_statetest116.py | 11 +------ .../stRandom/test_random_statetest117.py | 11 +------ .../stRandom/test_random_statetest118.py | 11 +------ .../stRandom/test_random_statetest119.py | 11 +------ .../stRandom/test_random_statetest12.py | 11 +------ .../stRandom/test_random_statetest120.py | 11 +------ .../stRandom/test_random_statetest121.py | 11 +------ .../stRandom/test_random_statetest122.py | 11 +------ .../stRandom/test_random_statetest124.py | 11 +------ .../stRandom/test_random_statetest129.py | 11 +------ .../stRandom/test_random_statetest130.py | 11 +------ .../stRandom/test_random_statetest131.py | 11 +------ .../stRandom/test_random_statetest137.py | 11 +------ .../stRandom/test_random_statetest139.py | 11 +------ .../stRandom/test_random_statetest142.py | 11 +------ .../stRandom/test_random_statetest145.py | 11 +------ .../stRandom/test_random_statetest148.py | 11 +------ .../stRandom/test_random_statetest15.py | 11 +------ .../stRandom/test_random_statetest155.py | 11 +------ .../stRandom/test_random_statetest156.py | 11 +------ .../stRandom/test_random_statetest158.py | 11 +------ .../stRandom/test_random_statetest161.py | 11 +------ .../stRandom/test_random_statetest162.py | 11 +------ .../stRandom/test_random_statetest166.py | 11 +------ .../stRandom/test_random_statetest167.py | 11 +------ .../stRandom/test_random_statetest169.py | 11 +------ .../stRandom/test_random_statetest175.py | 11 +------ .../stRandom/test_random_statetest179.py | 11 +------ .../stRandom/test_random_statetest180.py | 11 +------ .../stRandom/test_random_statetest183.py | 11 +------ .../stRandom/test_random_statetest184.py | 11 +------ .../stRandom/test_random_statetest187.py | 11 +------ .../stRandom/test_random_statetest188.py | 11 +------ .../stRandom/test_random_statetest19.py | 11 +------ .../stRandom/test_random_statetest191.py | 11 +------ .../stRandom/test_random_statetest192.py | 11 +------ .../stRandom/test_random_statetest194.py | 12 +------ .../stRandom/test_random_statetest195.py | 11 +------ .../stRandom/test_random_statetest196.py | 11 +------ .../stRandom/test_random_statetest2.py | 11 +------ .../stRandom/test_random_statetest200.py | 11 +------ .../stRandom/test_random_statetest202.py | 11 +------ .../stRandom/test_random_statetest204.py | 11 +------ .../stRandom/test_random_statetest206.py | 11 +------ .../stRandom/test_random_statetest208.py | 11 +------ .../stRandom/test_random_statetest210.py | 11 +------ .../stRandom/test_random_statetest214.py | 11 +------ .../stRandom/test_random_statetest215.py | 11 +------ .../stRandom/test_random_statetest216.py | 11 +------ .../stRandom/test_random_statetest217.py | 11 +------ .../stRandom/test_random_statetest219.py | 11 +------ .../stRandom/test_random_statetest220.py | 11 +------ .../stRandom/test_random_statetest221.py | 11 +------ .../stRandom/test_random_statetest222.py | 11 +------ .../stRandom/test_random_statetest225.py | 11 +------ .../stRandom/test_random_statetest227.py | 11 +------ .../stRandom/test_random_statetest23.py | 11 +------ .../stRandom/test_random_statetest231.py | 11 +------ .../stRandom/test_random_statetest238.py | 11 +------ .../stRandom/test_random_statetest242.py | 11 +------ .../stRandom/test_random_statetest243.py | 11 +------ .../stRandom/test_random_statetest247.py | 11 +------ .../stRandom/test_random_statetest248.py | 11 +------ .../stRandom/test_random_statetest249.py | 12 +------ .../stRandom/test_random_statetest254.py | 11 +------ .../stRandom/test_random_statetest259.py | 11 +------ .../stRandom/test_random_statetest264.py | 12 +------ .../stRandom/test_random_statetest267.py | 11 +------ .../stRandom/test_random_statetest268.py | 11 +------ .../stRandom/test_random_statetest269.py | 11 +------ .../stRandom/test_random_statetest27.py | 11 +------ .../stRandom/test_random_statetest276.py | 11 +------ .../stRandom/test_random_statetest278.py | 11 +------ .../stRandom/test_random_statetest279.py | 11 +------ .../stRandom/test_random_statetest28.py | 11 +------ .../stRandom/test_random_statetest280.py | 11 +------ .../stRandom/test_random_statetest281.py | 11 +------ .../stRandom/test_random_statetest283.py | 11 +------ .../stRandom/test_random_statetest29.py | 11 +------ .../stRandom/test_random_statetest290.py | 11 +------ .../stRandom/test_random_statetest297.py | 11 +------ .../stRandom/test_random_statetest298.py | 11 +------ .../stRandom/test_random_statetest299.py | 11 +------ .../stRandom/test_random_statetest3.py | 11 +------ .../stRandom/test_random_statetest301.py | 11 +------ .../stRandom/test_random_statetest305.py | 11 +------ .../stRandom/test_random_statetest310.py | 11 +------ .../stRandom/test_random_statetest311.py | 11 +------ .../stRandom/test_random_statetest315.py | 11 +------ .../stRandom/test_random_statetest316.py | 12 +------ .../stRandom/test_random_statetest318.py | 11 +------ .../stRandom/test_random_statetest322.py | 11 +------ .../stRandom/test_random_statetest325.py | 11 +------ .../stRandom/test_random_statetest329.py | 11 +------ .../stRandom/test_random_statetest332.py | 11 +------ .../stRandom/test_random_statetest333.py | 11 +------ .../stRandom/test_random_statetest334.py | 11 +------ .../stRandom/test_random_statetest339.py | 11 +------ .../stRandom/test_random_statetest342.py | 11 +------ .../stRandom/test_random_statetest348.py | 11 +------ .../stRandom/test_random_statetest351.py | 11 +------ .../stRandom/test_random_statetest354.py | 11 +------ .../stRandom/test_random_statetest356.py | 11 +------ .../stRandom/test_random_statetest358.py | 11 +------ .../stRandom/test_random_statetest360.py | 11 +------ .../stRandom/test_random_statetest361.py | 11 +------ .../stRandom/test_random_statetest362.py | 11 +------ .../stRandom/test_random_statetest363.py | 11 +------ .../stRandom/test_random_statetest364.py | 11 +------ .../stRandom/test_random_statetest365.py | 11 +------ .../stRandom/test_random_statetest366.py | 11 +------ .../stRandom/test_random_statetest367.py | 11 +------ .../stRandom/test_random_statetest369.py | 11 +------ .../stRandom/test_random_statetest37.py | 11 +------ .../stRandom/test_random_statetest372.py | 11 +------ .../stRandom/test_random_statetest380.py | 11 +------ .../stRandom/test_random_statetest381.py | 11 +------ .../stRandom/test_random_statetest382.py | 11 +------ .../stRandom/test_random_statetest383.py | 11 +------ .../stRandom/test_random_statetest41.py | 11 +------ .../stRandom/test_random_statetest47.py | 11 +------ .../stRandom/test_random_statetest49.py | 11 +------ .../stRandom/test_random_statetest52.py | 11 +------ .../stRandom/test_random_statetest58.py | 11 +------ .../stRandom/test_random_statetest59.py | 11 +------ .../stRandom/test_random_statetest6.py | 11 +------ .../stRandom/test_random_statetest60.py | 11 +------ .../stRandom/test_random_statetest62.py | 11 +------ .../stRandom/test_random_statetest63.py | 11 +------ .../stRandom/test_random_statetest66.py | 11 +------ .../stRandom/test_random_statetest67.py | 11 +------ .../stRandom/test_random_statetest69.py | 11 +------ .../stRandom/test_random_statetest73.py | 11 +------ .../stRandom/test_random_statetest74.py | 11 +------ .../stRandom/test_random_statetest75.py | 11 +------ .../stRandom/test_random_statetest77.py | 11 +------ .../stRandom/test_random_statetest80.py | 11 +------ .../stRandom/test_random_statetest81.py | 11 +------ .../stRandom/test_random_statetest83.py | 11 +------ .../stRandom/test_random_statetest85.py | 11 +------ .../stRandom/test_random_statetest87.py | 11 +------ .../stRandom/test_random_statetest88.py | 11 +------ .../stRandom/test_random_statetest89.py | 11 +------ .../stRandom/test_random_statetest9.py | 11 +------ .../stRandom/test_random_statetest90.py | 11 +------ .../stRandom/test_random_statetest92.py | 11 +------ .../stRandom/test_random_statetest95.py | 11 +------ .../stRandom/test_random_statetest96.py | 11 +------ .../stRandom2/test_random_statetest.py | 11 +------ .../stRandom2/test_random_statetest384.py | 11 +------ .../stRandom2/test_random_statetest385.py | 11 +------ .../stRandom2/test_random_statetest386.py | 12 +------ .../stRandom2/test_random_statetest388.py | 11 +------ .../stRandom2/test_random_statetest389.py | 11 +------ .../stRandom2/test_random_statetest395.py | 11 +------ .../stRandom2/test_random_statetest398.py | 11 +------ .../stRandom2/test_random_statetest399.py | 11 +------ .../stRandom2/test_random_statetest402.py | 11 +------ .../stRandom2/test_random_statetest405.py | 11 +------ .../stRandom2/test_random_statetest407.py | 11 +------ .../stRandom2/test_random_statetest408.py | 11 +------ .../stRandom2/test_random_statetest411.py | 11 +------ .../stRandom2/test_random_statetest412.py | 11 +------ .../stRandom2/test_random_statetest413.py | 11 +------ .../stRandom2/test_random_statetest416.py | 11 +------ .../stRandom2/test_random_statetest419.py | 11 +------ .../stRandom2/test_random_statetest421.py | 11 +------ .../stRandom2/test_random_statetest424.py | 11 +------ .../stRandom2/test_random_statetest425.py | 11 +------ .../stRandom2/test_random_statetest426.py | 11 +------ .../stRandom2/test_random_statetest429.py | 11 +------ .../stRandom2/test_random_statetest430.py | 11 +------ .../stRandom2/test_random_statetest436.py | 11 +------ .../stRandom2/test_random_statetest438.py | 11 +------ .../stRandom2/test_random_statetest439.py | 11 +------ .../stRandom2/test_random_statetest440.py | 11 +------ .../stRandom2/test_random_statetest446.py | 11 +------ .../stRandom2/test_random_statetest447.py | 11 +------ .../stRandom2/test_random_statetest450.py | 11 +------ .../stRandom2/test_random_statetest451.py | 11 +------ .../stRandom2/test_random_statetest452.py | 11 +------ .../stRandom2/test_random_statetest455.py | 11 +------ .../stRandom2/test_random_statetest457.py | 11 +------ .../stRandom2/test_random_statetest460.py | 11 +------ .../stRandom2/test_random_statetest461.py | 11 +------ .../stRandom2/test_random_statetest462.py | 11 +------ .../stRandom2/test_random_statetest464.py | 11 +------ .../stRandom2/test_random_statetest465.py | 12 +------ .../stRandom2/test_random_statetest470.py | 11 +------ .../stRandom2/test_random_statetest471.py | 11 +------ .../stRandom2/test_random_statetest473.py | 11 +------ .../stRandom2/test_random_statetest474.py | 11 +------ .../stRandom2/test_random_statetest475.py | 11 +------ .../stRandom2/test_random_statetest477.py | 11 +------ .../stRandom2/test_random_statetest480.py | 11 +------ .../stRandom2/test_random_statetest482.py | 11 +------ .../stRandom2/test_random_statetest483.py | 12 +------ .../stRandom2/test_random_statetest488.py | 11 +------ .../stRandom2/test_random_statetest489.py | 11 +------ .../stRandom2/test_random_statetest491.py | 11 +------ .../stRandom2/test_random_statetest497.py | 11 +------ .../stRandom2/test_random_statetest500.py | 11 +------ .../stRandom2/test_random_statetest502.py | 11 +------ .../stRandom2/test_random_statetest503.py | 11 +------ .../stRandom2/test_random_statetest505.py | 11 +------ .../stRandom2/test_random_statetest506.py | 11 +------ .../stRandom2/test_random_statetest511.py | 11 +------ .../stRandom2/test_random_statetest512.py | 11 +------ .../stRandom2/test_random_statetest514.py | 11 +------ .../stRandom2/test_random_statetest516.py | 11 +------ .../stRandom2/test_random_statetest518.py | 11 +------ .../stRandom2/test_random_statetest519.py | 11 +------ .../stRandom2/test_random_statetest520.py | 11 +------ .../stRandom2/test_random_statetest526.py | 11 +------ .../stRandom2/test_random_statetest532.py | 11 +------ .../stRandom2/test_random_statetest533.py | 11 +------ .../stRandom2/test_random_statetest534.py | 11 +------ .../stRandom2/test_random_statetest535.py | 11 +------ .../stRandom2/test_random_statetest537.py | 11 +------ .../stRandom2/test_random_statetest539.py | 11 +------ .../stRandom2/test_random_statetest541.py | 13 +------- .../stRandom2/test_random_statetest544.py | 11 +------ .../stRandom2/test_random_statetest545.py | 11 +------ .../stRandom2/test_random_statetest546.py | 11 +------ .../stRandom2/test_random_statetest548.py | 11 +------ .../stRandom2/test_random_statetest550.py | 11 +------ .../stRandom2/test_random_statetest552.py | 11 +------ .../stRandom2/test_random_statetest553.py | 11 +------ .../stRandom2/test_random_statetest555.py | 11 +------ .../stRandom2/test_random_statetest556.py | 11 +------ .../stRandom2/test_random_statetest564.py | 11 +------ .../stRandom2/test_random_statetest565.py | 11 +------ .../stRandom2/test_random_statetest571.py | 11 +------ .../stRandom2/test_random_statetest574.py | 11 +------ .../stRandom2/test_random_statetest578.py | 11 +------ .../stRandom2/test_random_statetest580.py | 11 +------ .../stRandom2/test_random_statetest585.py | 11 +------ .../stRandom2/test_random_statetest586.py | 11 +------ .../stRandom2/test_random_statetest587.py | 11 +------ .../stRandom2/test_random_statetest588.py | 12 +------ .../stRandom2/test_random_statetest592.py | 11 +------ .../stRandom2/test_random_statetest596.py | 11 +------ .../stRandom2/test_random_statetest599.py | 11 +------ .../stRandom2/test_random_statetest600.py | 11 +------ .../stRandom2/test_random_statetest602.py | 11 +------ .../stRandom2/test_random_statetest603.py | 11 +------ .../stRandom2/test_random_statetest605.py | 11 +------ .../stRandom2/test_random_statetest607.py | 11 +------ .../stRandom2/test_random_statetest608.py | 11 +------ .../stRandom2/test_random_statetest610.py | 11 +------ .../stRandom2/test_random_statetest615.py | 11 +------ .../stRandom2/test_random_statetest616.py | 11 +------ .../stRandom2/test_random_statetest620.py | 11 +------ .../stRandom2/test_random_statetest621.py | 11 +------ .../stRandom2/test_random_statetest629.py | 11 +------ .../stRandom2/test_random_statetest630.py | 11 +------ .../stRandom2/test_random_statetest633.py | 11 +------ .../stRandom2/test_random_statetest637.py | 11 +------ .../stRandom2/test_random_statetest638.py | 11 +------ .../stRandom2/test_random_statetest641.py | 11 +------ .../test_revert_in_create_in_init_paris.py | 12 +------ .../test_callcode_to_return1.py | 20 ++--------- .../test_create_name_registrator.py | 16 ++------- 359 files changed, 448 insertions(+), 4823 deletions(-) diff --git a/tests/ported_static/stCallCodes/test_callcall_00.py b/tests/ported_static/stCallCodes/test_callcall_00.py index 668dd94809b..174b23b7844 100644 --- a/tests/ported_static/stCallCodes/test_callcall_00.py +++ b/tests/ported_static/stCallCodes/test_callcall_00.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcall_00Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,18 +31,8 @@ def test_callcall_00( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> call -> code, params check.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -84,7 +65,6 @@ def test_callcall_00( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=inner_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -103,7 +83,6 @@ def test_callcall_00( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -117,12 +96,7 @@ def test_callcall_00( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr_2: Account( diff --git a/tests/ported_static/stCallCodes/test_callcall_00_suicide_end.py b/tests/ported_static/stCallCodes/test_callcall_00_suicide_end.py index ba8ab1441e5..bbf2605c2e5 100644 --- a/tests/ported_static/stCallCodes/test_callcall_00_suicide_end.py +++ b/tests/ported_static/stCallCodes/test_callcall_00_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallCodes/callcall_00_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,18 +31,8 @@ def test_callcall_00_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> (call -> code) suicide .""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -72,7 +59,6 @@ def test_callcall_00_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=0xF741CFEE7B7FB1025DCCEF3DB5A3CBC8FFB776F8, value=0x0, args_offset=0x0, @@ -92,7 +78,6 @@ def test_callcall_00_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=inner_call_gas, address=0x703B936FD4D674F0FF5D6957F61097152F8781B8, value=0x0, args_offset=0x0, @@ -108,12 +93,7 @@ def test_callcall_00_suicide_end( address=Address(0xF741CFEE7B7FB1025DCCEF3DB5A3CBC8FFB776F8), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(balance=0xDE0B6B5FB6FE400), diff --git a/tests/ported_static/stCallCodes/test_callcallcall_000.py b/tests/ported_static/stCallCodes/test_callcallcall_000.py index 1026e276d3d..0242f70f02b 100644 --- a/tests/ported_static/stCallCodes/test_callcallcall_000.py +++ b/tests/ported_static/stCallCodes/test_callcallcall_000.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcallcall_000Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,20 +31,8 @@ def test_callcallcall_000( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> call -> call -> code, params check.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +65,6 @@ def test_callcallcall_000( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=addr_3, value=0x3, args_offset=0x0, @@ -105,7 +83,6 @@ def test_callcallcall_000( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -124,7 +101,6 @@ def test_callcallcall_000( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -138,12 +114,7 @@ def test_callcallcall_000( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr_3: Account( diff --git a/tests/ported_static/stCallCodes/test_callcallcall_000_suicide_end.py b/tests/ported_static/stCallCodes/test_callcallcall_000_suicide_end.py index d33e9e42b6a..752156fee71 100644 --- a/tests/ported_static/stCallCodes/test_callcallcall_000_suicide_end.py +++ b/tests/ported_static/stCallCodes/test_callcallcall_000_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallCodes/callcallcall_000_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,20 +31,8 @@ def test_callcallcall_000_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> call -> (call -> code) suicide.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +59,6 @@ def test_callcallcall_000_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=0x77B749FFFF7EC61D31C79ED104F230A7959B2879, value=0x0, args_offset=0x0, @@ -94,7 +78,6 @@ def test_callcallcall_000_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=0xD957E143AD2C011BC6A2B142795F1A9BA70D0680, value=0x0, args_offset=0x0, @@ -114,7 +97,6 @@ def test_callcallcall_000_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=0xCB6497F0337B6CD0F7239A8819295EC7D1DAFD34, value=0x0, args_offset=0x0, @@ -130,12 +112,7 @@ def test_callcallcall_000_suicide_end( address=Address(0xD957E143AD2C011BC6A2B142795F1A9BA70D0680), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr: Account(balance=0x4A817C800), diff --git a/tests/ported_static/stCallCodes/test_callcallcallcode_001.py b/tests/ported_static/stCallCodes/test_callcallcallcode_001.py index f1a4178583c..d7d4ec9d015 100644 --- a/tests/ported_static/stCallCodes/test_callcallcallcode_001.py +++ b/tests/ported_static/stCallCodes/test_callcallcallcode_001.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcallcallcode_001Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,20 +31,8 @@ def test_callcallcallcode_001( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> call -> callcode - > code, params check.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +65,6 @@ def test_callcallcallcode_001( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_3, value=0x3, args_offset=0x0, @@ -105,7 +83,6 @@ def test_callcallcallcode_001( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -124,7 +101,6 @@ def test_callcallcallcode_001( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -138,12 +114,7 @@ def test_callcallcallcode_001( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr_2: Account( diff --git a/tests/ported_static/stCallCodes/test_callcallcallcode_001_suicide_end.py b/tests/ported_static/stCallCodes/test_callcallcallcode_001_suicide_end.py index 1bc24e83ea6..facef0e01ca 100644 --- a/tests/ported_static/stCallCodes/test_callcallcallcode_001_suicide_end.py +++ b/tests/ported_static/stCallCodes/test_callcallcallcode_001_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallCodes/callcallcallcode_001_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,20 +31,8 @@ def test_callcallcallcode_001_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> call -> ( callcode - > code ) suicide.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +59,6 @@ def test_callcallcallcode_001_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=0x77B749FFFF7EC61D31C79ED104F230A7959B2879, value=0x0, args_offset=0x0, @@ -94,7 +78,6 @@ def test_callcallcallcode_001_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=0x94C8F980AEECBB6575B12AE614A249FC3E836F21, value=0x0, args_offset=0x0, @@ -114,7 +97,6 @@ def test_callcallcallcode_001_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -130,12 +112,7 @@ def test_callcallcallcode_001_suicide_end( address=Address(0x94C8F980AEECBB6575B12AE614A249FC3E836F21), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr: Account(balance=0x4A817C800), diff --git a/tests/ported_static/stCallCodes/test_callcallcode_01.py b/tests/ported_static/stCallCodes/test_callcallcode_01.py index 08d46046488..e8f2b2285ec 100644 --- a/tests/ported_static/stCallCodes/test_callcallcode_01.py +++ b/tests/ported_static/stCallCodes/test_callcallcode_01.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcallcode_01Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,18 +31,8 @@ def test_callcallcode_01( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> callcode -> code, params check.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -84,7 +65,6 @@ def test_callcallcode_01( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -103,7 +83,6 @@ def test_callcallcode_01( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -117,12 +96,7 @@ def test_callcallcode_01( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr: Account( diff --git a/tests/ported_static/stCallCodes/test_callcallcodecall_010.py b/tests/ported_static/stCallCodes/test_callcallcodecall_010.py index 51ab4615cc1..0f9c9278148 100644 --- a/tests/ported_static/stCallCodes/test_callcallcodecall_010.py +++ b/tests/ported_static/stCallCodes/test_callcallcodecall_010.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcallcodecall_010Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,20 +31,8 @@ def test_callcallcodecall_010( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> callcode -> call -> code, params check.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +65,6 @@ def test_callcallcodecall_010( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=addr_3, value=0x3, args_offset=0x0, @@ -105,7 +83,6 @@ def test_callcallcodecall_010( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -124,7 +101,6 @@ def test_callcallcodecall_010( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -138,12 +114,7 @@ def test_callcallcodecall_010( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr: Account(storage={1: 1, 2: 1}), diff --git a/tests/ported_static/stCallCodes/test_callcallcodecall_010_suicide_end.py b/tests/ported_static/stCallCodes/test_callcallcodecall_010_suicide_end.py index f23b0ff9251..7fc69c98b23 100644 --- a/tests/ported_static/stCallCodes/test_callcallcodecall_010_suicide_end.py +++ b/tests/ported_static/stCallCodes/test_callcallcodecall_010_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallCodes/callcallcodecall_010_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,20 +31,8 @@ def test_callcallcodecall_010_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> callcode -> (call -> code) (suicide).""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +59,6 @@ def test_callcallcodecall_010_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=0xEAF8C2AE0D01A880CEA4E1AA88DEF5EDD153D57B, value=0x0, args_offset=0x0, @@ -94,7 +78,6 @@ def test_callcallcodecall_010_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=0xD957E143AD2C011BC6A2B142795F1A9BA70D0680, value=0x0, args_offset=0x0, @@ -114,7 +97,6 @@ def test_callcallcodecall_010_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -130,12 +112,7 @@ def test_callcallcodecall_010_suicide_end( address=Address(0xD957E143AD2C011BC6A2B142795F1A9BA70D0680), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr_2: Account(storage={1: 0, 2: 0}, balance=0x2540BE400), diff --git a/tests/ported_static/stCallCodes/test_callcallcodecallcode_011.py b/tests/ported_static/stCallCodes/test_callcallcodecallcode_011.py index dd5241029ac..758d721cfa1 100644 --- a/tests/ported_static/stCallCodes/test_callcallcodecallcode_011.py +++ b/tests/ported_static/stCallCodes/test_callcallcodecallcode_011.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcallcodecallcode_011Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,20 +31,8 @@ def test_callcallcodecallcode_011( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Call -> callcode -> callcode -> code, check params.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +65,6 @@ def test_callcallcodecallcode_011( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_3, value=0x3, args_offset=0x0, @@ -105,7 +83,6 @@ def test_callcallcodecallcode_011( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -124,7 +101,6 @@ def test_callcallcodecallcode_011( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -138,12 +114,7 @@ def test_callcallcodecallcode_011( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr: Account( diff --git a/tests/ported_static/stCallCodes/test_callcodecall_10.py b/tests/ported_static/stCallCodes/test_callcodecall_10.py index 2e2a3bc2ae9..bf8db0c79f3 100644 --- a/tests/ported_static/stCallCodes/test_callcodecall_10.py +++ b/tests/ported_static/stCallCodes/test_callcodecall_10.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecall_10Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,18 +31,8 @@ def test_callcodecall_10( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Callcode -> call -> code, params check .""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -84,7 +65,6 @@ def test_callcodecall_10( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=inner_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -103,7 +83,6 @@ def test_callcodecall_10( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -117,12 +96,7 @@ def test_callcodecall_10( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1}), diff --git a/tests/ported_static/stCallCodes/test_callcodecall_10_suicide_end.py b/tests/ported_static/stCallCodes/test_callcodecall_10_suicide_end.py index d62da3d1016..3c8df70d9b5 100644 --- a/tests/ported_static/stCallCodes/test_callcodecall_10_suicide_end.py +++ b/tests/ported_static/stCallCodes/test_callcodecall_10_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecall_10_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,18 +31,8 @@ def test_callcodecall_10_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> (CALL -> code) (suicide).""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -72,7 +59,6 @@ def test_callcodecall_10_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=0xF741CFEE7B7FB1025DCCEF3DB5A3CBC8FFB776F8, value=0x0, args_offset=0x0, @@ -92,7 +78,6 @@ def test_callcodecall_10_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=inner_call_gas, address=0x703B936FD4D674F0FF5D6957F61097152F8781B8, value=0x0, args_offset=0x0, @@ -108,12 +93,7 @@ def test_callcodecall_10_suicide_end( address=Address(0xF741CFEE7B7FB1025DCCEF3DB5A3CBC8FFB776F8), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr: Account(storage={0: 0, 1: 0}, balance=0x2540BE400), diff --git a/tests/ported_static/stCallCodes/test_callcodecallcall_100.py b/tests/ported_static/stCallCodes/test_callcodecallcall_100.py index 7d15c2b1f8d..3d48274bf52 100644 --- a/tests/ported_static/stCallCodes/test_callcodecallcall_100.py +++ b/tests/ported_static/stCallCodes/test_callcodecallcall_100.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecallcall_100Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,20 +31,8 @@ def test_callcodecallcall_100( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> CALL -> CALL-> code, params check.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +65,6 @@ def test_callcodecallcall_100( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=addr_3, value=0x3, args_offset=0x0, @@ -105,7 +83,6 @@ def test_callcodecallcall_100( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -124,7 +101,6 @@ def test_callcodecallcall_100( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -138,12 +114,7 @@ def test_callcodecallcall_100( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1}), diff --git a/tests/ported_static/stCallCodes/test_callcodecallcall_100_suicide_end.py b/tests/ported_static/stCallCodes/test_callcodecallcall_100_suicide_end.py index 4a8b875f9c0..846202968df 100644 --- a/tests/ported_static/stCallCodes/test_callcodecallcall_100_suicide_end.py +++ b/tests/ported_static/stCallCodes/test_callcodecallcall_100_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecallcall_100_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,20 +31,8 @@ def test_callcodecallcall_100_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> CALL -> (CALL-> code) (suicide).""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +59,6 @@ def test_callcodecallcall_100_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=0x77B749FFFF7EC61D31C79ED104F230A7959B2879, value=0x0, args_offset=0x0, @@ -94,7 +78,6 @@ def test_callcodecallcall_100_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=0xD957E143AD2C011BC6A2B142795F1A9BA70D0680, value=0x0, args_offset=0x0, @@ -114,7 +97,6 @@ def test_callcodecallcall_100_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -130,12 +112,7 @@ def test_callcodecallcall_100_suicide_end( address=Address(0xD957E143AD2C011BC6A2B142795F1A9BA70D0680), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1}, balance=0xDE0B6B3A7640000), diff --git a/tests/ported_static/stCallCodes/test_callcodecallcallcode_101.py b/tests/ported_static/stCallCodes/test_callcodecallcallcode_101.py index ef876653dac..8c8218c8c55 100644 --- a/tests/ported_static/stCallCodes/test_callcodecallcallcode_101.py +++ b/tests/ported_static/stCallCodes/test_callcodecallcallcode_101.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecallcallcode_101Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,20 +31,8 @@ def test_callcodecallcallcode_101( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> CALL -> CALLCODE -> code parameters check.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +65,6 @@ def test_callcodecallcallcode_101( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_3, value=0x3, args_offset=0x0, @@ -105,7 +83,6 @@ def test_callcodecallcallcode_101( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -124,7 +101,6 @@ def test_callcodecallcallcode_101( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -138,12 +114,7 @@ def test_callcodecallcallcode_101( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1}), diff --git a/tests/ported_static/stCallCodes/test_callcodecallcallcode_101_suicide_end.py b/tests/ported_static/stCallCodes/test_callcodecallcallcode_101_suicide_end.py index 3de342c0923..824042c2695 100644 --- a/tests/ported_static/stCallCodes/test_callcodecallcallcode_101_suicide_end.py +++ b/tests/ported_static/stCallCodes/test_callcodecallcallcode_101_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecallcallcode_101_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,20 +31,8 @@ def test_callcodecallcallcode_101_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> CALL -> (CALLCODE -> code) (suicide).""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +59,6 @@ def test_callcodecallcallcode_101_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=0x77B749FFFF7EC61D31C79ED104F230A7959B2879, value=0x0, args_offset=0x0, @@ -94,7 +78,6 @@ def test_callcodecallcallcode_101_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=0x94C8F980AEECBB6575B12AE614A249FC3E836F21, value=0x0, args_offset=0x0, @@ -114,7 +97,6 @@ def test_callcodecallcallcode_101_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -130,12 +112,7 @@ def test_callcodecallcallcode_101_suicide_end( address=Address(0x94C8F980AEECBB6575B12AE614A249FC3E836F21), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1}), diff --git a/tests/ported_static/stCallCodes/test_callcodecallcode_11.py b/tests/ported_static/stCallCodes/test_callcodecallcode_11.py index 8383a42511c..ff3da1cd960 100644 --- a/tests/ported_static/stCallCodes/test_callcodecallcode_11.py +++ b/tests/ported_static/stCallCodes/test_callcodecallcode_11.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecallcode_11Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,18 +31,8 @@ def test_callcodecallcode_11( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> CALLCODE -> code, check parameters.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -84,7 +65,6 @@ def test_callcodecallcode_11( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -103,7 +83,6 @@ def test_callcodecallcode_11( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -117,12 +96,7 @@ def test_callcodecallcode_11( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallCodes/test_callcodecallcodecall_110.py b/tests/ported_static/stCallCodes/test_callcodecallcodecall_110.py index 5c057849d04..090803a99fd 100644 --- a/tests/ported_static/stCallCodes/test_callcodecallcodecall_110.py +++ b/tests/ported_static/stCallCodes/test_callcodecallcodecall_110.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecallcodecall_110Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,20 +31,8 @@ def test_callcodecallcodecall_110( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> CALLCODE -> CALL -> code, check parameters.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +65,6 @@ def test_callcodecallcodecall_110( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=addr_3, value=0x3, args_offset=0x0, @@ -105,7 +83,6 @@ def test_callcodecallcodecall_110( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -124,7 +101,6 @@ def test_callcodecallcodecall_110( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -138,12 +114,7 @@ def test_callcodecallcodecall_110( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1}), diff --git a/tests/ported_static/stCallCodes/test_callcodecallcodecall_110_suicide_end.py b/tests/ported_static/stCallCodes/test_callcodecallcodecall_110_suicide_end.py index fdeaf653e4d..a57ed1f17bc 100644 --- a/tests/ported_static/stCallCodes/test_callcodecallcodecall_110_suicide_end.py +++ b/tests/ported_static/stCallCodes/test_callcodecallcodecall_110_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecallcodecall_110_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,20 +31,8 @@ def test_callcodecallcodecall_110_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> CALLCODE -> (CALL -> code) (suicide) .""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +59,6 @@ def test_callcodecallcodecall_110_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=0xEAF8C2AE0D01A880CEA4E1AA88DEF5EDD153D57B, value=0x0, args_offset=0x0, @@ -94,7 +78,6 @@ def test_callcodecallcodecall_110_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=0xD957E143AD2C011BC6A2B142795F1A9BA70D0680, value=0x0, args_offset=0x0, @@ -114,7 +97,6 @@ def test_callcodecallcodecall_110_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -130,12 +112,7 @@ def test_callcodecallcodecall_110_suicide_end( address=Address(0xD957E143AD2C011BC6A2B142795F1A9BA70D0680), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr: Account(balance=0xDE0B6B5FB6FE400), diff --git a/tests/ported_static/stCallCodes/test_callcodecallcodecallcode_111.py b/tests/ported_static/stCallCodes/test_callcodecallcodecallcode_111.py index 397d7fff51a..d2c205fdf9c 100644 --- a/tests/ported_static/stCallCodes/test_callcodecallcodecallcode_111.py +++ b/tests/ported_static/stCallCodes/test_callcodecallcodecallcode_111.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecallcodecallcode_111Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,20 +31,8 @@ def test_callcodecallcodecallcode_111( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> CALLCODE -> CALLCODE -> code check parameter opcodes.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +65,6 @@ def test_callcodecallcodecallcode_111( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_3, value=0x3, args_offset=0x0, @@ -105,7 +83,6 @@ def test_callcodecallcodecallcode_111( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -124,7 +101,6 @@ def test_callcodecallcodecallcode_111( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -138,12 +114,7 @@ def test_callcodecallcodecallcode_111( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallCodes/test_callcodecallcodecallcode_111_suicide_end.py b/tests/ported_static/stCallCodes/test_callcodecallcodecallcode_111_suicide_end.py index b07feeb4693..301771e779c 100644 --- a/tests/ported_static/stCallCodes/test_callcodecallcodecallcode_111_suicide_end.py +++ b/tests/ported_static/stCallCodes/test_callcodecallcodecallcode_111_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallCodes/callcodecallcodecallcode_111_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcodecallcodecallcode_111_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """CALLCODE -> CALLCODE -> (CALLCODE -> code) suicide.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcodecallcodecallcode_111_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=0xEAF8C2AE0D01A880CEA4E1AA88DEF5EDD153D57B, value=0x0, args_offset=0x0, @@ -96,7 +80,6 @@ def test_callcodecallcodecallcode_111_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=0x94C8F980AEECBB6575B12AE614A249FC3E836F21, value=0x0, args_offset=0x0, @@ -116,7 +99,6 @@ def test_callcodecallcodecallcode_111_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -132,12 +114,7 @@ def test_callcodecallcodecallcode_111_suicide_end( address=Address(0x94C8F980AEECBB6575B12AE614A249FC3E836F21), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { addr: Account(balance=0xDE0B6B5FB6FE400), diff --git a/tests/ported_static/stCallCreateCallCodeTest/test_create_init_fail_undefined_instruction.py b/tests/ported_static/stCallCreateCallCodeTest/test_create_init_fail_undefined_instruction.py index b3d1812c13a..1c0b0de14b6 100644 --- a/tests/ported_static/stCallCreateCallCodeTest/test_create_init_fail_undefined_instruction.py +++ b/tests/ported_static/stCallCreateCallCodeTest/test_create_init_fail_undefined_instruction.py @@ -3,10 +3,8 @@ Ported from: state_tests/stCallCreateCallCodeTest/createInitFailUndefinedInstructionFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 SSTORE-set state-gas spill (target performs 3 fresh -SSTOREs); pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,14 +33,8 @@ def test_create_init_fail_undefined_instruction( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Create fails because init code has undefined opcode, trying to...""" - # EIP-8037 state-gas spill (3x fresh SSTORE-set) exceeds 900k tx_gas. - tx_gas_limit = 900000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_500_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -108,13 +99,7 @@ def test_create_init_fail_undefined_instruction( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=0x186A0, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=0x186A0) post = {target: Account(storage={2: 1})} diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcallcode_001.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcallcode_001.py index 17ac54a7922..9901d0615a1 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcallcode_001.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcallcode_001.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcallcallcode_001Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcallcallcode_001( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcallcode_001.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcallcallcode_001( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_3, args_offset=0x0, args_size=0x40, @@ -106,7 +84,6 @@ def test_callcallcallcode_001( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -125,7 +102,6 @@ def test_callcallcallcode_001( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -139,12 +115,7 @@ def test_callcallcallcode_001( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcode_01.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcode_01.py index 4ec0e0470db..93bd4443f4b 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcode_01.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcode_01.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcallcode_01Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,18 +33,8 @@ def test_callcallcode_01( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcode_01.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +67,6 @@ def test_callcallcode_01( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -104,7 +84,6 @@ def test_callcallcode_01( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -118,12 +97,7 @@ def test_callcallcode_01( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcode_01_suicide_end.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcode_01_suicide_end.py index fd2c72ca7c1..5df67aa7d7a 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcode_01_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcode_01_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcallcode_01_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,18 +33,8 @@ def test_callcallcode_01_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcode_01_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +61,6 @@ def test_callcallcode_01_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=0x1CCA6E93108EC94304AE5EB121D323E6C317FE7A, value=0x0, args_offset=0x0, @@ -94,7 +80,6 @@ def test_callcallcode_01_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x703B936FD4D674F0FF5D6957F61097152F8781B8, args_offset=0x0, args_size=0x40, @@ -109,12 +94,7 @@ def test_callcallcode_01_suicide_end( address=Address(0x1CCA6E93108EC94304AE5EB121D323E6C317FE7A), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecall_010.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecall_010.py index 58e1eef4424..602c913b926 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecall_010.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecall_010.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcallcodecall_010Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcallcodecall_010( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcodecall_010.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcallcodecall_010( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_3, value=0x2, args_offset=0x0, @@ -108,7 +86,6 @@ def test_callcallcodecall_010( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -126,7 +103,6 @@ def test_callcallcodecall_010( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -140,12 +116,7 @@ def test_callcallcodecall_010( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecall_010_suicide_end.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecall_010_suicide_end.py index 5ba88271301..4406ecf6aaf 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecall_010_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecall_010_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcallcodecall_010_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcallcodecall_010_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcodecall_010_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcallcodecall_010_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=0x2CAC1D43F00E8B40B63426AB460C7E8717EE6455, value=0x0, args_offset=0x0, @@ -96,7 +80,6 @@ def test_callcallcodecall_010_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=0x94C8F980AEECBB6575B12AE614A249FC3E836F21, args_offset=0x0, args_size=0x40, @@ -115,7 +98,6 @@ def test_callcallcodecall_010_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -131,12 +113,7 @@ def test_callcallcodecall_010_suicide_end( address=Address(0x94C8F980AEECBB6575B12AE614A249FC3E836F21), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1, 3: 1}), diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecallcode_011.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecallcode_011.py index fb05c8d0604..6c913955bef 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecallcode_011.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecallcode_011.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcallcodecallcode_011Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcallcodecallcode_011( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcodecallcode_011.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcallcodecallcode_011( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_3, args_offset=0x0, args_size=0x40, @@ -105,7 +83,6 @@ def test_callcallcodecallcode_011( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -122,7 +99,6 @@ def test_callcallcodecallcode_011( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -136,12 +112,7 @@ def test_callcallcodecallcode_011( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecallcode_011_suicide_end.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecallcode_011_suicide_end.py index 842885bcc2a..bb07f396807 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecallcode_011_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcallcodecallcode_011_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcallcodecallcode_011_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcallcodecallcode_011_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcodecallcode_011_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcallcodecallcode_011_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=outer_call_gas, address=0x2CAC1D43F00E8B40B63426AB460C7E8717EE6455, value=0x0, args_offset=0x0, @@ -96,7 +80,6 @@ def test_callcallcodecallcode_011_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=0xAC521409E2FA9526BFE6B827805783D2E307C4CE, args_offset=0x0, args_size=0x40, @@ -115,7 +98,6 @@ def test_callcallcodecallcode_011_suicide_end( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, args_offset=0x0, args_size=0x40, @@ -130,12 +112,7 @@ def test_callcallcodecallcode_011_suicide_end( address=Address(0xAC521409E2FA9526BFE6B827805783D2E307C4CE), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1, 3: 1}), diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecall_10.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecall_10.py index 85607a610a4..1ff010fb617 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecall_10.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecall_10.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecall_10Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,18 +33,8 @@ def test_callcodecall_10( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecall_10.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +67,6 @@ def test_callcodecall_10( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -105,7 +85,6 @@ def test_callcodecall_10( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -118,12 +97,7 @@ def test_callcodecall_10( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecall_10_suicide_end.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecall_10_suicide_end.py index 66565fc3929..f3664b9da7e 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecall_10_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecall_10_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecall_10_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,18 +33,8 @@ def test_callcodecall_10_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecall_10_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +61,6 @@ def test_callcodecall_10_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0x799DA5A3C983A22F9C430DE1BF99134EE561E856, args_offset=0x0, args_size=0x40, @@ -93,7 +79,6 @@ def test_callcodecall_10_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=inner_call_gas, address=0x703B936FD4D674F0FF5D6957F61097152F8781B8, value=0x0, args_offset=0x0, @@ -109,12 +94,7 @@ def test_callcodecall_10_suicide_end( address=Address(0x799DA5A3C983A22F9C430DE1BF99134EE561E856), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1}), diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcall_100.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcall_100.py index b6072d270e1..a3a73dc9710 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcall_100.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcall_100.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcall_100Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcodecallcall_100( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcall_100.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcodecallcall_100( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_3, value=0x2, args_offset=0x0, @@ -107,7 +85,6 @@ def test_callcodecallcall_100( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=addr_2, value=0x1, args_offset=0x0, @@ -127,7 +104,6 @@ def test_callcodecallcall_100( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -140,12 +116,7 @@ def test_callcodecallcall_100( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcall_100_suicide_end.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcall_100_suicide_end.py index 84802cd5c8c..e68f4bb1f1d 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcall_100_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcall_100_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcall_100_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcodecallcall_100_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcall_100_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcodecallcall_100_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0xEAF8C2AE0D01A880CEA4E1AA88DEF5EDD153D57B, args_offset=0x0, args_size=0x40, @@ -95,7 +79,6 @@ def test_callcodecallcall_100_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=0x94C8F980AEECBB6575B12AE614A249FC3E836F21, value=0x0, args_offset=0x0, @@ -115,7 +98,6 @@ def test_callcodecallcall_100_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -131,12 +113,7 @@ def test_callcodecallcall_100_suicide_end( address=Address(0x94C8F980AEECBB6575B12AE614A249FC3E836F21), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1, 3: 1}), diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcallcode_101.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcallcode_101.py index f85f6c39c21..de65e8b34ca 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcallcode_101.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcallcode_101.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcallcode_101Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcodecallcallcode_101( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcallcode_101.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcodecallcallcode_101( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_3, args_offset=0x0, args_size=0x40, @@ -107,7 +85,6 @@ def test_callcodecallcallcode_101( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=addr_2, value=0x1, args_offset=0x0, @@ -127,7 +104,6 @@ def test_callcodecallcallcode_101( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -140,12 +116,7 @@ def test_callcodecallcallcode_101( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcallcode_101_suicide_end.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcallcode_101_suicide_end.py index 4a20cbfa33f..f5f4d5d957b 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcallcode_101_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcallcode_101_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcallcode_101_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcodecallcallcode_101_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcallcode_101_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcodecallcallcode_101_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0xEAF8C2AE0D01A880CEA4E1AA88DEF5EDD153D57B, args_offset=0x0, args_size=0x40, @@ -95,7 +79,6 @@ def test_callcodecallcallcode_101_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALLCODE( - gas=middle_call_gas, address=0xAC521409E2FA9526BFE6B827805783D2E307C4CE, value=0x0, args_offset=0x0, @@ -115,7 +98,6 @@ def test_callcodecallcallcode_101_suicide_end( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, args_offset=0x0, args_size=0x40, @@ -130,12 +112,7 @@ def test_callcodecallcallcode_101_suicide_end( address=Address(0xAC521409E2FA9526BFE6B827805783D2E307C4CE), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1, 3: 1}), diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcode_11.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcode_11.py index 9e2c24e09e6..685d387ac85 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcode_11.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcode_11.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcode_11Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,18 +33,8 @@ def test_callcodecallcode_11( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcode_11.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +67,6 @@ def test_callcodecallcode_11( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -103,7 +83,6 @@ def test_callcodecallcode_11( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -116,12 +95,7 @@ def test_callcodecallcode_11( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcode_11_suicide_end.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcode_11_suicide_end.py index b1adb4e9e21..5b18d769850 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcode_11_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcode_11_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcode_11_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,18 +33,8 @@ def test_callcodecallcode_11_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcode_11_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +61,6 @@ def test_callcodecallcode_11_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0x1CCA6E93108EC94304AE5EB121D323E6C317FE7A, args_offset=0x0, args_size=0x40, @@ -93,7 +79,6 @@ def test_callcodecallcode_11_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x703B936FD4D674F0FF5D6957F61097152F8781B8, args_offset=0x0, args_size=0x40, @@ -108,12 +93,7 @@ def test_callcodecallcode_11_suicide_end( address=Address(0x1CCA6E93108EC94304AE5EB121D323E6C317FE7A), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1}), diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecall_110.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecall_110.py index 32061749e58..cbdda4dcb84 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecall_110.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecall_110.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcodecall_110Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcodecallcodecall_110( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcodecall_110.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcodecallcodecall_110( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=addr_3, value=0x1, args_offset=0x0, @@ -108,7 +86,6 @@ def test_callcodecallcodecall_110( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -127,7 +104,6 @@ def test_callcodecallcodecall_110( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -140,12 +116,7 @@ def test_callcodecallcodecall_110( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecall_110_suicide_end.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecall_110_suicide_end.py index 2323c57ec3a..9a97900067d 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecall_110_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecall_110_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcodecall_110_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcodecallcodecall_110_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcodecall_110_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcodecallcodecall_110_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0x2CAC1D43F00E8B40B63426AB460C7E8717EE6455, args_offset=0x0, args_size=0x40, @@ -95,7 +79,6 @@ def test_callcodecallcodecall_110_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=0x94C8F980AEECBB6575B12AE614A249FC3E836F21, args_offset=0x0, args_size=0x40, @@ -114,7 +97,6 @@ def test_callcodecallcodecall_110_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -130,12 +112,7 @@ def test_callcodecallcodecall_110_suicide_end( address=Address(0x94C8F980AEECBB6575B12AE614A249FC3E836F21), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1, 3: 1}), diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecallcode_111.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecallcode_111.py index 284d284adeb..7954b4dc0cc 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecallcode_111.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecallcode_111.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcodecallcode_111Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcodecallcodecallcode_111( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcodecallcode_111.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcodecallcodecallcode_111( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_3, args_offset=0x0, args_size=0x40, @@ -105,7 +83,6 @@ def test_callcodecallcodecallcode_111( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -122,7 +99,6 @@ def test_callcodecallcodecallcode_111( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -135,12 +111,7 @@ def test_callcodecallcodecallcode_111( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecallcode_111_suicide_end.py b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecallcode_111_suicide_end.py index d47d3c95ed5..c9afc938d33 100644 --- a/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecallcode_111_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesCallCodeHomestead/test_callcodecallcodecallcode_111_suicide_end.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesCallCodeHomestead/callcodecallcodecallcode_111_SuicideEndFiller.json - -@manually-enhanced: Do not overwrite. Hardcoded inner-CALL gas values -from the original filler (100k / 800k / 150k / 50k) were tuned to the -pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the inner -callee adds the EIP-8037 per-storage state-gas (37 568 wei of -regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly with extra headroom; older forks are -unaffected because only the requested gas changes, the actual -consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcodecallcodecallcode_111_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcodecallcode_111_suicide_end.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x186A0 - middle_call_gas = 0x249F0 - inner_call_gas_b = 0xC350 - if fork.is_eip_enabled(8037): - inner_call_gas = 0x1E8480 - middle_call_gas = 0x1E8480 - inner_call_gas_b = 0x1E8480 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -82,7 +61,6 @@ def test_callcodecallcodecallcode_111_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=middle_call_gas, address=0x9CFF7A3C9C90A301C47982DC2C4399C93700F0FD, args_offset=0x0, args_size=0x40, @@ -101,7 +79,6 @@ def test_callcodecallcodecallcode_111_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=inner_call_gas, address=0xB207980945728D64A3C9F905932314C8F130EE38, value=0x1, args_offset=0x0, @@ -121,7 +98,6 @@ def test_callcodecallcodecallcode_111_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALLCODE( - gas=inner_call_gas_b, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x2, args_offset=0x0, @@ -137,12 +113,7 @@ def test_callcodecallcodecallcode_111_suicide_end( address=Address(0xB207980945728D64A3C9F905932314C8F130EE38), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 0, 3: 0}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcallcode_001.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcallcode_001.py index c8481280159..a2e112bfa53 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcallcode_001.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcallcode_001.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcallcallcode_001Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcallcallcode_001( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcallcode_001.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcallcallcode_001( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_3, args_offset=0x0, args_size=0x40, @@ -106,7 +84,6 @@ def test_callcallcallcode_001( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=addr_2, value=0x2, args_offset=0x0, @@ -125,7 +102,6 @@ def test_callcallcallcode_001( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -139,12 +115,7 @@ def test_callcallcallcode_001( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 0, 3: 0, 4: 0}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcallcode_001_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcallcode_001_suicide_end.py index bf50302cc14..9f4aa38224e 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcallcode_001_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcallcode_001_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcallcallcode_001_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcallcallcode_001_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcallcode_001_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcallcallcode_001_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=0x77B749FFFF7EC61D31C79ED104F230A7959B2879, value=0x0, args_offset=0x0, @@ -96,7 +80,6 @@ def test_callcallcallcode_001_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=0xAC521409E2FA9526BFE6B827805783D2E307C4CE, value=0x0, args_offset=0x0, @@ -116,7 +99,6 @@ def test_callcallcallcode_001_suicide_end( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, args_offset=0x0, args_size=0x40, @@ -131,12 +113,7 @@ def test_callcallcallcode_001_suicide_end( address=Address(0xAC521409E2FA9526BFE6B827805783D2E307C4CE), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 2: 0}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcode_01.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcode_01.py index 539d0d35cdf..f6f9404e6c4 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcode_01.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcode_01.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcallcode_01Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,18 +31,8 @@ def test_callcallcode_01( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcode_01.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -84,7 +65,6 @@ def test_callcallcode_01( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -101,7 +81,6 @@ def test_callcallcode_01( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -115,12 +94,7 @@ def test_callcallcode_01( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcode_01_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcode_01_suicide_end.py index 4afdbbe5775..3090bd24b68 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcode_01_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcode_01_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcallcode_01_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,18 +33,8 @@ def test_callcallcode_01_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcode_01_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +61,6 @@ def test_callcallcode_01_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=0x1CCA6E93108EC94304AE5EB121D323E6C317FE7A, value=0x0, args_offset=0x0, @@ -94,7 +80,6 @@ def test_callcallcode_01_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x703B936FD4D674F0FF5D6957F61097152F8781B8, args_offset=0x0, args_size=0x40, @@ -109,12 +94,7 @@ def test_callcallcode_01_suicide_end( address=Address(0x1CCA6E93108EC94304AE5EB121D323E6C317FE7A), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 2: 0}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecall_010.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecall_010.py index e62a62820a2..b56b71e4de5 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecall_010.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecall_010.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcallcodecall_010Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcallcodecall_010( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcodecall_010.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcallcodecall_010( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=addr_3, value=0x2, args_offset=0x0, @@ -108,7 +86,6 @@ def test_callcallcodecall_010( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -126,7 +103,6 @@ def test_callcallcodecall_010( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -140,12 +116,7 @@ def test_callcallcodecall_010( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 2: 0}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecall_010_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecall_010_suicide_end.py index 32f1487a627..5c4b1b42e0d 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecall_010_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecall_010_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcallcodecall_010_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcallcodecall_010_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcodecall_010_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcallcodecall_010_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=0x2CAC1D43F00E8B40B63426AB460C7E8717EE6455, value=0x0, args_offset=0x0, @@ -96,7 +80,6 @@ def test_callcallcodecall_010_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=0xD957E143AD2C011BC6A2B142795F1A9BA70D0680, args_offset=0x0, args_size=0x40, @@ -115,7 +98,6 @@ def test_callcallcodecall_010_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -131,12 +113,7 @@ def test_callcallcodecall_010_suicide_end( address=Address(0xD957E143AD2C011BC6A2B142795F1A9BA70D0680), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 0, 3: 0}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecallcode_011.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecallcode_011.py index d41418e40d3..7e85a2280f5 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecallcode_011.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecallcode_011.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcallcodecallcode_011Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcallcodecallcode_011( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcodecallcode_011.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcallcodecallcode_011( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_3, args_offset=0x0, args_size=0x40, @@ -106,7 +84,6 @@ def test_callcallcodecallcode_011( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -124,7 +101,6 @@ def test_callcallcodecallcode_011( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=addr, value=0x1, args_offset=0x0, @@ -138,12 +114,7 @@ def test_callcallcodecallcode_011( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 2: 0, 3: 0, 4: 0}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecallcode_011_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecallcode_011_suicide_end.py index a0b5607e396..67dfb5017ee 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecallcode_011_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcallcodecallcode_011_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcallcodecallcode_011_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcallcodecallcode_011_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcallcodecallcode_011_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcallcodecallcode_011_suicide_end( code=Op.SSTORE( key=0x0, value=Op.CALL( - gas=outer_call_gas, address=0x2CAC1D43F00E8B40B63426AB460C7E8717EE6455, value=0x0, args_offset=0x0, @@ -96,7 +80,6 @@ def test_callcallcodecallcode_011_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=0xAC521409E2FA9526BFE6B827805783D2E307C4CE, args_offset=0x0, args_size=0x40, @@ -115,7 +98,6 @@ def test_callcallcodecallcode_011_suicide_end( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, args_offset=0x0, args_size=0x40, @@ -130,12 +112,7 @@ def test_callcallcodecallcode_011_suicide_end( address=Address(0xAC521409E2FA9526BFE6B827805783D2E307C4CE), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecall_10.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecall_10.py index 944c9b6ca4d..b2589e6b2dc 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecall_10.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecall_10.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecall_10Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -40,18 +31,8 @@ def test_callcodecall_10( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecall_10.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -84,7 +65,6 @@ def test_callcodecall_10( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=inner_call_gas, address=addr_2, value=0x1, args_offset=0x0, @@ -103,7 +83,6 @@ def test_callcodecall_10( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -116,12 +95,7 @@ def test_callcodecall_10( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecall_10_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecall_10_suicide_end.py index d6f6e7d5a6f..8e3c9005976 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecall_10_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecall_10_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecall_10_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,18 +33,8 @@ def test_callcodecall_10_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecall_10_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +61,6 @@ def test_callcodecall_10_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0xF741CFEE7B7FB1025DCCEF3DB5A3CBC8FFB776F8, args_offset=0x0, args_size=0x40, @@ -93,7 +79,6 @@ def test_callcodecall_10_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=inner_call_gas, address=0x703B936FD4D674F0FF5D6957F61097152F8781B8, value=0x0, args_offset=0x0, @@ -109,12 +94,7 @@ def test_callcodecall_10_suicide_end( address=Address(0xF741CFEE7B7FB1025DCCEF3DB5A3CBC8FFB776F8), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1}, balance=0xDE0B6B3A7640000), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcall_100.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcall_100.py index f5e7137363c..e7bb5131167 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcall_100.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcall_100.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcall_100Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcodecallcall_100( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcall_100.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcodecallcall_100( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=addr_3, value=0x2, args_offset=0x0, @@ -107,7 +85,6 @@ def test_callcodecallcall_100( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=addr_2, value=0x1, args_offset=0x0, @@ -127,7 +104,6 @@ def test_callcodecallcall_100( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -140,12 +116,7 @@ def test_callcodecallcall_100( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 5: sender}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcall_100_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcall_100_suicide_end.py index 49da4be2412..36c3ed77b48 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcall_100_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcall_100_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcall_100_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcodecallcall_100_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcall_100_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcodecallcall_100_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0x77B749FFFF7EC61D31C79ED104F230A7959B2879, args_offset=0x0, args_size=0x40, @@ -95,7 +79,6 @@ def test_callcodecallcall_100_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=0xD957E143AD2C011BC6A2B142795F1A9BA70D0680, value=0x0, args_offset=0x0, @@ -115,7 +98,6 @@ def test_callcodecallcall_100_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -131,12 +113,7 @@ def test_callcodecallcall_100_suicide_end( address=Address(0xD957E143AD2C011BC6A2B142795F1A9BA70D0680), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 0}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcallcode_101.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcallcode_101.py index 3bac074bbdc..0a4d8e91d71 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcallcode_101.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcallcode_101.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcallcode_101Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcodecallcallcode_101( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcallcode_101.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcodecallcallcode_101( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_3, args_offset=0x0, args_size=0x40, @@ -107,7 +85,6 @@ def test_callcodecallcallcode_101( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=addr_2, value=0x1, args_offset=0x0, @@ -127,7 +104,6 @@ def test_callcodecallcallcode_101( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -140,12 +116,7 @@ def test_callcodecallcallcode_101( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 5: sender}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcallcode_101_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcallcode_101_suicide_end.py index 96f3337c150..4496997a3b9 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcallcode_101_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcallcode_101_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcallcode_101_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcodecallcallcode_101_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcallcode_101_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcodecallcallcode_101_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0x77B749FFFF7EC61D31C79ED104F230A7959B2879, args_offset=0x0, args_size=0x40, @@ -95,7 +79,6 @@ def test_callcodecallcallcode_101_suicide_end( code=Op.SSTORE( key=0x1, value=Op.CALL( - gas=middle_call_gas, address=0xAC521409E2FA9526BFE6B827805783D2E307C4CE, value=0x0, args_offset=0x0, @@ -115,7 +98,6 @@ def test_callcodecallcallcode_101_suicide_end( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, args_offset=0x0, args_size=0x40, @@ -130,12 +112,7 @@ def test_callcodecallcallcode_101_suicide_end( address=Address(0xAC521409E2FA9526BFE6B827805783D2E307C4CE), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 0, 3: 0}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcode_11.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcode_11.py index 055d2ccfe03..89178b5d7e0 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcode_11.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcode_11.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcode_11Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,18 +33,8 @@ def test_callcodecallcode_11( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcode_11.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -86,7 +67,6 @@ def test_callcodecallcode_11( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -103,7 +83,6 @@ def test_callcodecallcode_11( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -116,12 +95,7 @@ def test_callcodecallcode_11( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcode_11_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcode_11_suicide_end.py index 5a96e25ac11..3435376fe0e 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcode_11_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcode_11_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcode_11_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,18 +33,8 @@ def test_callcodecallcode_11_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcode_11_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -74,7 +61,6 @@ def test_callcodecallcode_11_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0x1CCA6E93108EC94304AE5EB121D323E6C317FE7A, args_offset=0x0, args_size=0x40, @@ -93,7 +79,6 @@ def test_callcodecallcode_11_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x703B936FD4D674F0FF5D6957F61097152F8781B8, args_offset=0x0, args_size=0x40, @@ -108,12 +93,7 @@ def test_callcodecallcode_11_suicide_end( address=Address(0x1CCA6E93108EC94304AE5EB121D323E6C317FE7A), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecall_110.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecall_110.py index 0d66c6d33fe..d87caf4c654 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecall_110.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecall_110.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcodecall_110Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcodecallcodecall_110( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcodecall_110.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcodecallcodecall_110( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=addr_3, value=0x1, args_offset=0x0, @@ -108,7 +86,6 @@ def test_callcodecallcodecall_110( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -127,7 +104,6 @@ def test_callcodecallcodecall_110( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -140,12 +116,7 @@ def test_callcodecallcodecall_110( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1, 5: sender, 6: sender}), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecall_110_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecall_110_suicide_end.py index c3fb455b3ef..cf1efe6aacf 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecall_110_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecall_110_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcodecall_110_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcodecallcodecall_110_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcodecall_110_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcodecallcodecall_110_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0x2CAC1D43F00E8B40B63426AB460C7E8717EE6455, args_offset=0x0, args_size=0x40, @@ -95,7 +79,6 @@ def test_callcodecallcodecall_110_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=0xD957E143AD2C011BC6A2B142795F1A9BA70D0680, args_offset=0x0, args_size=0x40, @@ -114,7 +97,6 @@ def test_callcodecallcodecall_110_suicide_end( code=Op.SSTORE( key=0x2, value=Op.CALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, value=0x0, args_offset=0x0, @@ -130,12 +112,7 @@ def test_callcodecallcodecall_110_suicide_end( address=Address(0xD957E143AD2C011BC6A2B142795F1A9BA70D0680), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1}, balance=0), diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecallcode_111.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecallcode_111.py index f270f4c6af8..543e76e4d49 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecallcode_111.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecallcode_111.py @@ -4,15 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcodecallcode_111Filler.json - -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values from the original filler (250k / 300k / 350k) were tuned to -the pre-EIP-8037 gas budget. On Amsterdam each SSTORE in the -innermost callee adds the EIP-8037 per-storage state-gas (37 568 wei -of regular gas), and the inner CALL OoGs before the test's SSTORE -markers fire. Bumped uniformly to 1M / 1.2M / 1.4M so the inner CALL -chain has headroom on Amsterdam; older forks are unaffected because -only the requested gas changes, the actual consumption is identical. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -25,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -42,20 +33,8 @@ def test_callcodecallcodecallcode_111( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcodecallcode_111.""" - # EIP-8037 inner-CALL gas bumps (original gas values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state-gas - # spill into regular gas on Amsterdam). - inner_call_gas = 0x3D090 - middle_call_gas = 0x493E0 - outer_call_gas = 0x55730 - if fork.is_eip_enabled(8037): - inner_call_gas = 0xF4240 - middle_call_gas = 0x124F80 - outer_call_gas = 0x155CC0 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -88,7 +67,6 @@ def test_callcodecallcodecallcode_111( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=addr_3, args_offset=0x0, args_size=0x40, @@ -106,7 +84,6 @@ def test_callcodecallcodecallcode_111( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=addr_2, args_offset=0x0, args_size=0x40, @@ -124,7 +101,6 @@ def test_callcodecallcodecallcode_111( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=addr, args_offset=0x0, args_size=0x40, @@ -137,12 +113,7 @@ def test_callcodecallcodecallcode_111( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account( diff --git a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecallcode_111_suicide_end.py b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecallcode_111_suicide_end.py index 56fde94b9ab..8077f1f29d9 100644 --- a/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecallcode_111_suicide_end.py +++ b/tests/ported_static/stCallDelegateCodesHomestead/test_callcodecallcodecallcode_111_suicide_end.py @@ -4,9 +4,7 @@ Ported from: state_tests/stCallDelegateCodesHomestead/callcodecallcodecallcode_111_SuicideEndFiller.json -@manually-enhanced: Do not overwrite. The hardcoded inner-CALL gas -values (50k / 100k / 150k) were tuned to the pre-EIP-8037 gas budget. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -36,20 +33,8 @@ def test_callcodecallcodecallcode_111_suicide_end( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcodecallcodecallcode_111_suicide_end.""" - # EIP-8037 inner-CALL gas bumps: original values restored for - # pre-EIP-8037 forks; bumped values cover the per-storage state- - # gas spill into regular gas on Amsterdam. - outer_call_gas = 150000 - middle_call_gas = 100000 - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - outer_call_gas = 1000000 - middle_call_gas = 800000 - inner_call_gas = 100000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -76,7 +61,6 @@ def test_callcodecallcodecallcode_111_suicide_end( code=Op.SSTORE( key=0x0, value=Op.DELEGATECALL( - gas=outer_call_gas, address=0x2CAC1D43F00E8B40B63426AB460C7E8717EE6455, args_offset=0x0, args_size=0x40, @@ -95,7 +79,6 @@ def test_callcodecallcodecallcode_111_suicide_end( code=Op.SSTORE( key=0x1, value=Op.DELEGATECALL( - gas=middle_call_gas, address=0xAC521409E2FA9526BFE6B827805783D2E307C4CE, args_offset=0x0, args_size=0x40, @@ -114,7 +97,6 @@ def test_callcodecallcodecallcode_111_suicide_end( code=Op.SSTORE( key=0x2, value=Op.DELEGATECALL( - gas=inner_call_gas, address=0x73B954EBC05BB0FF4A0F6A13A054D50AD1584099, args_offset=0x0, args_size=0x40, @@ -129,12 +111,7 @@ def test_callcodecallcodecallcode_111_suicide_end( address=Address(0xAC521409E2FA9526BFE6B827805783D2E307C4CE), # noqa: E501 ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - ) + tx = Transaction(sender=sender, to=target, data=Bytes("")) post = { target: Account(storage={0: 1, 1: 1, 2: 1, 3: 1}, balance=0), diff --git a/tests/ported_static/stCodeSizeLimit/test_codesize_valid.py b/tests/ported_static/stCodeSizeLimit/test_codesize_valid.py index 6ac356a7b8c..8f9c8f5b8df 100644 --- a/tests/ported_static/stCodeSizeLimit/test_codesize_valid.py +++ b/tests/ported_static/stCodeSizeLimit/test_codesize_valid.py @@ -4,14 +4,7 @@ Ported from: state_tests/stCodeSizeLimit/codesizeValidFiller.json -@manually-enhanced: Do not overwrite. On Amsterdam (EIP-8037) the -contract-creation tx — which deploys ~24 KiB of code — needs extra -state-gas headroom on top of the 15 000 000 regular-gas budget that -suffices on earlier forks. Bump `tx.gas` to 30 000 000 fork- -conditionally; pre-Amsterdam keeps the original 15 000 000 (Osaka -caps `tx.gas` at `TX_MAX_GAS_LIMIT = 16 777 216`, so the bump must be -gated). `env.gas_limit` widened so the larger tx fits in the block. -Post-state expectations are unchanged on all forks. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -24,7 +17,6 @@ Transaction, compute_create_address, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -55,7 +47,6 @@ def test_codesize_valid( state_test: StateTestFiller, pre: Alloc, - fork: Fork, d: int, g: int, v: int, @@ -79,15 +70,10 @@ def test_codesize_valid( Op.CODECOPY(dest_offset=0x0, offset=0xD, size=0x6000) + Op.RETURN(offset=0x0, size=0x6000), ] - tx_gas = [40000000 if fork.is_eip_enabled(8037) else 15000000] tx_value = [1] tx = Transaction( - sender=sender, - to=None, - data=tx_data[d], - gas_limit=tx_gas[g], - value=tx_value[v], + sender=sender, to=None, data=tx_data[d], value=tx_value[v] ) post = { diff --git a/tests/ported_static/stMemoryTest/test_mem0b_single_byte.py b/tests/ported_static/stMemoryTest/test_mem0b_single_byte.py index 6499f41dd67..780127bb03b 100644 --- a/tests/ported_static/stMemoryTest/test_mem0b_single_byte.py +++ b/tests/ported_static/stMemoryTest/test_mem0b_single_byte.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem0b_singleByteFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem0b_single_byte( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem0b_single_byte.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 200_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem0b_single_byte( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem31b_single_byte.py b/tests/ported_static/stMemoryTest/test_mem31b_single_byte.py index ab2ee24082e..cd346824db6 100644 --- a/tests/ported_static/stMemoryTest/test_mem31b_single_byte.py +++ b/tests/ported_static/stMemoryTest/test_mem31b_single_byte.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem31b_singleByteFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem31b_single_byte( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem31b_single_byte.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 200_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem31b_single_byte( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32b_single_byte.py b/tests/ported_static/stMemoryTest/test_mem32b_single_byte.py index b839594d38b..4f5526737dd 100644 --- a/tests/ported_static/stMemoryTest/test_mem32b_single_byte.py +++ b/tests/ported_static/stMemoryTest/test_mem32b_single_byte.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32b_singleByteFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32b_single_byte( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32b_single_byte.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 200_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32b_single_byte( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte.py b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte.py index fa5d24dae28..ac6ee951b02 100644 --- a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte.py +++ b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32kb_singleByteFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32kb_single_byte( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32kb_single_byte.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 300_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32kb_single_byte( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32000}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_1.py b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_1.py index 49986e0279f..05ab6ff8a2f 100644 --- a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_1.py +++ b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_1.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32kb_singleByte-1Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32kb_single_byte_minus_1( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32kb_single_byte_minus_1.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 300_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32kb_single_byte_minus_1( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32000}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_31.py b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_31.py index 9931597621c..afbeeec0d17 100644 --- a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_31.py +++ b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_31.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32kb_singleByte-31Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32kb_single_byte_minus_31( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32kb_single_byte_minus_31.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 300_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32kb_single_byte_minus_31( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32000}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_32.py b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_32.py index b25a8187a58..e6219711ca2 100644 --- a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_32.py +++ b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_32.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32kb_singleByte-32Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32kb_single_byte_minus_32( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32kb_single_byte_minus_32.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 300_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32kb_single_byte_minus_32( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 31968}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_33.py b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_33.py index 848a8a59319..d8bdc089124 100644 --- a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_33.py +++ b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_minus_33.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32kb_singleByte-33Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32kb_single_byte_minus_33( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32kb_single_byte_minus_33.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 300_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32kb_single_byte_minus_33( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 31968}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_1.py b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_1.py index 2fb7c811573..ec9bcfbeb59 100644 --- a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_1.py +++ b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_1.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32kb_singleByte+1Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32kb_single_byte_plus_1( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32kb_single_byte_plus_1.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 300_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32kb_single_byte_plus_1( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32032}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_31.py b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_31.py index d03e663c1ba..e62542e9628 100644 --- a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_31.py +++ b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_31.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32kb_singleByte+31Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32kb_single_byte_plus_31( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32kb_single_byte_plus_31.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 300_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32kb_single_byte_plus_31( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32032}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_32.py b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_32.py index 9cdbcc90c64..911620e273e 100644 --- a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_32.py +++ b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_32.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32kb_singleByte+32Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32kb_single_byte_plus_32( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32kb_single_byte_plus_32.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 300_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32kb_single_byte_plus_32( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32032}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_33.py b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_33.py index 8c976ddc056..7f116b090f3 100644 --- a/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_33.py +++ b/tests/ported_static/stMemoryTest/test_mem32kb_single_byte_plus_33.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem32kb_singleByte+33Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem32kb_single_byte_plus_33( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem32kb_single_byte_plus_33.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 300_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem32kb_single_byte_plus_33( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 32064}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem33b_single_byte.py b/tests/ported_static/stMemoryTest/test_mem33b_single_byte.py index dd2e815624f..6fc11fc4287 100644 --- a/tests/ported_static/stMemoryTest/test_mem33b_single_byte.py +++ b/tests/ported_static/stMemoryTest/test_mem33b_single_byte.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem33b_singleByteFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem33b_single_byte( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem33b_single_byte.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 200_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem33b_single_byte( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 64}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte.py b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte.py index 68ac145e74f..aee1042aa83 100644 --- a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte.py +++ b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem64kb_singleByteFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem64kb_single_byte( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem64kb_single_byte.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem64kb_single_byte( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 64000}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_1.py b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_1.py index d89f096cb45..6c69e209c31 100644 --- a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_1.py +++ b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_1.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem64kb_singleByte-1Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem64kb_single_byte_minus_1( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem64kb_single_byte_minus_1.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem64kb_single_byte_minus_1( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 64000}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_31.py b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_31.py index adbbfb14cd4..63d2d7ef9d5 100644 --- a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_31.py +++ b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_31.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem64kb_singleByte-31Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem64kb_single_byte_minus_31( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem64kb_single_byte_minus_31.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem64kb_single_byte_minus_31( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 64000}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_32.py b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_32.py index c03bd98cb1a..93281a401fb 100644 --- a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_32.py +++ b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_32.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem64kb_singleByte-32Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem64kb_single_byte_minus_32( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem64kb_single_byte_minus_32.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem64kb_single_byte_minus_32( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 63968}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_33.py b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_33.py index e6697924f19..6d2886fac7e 100644 --- a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_33.py +++ b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_minus_33.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem64kb_singleByte-33Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem64kb_single_byte_minus_33( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem64kb_single_byte_minus_33.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem64kb_single_byte_minus_33( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 63968}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_1.py b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_1.py index 9717e71651b..9f4df80383d 100644 --- a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_1.py +++ b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_1.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem64kb_singleByte+1Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem64kb_single_byte_plus_1( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem64kb_single_byte_plus_1.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem64kb_single_byte_plus_1( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 64032}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_31.py b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_31.py index eff7dbdbbca..328fd9653d6 100644 --- a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_31.py +++ b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_31.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem64kb_singleByte+31Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem64kb_single_byte_plus_31( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem64kb_single_byte_plus_31.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem64kb_single_byte_plus_31( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 64032}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_32.py b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_32.py index b8882820448..05c6e938bd3 100644 --- a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_32.py +++ b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_32.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem64kb_singleByte+32Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem64kb_single_byte_plus_32( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem64kb_single_byte_plus_32.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem64kb_single_byte_plus_32( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 64032}, nonce=0), diff --git a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_33.py b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_33.py index 6e9b9c4d55b..20c643d51db 100644 --- a/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_33.py +++ b/tests/ported_static/stMemoryTest/test_mem64kb_single_byte_plus_33.py @@ -3,9 +3,8 @@ Ported from: state_tests/stMemoryTest/mem64kb_singleByte+33Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_mem64kb_single_byte_plus_33( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_mem64kb_single_byte_plus_33.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0x6400000000) @@ -62,13 +54,7 @@ def test_mem64kb_single_byte_plus_33( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=10, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=10) post = { target: Account(storage={0: 64064}, nonce=0), diff --git a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_22000.py b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_22000.py index 19c7672ffd3..d357264248d 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_22000.py +++ b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_22000.py @@ -3,9 +3,8 @@ Ported from: state_tests/stPreCompiledContracts2/modexp_0_0_0_22000Filler.json -@manually-enhanced: Do not overwrite. tx_gas values bumped on -Amsterdam to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -20,7 +19,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -64,7 +62,6 @@ def test_modexp_0_0_0_22000( state_test: StateTestFiller, pre: Alloc, - fork: Fork, d: int, g: int, v: int, @@ -216,7 +213,6 @@ def test_modexp_0_0_0_22000( pc=Op.PC, condition=Op.ISZERO( Op.CALL( - gas=0x5F5E0FF, address=0x5, value=0x0, args_offset=0x160, @@ -231,7 +227,6 @@ def test_modexp_0_0_0_22000( + Op.PUSH1[0x21] + Op.POP( Op.CALL( - gas=0x15, address=0x4, value=0x0, args_offset=Op.DUP5, @@ -270,18 +265,8 @@ def test_modexp_0_0_0_22000( + Hash(0x0) + Hash(0x0), ] - tx_gas = [48136, 90000, 110000, 200000] - if fork.is_eip_enabled(8037): - # EIP-8037 state-gas spill OoGs the SSTORE; bump to fit. - tx_gas = [200000, 200000, 200000, 200000] - tx = Transaction( - sender=sender, - to=contract_0, - data=tx_data[d], - gas_limit=tx_gas[g], - nonce=1, - ) + tx = Transaction(sender=sender, to=contract_0, data=tx_data[d], nonce=1) post = { contract_1: Account(storage={}, code=b"", balance=1, nonce=0), diff --git a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_25000.py b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_25000.py index a9847bc8f27..97c883d5344 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_25000.py +++ b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_25000.py @@ -3,9 +3,8 @@ Ported from: state_tests/stPreCompiledContracts2/modexp_0_0_0_25000Filler.json -@manually-enhanced: Do not overwrite. tx_gas values bumped on -Amsterdam to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -20,7 +19,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -64,7 +62,6 @@ def test_modexp_0_0_0_25000( state_test: StateTestFiller, pre: Alloc, - fork: Fork, d: int, g: int, v: int, @@ -216,7 +213,6 @@ def test_modexp_0_0_0_25000( pc=Op.PC, condition=Op.ISZERO( Op.CALL( - gas=0x5F5E0FF, address=0x5, value=0x0, args_offset=0x160, @@ -231,7 +227,6 @@ def test_modexp_0_0_0_25000( + Op.PUSH1[0x21] + Op.POP( Op.CALL( - gas=0x15, address=0x4, value=0x0, args_offset=Op.DUP5, @@ -270,18 +265,8 @@ def test_modexp_0_0_0_25000( + Hash(0x0) + Hash(0x0), ] - tx_gas = [47040, 90000, 110000, 200000] - if fork.is_eip_enabled(8037): - # EIP-8037 state-gas spill OoGs the SSTORE; bump to fit. - tx_gas = [200000, 200000, 200000, 200000] - tx = Transaction( - sender=sender, - to=contract_0, - data=tx_data[d], - gas_limit=tx_gas[g], - nonce=1, - ) + tx = Transaction(sender=sender, to=contract_0, data=tx_data[d], nonce=1) post = { contract_1: Account(storage={}, code=b"", balance=1, nonce=0), diff --git a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_35000.py b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_35000.py index 0ddf844021c..72973df8483 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_35000.py +++ b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_35000.py @@ -3,9 +3,8 @@ Ported from: state_tests/stPreCompiledContracts2/modexp_0_0_0_35000Filler.json -@manually-enhanced: Do not overwrite. tx_gas values bumped on -Amsterdam to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -20,7 +19,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -64,7 +62,6 @@ def test_modexp_0_0_0_35000( state_test: StateTestFiller, pre: Alloc, - fork: Fork, d: int, g: int, v: int, @@ -216,7 +213,6 @@ def test_modexp_0_0_0_35000( pc=Op.PC, condition=Op.ISZERO( Op.CALL( - gas=0x5F5E0FF, address=0x5, value=0x0, args_offset=0x160, @@ -231,7 +227,6 @@ def test_modexp_0_0_0_35000( + Op.PUSH1[0x21] + Op.POP( Op.CALL( - gas=0x15, address=0x4, value=0x0, args_offset=Op.DUP5, @@ -270,18 +265,8 @@ def test_modexp_0_0_0_35000( + Hash(0x0) + Hash(0x0), ] - tx_gas = [57040, 90000, 110000, 200000] - if fork.is_eip_enabled(8037): - # EIP-8037 state-gas spill OoGs the SSTORE; bump to fit. - tx_gas = [200000, 200000, 200000, 200000] - tx = Transaction( - sender=sender, - to=contract_0, - data=tx_data[d], - gas_limit=tx_gas[g], - nonce=1, - ) + tx = Transaction(sender=sender, to=contract_0, data=tx_data[d], nonce=1) post = { contract_1: Account(storage={}, code=b"", balance=1, nonce=0), diff --git a/tests/ported_static/stRandom/test_random_statetest102.py b/tests/ported_static/stRandom/test_random_statetest102.py index 4c6423fd4fa..0d576dc8482 100644 --- a/tests/ported_static/stRandom/test_random_statetest102.py +++ b/tests/ported_static/stRandom/test_random_statetest102.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest102Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest102( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest102.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest102( data=Bytes( "457f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e7944447f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f157094ffff1a04893a9cf3858b8576" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x25D01AE2, ) diff --git a/tests/ported_static/stRandom/test_random_statetest104.py b/tests/ported_static/stRandom/test_random_statetest104.py index 114d7820a3a..c98bab49092 100644 --- a/tests/ported_static/stRandom/test_random_statetest104.py +++ b/tests/ported_static/stRandom/test_random_statetest104.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest104Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest104( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest104.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -104,7 +96,6 @@ def test_random_statetest104( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f147d6b978c780a82619772417d5b6a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3A3FA7D5, ) diff --git a/tests/ported_static/stRandom/test_random_statetest105.py b/tests/ported_static/stRandom/test_random_statetest105.py index 84f03f71bd7..c1dd2310265 100644 --- a/tests/ported_static/stRandom/test_random_statetest105.py +++ b/tests/ported_static/stRandom/test_random_statetest105.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest105Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest105( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest105.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest105( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff437f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f9914639111156d1759ff65039a02926c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x566920F7, ) diff --git a/tests/ported_static/stRandom/test_random_statetest106.py b/tests/ported_static/stRandom/test_random_statetest106.py index 0b31c2aa12f..61ef6d931c9 100644 --- a/tests/ported_static/stRandom/test_random_statetest106.py +++ b/tests/ported_static/stRandom/test_random_statetest106.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest106Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest106( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest106.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -101,7 +93,6 @@ def test_random_statetest106( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f327043726481f25094828e21155779" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x41FF266C, ) diff --git a/tests/ported_static/stRandom/test_random_statetest107.py b/tests/ported_static/stRandom/test_random_statetest107.py index 3ed7e239af2..2c7d646c47f 100644 --- a/tests/ported_static/stRandom/test_random_statetest107.py +++ b/tests/ported_static/stRandom/test_random_statetest107.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest107Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest107( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest107.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -102,7 +94,6 @@ def test_random_statetest107( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b509" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4F9C450B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest11.py b/tests/ported_static/stRandom/test_random_statetest11.py index 0fa94e89cfc..70cce2648dc 100644 --- a/tests/ported_static/stRandom/test_random_statetest11.py +++ b/tests/ported_static/stRandom/test_random_statetest11.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest11Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest11( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest11.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest11( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3506fa093f3408a6e531735960a7617127a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6909D3EC, ) diff --git a/tests/ported_static/stRandom/test_random_statetest110.py b/tests/ported_static/stRandom/test_random_statetest110.py index 92c3316ccd0..a292f781261 100644 --- a/tests/ported_static/stRandom/test_random_statetest110.py +++ b/tests/ported_static/stRandom/test_random_statetest110.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest110Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest110( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest110.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest110( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe417f00000000000000000000000000000000000000000000000000000000000000016f97543c343476cb7c8c84066217f102" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2BEB343B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest112.py b/tests/ported_static/stRandom/test_random_statetest112.py index f8e4ef355a9..3a1ff38db27 100644 --- a/tests/ported_static/stRandom/test_random_statetest112.py +++ b/tests/ported_static/stRandom/test_random_statetest112.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest112Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest112( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest112.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest112( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff45447fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000006f549c5779398a848c35307514650541" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x779DB8A6, ) diff --git a/tests/ported_static/stRandom/test_random_statetest114.py b/tests/ported_static/stRandom/test_random_statetest114.py index d6d636c9e8d..75f2fea4a0c 100644 --- a/tests/ported_static/stRandom/test_random_statetest114.py +++ b/tests/ported_static/stRandom/test_random_statetest114.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest114Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest114( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest114.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -103,7 +95,6 @@ def test_random_statetest114( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe417fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f3584357ea388725483637d4471727f" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3FA85EB3, ) diff --git a/tests/ported_static/stRandom/test_random_statetest116.py b/tests/ported_static/stRandom/test_random_statetest116.py index 388421585ea..7609913a4ad 100644 --- a/tests/ported_static/stRandom/test_random_statetest116.py +++ b/tests/ported_static/stRandom/test_random_statetest116.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest116Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest116( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest116.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -103,7 +95,6 @@ def test_random_statetest116( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e7907539337" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x162D4E87, ) diff --git a/tests/ported_static/stRandom/test_random_statetest117.py b/tests/ported_static/stRandom/test_random_statetest117.py index 5874efbb26b..39aa6237255 100644 --- a/tests/ported_static/stRandom/test_random_statetest117.py +++ b/tests/ported_static/stRandom/test_random_statetest117.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest117Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest117( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest117.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest117( data=Bytes( "447f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79427f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000006f8aa4a4980274f18c6158368d415714" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x691AC7A4, ) diff --git a/tests/ported_static/stRandom/test_random_statetest118.py b/tests/ported_static/stRandom/test_random_statetest118.py index e6cbb0601d6..6af025604c1 100644 --- a/tests/ported_static/stRandom/test_random_statetest118.py +++ b/tests/ported_static/stRandom/test_random_statetest118.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest118Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest118( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest118.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -101,7 +93,6 @@ def test_random_statetest118( data=Bytes( "457ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000006f55817c037fa45bf3850320309a8f02" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x46F13668, ) diff --git a/tests/ported_static/stRandom/test_random_statetest119.py b/tests/ported_static/stRandom/test_random_statetest119.py index 724114ace31..0d793d553ea 100644 --- a/tests/ported_static/stRandom/test_random_statetest119.py +++ b/tests/ported_static/stRandom/test_random_statetest119.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest119Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest119( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest119.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest119( data=Bytes( "4559437f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006f52503b127c115a9673a43137909566" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x189731CA, ) diff --git a/tests/ported_static/stRandom/test_random_statetest12.py b/tests/ported_static/stRandom/test_random_statetest12.py index f1c61def0c7..ae09d4f9f6a 100644 --- a/tests/ported_static/stRandom/test_random_statetest12.py +++ b/tests/ported_static/stRandom/test_random_statetest12.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest12Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest12( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest12.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest12( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff457ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79027f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f165490a41215369ef2760379411633" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4576EB63, ) diff --git a/tests/ported_static/stRandom/test_random_statetest120.py b/tests/ported_static/stRandom/test_random_statetest120.py index e37628a38ef..5864dbbe3a7 100644 --- a/tests/ported_static/stRandom/test_random_statetest120.py +++ b/tests/ported_static/stRandom/test_random_statetest120.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest120Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest120( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest120.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -101,7 +93,6 @@ def test_random_statetest120( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8208" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x707BF5EA, ) diff --git a/tests/ported_static/stRandom/test_random_statetest121.py b/tests/ported_static/stRandom/test_random_statetest121.py index 3db32458324..82a93ce4d74 100644 --- a/tests/ported_static/stRandom/test_random_statetest121.py +++ b/tests/ported_static/stRandom/test_random_statetest121.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest121Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest121( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest121.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest121( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c350456f305842321509108c689f7ca3195a9d" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x492A84CF, ) diff --git a/tests/ported_static/stRandom/test_random_statetest122.py b/tests/ported_static/stRandom/test_random_statetest122.py index 9eff336d8f6..30e1ad00e0f 100644 --- a/tests/ported_static/stRandom/test_random_statetest122.py +++ b/tests/ported_static/stRandom/test_random_statetest122.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest122Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest122( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest122.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest122( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6fa2825b6c338f8d717156560af045136b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x201771A5, ) diff --git a/tests/ported_static/stRandom/test_random_statetest124.py b/tests/ported_static/stRandom/test_random_statetest124.py index 33c25c1e79d..545cd436ab9 100644 --- a/tests/ported_static/stRandom/test_random_statetest124.py +++ b/tests/ported_static/stRandom/test_random_statetest124.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest124Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest124( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest124.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -88,7 +80,6 @@ def test_random_statetest124( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08125580355b17457f7463587b9a7a43" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6863F683, ) diff --git a/tests/ported_static/stRandom/test_random_statetest129.py b/tests/ported_static/stRandom/test_random_statetest129.py index be9ff65c5d1..df9d0173a7d 100644 --- a/tests/ported_static/stRandom/test_random_statetest129.py +++ b/tests/ported_static/stRandom/test_random_statetest129.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest129Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest129( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest129.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest129( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f166e733343093a31a33b8e025a0270" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x422CD1CC, ) diff --git a/tests/ported_static/stRandom/test_random_statetest130.py b/tests/ported_static/stRandom/test_random_statetest130.py index 6895e8b5670..221d0c100f7 100644 --- a/tests/ported_static/stRandom/test_random_statetest130.py +++ b/tests/ported_static/stRandom/test_random_statetest130.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest130Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest130( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest130.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest130( data=Bytes( "417fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000016f368a668b76306d181a393611988317" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x720306C0, ) diff --git a/tests/ported_static/stRandom/test_random_statetest131.py b/tests/ported_static/stRandom/test_random_statetest131.py index fee5ddcf1c4..d12c3833a45 100644 --- a/tests/ported_static/stRandom/test_random_statetest131.py +++ b/tests/ported_static/stRandom/test_random_statetest131.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest131Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest131( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest131.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest131( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000001000000000000000000000000000000000000000014416f36ff85758270710168547a9777886096" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1C479F90, ) diff --git a/tests/ported_static/stRandom/test_random_statetest137.py b/tests/ported_static/stRandom/test_random_statetest137.py index 9d68283af2a..7a0fe4797d6 100644 --- a/tests/ported_static/stRandom/test_random_statetest137.py +++ b/tests/ported_static/stRandom/test_random_statetest137.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest137Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest137( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest137.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -97,7 +89,6 @@ def test_random_statetest137( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000087f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017e7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5a130e86ca17390989355f092a2" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x33AC85E7, ) diff --git a/tests/ported_static/stRandom/test_random_statetest139.py b/tests/ported_static/stRandom/test_random_statetest139.py index 561422cc2e2..ea8c45d37d9 100644 --- a/tests/ported_static/stRandom/test_random_statetest139.py +++ b/tests/ported_static/stRandom/test_random_statetest139.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest139Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest139( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest139.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -93,7 +85,6 @@ def test_random_statetest139( data=Bytes( "33447f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff43446133451545" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x409CEFF3, ) diff --git a/tests/ported_static/stRandom/test_random_statetest142.py b/tests/ported_static/stRandom/test_random_statetest142.py index 19cae9d2e03..442720c001e 100644 --- a/tests/ported_static/stRandom/test_random_statetest142.py +++ b/tests/ported_static/stRandom/test_random_statetest142.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest142Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest142( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest142.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -105,7 +97,6 @@ def test_random_statetest142( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff959137630364087e1a640431107c8801" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6DD219A0, ) diff --git a/tests/ported_static/stRandom/test_random_statetest145.py b/tests/ported_static/stRandom/test_random_statetest145.py index ba633f6f5a4..f2def3075dc 100644 --- a/tests/ported_static/stRandom/test_random_statetest145.py +++ b/tests/ported_static/stRandom/test_random_statetest145.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest145Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest145( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest145.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -94,7 +86,6 @@ def test_random_statetest145( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000000000000000000000000000000000000000000000427f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000001391333" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7E1F26DA, ) diff --git a/tests/ported_static/stRandom/test_random_statetest148.py b/tests/ported_static/stRandom/test_random_statetest148.py index 9909560b035..71d00424946 100644 --- a/tests/ported_static/stRandom/test_random_statetest148.py +++ b/tests/ported_static/stRandom/test_random_statetest148.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest148Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest148( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest148.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -92,7 +84,6 @@ def test_random_statetest148( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000000000000000000000000000000000000000000001537f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f34847e390773919b16559077164472" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x30607FB3, ) diff --git a/tests/ported_static/stRandom/test_random_statetest15.py b/tests/ported_static/stRandom/test_random_statetest15.py index 50abb7919ce..1af383a925f 100644 --- a/tests/ported_static/stRandom/test_random_statetest15.py +++ b/tests/ported_static/stRandom/test_random_statetest15.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest15Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest15( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest15.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest15( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000016f436af043189b6197733280a2f1f038" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x598426AC, ) diff --git a/tests/ported_static/stRandom/test_random_statetest155.py b/tests/ported_static/stRandom/test_random_statetest155.py index 4a3ba8c177b..39f2cc60107 100644 --- a/tests/ported_static/stRandom/test_random_statetest155.py +++ b/tests/ported_static/stRandom/test_random_statetest155.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest155Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest155( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest155.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest155( data=Bytes( "457f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000006f3494f39b6ca29473a1995803089101" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x228B052C, ) diff --git a/tests/ported_static/stRandom/test_random_statetest156.py b/tests/ported_static/stRandom/test_random_statetest156.py index dd4b11a6002..ff34c557bf2 100644 --- a/tests/ported_static/stRandom/test_random_statetest156.py +++ b/tests/ported_static/stRandom/test_random_statetest156.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest156Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest156( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest156.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -93,7 +85,6 @@ def test_random_statetest156( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3506f813982583141966b389c159aa48b3a88" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7FFE6411, ) diff --git a/tests/ported_static/stRandom/test_random_statetest158.py b/tests/ported_static/stRandom/test_random_statetest158.py index 39fa2b5981b..472af6f1e99 100644 --- a/tests/ported_static/stRandom/test_random_statetest158.py +++ b/tests/ported_static/stRandom/test_random_statetest158.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest158Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest158( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest158.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest158( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe4350" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x383BFC76, ) diff --git a/tests/ported_static/stRandom/test_random_statetest161.py b/tests/ported_static/stRandom/test_random_statetest161.py index 7dc41e77504..0c8527b4b51 100644 --- a/tests/ported_static/stRandom/test_random_statetest161.py +++ b/tests/ported_static/stRandom/test_random_statetest161.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest161Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest161( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest161.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest161( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c350437f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000001416f458a458076526052650a418c9b40863c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2D2470B1, ) diff --git a/tests/ported_static/stRandom/test_random_statetest162.py b/tests/ported_static/stRandom/test_random_statetest162.py index ecc14ec7fc5..17aadbad253 100644 --- a/tests/ported_static/stRandom/test_random_statetest162.py +++ b/tests/ported_static/stRandom/test_random_statetest162.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest162Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest162( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest162.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest162( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f355a7f614497339e3b63878b369804" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2B36B8AD, ) diff --git a/tests/ported_static/stRandom/test_random_statetest166.py b/tests/ported_static/stRandom/test_random_statetest166.py index b472e7ddf9e..4f4887e202d 100644 --- a/tests/ported_static/stRandom/test_random_statetest166.py +++ b/tests/ported_static/stRandom/test_random_statetest166.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest166Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest166( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest166.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest166( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff817f0000000000000000000000010000000000000000000000000000000000000000417f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c350456f8eb7099d9f160532785143c5937e18" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x603D8563, ) diff --git a/tests/ported_static/stRandom/test_random_statetest167.py b/tests/ported_static/stRandom/test_random_statetest167.py index c1a689820af..42e16523102 100644 --- a/tests/ported_static/stRandom/test_random_statetest167.py +++ b/tests/ported_static/stRandom/test_random_statetest167.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest167Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest167( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest167.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest167( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000001437f0000000000000000000000000000000000000000000000000000000000000001027f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6fa00b875630178a439384941395369e" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x198F60AB, ) diff --git a/tests/ported_static/stRandom/test_random_statetest169.py b/tests/ported_static/stRandom/test_random_statetest169.py index 3d2d075902f..7d29bdc517e 100644 --- a/tests/ported_static/stRandom/test_random_statetest169.py +++ b/tests/ported_static/stRandom/test_random_statetest169.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest169Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest169( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest169.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest169( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe447f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x33C6014B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest175.py b/tests/ported_static/stRandom/test_random_statetest175.py index 63c7e71548a..7bf972d1825 100644 --- a/tests/ported_static/stRandom/test_random_statetest175.py +++ b/tests/ported_static/stRandom/test_random_statetest175.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest175Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest175( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest175.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest175( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3506f6985f2837e09689844171a0235833c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7F8A09B6, ) diff --git a/tests/ported_static/stRandom/test_random_statetest179.py b/tests/ported_static/stRandom/test_random_statetest179.py index 7fcc568ea78..442a9081ff6 100644 --- a/tests/ported_static/stRandom/test_random_statetest179.py +++ b/tests/ported_static/stRandom/test_random_statetest179.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest179Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest179( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest179.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest179( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3506f515480126a50a173506e0667621292" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5E6CF4EC, ) diff --git a/tests/ported_static/stRandom/test_random_statetest180.py b/tests/ported_static/stRandom/test_random_statetest180.py index fb9e36a7218..6dbdb743b71 100644 --- a/tests/ported_static/stRandom/test_random_statetest180.py +++ b/tests/ported_static/stRandom/test_random_statetest180.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest180Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest180( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest180.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest180( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000001447f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f11576b693c128a9e0820609c050a219d" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x21C3963D, ) diff --git a/tests/ported_static/stRandom/test_random_statetest183.py b/tests/ported_static/stRandom/test_random_statetest183.py index 045b6188782..9338f4e8d1e 100644 --- a/tests/ported_static/stRandom/test_random_statetest183.py +++ b/tests/ported_static/stRandom/test_random_statetest183.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest183Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest183( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest183.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest183( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79436f4134547075687854849d7b64658630" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x451629C1, ) diff --git a/tests/ported_static/stRandom/test_random_statetest184.py b/tests/ported_static/stRandom/test_random_statetest184.py index 33600950e0f..d6ceed7597b 100644 --- a/tests/ported_static/stRandom/test_random_statetest184.py +++ b/tests/ported_static/stRandom/test_random_statetest184.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest184Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest184( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest184.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x6D6E40885310545835A5B582DBC23EF026404BDA) addr = Address(0xF377657E450772B703A269E12BB487FF421A5C6D) sender = EOA( @@ -85,7 +77,6 @@ def test_random_statetest184( sender=sender, to=target, data=Bytes("64dd3e4e84676723342c1dfaf9af4ef3"), - gas_limit=tx_gas_limit, value=0x6D1DD024, gas_price=28, ) diff --git a/tests/ported_static/stRandom/test_random_statetest187.py b/tests/ported_static/stRandom/test_random_statetest187.py index b1e665c5de0..419f21abb3d 100644 --- a/tests/ported_static/stRandom/test_random_statetest187.py +++ b/tests/ported_static/stRandom/test_random_statetest187.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest187Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest187( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest187.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest187( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff457f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000006f75988036a0562096036b04518877199d" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x372E4882, ) diff --git a/tests/ported_static/stRandom/test_random_statetest188.py b/tests/ported_static/stRandom/test_random_statetest188.py index 9eb3c7129d5..49fc6ab0543 100644 --- a/tests/ported_static/stRandom/test_random_statetest188.py +++ b/tests/ported_static/stRandom/test_random_statetest188.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest188Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest188( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest188.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest188( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff817f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4286687859f38379718794" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x49195164, ) diff --git a/tests/ported_static/stRandom/test_random_statetest19.py b/tests/ported_static/stRandom/test_random_statetest19.py index afff390d5c9..51195e1cf08 100644 --- a/tests/ported_static/stRandom/test_random_statetest19.py +++ b/tests/ported_static/stRandom/test_random_statetest19.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest19Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest19( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest19.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest19( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe3a7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe417f0000000000000000000000000000000000000000000000000000000000000001587f000000000000000000000000000000000000000000000000000000000000c3506fff59876660063b7c8df1ff088a8414" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1DCD74DE, ) diff --git a/tests/ported_static/stRandom/test_random_statetest191.py b/tests/ported_static/stRandom/test_random_statetest191.py index 1b71f2b90ed..9bf77cde723 100644 --- a/tests/ported_static/stRandom/test_random_statetest191.py +++ b/tests/ported_static/stRandom/test_random_statetest191.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest191Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest191( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest191.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest191( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000010000000000000000000000000000000000000000447ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f678f0443457084700b645760018a10" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x17008747, ) diff --git a/tests/ported_static/stRandom/test_random_statetest192.py b/tests/ported_static/stRandom/test_random_statetest192.py index 8f08b1019cc..93ccf539e03 100644 --- a/tests/ported_static/stRandom/test_random_statetest192.py +++ b/tests/ported_static/stRandom/test_random_statetest192.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest192Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest192( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest192.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -101,7 +93,6 @@ def test_random_statetest192( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff347f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe04" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x45A5235D, ) diff --git a/tests/ported_static/stRandom/test_random_statetest194.py b/tests/ported_static/stRandom/test_random_statetest194.py index bfe9ecf28d6..3d3b1205b0e 100644 --- a/tests/ported_static/stRandom/test_random_statetest194.py +++ b/tests/ported_static/stRandom/test_random_statetest194.py @@ -4,10 +4,8 @@ Ported from: state_tests/stRandom/randomStatetest194Filler.json -@manually-enhanced: Do not overwrite. `gas_limit` raised on Amsterdam -to cover EIP-8037 state-gas spill. Pre-EIP-8037 keeps the original -100 000. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -20,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -35,14 +32,8 @@ def test_random_statetest194( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest194.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -95,7 +86,6 @@ def test_random_statetest194( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff097f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x31582CFB, ) diff --git a/tests/ported_static/stRandom/test_random_statetest195.py b/tests/ported_static/stRandom/test_random_statetest195.py index 823838d4c9c..6f31ee1c784 100644 --- a/tests/ported_static/stRandom/test_random_statetest195.py +++ b/tests/ported_static/stRandom/test_random_statetest195.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest195Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest195( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest195.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest195( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c350417fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff097f0000000000000000000000010000000000000000000000000000000000000000" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1252A41F, ) diff --git a/tests/ported_static/stRandom/test_random_statetest196.py b/tests/ported_static/stRandom/test_random_statetest196.py index 9b8e822d671..a737f5564fa 100644 --- a/tests/ported_static/stRandom/test_random_statetest196.py +++ b/tests/ported_static/stRandom/test_random_statetest196.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest196Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest196( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest196.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -97,7 +89,6 @@ def test_random_statetest196( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe447f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000003703659c5b3a6d7b9a935436" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2819E4BE, ) diff --git a/tests/ported_static/stRandom/test_random_statetest2.py b/tests/ported_static/stRandom/test_random_statetest2.py index 8120e34f029..a93ef6e6551 100644 --- a/tests/ported_static/stRandom/test_random_statetest2.py +++ b/tests/ported_static/stRandom/test_random_statetest2.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest2Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest2( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest2.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest2( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e7958437f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000016f3412a47c889e8da06a04049f049888" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7C34BB45, ) diff --git a/tests/ported_static/stRandom/test_random_statetest200.py b/tests/ported_static/stRandom/test_random_statetest200.py index ea5bfad15e3..03c3334cfed 100644 --- a/tests/ported_static/stRandom/test_random_statetest200.py +++ b/tests/ported_static/stRandom/test_random_statetest200.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest200Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest200( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest200.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -92,7 +84,6 @@ def test_random_statetest200( data=Bytes( "437f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79346f42051af2a24050039e9d3a678b028a0a80" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3F51031D, ) diff --git a/tests/ported_static/stRandom/test_random_statetest202.py b/tests/ported_static/stRandom/test_random_statetest202.py index e7dc23c0fd8..0dd454a967d 100644 --- a/tests/ported_static/stRandom/test_random_statetest202.py +++ b/tests/ported_static/stRandom/test_random_statetest202.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest202Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest202( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest202.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -83,7 +75,6 @@ def test_random_statetest202( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000000000000000000000000000000000000000000000557f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6750a3190486f0" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3158E7CD, ) diff --git a/tests/ported_static/stRandom/test_random_statetest204.py b/tests/ported_static/stRandom/test_random_statetest204.py index 80779e64297..de30d9e8c14 100644 --- a/tests/ported_static/stRandom/test_random_statetest204.py +++ b/tests/ported_static/stRandom/test_random_statetest204.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest204Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest204( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest204.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest204( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0982" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x763F0C95, ) diff --git a/tests/ported_static/stRandom/test_random_statetest206.py b/tests/ported_static/stRandom/test_random_statetest206.py index 39a87632dd4..4ef692abb3e 100644 --- a/tests/ported_static/stRandom/test_random_statetest206.py +++ b/tests/ported_static/stRandom/test_random_statetest206.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest206Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest206( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest206.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest206( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79427f0000000000000000000000000000000000000000000000000000000000000001427f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f45736d8e806138378d62087320313c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7CA24D6F, ) diff --git a/tests/ported_static/stRandom/test_random_statetest208.py b/tests/ported_static/stRandom/test_random_statetest208.py index 2ebdf20f398..ff24015db4a 100644 --- a/tests/ported_static/stRandom/test_random_statetest208.py +++ b/tests/ported_static/stRandom/test_random_statetest208.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest208Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest208( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest208.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest208( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7FD561B3, ) diff --git a/tests/ported_static/stRandom/test_random_statetest210.py b/tests/ported_static/stRandom/test_random_statetest210.py index 5ec0f49f96e..4ed821eb58d 100644 --- a/tests/ported_static/stRandom/test_random_statetest210.py +++ b/tests/ported_static/stRandom/test_random_statetest210.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest210Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest210( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest210.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest210( data=Bytes( "457f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff427ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6A1B0D6A, ) diff --git a/tests/ported_static/stRandom/test_random_statetest214.py b/tests/ported_static/stRandom/test_random_statetest214.py index f9f806f4ee1..9bcf17ad20e 100644 --- a/tests/ported_static/stRandom/test_random_statetest214.py +++ b/tests/ported_static/stRandom/test_random_statetest214.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest214Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest214( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest214.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest214( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff150a6f7b056b335a15a48d7b8841163a503963" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7D4430A5, ) diff --git a/tests/ported_static/stRandom/test_random_statetest215.py b/tests/ported_static/stRandom/test_random_statetest215.py index 270221359f5..224dfa986cd 100644 --- a/tests/ported_static/stRandom/test_random_statetest215.py +++ b/tests/ported_static/stRandom/test_random_statetest215.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest215Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest215( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest215.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -93,7 +85,6 @@ def test_random_statetest215( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff446f728f4f1065583139780a981510173b9c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x306B9921, ) diff --git a/tests/ported_static/stRandom/test_random_statetest216.py b/tests/ported_static/stRandom/test_random_statetest216.py index ae66319835f..17993db1301 100644 --- a/tests/ported_static/stRandom/test_random_statetest216.py +++ b/tests/ported_static/stRandom/test_random_statetest216.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest216Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest216( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest216.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest216( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c350447f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3506d766d67fe078532089913064494" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x288181DD, ) diff --git a/tests/ported_static/stRandom/test_random_statetest217.py b/tests/ported_static/stRandom/test_random_statetest217.py index e451e45b057..84e77da47dc 100644 --- a/tests/ported_static/stRandom/test_random_statetest217.py +++ b/tests/ported_static/stRandom/test_random_statetest217.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest217Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest217( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest217.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -89,7 +81,6 @@ def test_random_statetest217( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000001377f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c350" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1C326D78, ) diff --git a/tests/ported_static/stRandom/test_random_statetest219.py b/tests/ported_static/stRandom/test_random_statetest219.py index c1566abbec1..d9c3212ba3f 100644 --- a/tests/ported_static/stRandom/test_random_statetest219.py +++ b/tests/ported_static/stRandom/test_random_statetest219.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest219Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest219( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest219.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest219( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff437f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3506f6253443a4104027144577f33998320" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x46404EA, ) diff --git a/tests/ported_static/stRandom/test_random_statetest220.py b/tests/ported_static/stRandom/test_random_statetest220.py index c80332b5130..e4d3fc20fc9 100644 --- a/tests/ported_static/stRandom/test_random_statetest220.py +++ b/tests/ported_static/stRandom/test_random_statetest220.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest220Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest220( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest220.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest220( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000016f420380a03c4282a3540a1a333a843a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xC5BFC9F, ) diff --git a/tests/ported_static/stRandom/test_random_statetest221.py b/tests/ported_static/stRandom/test_random_statetest221.py index 41805cb2db0..c0e3ad64a19 100644 --- a/tests/ported_static/stRandom/test_random_statetest221.py +++ b/tests/ported_static/stRandom/test_random_statetest221.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest221Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest221( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest221.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest221( data=Bytes( "457f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f977789947e197f828151867a73771a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6F0651EF, ) diff --git a/tests/ported_static/stRandom/test_random_statetest222.py b/tests/ported_static/stRandom/test_random_statetest222.py index d967defdcf6..0ffd77403cd 100644 --- a/tests/ported_static/stRandom/test_random_statetest222.py +++ b/tests/ported_static/stRandom/test_random_statetest222.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest222Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest222( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest222.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest222( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000001000000000000000000000000000000000000000043397f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c35081" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x66F96B9F, ) diff --git a/tests/ported_static/stRandom/test_random_statetest225.py b/tests/ported_static/stRandom/test_random_statetest225.py index a29e2414eae..9c3fe80da55 100644 --- a/tests/ported_static/stRandom/test_random_statetest225.py +++ b/tests/ported_static/stRandom/test_random_statetest225.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest225Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest225( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest225.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -104,7 +96,6 @@ def test_random_statetest225( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff506f69786c858e0703566f95f89931119019" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x9859445, ) diff --git a/tests/ported_static/stRandom/test_random_statetest227.py b/tests/ported_static/stRandom/test_random_statetest227.py index 152f35cb0e6..7600ea491f4 100644 --- a/tests/ported_static/stRandom/test_random_statetest227.py +++ b/tests/ported_static/stRandom/test_random_statetest227.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest227Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest227( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest227.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest227( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f108fa27475689e44993a528752a1523359" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x462204C5, ) diff --git a/tests/ported_static/stRandom/test_random_statetest23.py b/tests/ported_static/stRandom/test_random_statetest23.py index dbeea4e8b60..32dbd8624d8 100644 --- a/tests/ported_static/stRandom/test_random_statetest23.py +++ b/tests/ported_static/stRandom/test_random_statetest23.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest23Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest23( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest23.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest23( data=Bytes( "7f0000000000000000000000000000000000000000000000000000000000000001427f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f89418c1076f1544315601489386c91" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x27CD2E4B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest231.py b/tests/ported_static/stRandom/test_random_statetest231.py index 0888a359ceb..cbe2df6a177 100644 --- a/tests/ported_static/stRandom/test_random_statetest231.py +++ b/tests/ported_static/stRandom/test_random_statetest231.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest231Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest231( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest231.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest231( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f7b98a491727a089df3365353329e80" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4BCA4C7E, ) diff --git a/tests/ported_static/stRandom/test_random_statetest238.py b/tests/ported_static/stRandom/test_random_statetest238.py index 9329c88c2ab..e3af7722da9 100644 --- a/tests/ported_static/stRandom/test_random_statetest238.py +++ b/tests/ported_static/stRandom/test_random_statetest238.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest238Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest238( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest238.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest238( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff307fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f7c748813587e990566719934f342316c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xFF8455C, ) diff --git a/tests/ported_static/stRandom/test_random_statetest242.py b/tests/ported_static/stRandom/test_random_statetest242.py index 401917748c4..c308099cb1e 100644 --- a/tests/ported_static/stRandom/test_random_statetest242.py +++ b/tests/ported_static/stRandom/test_random_statetest242.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest242Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest242( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest242.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest242( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe427f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7DCB2C64, ) diff --git a/tests/ported_static/stRandom/test_random_statetest243.py b/tests/ported_static/stRandom/test_random_statetest243.py index 468c36864ba..f02622d3348 100644 --- a/tests/ported_static/stRandom/test_random_statetest243.py +++ b/tests/ported_static/stRandom/test_random_statetest243.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest243Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest243( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest243.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -90,7 +82,6 @@ def test_random_statetest243( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3506f424544664076406862554558668490" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x49903AC, ) diff --git a/tests/ported_static/stRandom/test_random_statetest247.py b/tests/ported_static/stRandom/test_random_statetest247.py index 474148b54f8..8d6b7448437 100644 --- a/tests/ported_static/stRandom/test_random_statetest247.py +++ b/tests/ported_static/stRandom/test_random_statetest247.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest247Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest247( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest247.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest247( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe04" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x43B4ED79, ) diff --git a/tests/ported_static/stRandom/test_random_statetest248.py b/tests/ported_static/stRandom/test_random_statetest248.py index 36e4656fdca..609a26c4eef 100644 --- a/tests/ported_static/stRandom/test_random_statetest248.py +++ b/tests/ported_static/stRandom/test_random_statetest248.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest248Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest248( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest248.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -99,7 +91,6 @@ def test_random_statetest248( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000000000000000000000000000000000000000000001427f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8636f25990" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x20C4D1A6, ) diff --git a/tests/ported_static/stRandom/test_random_statetest249.py b/tests/ported_static/stRandom/test_random_statetest249.py index c4eb673ae28..15938c8d5f1 100644 --- a/tests/ported_static/stRandom/test_random_statetest249.py +++ b/tests/ported_static/stRandom/test_random_statetest249.py @@ -4,10 +4,8 @@ Ported from: state_tests/stRandom/randomStatetest249Filler.json -@manually-enhanced: Do not overwrite. `gas_limit` raised on Amsterdam -to cover EIP-8037 state-gas spill. Pre-EIP-8037 keeps the original -100 000. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -20,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -35,14 +32,8 @@ def test_random_statetest249( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest249.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -95,7 +86,6 @@ def test_random_statetest249( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000012807f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000039" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6F8F420B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest254.py b/tests/ported_static/stRandom/test_random_statetest254.py index 972ba4c86b7..32ea8ec1c88 100644 --- a/tests/ported_static/stRandom/test_random_statetest254.py +++ b/tests/ported_static/stRandom/test_random_statetest254.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest254Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest254( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest254.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest254( data=Bytes( "7f000000000000000000000001000000000000000000000000000000000000000041417f0000000000000000000000000000000000000000000000000000000000000001447fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3506f059b6b83f294740688598c52195a92" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5C13C2FF, ) diff --git a/tests/ported_static/stRandom/test_random_statetest259.py b/tests/ported_static/stRandom/test_random_statetest259.py index b291a673bfb..ca33ee8be7c 100644 --- a/tests/ported_static/stRandom/test_random_statetest259.py +++ b/tests/ported_static/stRandom/test_random_statetest259.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest259Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest259( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest259.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest259( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000001587fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3506f04831adc0812f09544927407900709" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xEF4B167, ) diff --git a/tests/ported_static/stRandom/test_random_statetest264.py b/tests/ported_static/stRandom/test_random_statetest264.py index 1ed859df59d..09af5cff8f7 100644 --- a/tests/ported_static/stRandom/test_random_statetest264.py +++ b/tests/ported_static/stRandom/test_random_statetest264.py @@ -4,10 +4,8 @@ Ported from: state_tests/stRandom/randomStatetest264Filler.json -@manually-enhanced: Do not overwrite. `gas_limit` raised on Amsterdam -to cover EIP-8037 state-gas spill. Pre-EIP-8037 keeps the original -100 000. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -20,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -35,14 +32,8 @@ def test_random_statetest264( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest264.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -96,7 +87,6 @@ def test_random_statetest264( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe427f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x457C78F7, ) diff --git a/tests/ported_static/stRandom/test_random_statetest267.py b/tests/ported_static/stRandom/test_random_statetest267.py index 0179d9e62c9..db3e8860e21 100644 --- a/tests/ported_static/stRandom/test_random_statetest267.py +++ b/tests/ported_static/stRandom/test_random_statetest267.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest267Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest267( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest267.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -98,7 +90,6 @@ def test_random_statetest267( data=Bytes( "447f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f00000000000000000000000000000000000000000000000000000000000000007e7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5a132776d398e3b7c14686a07346f" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xF5106AE, ) diff --git a/tests/ported_static/stRandom/test_random_statetest268.py b/tests/ported_static/stRandom/test_random_statetest268.py index eb8aa8ad175..713eda7f360 100644 --- a/tests/ported_static/stRandom/test_random_statetest268.py +++ b/tests/ported_static/stRandom/test_random_statetest268.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest268Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest268( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest268.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest268( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000016f7466f0a0733d863263934063409442" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2360D94A, ) diff --git a/tests/ported_static/stRandom/test_random_statetest269.py b/tests/ported_static/stRandom/test_random_statetest269.py index 1bd356a4c89..54bbf23eb99 100644 --- a/tests/ported_static/stRandom/test_random_statetest269.py +++ b/tests/ported_static/stRandom/test_random_statetest269.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest269Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest269( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest269.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest269( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6676029968ffa27d04" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x49E002C2, ) diff --git a/tests/ported_static/stRandom/test_random_statetest27.py b/tests/ported_static/stRandom/test_random_statetest27.py index e8a29a8e786..b9d6f411280 100644 --- a/tests/ported_static/stRandom/test_random_statetest27.py +++ b/tests/ported_static/stRandom/test_random_statetest27.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest27Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest27( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest27.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest27( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000001000000000000000000000000000000000000000009" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x204D3E8E, ) diff --git a/tests/ported_static/stRandom/test_random_statetest276.py b/tests/ported_static/stRandom/test_random_statetest276.py index 40c9a6e56c9..6daf9f9e162 100644 --- a/tests/ported_static/stRandom/test_random_statetest276.py +++ b/tests/ported_static/stRandom/test_random_statetest276.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest276Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest276( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest276.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest276( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f4382349f7b370589141a31f39741a4f2" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3D3366FA, ) diff --git a/tests/ported_static/stRandom/test_random_statetest278.py b/tests/ported_static/stRandom/test_random_statetest278.py index d66b5664484..e0d9cbaea9c 100644 --- a/tests/ported_static/stRandom/test_random_statetest278.py +++ b/tests/ported_static/stRandom/test_random_statetest278.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest278Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest278( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest278.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest278( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000001377f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5E02EC7F, ) diff --git a/tests/ported_static/stRandom/test_random_statetest279.py b/tests/ported_static/stRandom/test_random_statetest279.py index 9ebcff5c884..38c7ad3949a 100644 --- a/tests/ported_static/stRandom/test_random_statetest279.py +++ b/tests/ported_static/stRandom/test_random_statetest279.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest279Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest279( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest279.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -95,7 +87,6 @@ def test_random_statetest279( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000010000000000000000000000000000000000000000947f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4E91B038, ) diff --git a/tests/ported_static/stRandom/test_random_statetest28.py b/tests/ported_static/stRandom/test_random_statetest28.py index 0454b3f339a..65770e55b95 100644 --- a/tests/ported_static/stRandom/test_random_statetest28.py +++ b/tests/ported_static/stRandom/test_random_statetest28.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest28Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest28( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest28.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest28( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff417f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f38129d68939a19a2697172926f6a673630" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x51AF41E7, ) diff --git a/tests/ported_static/stRandom/test_random_statetest280.py b/tests/ported_static/stRandom/test_random_statetest280.py index b0d276d3d1d..b1ba224f02c 100644 --- a/tests/ported_static/stRandom/test_random_statetest280.py +++ b/tests/ported_static/stRandom/test_random_statetest280.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest280Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest280( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest280.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -93,7 +85,6 @@ def test_random_statetest280( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000000143507f000000000000000000000000000000000000000000000000000000000000c350417f00000000000000000000000000000000000000000000000000000000000000006f423b3c407e7c6f16718668738d193cf2" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x303CDC5A, ) diff --git a/tests/ported_static/stRandom/test_random_statetest281.py b/tests/ported_static/stRandom/test_random_statetest281.py index acb3ffcc38f..a1b50ea385d 100644 --- a/tests/ported_static/stRandom/test_random_statetest281.py +++ b/tests/ported_static/stRandom/test_random_statetest281.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest281Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest281( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest281.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -93,7 +85,6 @@ def test_random_statetest281( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79457f000000000000000000000000000000000000000000000000000000000000c350417f00000000000000000000000000000000000000000000000000000000000000016f649a7a3457645670a27fa170639718a2" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x662E647C, ) diff --git a/tests/ported_static/stRandom/test_random_statetest283.py b/tests/ported_static/stRandom/test_random_statetest283.py index aee36b2148e..d68775daaad 100644 --- a/tests/ported_static/stRandom/test_random_statetest283.py +++ b/tests/ported_static/stRandom/test_random_statetest283.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest283Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest283( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest283.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -101,7 +93,6 @@ def test_random_statetest283( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000139" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5F83295F, ) diff --git a/tests/ported_static/stRandom/test_random_statetest29.py b/tests/ported_static/stRandom/test_random_statetest29.py index cdc40338649..82136472ece 100644 --- a/tests/ported_static/stRandom/test_random_statetest29.py +++ b/tests/ported_static/stRandom/test_random_statetest29.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest29Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest29( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest29.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest29( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff087fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x214AB1F3, ) diff --git a/tests/ported_static/stRandom/test_random_statetest290.py b/tests/ported_static/stRandom/test_random_statetest290.py index 5c2372d1a16..3a308777139 100644 --- a/tests/ported_static/stRandom/test_random_statetest290.py +++ b/tests/ported_static/stRandom/test_random_statetest290.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest290Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest290( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest290.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest290( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8309" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6D5253D6, ) diff --git a/tests/ported_static/stRandom/test_random_statetest297.py b/tests/ported_static/stRandom/test_random_statetest297.py index 47b9b555a73..13ce84df817 100644 --- a/tests/ported_static/stRandom/test_random_statetest297.py +++ b/tests/ported_static/stRandom/test_random_statetest297.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest297Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest297( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest297.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest297( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79437f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe426f91085661509214157d9c8a77758518" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7C61878A, ) diff --git a/tests/ported_static/stRandom/test_random_statetest298.py b/tests/ported_static/stRandom/test_random_statetest298.py index a6e343ab2f5..d2feafe31db 100644 --- a/tests/ported_static/stRandom/test_random_statetest298.py +++ b/tests/ported_static/stRandom/test_random_statetest298.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest298Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest298( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest298.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest298( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3500a6f7c542006528b69ff3a7a3a0401613c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7E0F660B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest299.py b/tests/ported_static/stRandom/test_random_statetest299.py index 1583f1bf72c..d897e342d9d 100644 --- a/tests/ported_static/stRandom/test_random_statetest299.py +++ b/tests/ported_static/stRandom/test_random_statetest299.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest299Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest299( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest299.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -104,7 +96,6 @@ def test_random_statetest299( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f540813697adf70f20906389d128bf0" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1A47B134, ) diff --git a/tests/ported_static/stRandom/test_random_statetest3.py b/tests/ported_static/stRandom/test_random_statetest3.py index 53632e80c19..7f548876e1d 100644 --- a/tests/ported_static/stRandom/test_random_statetest3.py +++ b/tests/ported_static/stRandom/test_random_statetest3.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest3Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest3( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest3.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -89,7 +81,6 @@ def test_random_statetest3( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe427f000000000000000000000000000000000000000000000000000000000000c35041" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5EAA223F, ) diff --git a/tests/ported_static/stRandom/test_random_statetest301.py b/tests/ported_static/stRandom/test_random_statetest301.py index 179ae4337a2..3de87c51f0e 100644 --- a/tests/ported_static/stRandom/test_random_statetest301.py +++ b/tests/ported_static/stRandom/test_random_statetest301.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest301Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest301( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest301.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest301( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000003784946a737aa092f1975664518a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1340F9CE, ) diff --git a/tests/ported_static/stRandom/test_random_statetest305.py b/tests/ported_static/stRandom/test_random_statetest305.py index cae2823329a..0502b11cc8c 100644 --- a/tests/ported_static/stRandom/test_random_statetest305.py +++ b/tests/ported_static/stRandom/test_random_statetest305.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest305Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest305( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest305.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest305( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000006f606e048240069c409313318736200b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xD00D79E, ) diff --git a/tests/ported_static/stRandom/test_random_statetest310.py b/tests/ported_static/stRandom/test_random_statetest310.py index f1bf7c47488..29af9f3952f 100644 --- a/tests/ported_static/stRandom/test_random_statetest310.py +++ b/tests/ported_static/stRandom/test_random_statetest310.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest310Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest310( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest310.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest310( data=Bytes( "44587fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff59907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1a37160b6a650645597c796e9c9795" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1B76ED9D, ) diff --git a/tests/ported_static/stRandom/test_random_statetest311.py b/tests/ported_static/stRandom/test_random_statetest311.py index 4b8c5b450b3..261c98d4d66 100644 --- a/tests/ported_static/stRandom/test_random_statetest311.py +++ b/tests/ported_static/stRandom/test_random_statetest311.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest311Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest311( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest311.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest311( data=Bytes( "447f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3506f13971264a1197d72ff18971902387b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5CD0515, ) diff --git a/tests/ported_static/stRandom/test_random_statetest315.py b/tests/ported_static/stRandom/test_random_statetest315.py index aec15d52e45..ec9cf4899b1 100644 --- a/tests/ported_static/stRandom/test_random_statetest315.py +++ b/tests/ported_static/stRandom/test_random_statetest315.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest315Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest315( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest315.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -103,7 +95,6 @@ def test_random_statetest315( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff067f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f98516a388683755669892b8b371957" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x13D8A45E, ) diff --git a/tests/ported_static/stRandom/test_random_statetest316.py b/tests/ported_static/stRandom/test_random_statetest316.py index c2d8d69d8d7..43f5ba20cf8 100644 --- a/tests/ported_static/stRandom/test_random_statetest316.py +++ b/tests/ported_static/stRandom/test_random_statetest316.py @@ -4,10 +4,8 @@ Ported from: state_tests/stRandom/randomStatetest316Filler.json -@manually-enhanced: Do not overwrite. `gas_limit` raised on Amsterdam -to cover EIP-8037 state-gas spill. Pre-EIP-8037 keeps the original -100 000. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -20,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -35,14 +32,8 @@ def test_random_statetest316( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest316.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -98,7 +89,6 @@ def test_random_statetest316( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3A0D0C77, ) diff --git a/tests/ported_static/stRandom/test_random_statetest318.py b/tests/ported_static/stRandom/test_random_statetest318.py index 6a493725f4d..86f6d74130e 100644 --- a/tests/ported_static/stRandom/test_random_statetest318.py +++ b/tests/ported_static/stRandom/test_random_statetest318.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest318Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest318( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest318.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest318( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c350457f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3506f8206a30a83887e5a3164667796308d" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x23F9C6F7, ) diff --git a/tests/ported_static/stRandom/test_random_statetest322.py b/tests/ported_static/stRandom/test_random_statetest322.py index f72ad9afd42..1d6052f0ddf 100644 --- a/tests/ported_static/stRandom/test_random_statetest322.py +++ b/tests/ported_static/stRandom/test_random_statetest322.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest322Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest322( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest322.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest322( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000427f000000000000000000000000000000000000000000000000000000000000c3506f1206060508840294304101a3128f34" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x312238E4, ) diff --git a/tests/ported_static/stRandom/test_random_statetest325.py b/tests/ported_static/stRandom/test_random_statetest325.py index 862b46b526c..0f3b869e9f5 100644 --- a/tests/ported_static/stRandom/test_random_statetest325.py +++ b/tests/ported_static/stRandom/test_random_statetest325.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest325Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest325( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest325.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -103,7 +95,6 @@ def test_random_statetest325( data=Bytes( "437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff427f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff427fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe810903" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1B449945, ) diff --git a/tests/ported_static/stRandom/test_random_statetest329.py b/tests/ported_static/stRandom/test_random_statetest329.py index c2bbd0aa10a..2f2a996b850 100644 --- a/tests/ported_static/stRandom/test_random_statetest329.py +++ b/tests/ported_static/stRandom/test_random_statetest329.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest329Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest329( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest329.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest329( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff426fa48d775458574133769c8b750207ff" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5B5A0B6C, ) diff --git a/tests/ported_static/stRandom/test_random_statetest332.py b/tests/ported_static/stRandom/test_random_statetest332.py index 93435882f34..359f5ec94fe 100644 --- a/tests/ported_static/stRandom/test_random_statetest332.py +++ b/tests/ported_static/stRandom/test_random_statetest332.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest332Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest332( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest332.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest332( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3506f7c098e7d625a64319d9e514bf35075" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x53D5155E, ) diff --git a/tests/ported_static/stRandom/test_random_statetest333.py b/tests/ported_static/stRandom/test_random_statetest333.py index eba776ceb9e..c1cdec7c3e3 100644 --- a/tests/ported_static/stRandom/test_random_statetest333.py +++ b/tests/ported_static/stRandom/test_random_statetest333.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest333Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest333( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest333.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest333( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f410263f305963310856c15ff5037a0" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3024B0A3, ) diff --git a/tests/ported_static/stRandom/test_random_statetest334.py b/tests/ported_static/stRandom/test_random_statetest334.py index a92922d48b9..eff987d6901 100644 --- a/tests/ported_static/stRandom/test_random_statetest334.py +++ b/tests/ported_static/stRandom/test_random_statetest334.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest334Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest334( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest334.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest334( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000013a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f424468208e181851308b7c7a776863a1" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x36993F17, ) diff --git a/tests/ported_static/stRandom/test_random_statetest339.py b/tests/ported_static/stRandom/test_random_statetest339.py index f3d6c565d4a..03298cb0b02 100644 --- a/tests/ported_static/stRandom/test_random_statetest339.py +++ b/tests/ported_static/stRandom/test_random_statetest339.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest339Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest339( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest339.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest339( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3506f89029e850708a293905668f1a367a2" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3F78C8AA, ) diff --git a/tests/ported_static/stRandom/test_random_statetest342.py b/tests/ported_static/stRandom/test_random_statetest342.py index da98d14951f..64c069f6492 100644 --- a/tests/ported_static/stRandom/test_random_statetest342.py +++ b/tests/ported_static/stRandom/test_random_statetest342.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest342Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest342( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest342.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest342( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000000041147fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f36314297399455797b42569e8f0556" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6312A8C4, ) diff --git a/tests/ported_static/stRandom/test_random_statetest348.py b/tests/ported_static/stRandom/test_random_statetest348.py index bfe57ee9531..b85dff30f6e 100644 --- a/tests/ported_static/stRandom/test_random_statetest348.py +++ b/tests/ported_static/stRandom/test_random_statetest348.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest348Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest348( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest348.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest348( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000142186f18208119191509036365739735608a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4F3B26DA, ) diff --git a/tests/ported_static/stRandom/test_random_statetest351.py b/tests/ported_static/stRandom/test_random_statetest351.py index 7880da18abb..908ad3b152b 100644 --- a/tests/ported_static/stRandom/test_random_statetest351.py +++ b/tests/ported_static/stRandom/test_random_statetest351.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest351Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest351( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest351.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -88,7 +80,6 @@ def test_random_statetest351( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0509355534707785320175fca414" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x486E44AE, ) diff --git a/tests/ported_static/stRandom/test_random_statetest354.py b/tests/ported_static/stRandom/test_random_statetest354.py index 15b13f2b299..395c910e028 100644 --- a/tests/ported_static/stRandom/test_random_statetest354.py +++ b/tests/ported_static/stRandom/test_random_statetest354.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest354Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest354( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest354.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -109,7 +101,6 @@ def test_random_statetest354( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c350603b35641a8e739f86980a4337" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x24AAAAF6, ) diff --git a/tests/ported_static/stRandom/test_random_statetest356.py b/tests/ported_static/stRandom/test_random_statetest356.py index 693aef48fd3..0a3f66001d0 100644 --- a/tests/ported_static/stRandom/test_random_statetest356.py +++ b/tests/ported_static/stRandom/test_random_statetest356.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest356Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest356( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest356.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest356( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79827f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe04" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4F386503, ) diff --git a/tests/ported_static/stRandom/test_random_statetest358.py b/tests/ported_static/stRandom/test_random_statetest358.py index daf1478c698..da3ed15c7ef 100644 --- a/tests/ported_static/stRandom/test_random_statetest358.py +++ b/tests/ported_static/stRandom/test_random_statetest358.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest358Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest358( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest358.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest358( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79417fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff437f000000000000000000000000000000000000000000000000000000000000c3506f679b82a092078f136b5541888c057a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x252F4B99, ) diff --git a/tests/ported_static/stRandom/test_random_statetest360.py b/tests/ported_static/stRandom/test_random_statetest360.py index 4b13e9e687a..af779dae142 100644 --- a/tests/ported_static/stRandom/test_random_statetest360.py +++ b/tests/ported_static/stRandom/test_random_statetest360.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest360Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest360( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest360.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest360( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000016f0441548af30803135562840563829c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3B167C0B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest361.py b/tests/ported_static/stRandom/test_random_statetest361.py index 23c0c82de85..475da58cf1f 100644 --- a/tests/ported_static/stRandom/test_random_statetest361.py +++ b/tests/ported_static/stRandom/test_random_statetest361.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest361Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest361( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest361.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest361( data=Bytes( "41417ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff066f9e9092673a8f430b6ba11520901816" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x74BA18BD, ) diff --git a/tests/ported_static/stRandom/test_random_statetest362.py b/tests/ported_static/stRandom/test_random_statetest362.py index 07b7cb05555..88694b0a270 100644 --- a/tests/ported_static/stRandom/test_random_statetest362.py +++ b/tests/ported_static/stRandom/test_random_statetest362.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest362Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest362( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest362.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -100,7 +92,6 @@ def test_random_statetest362( data=Bytes( "7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b509" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x31025CBA, ) diff --git a/tests/ported_static/stRandom/test_random_statetest363.py b/tests/ported_static/stRandom/test_random_statetest363.py index 64e32ba7846..a34ee24f613 100644 --- a/tests/ported_static/stRandom/test_random_statetest363.py +++ b/tests/ported_static/stRandom/test_random_statetest363.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest363Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest363( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest363.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -103,7 +95,6 @@ def test_random_statetest363( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c350117ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f7b20937d953695f369719f9a447905" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4C18B65E, ) diff --git a/tests/ported_static/stRandom/test_random_statetest364.py b/tests/ported_static/stRandom/test_random_statetest364.py index 5eb7a370885..86a27a55c40 100644 --- a/tests/ported_static/stRandom/test_random_statetest364.py +++ b/tests/ported_static/stRandom/test_random_statetest364.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest364Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest364( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest364.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest364( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c350076f7332988d746694918859185920446d" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x25908FA1, ) diff --git a/tests/ported_static/stRandom/test_random_statetest365.py b/tests/ported_static/stRandom/test_random_statetest365.py index eaeb4040bcf..b9d4d6f4a05 100644 --- a/tests/ported_static/stRandom/test_random_statetest365.py +++ b/tests/ported_static/stRandom/test_random_statetest365.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest365Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest365( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest365.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -103,7 +95,6 @@ def test_random_statetest365( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff42417f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000000000000000000000000000000000000000000000143b42078537" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x48ACB162, ) diff --git a/tests/ported_static/stRandom/test_random_statetest366.py b/tests/ported_static/stRandom/test_random_statetest366.py index 6846a0c5772..22ad109b53b 100644 --- a/tests/ported_static/stRandom/test_random_statetest366.py +++ b/tests/ported_static/stRandom/test_random_statetest366.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest366Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest366( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest366.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest366( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff446f516f0395f57433725580758f32f194" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7D527F3C, ) diff --git a/tests/ported_static/stRandom/test_random_statetest367.py b/tests/ported_static/stRandom/test_random_statetest367.py index d5c56cd839f..bafc8331c25 100644 --- a/tests/ported_static/stRandom/test_random_statetest367.py +++ b/tests/ported_static/stRandom/test_random_statetest367.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest367Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest367( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest367.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -104,7 +96,6 @@ def test_random_statetest367( data=Bytes( "7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000447f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5447f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b51905810a6c7a5959339f3342838b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2BC3D730, ) diff --git a/tests/ported_static/stRandom/test_random_statetest369.py b/tests/ported_static/stRandom/test_random_statetest369.py index 112d60404dc..23c318bec82 100644 --- a/tests/ported_static/stRandom/test_random_statetest369.py +++ b/tests/ported_static/stRandom/test_random_statetest369.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest369Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest369( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest369.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest369( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff437f0000000000000000000000010000000000000000000000000000000000000000" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1C20856A, ) diff --git a/tests/ported_static/stRandom/test_random_statetest37.py b/tests/ported_static/stRandom/test_random_statetest37.py index 0762ac0083f..99afe8c0be8 100644 --- a/tests/ported_static/stRandom/test_random_statetest37.py +++ b/tests/ported_static/stRandom/test_random_statetest37.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest37Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest37( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest37.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest37( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000016fa49835863514f0f29b930b97f11693" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x76C6A52D, ) diff --git a/tests/ported_static/stRandom/test_random_statetest372.py b/tests/ported_static/stRandom/test_random_statetest372.py index 6d5dda1765b..d564e6f2501 100644 --- a/tests/ported_static/stRandom/test_random_statetest372.py +++ b/tests/ported_static/stRandom/test_random_statetest372.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest372Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest372( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest372.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -102,7 +94,6 @@ def test_random_statetest372( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f00000000000000000000000000000000000000000000000000000000000000011808" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6D4BEA09, ) diff --git a/tests/ported_static/stRandom/test_random_statetest380.py b/tests/ported_static/stRandom/test_random_statetest380.py index 7d6630e53a3..8dfb4fdd8cd 100644 --- a/tests/ported_static/stRandom/test_random_statetest380.py +++ b/tests/ported_static/stRandom/test_random_statetest380.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest380Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest380( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest380.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest380( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f967737653485593c63408b39943975" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x25771D96, ) diff --git a/tests/ported_static/stRandom/test_random_statetest381.py b/tests/ported_static/stRandom/test_random_statetest381.py index a2cfc8f33af..7e080c082a1 100644 --- a/tests/ported_static/stRandom/test_random_statetest381.py +++ b/tests/ported_static/stRandom/test_random_statetest381.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest381Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest381( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest381.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest381( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff417f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f098ba088881a64904570927a861835" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2D1A0F83, ) diff --git a/tests/ported_static/stRandom/test_random_statetest382.py b/tests/ported_static/stRandom/test_random_statetest382.py index 2b564b3e7f7..a78f6d6b980 100644 --- a/tests/ported_static/stRandom/test_random_statetest382.py +++ b/tests/ported_static/stRandom/test_random_statetest382.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest382Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest382( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest382.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest382( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x34AE0BF4, ) diff --git a/tests/ported_static/stRandom/test_random_statetest383.py b/tests/ported_static/stRandom/test_random_statetest383.py index 1b1dfe3d6a5..38877cf35a0 100644 --- a/tests/ported_static/stRandom/test_random_statetest383.py +++ b/tests/ported_static/stRandom/test_random_statetest383.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest383Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest383( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest383.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -88,7 +80,6 @@ def test_random_statetest383( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09150255436c75107e" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6379C077, ) diff --git a/tests/ported_static/stRandom/test_random_statetest41.py b/tests/ported_static/stRandom/test_random_statetest41.py index 7546db6b4f4..9a8a7b7ff78 100644 --- a/tests/ported_static/stRandom/test_random_statetest41.py +++ b/tests/ported_static/stRandom/test_random_statetest41.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest41Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest41( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest41.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -98,7 +90,6 @@ def test_random_statetest41( data=Bytes( "7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c350517f0000000000000000000000010000000000000000000000000000000000000000417f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b56a84a10719a1786a6510349b0282" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4ADE804, ) diff --git a/tests/ported_static/stRandom/test_random_statetest47.py b/tests/ported_static/stRandom/test_random_statetest47.py index 75436ccf17b..4814873fe6f 100644 --- a/tests/ported_static/stRandom/test_random_statetest47.py +++ b/tests/ported_static/stRandom/test_random_statetest47.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest47Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest47( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest47.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest47( data=Bytes( "437f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c350437f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f1544898b167c6a6f6d5b953714457e" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x77A1A475, ) diff --git a/tests/ported_static/stRandom/test_random_statetest49.py b/tests/ported_static/stRandom/test_random_statetest49.py index 80ee0fecba0..e84eb9a653c 100644 --- a/tests/ported_static/stRandom/test_random_statetest49.py +++ b/tests/ported_static/stRandom/test_random_statetest49.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest49Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest49( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest49.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -93,7 +85,6 @@ def test_random_statetest49( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000010000000000000000000000000000000000000000807f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e7961859c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x69D65F4B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest52.py b/tests/ported_static/stRandom/test_random_statetest52.py index 92da6f37c3a..2771aa5b195 100644 --- a/tests/ported_static/stRandom/test_random_statetest52.py +++ b/tests/ported_static/stRandom/test_random_statetest52.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest52Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest52( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest52.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest52( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe410a81437f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000006f59a130a10a189fc653057a185b886c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x27CBF98C, ) diff --git a/tests/ported_static/stRandom/test_random_statetest58.py b/tests/ported_static/stRandom/test_random_statetest58.py index 7f6faa8aedf..e8121e89950 100644 --- a/tests/ported_static/stRandom/test_random_statetest58.py +++ b/tests/ported_static/stRandom/test_random_statetest58.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest58Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest58( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest58.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -105,7 +97,6 @@ def test_random_statetest58( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe417fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c350367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe096902947d567838719e97f301" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1F00EC9E, ) diff --git a/tests/ported_static/stRandom/test_random_statetest59.py b/tests/ported_static/stRandom/test_random_statetest59.py index b5d3df091a1..d78ba76facb 100644 --- a/tests/ported_static/stRandom/test_random_statetest59.py +++ b/tests/ported_static/stRandom/test_random_statetest59.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest59Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest59( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest59.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -104,7 +96,6 @@ def test_random_statetest59( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0208673a06756406548b99" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2591EEF6, ) diff --git a/tests/ported_static/stRandom/test_random_statetest6.py b/tests/ported_static/stRandom/test_random_statetest6.py index 7a203fab94e..96251ae835d 100644 --- a/tests/ported_static/stRandom/test_random_statetest6.py +++ b/tests/ported_static/stRandom/test_random_statetest6.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest6Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest6( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest6.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest6( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e794143416f1732797105f237768fe506871ac853" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3227D64E, ) diff --git a/tests/ported_static/stRandom/test_random_statetest60.py b/tests/ported_static/stRandom/test_random_statetest60.py index 55d243e4ef6..a044d0fc654 100644 --- a/tests/ported_static/stRandom/test_random_statetest60.py +++ b/tests/ported_static/stRandom/test_random_statetest60.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest60Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest60( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest60.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest60( data=Bytes( "427f0000000000000000000000000000000000000000000000000000000000000000427f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff437f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f969001091aa15b8b9b75459d015a04" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x54DE1EAF, ) diff --git a/tests/ported_static/stRandom/test_random_statetest62.py b/tests/ported_static/stRandom/test_random_statetest62.py index 46dae90ae4a..7118251bf4c 100644 --- a/tests/ported_static/stRandom/test_random_statetest62.py +++ b/tests/ported_static/stRandom/test_random_statetest62.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest62Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest62( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest62.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest62( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff437f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000016f7268713013964a96ac575804332501" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x493FBF98, ) diff --git a/tests/ported_static/stRandom/test_random_statetest63.py b/tests/ported_static/stRandom/test_random_statetest63.py index b8752371d61..909326d4fd3 100644 --- a/tests/ported_static/stRandom/test_random_statetest63.py +++ b/tests/ported_static/stRandom/test_random_statetest63.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest63Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest63( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest63.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest63( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000006f977f157e088003767a86928e825296" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x31B19D43, ) diff --git a/tests/ported_static/stRandom/test_random_statetest66.py b/tests/ported_static/stRandom/test_random_statetest66.py index b1ac9c6c177..c91cee9a922 100644 --- a/tests/ported_static/stRandom/test_random_statetest66.py +++ b/tests/ported_static/stRandom/test_random_statetest66.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest66Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest66( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest66.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -99,7 +91,6 @@ def test_random_statetest66( data=Bytes( "457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff417fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe097f0000000000000000000000010000000000000000000000000000000000000000" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2F5660CE, ) diff --git a/tests/ported_static/stRandom/test_random_statetest67.py b/tests/ported_static/stRandom/test_random_statetest67.py index 0ea82c5570b..a9f19ef5f70 100644 --- a/tests/ported_static/stRandom/test_random_statetest67.py +++ b/tests/ported_static/stRandom/test_random_statetest67.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest67Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest67( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest67.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest67( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000016f699776659a06a27607a2166d537331" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7DF32855, ) diff --git a/tests/ported_static/stRandom/test_random_statetest69.py b/tests/ported_static/stRandom/test_random_statetest69.py index 58b0b1b4d2f..ba16b5b1d72 100644 --- a/tests/ported_static/stRandom/test_random_statetest69.py +++ b/tests/ported_static/stRandom/test_random_statetest69.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest69Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest69( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest69.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest69( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe43596f15a0770a7676611a6595057b768b64" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2F6C315B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest73.py b/tests/ported_static/stRandom/test_random_statetest73.py index cbe0f4f7fdd..a95db38a899 100644 --- a/tests/ported_static/stRandom/test_random_statetest73.py +++ b/tests/ported_static/stRandom/test_random_statetest73.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest73Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest73( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest73.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -97,7 +89,6 @@ def test_random_statetest73( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57e7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5b573198d729b711671056e0a0555346138" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x505D427, ) diff --git a/tests/ported_static/stRandom/test_random_statetest74.py b/tests/ported_static/stRandom/test_random_statetest74.py index 9444931dbdc..a0a31459b1e 100644 --- a/tests/ported_static/stRandom/test_random_statetest74.py +++ b/tests/ported_static/stRandom/test_random_statetest74.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest74Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest74( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest74.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest74( data=Bytes( "427ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff3a7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000006f141097788a7b5a72139c07076f1842" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x48E72790, ) diff --git a/tests/ported_static/stRandom/test_random_statetest75.py b/tests/ported_static/stRandom/test_random_statetest75.py index 8001c8457a5..85f2352d2ab 100644 --- a/tests/ported_static/stRandom/test_random_statetest75.py +++ b/tests/ported_static/stRandom/test_random_statetest75.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest75Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest75( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest75.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest75( data=Bytes( "457ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000006f5893504553386c7d15400177928776" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xABD0738, ) diff --git a/tests/ported_static/stRandom/test_random_statetest77.py b/tests/ported_static/stRandom/test_random_statetest77.py index 0b8eb36b733..9be12420794 100644 --- a/tests/ported_static/stRandom/test_random_statetest77.py +++ b/tests/ported_static/stRandom/test_random_statetest77.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest77Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest77( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest77.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest77( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000141937f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000006f79a06df1a08d05373216d372190341" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4A760CDB, ) diff --git a/tests/ported_static/stRandom/test_random_statetest80.py b/tests/ported_static/stRandom/test_random_statetest80.py index 1a4602a5d18..e0543031205 100644 --- a/tests/ported_static/stRandom/test_random_statetest80.py +++ b/tests/ported_static/stRandom/test_random_statetest80.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest80Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest80( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest80.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -99,7 +91,6 @@ def test_random_statetest80( data=Bytes( "7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f0000000000000000000000010000000000000000000000000000000000000000117fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7e7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5681069127b3b9c877d6f6169ff36" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1ED9A5B6, ) diff --git a/tests/ported_static/stRandom/test_random_statetest81.py b/tests/ported_static/stRandom/test_random_statetest81.py index 7f18d30496c..f4ef9c0a9c5 100644 --- a/tests/ported_static/stRandom/test_random_statetest81.py +++ b/tests/ported_static/stRandom/test_random_statetest81.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest81Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest81( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest81.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest81( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe437f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff436f616c327e0435743c515b078453a03c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x358AB2E1, ) diff --git a/tests/ported_static/stRandom/test_random_statetest83.py b/tests/ported_static/stRandom/test_random_statetest83.py index 045fc17a702..21b6e751ecb 100644 --- a/tests/ported_static/stRandom/test_random_statetest83.py +++ b/tests/ported_static/stRandom/test_random_statetest83.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest83Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest83( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest83.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest83( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff427f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6fa1109af20740728e72150a7a9c0959" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3C81798C, ) diff --git a/tests/ported_static/stRandom/test_random_statetest85.py b/tests/ported_static/stRandom/test_random_statetest85.py index d92db0d8f99..e62f281618d 100644 --- a/tests/ported_static/stRandom/test_random_statetest85.py +++ b/tests/ported_static/stRandom/test_random_statetest85.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest85Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest85( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest85.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -83,7 +75,6 @@ def test_random_statetest85( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c350f25b557e348ff374819d123109539b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3B46EEB1, ) diff --git a/tests/ported_static/stRandom/test_random_statetest87.py b/tests/ported_static/stRandom/test_random_statetest87.py index 18c8d7e6a0b..e76829d6ccc 100644 --- a/tests/ported_static/stRandom/test_random_statetest87.py +++ b/tests/ported_static/stRandom/test_random_statetest87.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest87Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest87( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest87.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest87( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000005b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f446e638e7e16736c030393727d748174" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7B1E5DC9, ) diff --git a/tests/ported_static/stRandom/test_random_statetest88.py b/tests/ported_static/stRandom/test_random_statetest88.py index d9bb7b3c472..049041d3053 100644 --- a/tests/ported_static/stRandom/test_random_statetest88.py +++ b/tests/ported_static/stRandom/test_random_statetest88.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest88Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest88( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest88.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest88( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e794343537f000000000000000000000000000000000000000000000000000000000000c350117fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000016f34f06a7014541167033909103620f3" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3E996CB5, ) diff --git a/tests/ported_static/stRandom/test_random_statetest89.py b/tests/ported_static/stRandom/test_random_statetest89.py index 84c8b823240..2d8d728dd32 100644 --- a/tests/ported_static/stRandom/test_random_statetest89.py +++ b/tests/ported_static/stRandom/test_random_statetest89.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest89Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest89( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest89.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -93,7 +85,6 @@ def test_random_statetest89( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000016f05648ce0ad106b7a6f3483379e62876b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x41032F3B, ) diff --git a/tests/ported_static/stRandom/test_random_statetest9.py b/tests/ported_static/stRandom/test_random_statetest9.py index fc4d799e62e..27f02d61230 100644 --- a/tests/ported_static/stRandom/test_random_statetest9.py +++ b/tests/ported_static/stRandom/test_random_statetest9.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest9Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest9( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest9.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest9( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000016f757fb845405bf1ff959ba03a9c336b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xCEFB419, ) diff --git a/tests/ported_static/stRandom/test_random_statetest90.py b/tests/ported_static/stRandom/test_random_statetest90.py index d13636db170..0d18aa16693 100644 --- a/tests/ported_static/stRandom/test_random_statetest90.py +++ b/tests/ported_static/stRandom/test_random_statetest90.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest90Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest90( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest90.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest90( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff45157f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000016f116b4177f25178d7048212877e9568" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xA10954E, ) diff --git a/tests/ported_static/stRandom/test_random_statetest92.py b/tests/ported_static/stRandom/test_random_statetest92.py index 2307d7542f7..725dc8078d8 100644 --- a/tests/ported_static/stRandom/test_random_statetest92.py +++ b/tests/ported_static/stRandom/test_random_statetest92.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest92Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest92( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest92.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest92( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000006f59640c655956799087168f0658a11a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1C23D3BC, ) diff --git a/tests/ported_static/stRandom/test_random_statetest95.py b/tests/ported_static/stRandom/test_random_statetest95.py index 0ad602c99f9..466b79bee04 100644 --- a/tests/ported_static/stRandom/test_random_statetest95.py +++ b/tests/ported_static/stRandom/test_random_statetest95.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest95Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest95( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest95.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest95( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff14447ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7E83FA74, ) diff --git a/tests/ported_static/stRandom/test_random_statetest96.py b/tests/ported_static/stRandom/test_random_statetest96.py index 779a04aad03..728a5d88843 100644 --- a/tests/ported_static/stRandom/test_random_statetest96.py +++ b/tests/ported_static/stRandom/test_random_statetest96.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom/randomStatetest96Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest96( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest96.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest96( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006f183b68a09b08953085a854a39d9212" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4A4D8FC4, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest.py b/tests/ported_static/stRandom2/test_random_statetest.py index 27df3124391..381d9b5ad72 100644 --- a/tests/ported_static/stRandom2/test_random_statetest.py +++ b/tests/ported_static/stRandom2/test_random_statetest.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetestFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f29199c9aa4054170f1a15a55056f96" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xF08F864, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest384.py b/tests/ported_static/stRandom2/test_random_statetest384.py index b7ff2acd9a5..a15bee09275 100644 --- a/tests/ported_static/stRandom2/test_random_statetest384.py +++ b/tests/ported_static/stRandom2/test_random_statetest384.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest384Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest384( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest384.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest384( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f16133502727c0a7f679b456df0935763" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7B2BD74C, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest385.py b/tests/ported_static/stRandom2/test_random_statetest385.py index fbf8c5b914c..ff18d79504f 100644 --- a/tests/ported_static/stRandom2/test_random_statetest385.py +++ b/tests/ported_static/stRandom2/test_random_statetest385.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest385Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest385( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest385.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest385( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79547f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f785188182063156955631a7a85093a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2DCC90D2, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest386.py b/tests/ported_static/stRandom2/test_random_statetest386.py index 96cfc99e246..89ee427dc65 100644 --- a/tests/ported_static/stRandom2/test_random_statetest386.py +++ b/tests/ported_static/stRandom2/test_random_statetest386.py @@ -4,10 +4,8 @@ Ported from: state_tests/stRandom2/randomStatetest386Filler.json -@manually-enhanced: Do not overwrite. `gas_limit` raised on Amsterdam -to cover EIP-8037 state-gas spill. Pre-EIP-8037 keeps the original -100 000. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -20,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -35,14 +32,8 @@ def test_random_statetest386( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest386.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -103,7 +94,6 @@ def test_random_statetest386( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff047f000000000000000000000000000000000000000000000000000000000000000105133641010b8111" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x19D7AC44, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest388.py b/tests/ported_static/stRandom2/test_random_statetest388.py index e799d490153..b32661ac43a 100644 --- a/tests/ported_static/stRandom2/test_random_statetest388.py +++ b/tests/ported_static/stRandom2/test_random_statetest388.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest388Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest388( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest388.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -98,7 +90,6 @@ def test_random_statetest388( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7e7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5765b8f743b9979a0905b6a189165" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x460B9F39, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest389.py b/tests/ported_static/stRandom2/test_random_statetest389.py index 8cfacc2758c..07dd743fdb5 100644 --- a/tests/ported_static/stRandom2/test_random_statetest389.py +++ b/tests/ported_static/stRandom2/test_random_statetest389.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest389Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest389( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest389.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -99,7 +91,6 @@ def test_random_statetest389( data=Bytes( "457ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000427f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3503a863854581237" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5BF15D9B, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest395.py b/tests/ported_static/stRandom2/test_random_statetest395.py index d3d5c53b250..6de0e56a9e4 100644 --- a/tests/ported_static/stRandom2/test_random_statetest395.py +++ b/tests/ported_static/stRandom2/test_random_statetest395.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest395Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest395( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest395.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest395( data=Bytes( "447f0000000000000000000000000000000000000000000000000000000000000001417f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f823140710bf13990e4500136726d8b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5A9C61EF, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest398.py b/tests/ported_static/stRandom2/test_random_statetest398.py index fbe759a2324..94fcf445373 100644 --- a/tests/ported_static/stRandom2/test_random_statetest398.py +++ b/tests/ported_static/stRandom2/test_random_statetest398.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest398Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest398( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest398.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest398( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f3781413b695a69079d7f5105829207" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x69A26DE, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest399.py b/tests/ported_static/stRandom2/test_random_statetest399.py index e8ba5a4ee29..918db55c7b8 100644 --- a/tests/ported_static/stRandom2/test_random_statetest399.py +++ b/tests/ported_static/stRandom2/test_random_statetest399.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest399Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest399( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest399.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest399( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe4544437f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f98324016076d428a9898129b16849a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2099AF7A, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest402.py b/tests/ported_static/stRandom2/test_random_statetest402.py index 528f4373389..7fd4f296c4b 100644 --- a/tests/ported_static/stRandom2/test_random_statetest402.py +++ b/tests/ported_static/stRandom2/test_random_statetest402.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest402Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest402( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest402.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest402( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff437f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000006f62138c87028162ea32a2db7e301004" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x37EBC742, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest405.py b/tests/ported_static/stRandom2/test_random_statetest405.py index f3592725b1a..596add3df18 100644 --- a/tests/ported_static/stRandom2/test_random_statetest405.py +++ b/tests/ported_static/stRandom2/test_random_statetest405.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest405Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest405( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest405.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest405( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff44457f0000000000000000000000010000000000000000000000000000000000000000037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f318d0707977199361171756f6d458e" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x10596FAF, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest407.py b/tests/ported_static/stRandom2/test_random_statetest407.py index b113779f4af..627a88bc89a 100644 --- a/tests/ported_static/stRandom2/test_random_statetest407.py +++ b/tests/ported_static/stRandom2/test_random_statetest407.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest407Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest407( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest407.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest407( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff437ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c350437f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f6d71656f054471181163037902615b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x313547F8, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest408.py b/tests/ported_static/stRandom2/test_random_statetest408.py index 7551ed6d5d4..e8bbf2f0955 100644 --- a/tests/ported_static/stRandom2/test_random_statetest408.py +++ b/tests/ported_static/stRandom2/test_random_statetest408.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest408Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest408( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest408.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest408( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe447f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f80656e8e6478946a323482135a8bf7" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x63AD417F, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest411.py b/tests/ported_static/stRandom2/test_random_statetest411.py index 179bb190c71..b902a71e74f 100644 --- a/tests/ported_static/stRandom2/test_random_statetest411.py +++ b/tests/ported_static/stRandom2/test_random_statetest411.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest411Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest411( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest411.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest411( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000006f44a17892738b6895619d7a93507d649d" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7E5B1276, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest412.py b/tests/ported_static/stRandom2/test_random_statetest412.py index 7460990cfe2..9fa348b42f2 100644 --- a/tests/ported_static/stRandom2/test_random_statetest412.py +++ b/tests/ported_static/stRandom2/test_random_statetest412.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest412Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest412( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest412.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest412( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6fa46ef06a5a858b9742198a37e1153c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x75CF6AD, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest413.py b/tests/ported_static/stRandom2/test_random_statetest413.py index ddf970571ae..6fb74ab95d7 100644 --- a/tests/ported_static/stRandom2/test_random_statetest413.py +++ b/tests/ported_static/stRandom2/test_random_statetest413.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest413Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest413( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest413.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest413( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000010000000000000000000000000000000000000000817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe037f00000000000000000000000000000000000000000000000000000000000000016f086e2055149345ad1a018b06370814" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x47E29C11, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest416.py b/tests/ported_static/stRandom2/test_random_statetest416.py index f9b9ba9332b..b588430660e 100644 --- a/tests/ported_static/stRandom2/test_random_statetest416.py +++ b/tests/ported_static/stRandom2/test_random_statetest416.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest416Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest416( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest416.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -90,7 +82,6 @@ def test_random_statetest416( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff427f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e7943" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4F622410, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest419.py b/tests/ported_static/stRandom2/test_random_statetest419.py index 8af9b0c54fc..58c21dcc75b 100644 --- a/tests/ported_static/stRandom2/test_random_statetest419.py +++ b/tests/ported_static/stRandom2/test_random_statetest419.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest419Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest419( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest419.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -104,7 +96,6 @@ def test_random_statetest419( data=Bytes( "437ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000000000000000000000000000000000000000000001417ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f73095b7ee211595a6b80a311900a78" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6A4CEBB4, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest421.py b/tests/ported_static/stRandom2/test_random_statetest421.py index f784c829ac2..790b2f8d4b0 100644 --- a/tests/ported_static/stRandom2/test_random_statetest421.py +++ b/tests/ported_static/stRandom2/test_random_statetest421.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest421Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest421( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest421.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest421( data=Bytes( "437f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f38454051968ff184a47d500912319717" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x52D1555F, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest424.py b/tests/ported_static/stRandom2/test_random_statetest424.py index 5a4b1706b07..05bc62eef22 100644 --- a/tests/ported_static/stRandom2/test_random_statetest424.py +++ b/tests/ported_static/stRandom2/test_random_statetest424.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest424Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest424( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest424.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest424( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79437f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000000000000000000000000000000000000000000000436f18116552626186825096665471140a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4BCD2F4F, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest425.py b/tests/ported_static/stRandom2/test_random_statetest425.py index 8f26fba2f5d..c3a2dcececb 100644 --- a/tests/ported_static/stRandom2/test_random_statetest425.py +++ b/tests/ported_static/stRandom2/test_random_statetest425.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest425Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest425( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest425.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -93,7 +85,6 @@ def test_random_statetest425( data=Bytes( "7f0000000000000000000000010000000000000000000000000000000000000000417f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f885707818b889a89975552f0128442" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x22371A75, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest426.py b/tests/ported_static/stRandom2/test_random_statetest426.py index 7977467a6a5..8d4b20e457c 100644 --- a/tests/ported_static/stRandom2/test_random_statetest426.py +++ b/tests/ported_static/stRandom2/test_random_statetest426.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest426Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest426( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest426.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest426( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79417ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000006f456d1687795a95938b0139976099f0" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x613B33CA, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest429.py b/tests/ported_static/stRandom2/test_random_statetest429.py index 60a9e50233b..42b725735e5 100644 --- a/tests/ported_static/stRandom2/test_random_statetest429.py +++ b/tests/ported_static/stRandom2/test_random_statetest429.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest429Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest429( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest429.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest429( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79417ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f98121f388786729087773476331366" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5430ADAF, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest430.py b/tests/ported_static/stRandom2/test_random_statetest430.py index f99d9695f69..297234d6cd3 100644 --- a/tests/ported_static/stRandom2/test_random_statetest430.py +++ b/tests/ported_static/stRandom2/test_random_statetest430.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest430Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest430( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest430.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest430( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe427f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000006f7d41a29934035b748e96a3135b6964" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6BF5E61F, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest436.py b/tests/ported_static/stRandom2/test_random_statetest436.py index 586314ec15a..7cd00de6e08 100644 --- a/tests/ported_static/stRandom2/test_random_statetest436.py +++ b/tests/ported_static/stRandom2/test_random_statetest436.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest436Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest436( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest436.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest436( data=Bytes( "367f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff417fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79456f8108067a345b7a76a20a835a0a0b6c10" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x57454F1E, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest438.py b/tests/ported_static/stRandom2/test_random_statetest438.py index 0ce4a0ac366..88693e737f9 100644 --- a/tests/ported_static/stRandom2/test_random_statetest438.py +++ b/tests/ported_static/stRandom2/test_random_statetest438.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest438Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest438( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest438.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -95,7 +87,6 @@ def test_random_statetest438( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff097fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3FDE3BBC, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest439.py b/tests/ported_static/stRandom2/test_random_statetest439.py index 69e9b00d114..bee9883581b 100644 --- a/tests/ported_static/stRandom2/test_random_statetest439.py +++ b/tests/ported_static/stRandom2/test_random_statetest439.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest439Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest439( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest439.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest439( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f5b1609653438813340097c53a49316" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x17BA0353, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest440.py b/tests/ported_static/stRandom2/test_random_statetest440.py index ba3114d0f37..5e88688f97a 100644 --- a/tests/ported_static/stRandom2/test_random_statetest440.py +++ b/tests/ported_static/stRandom2/test_random_statetest440.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest440Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest440( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest440.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest440( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e7945457f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff416f01513a9b8216816f74f3676e9ea261" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4A3FD736, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest446.py b/tests/ported_static/stRandom2/test_random_statetest446.py index fdcddb6bd89..47dd0efba21 100644 --- a/tests/ported_static/stRandom2/test_random_statetest446.py +++ b/tests/ported_static/stRandom2/test_random_statetest446.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest446Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest446( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest446.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest446( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x872ECB9, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest447.py b/tests/ported_static/stRandom2/test_random_statetest447.py index 5d05d1aeecb..07bb8f1538a 100644 --- a/tests/ported_static/stRandom2/test_random_statetest447.py +++ b/tests/ported_static/stRandom2/test_random_statetest447.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest447Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest447( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest447.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -103,7 +95,6 @@ def test_random_statetest447( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe437f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1569EBA8, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest450.py b/tests/ported_static/stRandom2/test_random_statetest450.py index 50d97a3609d..8df96136097 100644 --- a/tests/ported_static/stRandom2/test_random_statetest450.py +++ b/tests/ported_static/stRandom2/test_random_statetest450.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest450Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest450( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest450.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A764000000) @@ -97,7 +89,6 @@ def test_random_statetest450( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000010000000000000000000000000000000000000000033a80" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x50F09196, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest451.py b/tests/ported_static/stRandom2/test_random_statetest451.py index 4b29183b8e3..5798c77f990 100644 --- a/tests/ported_static/stRandom2/test_random_statetest451.py +++ b/tests/ported_static/stRandom2/test_random_statetest451.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest451Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest451( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest451.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest451( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000006fed05989a0659453076573a87041174" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x306CA21A, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest452.py b/tests/ported_static/stRandom2/test_random_statetest452.py index bab4ce182c0..6525cf7d1f4 100644 --- a/tests/ported_static/stRandom2/test_random_statetest452.py +++ b/tests/ported_static/stRandom2/test_random_statetest452.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest452Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest452( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest452.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest452( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f0a3289746806163630047dff983105" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x58F77982, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest455.py b/tests/ported_static/stRandom2/test_random_statetest455.py index e6cf5829f17..8dda27e9af2 100644 --- a/tests/ported_static/stRandom2/test_random_statetest455.py +++ b/tests/ported_static/stRandom2/test_random_statetest455.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest455Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest455( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest455.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest455( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f858b1411f218693ca2245b918274f3" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2BF8F04F, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest457.py b/tests/ported_static/stRandom2/test_random_statetest457.py index ca20ff7a1c8..a52bc3385b2 100644 --- a/tests/ported_static/stRandom2/test_random_statetest457.py +++ b/tests/ported_static/stRandom2/test_random_statetest457.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest457Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest457( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest457.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest457( data=Bytes( "44417f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f949fa28af308a37a136c626218927d" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x12DE4990, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest460.py b/tests/ported_static/stRandom2/test_random_statetest460.py index 6c2c1f0b13a..92dca4015e8 100644 --- a/tests/ported_static/stRandom2/test_random_statetest460.py +++ b/tests/ported_static/stRandom2/test_random_statetest460.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest460Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest460( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest460.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -101,7 +93,6 @@ def test_random_statetest460( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000003a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c350046f16a23c6c90739ba201697b4315778a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5A8388BF, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest461.py b/tests/ported_static/stRandom2/test_random_statetest461.py index 08dce9529e4..32a4dfa24ff 100644 --- a/tests/ported_static/stRandom2/test_random_statetest461.py +++ b/tests/ported_static/stRandom2/test_random_statetest461.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest461Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest461( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest461.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -92,7 +84,6 @@ def test_random_statetest461( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c350517f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff42515259" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x20B19906, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest462.py b/tests/ported_static/stRandom2/test_random_statetest462.py index 7160533bddd..28019cf7c9e 100644 --- a/tests/ported_static/stRandom2/test_random_statetest462.py +++ b/tests/ported_static/stRandom2/test_random_statetest462.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest462Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest462( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest462.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -93,7 +85,6 @@ def test_random_statetest462( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000006f8e0186019d029d1354681482826f37" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x564E62DA, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest464.py b/tests/ported_static/stRandom2/test_random_statetest464.py index 5ef019e574a..e39de2c83d9 100644 --- a/tests/ported_static/stRandom2/test_random_statetest464.py +++ b/tests/ported_static/stRandom2/test_random_statetest464.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest464Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest464( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest464.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest464( data=Bytes( "447f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8209" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2491B9, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest465.py b/tests/ported_static/stRandom2/test_random_statetest465.py index 616396458de..45e66598f58 100644 --- a/tests/ported_static/stRandom2/test_random_statetest465.py +++ b/tests/ported_static/stRandom2/test_random_statetest465.py @@ -4,10 +4,8 @@ Ported from: state_tests/stRandom2/randomStatetest465Filler.json -@manually-enhanced: Do not overwrite. `gas_limit` raised on Amsterdam -to cover EIP-8037 state-gas spill. Pre-EIP-8037 keeps the original -100 000. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -20,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -35,14 +32,8 @@ def test_random_statetest465( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest465.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -94,7 +85,6 @@ def test_random_statetest465( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79437f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000001" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5DE12C27, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest470.py b/tests/ported_static/stRandom2/test_random_statetest470.py index f0dfe17c0c7..e84b0c32381 100644 --- a/tests/ported_static/stRandom2/test_random_statetest470.py +++ b/tests/ported_static/stRandom2/test_random_statetest470.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest470Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest470( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest470.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest470( data=Bytes( "457f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000001357f00000000000000000000000000000000000000000000000000000000000000000b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x67C37947, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest471.py b/tests/ported_static/stRandom2/test_random_statetest471.py index abd2d844583..2cfba80dca9 100644 --- a/tests/ported_static/stRandom2/test_random_statetest471.py +++ b/tests/ported_static/stRandom2/test_random_statetest471.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest471Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest471( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest471.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -88,7 +80,6 @@ def test_random_statetest471( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09650618701355040655183a51377d82" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x63180FB7, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest473.py b/tests/ported_static/stRandom2/test_random_statetest473.py index a6192bdd920..993951d548f 100644 --- a/tests/ported_static/stRandom2/test_random_statetest473.py +++ b/tests/ported_static/stRandom2/test_random_statetest473.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest473Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest473( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest473.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -100,7 +92,6 @@ def test_random_statetest473( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff317f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5910209" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4467CA41, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest474.py b/tests/ported_static/stRandom2/test_random_statetest474.py index fbbeb0f9f06..41fca3563bc 100644 --- a/tests/ported_static/stRandom2/test_random_statetest474.py +++ b/tests/ported_static/stRandom2/test_random_statetest474.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest474Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest474( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest474.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest474( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe027f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f7d6f6b1051778ea1670387810b5805" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7B1ABEED, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest475.py b/tests/ported_static/stRandom2/test_random_statetest475.py index 65aa0f5f8d2..8c9aae84e71 100644 --- a/tests/ported_static/stRandom2/test_random_statetest475.py +++ b/tests/ported_static/stRandom2/test_random_statetest475.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest475Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest475( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest475.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -94,7 +86,6 @@ def test_random_statetest475( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x19883C24, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest477.py b/tests/ported_static/stRandom2/test_random_statetest477.py index 868fa22f1de..71e2ca0631a 100644 --- a/tests/ported_static/stRandom2/test_random_statetest477.py +++ b/tests/ported_static/stRandom2/test_random_statetest477.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest477Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest477( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest477.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest477( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000000000000000000000000000000000000000000001417ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f9084a3758d3456763aa4f09c8b735b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xA9AAD5, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest480.py b/tests/ported_static/stRandom2/test_random_statetest480.py index 63098954ae9..f21058d0b1e 100644 --- a/tests/ported_static/stRandom2/test_random_statetest480.py +++ b/tests/ported_static/stRandom2/test_random_statetest480.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest480Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest480( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest480.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest480( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff037f0000000000000000000000000000000000000000000000000000000000000000427ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f5af3a474ff64f3a37d51f36a6a607f" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2C6942FB, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest482.py b/tests/ported_static/stRandom2/test_random_statetest482.py index 2c6553c50be..d5f4b4e9396 100644 --- a/tests/ported_static/stRandom2/test_random_statetest482.py +++ b/tests/ported_static/stRandom2/test_random_statetest482.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest482Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest482( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest482.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest482( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f027c9d313d9b09376505927c8e7156" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x636F84BF, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest483.py b/tests/ported_static/stRandom2/test_random_statetest483.py index 2a810280520..54ef625e4b9 100644 --- a/tests/ported_static/stRandom2/test_random_statetest483.py +++ b/tests/ported_static/stRandom2/test_random_statetest483.py @@ -4,10 +4,8 @@ Ported from: state_tests/stRandom2/randomStatetest483Filler.json -@manually-enhanced: Do not overwrite. `gas_limit` raised on Amsterdam -to cover EIP-8037 state-gas spill. Pre-EIP-8037 keeps the original -100 000. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -20,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -35,14 +32,8 @@ def test_random_statetest483( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest483.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -93,7 +84,6 @@ def test_random_statetest483( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8409" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7EEDCE16, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest488.py b/tests/ported_static/stRandom2/test_random_statetest488.py index 4037e572732..118af78d93a 100644 --- a/tests/ported_static/stRandom2/test_random_statetest488.py +++ b/tests/ported_static/stRandom2/test_random_statetest488.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest488Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest488( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest488.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest488( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79427f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f3250648093577f6364a218f0907e7d" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x53844097, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest489.py b/tests/ported_static/stRandom2/test_random_statetest489.py index 998c3c5301e..e0c3d43b186 100644 --- a/tests/ported_static/stRandom2/test_random_statetest489.py +++ b/tests/ported_static/stRandom2/test_random_statetest489.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest489Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest489( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest489.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest489( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000456f2b8e846b91987417705a126e770764" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6EA1DC52, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest491.py b/tests/ported_static/stRandom2/test_random_statetest491.py index 5bdc6ad3a55..7e9b4090c3e 100644 --- a/tests/ported_static/stRandom2/test_random_statetest491.py +++ b/tests/ported_static/stRandom2/test_random_statetest491.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest491Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest491( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest491.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -101,7 +93,6 @@ def test_random_statetest491( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000006fa0f670645a778c71127d3b5598308b17" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6BA27C22, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest497.py b/tests/ported_static/stRandom2/test_random_statetest497.py index 550bf2442fa..700ed36357f 100644 --- a/tests/ported_static/stRandom2/test_random_statetest497.py +++ b/tests/ported_static/stRandom2/test_random_statetest497.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest497Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest497( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest497.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -93,7 +85,6 @@ def test_random_statetest497( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0904" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x44240571, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest500.py b/tests/ported_static/stRandom2/test_random_statetest500.py index f39cc52497e..868c0b501fe 100644 --- a/tests/ported_static/stRandom2/test_random_statetest500.py +++ b/tests/ported_static/stRandom2/test_random_statetest500.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest500Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest500( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest500.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest500( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f87196584968a97046c679199311482" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x20D454F, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest502.py b/tests/ported_static/stRandom2/test_random_statetest502.py index e22b5a3ee78..7ae7d39a68d 100644 --- a/tests/ported_static/stRandom2/test_random_statetest502.py +++ b/tests/ported_static/stRandom2/test_random_statetest502.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest502Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest502( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest502.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -98,7 +90,6 @@ def test_random_statetest502( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c350807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57e7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b59c66369a85a46da1821861586378" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x14960C58, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest503.py b/tests/ported_static/stRandom2/test_random_statetest503.py index 3925ac7107b..ab822db30df 100644 --- a/tests/ported_static/stRandom2/test_random_statetest503.py +++ b/tests/ported_static/stRandom2/test_random_statetest503.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest503Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest503( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest503.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest503( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000006f0886a83c66553c9889528d8f1294ff" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7B7801AA, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest505.py b/tests/ported_static/stRandom2/test_random_statetest505.py index 8d1dc12357e..cba7314aafa 100644 --- a/tests/ported_static/stRandom2/test_random_statetest505.py +++ b/tests/ported_static/stRandom2/test_random_statetest505.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest505Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest505( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest505.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest505( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe427f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe457f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000006f44a06f550371317376738c53998437" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4013B563, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest506.py b/tests/ported_static/stRandom2/test_random_statetest506.py index a574ead20f1..fc0561322f9 100644 --- a/tests/ported_static/stRandom2/test_random_statetest506.py +++ b/tests/ported_static/stRandom2/test_random_statetest506.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest506Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest506( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest506.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest506( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000000042377f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000006ba218f370862059149e3cff20" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3879DAC6, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest511.py b/tests/ported_static/stRandom2/test_random_statetest511.py index 6bee58df4be..4ca2b67bd72 100644 --- a/tests/ported_static/stRandom2/test_random_statetest511.py +++ b/tests/ported_static/stRandom2/test_random_statetest511.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest511Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest511( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest511.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest511( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff416f6a52027f41f267453843630a66444145" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1B89A723, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest512.py b/tests/ported_static/stRandom2/test_random_statetest512.py index f161e8e69c1..ab69357d013 100644 --- a/tests/ported_static/stRandom2/test_random_statetest512.py +++ b/tests/ported_static/stRandom2/test_random_statetest512.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest512Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest512( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest512.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest512( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c350437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f3b5bff405670977499515002634492" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x33F0AE08, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest514.py b/tests/ported_static/stRandom2/test_random_statetest514.py index 6caf5d66571..9726d55bc4b 100644 --- a/tests/ported_static/stRandom2/test_random_statetest514.py +++ b/tests/ported_static/stRandom2/test_random_statetest514.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest514Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest514( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest514.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest514( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe44447f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3506c8ea356796d65546d3883768f" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x105D80AD, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest516.py b/tests/ported_static/stRandom2/test_random_statetest516.py index 243141c25dd..5396b19ae2a 100644 --- a/tests/ported_static/stRandom2/test_random_statetest516.py +++ b/tests/ported_static/stRandom2/test_random_statetest516.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest516Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest516( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest516.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -105,7 +97,6 @@ def test_random_statetest516( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6a32787358019b391868619409" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2C787EA, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest518.py b/tests/ported_static/stRandom2/test_random_statetest518.py index 0ff6bc1bcef..1a50ca640a2 100644 --- a/tests/ported_static/stRandom2/test_random_statetest518.py +++ b/tests/ported_static/stRandom2/test_random_statetest518.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest518Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest518( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest518.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest518( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f3c589f416d947a5134f268515b6c92" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x415CB1C9, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest519.py b/tests/ported_static/stRandom2/test_random_statetest519.py index dd414e2d50d..e7ec4d68eb5 100644 --- a/tests/ported_static/stRandom2/test_random_statetest519.py +++ b/tests/ported_static/stRandom2/test_random_statetest519.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest519Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest519( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest519.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -88,7 +80,6 @@ def test_random_statetest519( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000001000000000000000000000000000000000000000009457f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3501a02556b85a45311" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xEA81BBF, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest520.py b/tests/ported_static/stRandom2/test_random_statetest520.py index ca90ac86420..8fb45f3f078 100644 --- a/tests/ported_static/stRandom2/test_random_statetest520.py +++ b/tests/ported_static/stRandom2/test_random_statetest520.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest520Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest520( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest520.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -106,7 +98,6 @@ def test_random_statetest520( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff190308" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x13D9C7A3, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest526.py b/tests/ported_static/stRandom2/test_random_statetest526.py index 33bf58469b1..f8461e8265b 100644 --- a/tests/ported_static/stRandom2/test_random_statetest526.py +++ b/tests/ported_static/stRandom2/test_random_statetest526.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest526Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest526( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest526.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -94,7 +86,6 @@ def test_random_statetest526( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5417e7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5419e01950777810975058c746f" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3AA8C462, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest532.py b/tests/ported_static/stRandom2/test_random_statetest532.py index acfe4835fc5..ebc928ac2a4 100644 --- a/tests/ported_static/stRandom2/test_random_statetest532.py +++ b/tests/ported_static/stRandom2/test_random_statetest532.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest532Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest532( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest532.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -101,7 +93,6 @@ def test_random_statetest532( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe54447f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f78297ba08ba478507f413b3597109c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x43E5A248, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest533.py b/tests/ported_static/stRandom2/test_random_statetest533.py index bd66b30f0b1..f482c7c05a3 100644 --- a/tests/ported_static/stRandom2/test_random_statetest533.py +++ b/tests/ported_static/stRandom2/test_random_statetest533.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest533Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest533( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest533.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -92,7 +84,6 @@ def test_random_statetest533( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000001847f00000000000000000000000100000000000000000000000000000000000000003a076152" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x70D690F4, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest534.py b/tests/ported_static/stRandom2/test_random_statetest534.py index 57e891e623b..47ec5ed56fc 100644 --- a/tests/ported_static/stRandom2/test_random_statetest534.py +++ b/tests/ported_static/stRandom2/test_random_statetest534.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest534Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest534( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest534.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest534( data=Bytes( "7f000000000000000000000001000000000000000000000000000000000000000045437f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff457f0000000000000000000000000000000000000000000000000000000000000000436ff3075243846d88747b6a9e7ff28c61" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x55DB76C1, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest535.py b/tests/ported_static/stRandom2/test_random_statetest535.py index 8f31eef37bf..37b56c5f44b 100644 --- a/tests/ported_static/stRandom2/test_random_statetest535.py +++ b/tests/ported_static/stRandom2/test_random_statetest535.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest535Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest535( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest535.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest535( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x4CD4DC30, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest537.py b/tests/ported_static/stRandom2/test_random_statetest537.py index 5d544116d7f..a6a874b13e6 100644 --- a/tests/ported_static/stRandom2/test_random_statetest537.py +++ b/tests/ported_static/stRandom2/test_random_statetest537.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest537Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest537( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest537.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -97,7 +89,6 @@ def test_random_statetest537( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7e7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5688068515a6a996a540a03686d6d" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x71E432D1, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest539.py b/tests/ported_static/stRandom2/test_random_statetest539.py index 3dc5e4915a2..a96c6badafc 100644 --- a/tests/ported_static/stRandom2/test_random_statetest539.py +++ b/tests/ported_static/stRandom2/test_random_statetest539.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest539Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest539( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest539.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest539( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff457f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff096794200bf18b0b316e41" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x55285B09, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest541.py b/tests/ported_static/stRandom2/test_random_statetest541.py index bc1abe1aaa3..e2bf1dbd0b8 100644 --- a/tests/ported_static/stRandom2/test_random_statetest541.py +++ b/tests/ported_static/stRandom2/test_random_statetest541.py @@ -4,10 +4,7 @@ Ported from: state_tests/stRandom2/randomStatetest541Filler.json -@manually-enhanced: Do not overwrite. `gas_limit` raised on Amsterdam -to cover EIP-8037 state-gas spill. Pre-EIP-8037 keeps the original -100 000. - +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -20,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -35,14 +31,8 @@ def test_random_statetest541( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest541.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -98,7 +88,6 @@ def test_random_statetest541( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff457f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000004335696e089257368d07897d57350b10" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1F529315, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest544.py b/tests/ported_static/stRandom2/test_random_statetest544.py index 77632478d50..c9c27fdc8a3 100644 --- a/tests/ported_static/stRandom2/test_random_statetest544.py +++ b/tests/ported_static/stRandom2/test_random_statetest544.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest544Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest544( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest544.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest544( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c3503b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff097f0000000000000000000000000000000000000000000000000000000000000000" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x505C017E, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest545.py b/tests/ported_static/stRandom2/test_random_statetest545.py index 7b95acefeb8..7f30c4566d0 100644 --- a/tests/ported_static/stRandom2/test_random_statetest545.py +++ b/tests/ported_static/stRandom2/test_random_statetest545.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest545Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest545( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest545.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -100,7 +92,6 @@ def test_random_statetest545( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c350637c9c82133005" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x13226624, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest546.py b/tests/ported_static/stRandom2/test_random_statetest546.py index 8f975634bdf..38aefee3f33 100644 --- a/tests/ported_static/stRandom2/test_random_statetest546.py +++ b/tests/ported_static/stRandom2/test_random_statetest546.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest546Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest546( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest546.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest546( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff447f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000010000000000000000000000000000000000000000956f895258826c35576592208671731501" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6B15392F, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest548.py b/tests/ported_static/stRandom2/test_random_statetest548.py index 8523f0f0278..5fa4f888890 100644 --- a/tests/ported_static/stRandom2/test_random_statetest548.py +++ b/tests/ported_static/stRandom2/test_random_statetest548.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest548Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest548( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest548.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest548( data=Bytes( "7f0000000000000000000000010000000000000000000000000000000000000000417fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000001000000000000000000000000000000000000000019417f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f777a349a646633977da01a315a3c03" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2AA46F82, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest550.py b/tests/ported_static/stRandom2/test_random_statetest550.py index d4fd817ef9b..1c559d499e3 100644 --- a/tests/ported_static/stRandom2/test_random_statetest550.py +++ b/tests/ported_static/stRandom2/test_random_statetest550.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest550Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest550( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest550.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -101,7 +93,6 @@ def test_random_statetest550( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000006f4472a17829659c94a29041419564313a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x52EBEDC8, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest552.py b/tests/ported_static/stRandom2/test_random_statetest552.py index bcf8c8f4b85..7c4cc681e0f 100644 --- a/tests/ported_static/stRandom2/test_random_statetest552.py +++ b/tests/ported_static/stRandom2/test_random_statetest552.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest552Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest552( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest552.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest552( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff42147ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe547f00000000000000000000000000000000000000000000000000000000000000006f6a72a37b5219f089416d4336a08e82" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6BD9B58C, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest553.py b/tests/ported_static/stRandom2/test_random_statetest553.py index b3942959256..ea6b94637ba 100644 --- a/tests/ported_static/stRandom2/test_random_statetest553.py +++ b/tests/ported_static/stRandom2/test_random_statetest553.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest553Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest553( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest553.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest553( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000016f94819c780585376da073368c45828ca0" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x22FB6, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest555.py b/tests/ported_static/stRandom2/test_random_statetest555.py index e3a668857b2..a69ad529ef3 100644 --- a/tests/ported_static/stRandom2/test_random_statetest555.py +++ b/tests/ported_static/stRandom2/test_random_statetest555.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest555Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest555( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest555.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest555( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe437f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff437f000000000000000000000000000000000000000000000000000000000000c3506f3b8f936e6f3874603c59120707e3588c" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x719DE78, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest556.py b/tests/ported_static/stRandom2/test_random_statetest556.py index a2778f086f9..f4619849408 100644 --- a/tests/ported_static/stRandom2/test_random_statetest556.py +++ b/tests/ported_static/stRandom2/test_random_statetest556.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest556Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest556( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest556.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest556( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000010000000000000000000000000000000000000000437f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000006f726e757692a2ad96526b9e8b77a33a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x44F0B58C, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest564.py b/tests/ported_static/stRandom2/test_random_statetest564.py index 22f3acce632..ea8b16d9a10 100644 --- a/tests/ported_static/stRandom2/test_random_statetest564.py +++ b/tests/ported_static/stRandom2/test_random_statetest564.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest564Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest564( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest564.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x945304EB96065B2A98B57A48A06AE28D285A71B5) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = EOA( @@ -99,7 +91,6 @@ def test_random_statetest564( data=Bytes( "5b7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe45500816" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x11182998, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest565.py b/tests/ported_static/stRandom2/test_random_statetest565.py index 33a1df3daea..2a47a89f34b 100644 --- a/tests/ported_static/stRandom2/test_random_statetest565.py +++ b/tests/ported_static/stRandom2/test_random_statetest565.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest565Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest565( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest565.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest565( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f000000000000000000000000000000000000000000000000000000000000c350137f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000009237" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x28CD0966, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest571.py b/tests/ported_static/stRandom2/test_random_statetest571.py index 38072ed934a..be395a11ad9 100644 --- a/tests/ported_static/stRandom2/test_random_statetest571.py +++ b/tests/ported_static/stRandom2/test_random_statetest571.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest571Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest571( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest571.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -93,7 +85,6 @@ def test_random_statetest571( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000015b7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e793c6508766c8b6b403a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x53934784, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest574.py b/tests/ported_static/stRandom2/test_random_statetest574.py index a8f165453a5..b6d30e95fec 100644 --- a/tests/ported_static/stRandom2/test_random_statetest574.py +++ b/tests/ported_static/stRandom2/test_random_statetest574.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest574Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest574( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest574.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest574( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000000000000000000000000000000000000000000001047f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff046d369354827d7433a335af" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x5F16646E, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest578.py b/tests/ported_static/stRandom2/test_random_statetest578.py index 01a23742ccc..de6856875cb 100644 --- a/tests/ported_static/stRandom2/test_random_statetest578.py +++ b/tests/ported_static/stRandom2/test_random_statetest578.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest578Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest578( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest578.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest578( data=Bytes( "7f000000000000000000000000000000000000000000000000000000000000c350457f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff42" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x17C973D5, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest580.py b/tests/ported_static/stRandom2/test_random_statetest580.py index 159a1cd03f1..92ed30c5c22 100644 --- a/tests/ported_static/stRandom2/test_random_statetest580.py +++ b/tests/ported_static/stRandom2/test_random_statetest580.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest580Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest580( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest580.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest580( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000000000000000000000000000000000000000000000457f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000006f4640879d18777b953a209836379a30" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2C360421, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest585.py b/tests/ported_static/stRandom2/test_random_statetest585.py index b6b61656f32..d58bca571c4 100644 --- a/tests/ported_static/stRandom2/test_random_statetest585.py +++ b/tests/ported_static/stRandom2/test_random_statetest585.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest585Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest585( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest585.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest585( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x16B2537A, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest586.py b/tests/ported_static/stRandom2/test_random_statetest586.py index c2c81827ba2..f4c991735fe 100644 --- a/tests/ported_static/stRandom2/test_random_statetest586.py +++ b/tests/ported_static/stRandom2/test_random_statetest586.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest586Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -18,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -33,14 +31,8 @@ def test_random_statetest586( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest586.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -92,7 +84,6 @@ def test_random_statetest586( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000000137" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x65DC324C, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest587.py b/tests/ported_static/stRandom2/test_random_statetest587.py index 6f9aa5a84cd..cda51656336 100644 --- a/tests/ported_static/stRandom2/test_random_statetest587.py +++ b/tests/ported_static/stRandom2/test_random_statetest587.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest587Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest587( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest587.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -96,7 +88,6 @@ def test_random_statetest587( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c350117f0000000000000000000000000000000000000000000000000000000000000001457f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f8b7152a3958a923c1665b27557089a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x11604410, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest588.py b/tests/ported_static/stRandom2/test_random_statetest588.py index 467e1489dfe..d5e3d32ffb2 100644 --- a/tests/ported_static/stRandom2/test_random_statetest588.py +++ b/tests/ported_static/stRandom2/test_random_statetest588.py @@ -4,10 +4,8 @@ Ported from: state_tests/stRandom2/randomStatetest588Filler.json -@manually-enhanced: Do not overwrite. `gas_limit` raised on Amsterdam -to cover EIP-8037 state-gas spill. Pre-EIP-8037 keeps the original -100 000. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -20,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -35,14 +32,8 @@ def test_random_statetest588( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest588.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -98,7 +89,6 @@ def test_random_statetest588( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41437f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff430637" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x66D6BC77, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest592.py b/tests/ported_static/stRandom2/test_random_statetest592.py index ef4e670fcdd..ab07f946f34 100644 --- a/tests/ported_static/stRandom2/test_random_statetest592.py +++ b/tests/ported_static/stRandom2/test_random_statetest592.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest592Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest592( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest592.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest592( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x6339E0E5, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest596.py b/tests/ported_static/stRandom2/test_random_statetest596.py index 9772ffda560..2f438f47db7 100644 --- a/tests/ported_static/stRandom2/test_random_statetest596.py +++ b/tests/ported_static/stRandom2/test_random_statetest596.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest596Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest596( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest596.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -94,7 +86,6 @@ def test_random_statetest596( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000001317f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000006f7066a3507f6e090653945638306520" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x2D99F481, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest599.py b/tests/ported_static/stRandom2/test_random_statetest599.py index 9e8f8f0973c..f7f52ec9962 100644 --- a/tests/ported_static/stRandom2/test_random_statetest599.py +++ b/tests/ported_static/stRandom2/test_random_statetest599.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest599Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest599( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest599.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest599( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f8d6c60440a44449372068a976a8382" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x421144B6, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest600.py b/tests/ported_static/stRandom2/test_random_statetest600.py index 1386a39da07..ae373101aa7 100644 --- a/tests/ported_static/stRandom2/test_random_statetest600.py +++ b/tests/ported_static/stRandom2/test_random_statetest600.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest600Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest600( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest600.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest600( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000000000000000000000000000000000000000c35043457ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f0b6f37208e76a402927039198c969907" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xAD3F19C, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest602.py b/tests/ported_static/stRandom2/test_random_statetest602.py index 9d569c1d26b..05cf83d935e 100644 --- a/tests/ported_static/stRandom2/test_random_statetest602.py +++ b/tests/ported_static/stRandom2/test_random_statetest602.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest602Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest602( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest602.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest602( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x25D01724, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest603.py b/tests/ported_static/stRandom2/test_random_statetest603.py index 6f5517dc6a3..0e6dde9eff3 100644 --- a/tests/ported_static/stRandom2/test_random_statetest603.py +++ b/tests/ported_static/stRandom2/test_random_statetest603.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest603Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest603( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest603.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest603( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79427f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f00000000000000000000000100000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79086f655860560745326476a03cdc360634" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x23FCF7F2, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest605.py b/tests/ported_static/stRandom2/test_random_statetest605.py index 6dc04cf8552..91275188c47 100644 --- a/tests/ported_static/stRandom2/test_random_statetest605.py +++ b/tests/ported_static/stRandom2/test_random_statetest605.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest605Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest605( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest605.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest605( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c350437f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9058038508" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x650044FA, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest607.py b/tests/ported_static/stRandom2/test_random_statetest607.py index 6f6e4f94516..4b9d2f729e2 100644 --- a/tests/ported_static/stRandom2/test_random_statetest607.py +++ b/tests/ported_static/stRandom2/test_random_statetest607.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest607Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest607( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest607.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest607( data=Bytes( "7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff09" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x106DF7F8, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest608.py b/tests/ported_static/stRandom2/test_random_statetest608.py index 2a9daf5e2cb..84918022a5b 100644 --- a/tests/ported_static/stRandom2/test_random_statetest608.py +++ b/tests/ported_static/stRandom2/test_random_statetest608.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest608Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest608( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest608.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -95,7 +87,6 @@ def test_random_statetest608( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c350537fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x1EB2352A, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest610.py b/tests/ported_static/stRandom2/test_random_statetest610.py index 449efdeb9c9..2db82865c51 100644 --- a/tests/ported_static/stRandom2/test_random_statetest610.py +++ b/tests/ported_static/stRandom2/test_random_statetest610.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest610Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest610( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest610.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -98,7 +90,6 @@ def test_random_statetest610( data=Bytes( "417f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f01f353a2437e4384726497587b8556" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7FDD9C9C, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest615.py b/tests/ported_static/stRandom2/test_random_statetest615.py index b3330682e09..9bd0741df64 100644 --- a/tests/ported_static/stRandom2/test_random_statetest615.py +++ b/tests/ported_static/stRandom2/test_random_statetest615.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest615Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest615( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest615.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -103,7 +95,6 @@ def test_random_statetest615( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe837f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000001000000000000000000000000000000000000000009556c6f390a3054d7368a9a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7BCC296A, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest616.py b/tests/ported_static/stRandom2/test_random_statetest616.py index a5a984ee14d..e104befe476 100644 --- a/tests/ported_static/stRandom2/test_random_statetest616.py +++ b/tests/ported_static/stRandom2/test_random_statetest616.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest616Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest616( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest616.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest616( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000006f86a2409b991539f0423c0342363c3b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x45949A6F, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest620.py b/tests/ported_static/stRandom2/test_random_statetest620.py index d1120537994..a35f659fe76 100644 --- a/tests/ported_static/stRandom2/test_random_statetest620.py +++ b/tests/ported_static/stRandom2/test_random_statetest620.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest620Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest620( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest620.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest620( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff427f0000000000000000000000010000000000000000000000000000000000000000457ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f6c54a420327d73727d9d1a667bf389" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x61F75E26, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest621.py b/tests/ported_static/stRandom2/test_random_statetest621.py index 53a4825c2f0..a36b82e0fe4 100644 --- a/tests/ported_static/stRandom2/test_random_statetest621.py +++ b/tests/ported_static/stRandom2/test_random_statetest621.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest621Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest621( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest621.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -92,7 +84,6 @@ def test_random_statetest621( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f0000000000000000000000000000000000000000000000000000000000000000441a7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff6f3ba187a19366899e595220741232905b" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x7FC94217, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest629.py b/tests/ported_static/stRandom2/test_random_statetest629.py index e5fb21ac908..1ae7ffdd02e 100644 --- a/tests/ported_static/stRandom2/test_random_statetest629.py +++ b/tests/ported_static/stRandom2/test_random_statetest629.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest629Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest629( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest629.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest629( data=Bytes( "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79347f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e79116f427277147c617f4354a35a1a47977a" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x3BCDBA80, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest630.py b/tests/ported_static/stRandom2/test_random_statetest630.py index 232e5045340..13619602736 100644 --- a/tests/ported_static/stRandom2/test_random_statetest630.py +++ b/tests/ported_static/stRandom2/test_random_statetest630.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest630Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest630( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest630.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest630( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000000000000000000000000000000000000000000001427f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000100000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f9461a46e61507a1206917b17137e7e" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x188B5E42, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest633.py b/tests/ported_static/stRandom2/test_random_statetest633.py index 200694e5db0..262759dd674 100644 --- a/tests/ported_static/stRandom2/test_random_statetest633.py +++ b/tests/ported_static/stRandom2/test_random_statetest633.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest633Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest633( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest633.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -102,7 +94,6 @@ def test_random_statetest633( data=Bytes( "7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e796f82941340756317567250f1573a8976" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x50F61B39, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest637.py b/tests/ported_static/stRandom2/test_random_statetest637.py index d896ccab731..5f0cc74718f 100644 --- a/tests/ported_static/stRandom2/test_random_statetest637.py +++ b/tests/ported_static/stRandom2/test_random_statetest637.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest637Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest637( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest637.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -97,7 +89,6 @@ def test_random_statetest637( data=Bytes( "7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f44931064138e9df1768334028c201471" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x58337064, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest638.py b/tests/ported_static/stRandom2/test_random_statetest638.py index 35ce2c4613a..0a732a2f891 100644 --- a/tests/ported_static/stRandom2/test_random_statetest638.py +++ b/tests/ported_static/stRandom2/test_random_statetest638.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest638Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest638( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest638.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -99,7 +91,6 @@ def test_random_statetest638( data=Bytes( "7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0x791E3396, ) diff --git a/tests/ported_static/stRandom2/test_random_statetest641.py b/tests/ported_static/stRandom2/test_random_statetest641.py index f81dffeabc8..a1e2749decb 100644 --- a/tests/ported_static/stRandom2/test_random_statetest641.py +++ b/tests/ported_static/stRandom2/test_random_statetest641.py @@ -3,9 +3,8 @@ Ported from: state_tests/stRandom2/randomStatetest641Filler.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_random_statetest641( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_random_statetest641.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 100k tx_gas. - tx_gas_limit = 100000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 500_000 - coinbase = Address(0x4F3F701464972E74606D6EA82D4D3080599A0E79) sender = EOA( key=0xB1F4CBC3A50042184425A6F9E996D0910F7BA879457CE5DAC5C71E498AD3C005 @@ -100,7 +92,6 @@ def test_random_statetest641( data=Bytes( "7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000c3507f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000004f3f701464972e74606d6ea82d4d3080599a0e797f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6f29199c9aa4054170f1a15a55056f96" # noqa: E501 ), - gas_limit=tx_gas_limit, value=0xF08F864, ) diff --git a/tests/ported_static/stRevertTest/test_revert_in_create_in_init_paris.py b/tests/ported_static/stRevertTest/test_revert_in_create_in_init_paris.py index 89789d898b9..87e09b013fb 100644 --- a/tests/ported_static/stRevertTest/test_revert_in_create_in_init_paris.py +++ b/tests/ported_static/stRevertTest/test_revert_in_create_in_init_paris.py @@ -3,10 +3,8 @@ Ported from: state_tests/stRevertTest/RevertInCreateInInit_ParisFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 NEW_ACCOUNT state-gas spill in nested CREATE; -pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +31,8 @@ def test_revert_in_create_in_init_paris( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_revert_in_create_in_init_paris.""" - # EIP-8037 NEW_ACCOUNT state-gas spill OoGs the nested CREATE. - tx_gas_limit = 200000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) addr = Address(0x4757608F18B70777AE788DD4056EEED52F7AA68F) sender = EOA( @@ -75,7 +66,6 @@ def test_revert_in_create_in_init_paris( + Op.MSTORE(offset=0x0, value=0x112233) + Op.REVERT(offset=0x0, size=0x20) + Op.STOP, - gas_limit=tx_gas_limit, ) post = {addr: Account(storage={0: 1}, balance=10)} diff --git a/tests/ported_static/stSystemOperationsTest/test_callcode_to_return1.py b/tests/ported_static/stSystemOperationsTest/test_callcode_to_return1.py index 6043500f367..4b13b9bf3aa 100644 --- a/tests/ported_static/stSystemOperationsTest/test_callcode_to_return1.py +++ b/tests/ported_static/stSystemOperationsTest/test_callcode_to_return1.py @@ -3,10 +3,8 @@ Ported from: state_tests/stSystemOperationsTest/callcodeToReturn1Filler.json -@manually-enhanced: Do not overwrite. Gas bumped fork-conditionally -to cover EIP-8037 state-gas spill into regular gas; pre-EIP-8037 -behavior unchanged. +@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,7 +17,6 @@ StateTestFiller, Transaction, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +31,8 @@ def test_callcode_to_return1( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_callcode_to_return1.""" - # EIP-8037 gas bumps: original values for pre-EIP-8037 forks. - inner_call_gas = 50000 - if fork.is_eip_enabled(8037): - inner_call_gas = 1000000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -77,7 +68,6 @@ def test_callcode_to_return1( + Op.SSTORE( key=0x0, value=Op.CALLCODE( - gas=inner_call_gas, address=addr, value=0x17, args_offset=0x0, @@ -91,13 +81,7 @@ def test_callcode_to_return1( nonce=0, ) - tx = Transaction( - sender=sender, - to=target, - data=Bytes(""), - gas_limit=3000000, - value=0x186A0, - ) + tx = Transaction(sender=sender, to=target, data=Bytes(""), value=0x186A0) post = {target: Account(storage={0: 1, 1: 1}, nonce=0)} diff --git a/tests/ported_static/stSystemOperationsTest/test_create_name_registrator.py b/tests/ported_static/stSystemOperationsTest/test_create_name_registrator.py index 25f3523cd44..5b1437d14d8 100644 --- a/tests/ported_static/stSystemOperationsTest/test_create_name_registrator.py +++ b/tests/ported_static/stSystemOperationsTest/test_create_name_registrator.py @@ -3,9 +3,8 @@ Ported from: state_tests/stSystemOperationsTest/createNameRegistratorFiller.json -@manually-enhanced: Do not overwrite. tx `gas_limit` bumped on Amsterdam -to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. +@manually-enhanced: Do not overwrite. tx `gas_limit` has been removed. """ import pytest @@ -19,7 +18,6 @@ Transaction, compute_create_address, ) -from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -34,14 +32,8 @@ def test_create_name_registrator( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test_create_name_registrator.""" - # EIP-8037 state-gas spill on Amsterdam exceeds 300k tx_gas. - tx_gas_limit = 300000 - if fork.is_eip_enabled(8037): - tx_gas_limit = 1_000_000 - coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA) contract_0 = Address(0x095E7BAEA6A6C7C4C2DFEB977EFAC326AF552D87) sender = pre.fund_eoa(amount=0xDE0B6B3A7640000) @@ -71,11 +63,7 @@ def test_create_name_registrator( ) tx = Transaction( - sender=sender, - to=contract_0, - data=Bytes(""), - gas_limit=tx_gas_limit, - value=0x186A0, + sender=sender, to=contract_0, data=Bytes(""), value=0x186A0 ) post = { From 5d397f784e0853ab85c5ff951f6de5e76a35bcc1 Mon Sep 17 00:00:00 2001 From: Mario Vega Date: Wed, 3 Jun 2026 22:10:49 +0000 Subject: [PATCH 12/46] feat(test-execute): Implement implicit gas limit --- .../plugins/execute/execute.py | 37 +++++++++----- .../plugins/execute/pre_alloc.py | 4 +- .../src/execution_testing/execution/base.py | 51 +++++++++++++++++-- .../execution/blob_transaction.py | 30 ++++++++--- .../execution/transaction_post.py | 25 ++++++--- .../src/execution_testing/specs/blockchain.py | 51 ++++++++++++------- .../src/execution_testing/specs/state.py | 11 ++-- .../test_types/transaction_types.py | 13 +++-- 8 files changed, 168 insertions(+), 54 deletions(-) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/execute.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/execute.py index be8743ac0d5..0a69a8c7799 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/execute.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/execute.py @@ -11,12 +11,14 @@ from execution_testing.base_types import Account from execution_testing.base_types import Alloc as BaseAlloc +from execution_testing.base_types.base_types import HexNumber from execution_testing.execution import BaseExecute from execution_testing.forks import Fork, TransitionFork from execution_testing.logging import get_logger from execution_testing.rpc import EngineRPC, EthRPC from execution_testing.specs import BaseTest from execution_testing.test_types import ( + Environment, EnvironmentDefaults, ) @@ -271,6 +273,17 @@ def gas_limit_accumulator() -> Generator[GasInfoAccumulator, None, None]: logger.info(f"Total minimum balance: {total_min_eth:.18f}") +@pytest.fixture(scope="session") +def env_gas_limit(eth_rpc: EthRPC) -> HexNumber: + """ + Return the environment gas limit derived from the head block before + tests start running. + """ + head_block = eth_rpc.get_block_by_number() + assert head_block is not None, "Unable to obtain head block from RPC" + return HexNumber(head_block["gasLimit"]) + + def base_test_parametrizer(cls: Type[BaseTest]) -> Any: """ Generate pytest.fixture for a given BaseTest subclass. @@ -288,7 +301,7 @@ def base_test_parametrizer(cls: Type[BaseTest]) -> Any: ) def base_test_parametrizer_func( request: Any, - fork: Fork | TransitionFork, + fork: Fork, pre: Alloc, eth_rpc: EthRPC, engine_rpc: EngineRPC | None, @@ -302,6 +315,7 @@ def base_test_parametrizer_func( max_fee_per_blob_gas: int, max_gas_limit_per_test: int | None, gas_limit_accumulator: GasInfoAccumulator, + env_gas_limit: HexNumber, is_tx_gas_heavy_test: bool, is_exception_test: bool, ) -> Type[BaseTest]: @@ -348,24 +362,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: if p not in kwargs } - # TODO: get values from network - timestamp = 0 - block_number = 0 - request.node.config.sender_address = str(pre._sender) super(BaseTestWrapper, self).__init__(*args, **kwargs) execute = self.execute(execute_format=execute_format) - # get balances of required sender accounts - required_balances = execute.get_required_sender_balances( + execute.prepare_transactions( + env=Environment(gas_limit=env_gas_limit), gas_price=gas_price, max_fee_per_gas=max_fee_per_gas, max_priority_fee_per_gas=max_priority_fee_per_gas, max_fee_per_blob_gas=max_fee_per_blob_gas, - fork=fork.fork_at( - block_number=block_number, timestamp=timestamp - ), + fork=fork, + ) + + # get balances of required sender accounts + required_balances = execute.get_required_sender_balances( + fork=fork, ) pre.resolve_deferred_checks() @@ -432,9 +445,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: ) execute_result = execute.execute( - fork=fork.fork_at( - block_number=block_number, timestamp=timestamp - ), + fork=fork, eth_rpc=eth_rpc, engine_rpc=engine_rpc, request=request, diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/pre_alloc.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/pre_alloc.py index 27a887b43d3..72ac35f808a 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/pre_alloc.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/pre_alloc.py @@ -978,7 +978,9 @@ def minimum_balance_for_pending_transactions( max_priority_fee_per_gas=max_priority_fee_per_gas, max_fee_per_blob_gas=max_fee_per_blob_gas, ) - gas_consumption += tx.gas_limit + tx_gas_limit = tx.gas_limit + assert tx_gas_limit, "tx gas limit not set" + gas_consumption += tx_gas_limit minimum_balance += tx.signer_minimum_balance(fork=fork) return minimum_balance + gas_consumption * gas_price, gas_consumption diff --git a/packages/testing/src/execution_testing/execution/base.py b/packages/testing/src/execution_testing/execution/base.py index 11cd9248cb2..fe80aa8b1d3 100644 --- a/packages/testing/src/execution_testing/execution/base.py +++ b/packages/testing/src/execution_testing/execution/base.py @@ -1,7 +1,7 @@ """Ethereum test execution base types.""" from abc import abstractmethod -from typing import Annotated, Any, ClassVar, Dict, Type +from typing import Annotated, Any, ClassVar, Dict, List, Type from pydantic import PlainSerializer, PlainValidator from pytest import FixtureRequest @@ -9,6 +9,7 @@ from execution_testing.base_types import Address, CamelModel from execution_testing.forks import Fork from execution_testing.rpc import EngineRPC, EthRPC +from execution_testing.test_types import Environment, Transaction class ExecuteResult(CamelModel): @@ -42,18 +43,60 @@ def __pydantic_init_subclass__(cls, **kwargs: Any) -> None: # Register the new execute format BaseExecute.formats[cls.format_name] = cls - def get_required_sender_balances( + @staticmethod + def calculate_max_transaction_gas_limit( + txs: List[Transaction], env: Environment, fork: Fork + ) -> int: + """ + Calculate the maximum gas limit that can be set in a transaction + given a list of transactions with and without gas-limits set + and a maximum available environment gas. + """ + available_gas = int(env.gas_limit) + unset_gas_limit_tx_count = 0 + for tx in txs: + if tx.gas_limit is None: + unset_gas_limit_tx_count += 1 + else: + available_gas -= int(tx.gas_limit) + + if unset_gas_limit_tx_count == 0 or available_gas <= 0: + return 0 + + max_gas_limit = available_gas // unset_gas_limit_tx_count + tx_gas_limit_cap = fork.transaction_gas_limit_cap() + if fork.is_eip_enabled(8037): + tx_gas_limit_cap = None + if tx_gas_limit_cap: + max_gas_limit = min(max_gas_limit, tx_gas_limit_cap) + return max_gas_limit + + def prepare_transactions( self, *, + env: Environment, gas_price: int, max_fee_per_gas: int, max_priority_fee_per_gas: int, max_fee_per_blob_gas: int, fork: Fork, - ) -> Dict[Address, int]: - """Get the required sender balances.""" + ) -> None: + """Prepare transactions by setting their final gas properties.""" + del env del gas_price, max_fee_per_gas, max_priority_fee_per_gas del max_fee_per_blob_gas, fork + raise Exception( + "Method `prepare_transactions` not implemented for " + f"{self.format_name}" + ) + + def get_required_sender_balances( + self, + *, + fork: Fork, + ) -> Dict[Address, int]: + """Get the required sender balances.""" + del fork raise Exception( "Method `get_required_sender_balances` not implemented for " f"{self.format_name}" diff --git a/packages/testing/src/execution_testing/execution/blob_transaction.py b/packages/testing/src/execution_testing/execution/blob_transaction.py index fa3f22c0051..df759c24252 100644 --- a/packages/testing/src/execution_testing/execution/blob_transaction.py +++ b/packages/testing/src/execution_testing/execution/blob_transaction.py @@ -19,6 +19,7 @@ ) from execution_testing.rpc.rpc_types import GetBlobsResponse from execution_testing.test_types import ( + Environment, NetworkWrappedTransaction, Transaction, ) @@ -149,26 +150,43 @@ class BlobTransaction(BaseExecute): nonexisting_blob_hashes: List[Hash] | None = None get_blobs_version: int | None = None - def get_required_sender_balances( + def prepare_transactions( self, *, + env: Environment, gas_price: int, max_fee_per_gas: int, max_priority_fee_per_gas: int, max_fee_per_blob_gas: int, fork: Fork, - ) -> Dict[Address, int]: - """Get the required sender balances.""" - balances: Dict[Address, int] = {} + ) -> None: + """Prepare transactions by setting their final gas properties.""" + txs: List[Transaction] = [] for tx in self.txs: - sender = tx.sender - assert sender is not None, "Sender is None" + if isinstance(tx, NetworkWrappedTransaction): + txs.append(tx.tx) + else: + txs.append(tx) + max_tx_gas_limit = self.calculate_max_transaction_gas_limit( + txs, env, fork + ) + for tx in txs: + tx.set_gas_limit(max_tx_gas_limit) tx.set_gas_price( gas_price=gas_price, max_fee_per_gas=max_fee_per_gas, max_priority_fee_per_gas=max_priority_fee_per_gas, max_fee_per_blob_gas=max_fee_per_blob_gas, ) + + def get_required_sender_balances( + self, *, fork: Fork + ) -> Dict[Address, int]: + """Get the required sender balances.""" + balances: Dict[Address, int] = {} + for tx in self.txs: + sender = tx.sender + assert sender is not None, "Sender is None" if sender not in balances: balances[sender] = 0 balances[sender] += tx.signer_minimum_balance(fork=fork) diff --git a/packages/testing/src/execution_testing/execution/transaction_post.py b/packages/testing/src/execution_testing/execution/transaction_post.py index d034e6e523a..562ba6e9a1c 100644 --- a/packages/testing/src/execution_testing/execution/transaction_post.py +++ b/packages/testing/src/execution_testing/execution/transaction_post.py @@ -14,6 +14,7 @@ SendTransactionExceptionError, ) from execution_testing.test_types import ( + Environment, NetworkWrappedTransaction, TestPhase, Transaction, @@ -39,27 +40,39 @@ class TransactionPost(BaseExecute): "are included" ) - def get_required_sender_balances( + def prepare_transactions( self, *, + env: Environment, gas_price: int, max_fee_per_gas: int, max_priority_fee_per_gas: int, max_fee_per_blob_gas: int, fork: Fork, - ) -> Dict[Address, int]: - """Get the required sender balances.""" - balances: Dict[Address, int] = {} + ) -> None: + """Prepare transactions by setting their final gas properties.""" for block in self.blocks: + max_tx_gas_limit = self.calculate_max_transaction_gas_limit( + block, env, fork + ) for tx in block: - sender = tx.sender - assert sender is not None, "Sender is None" + tx.set_gas_limit(max_tx_gas_limit) tx.set_gas_price( gas_price=gas_price, max_fee_per_gas=max_fee_per_gas, max_priority_fee_per_gas=max_priority_fee_per_gas, max_fee_per_blob_gas=max_fee_per_blob_gas, ) + + def get_required_sender_balances( + self, *, fork: Fork + ) -> Dict[Address, int]: + """Get the required sender balances.""" + balances: Dict[Address, int] = {} + for block in self.blocks: + for tx in block: + sender = tx.sender + assert sender is not None, "Sender is None" if sender not in balances: balances[sender] = 0 balances[sender] += tx.signer_minimum_balance(fork=fork) diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index b28c7843536..02d0860e3da 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -803,6 +803,34 @@ def make_genesis( ).with_rlp(txs=[]), ) + @staticmethod + def calculate_max_transaction_gas_limit( + txs: List[Transaction], env: Environment, fork: Fork + ) -> int: + """ + Calculate the maximum gas limit that can be set in a transaction + given a list of transactions with and without gas-limits set + and a maximum available environment gas. + """ + available_gas = int(env.gas_limit) + unset_gas_limit_tx_count = 0 + for tx in txs: + if tx.gas_limit is None: + unset_gas_limit_tx_count += 1 + else: + available_gas -= int(tx.gas_limit) + + if unset_gas_limit_tx_count == 0 or available_gas <= 0: + return 0 + + max_gas_limit = available_gas // unset_gas_limit_tx_count + tx_gas_limit_cap = fork.transaction_gas_limit_cap() + if fork.is_eip_enabled(8037): + tx_gas_limit_cap = None + if tx_gas_limit_cap: + max_gas_limit = min(max_gas_limit, tx_gas_limit_cap) + return max_gas_limit + def generate_block_data( self, t8n: FillerBackend, @@ -825,27 +853,16 @@ def generate_block_data( env = env.set_fork_requirements(fork) txs = block.txs[:] if any(tx.gas_limit is None for tx in block.txs): - available_gas = env.gas_limit - tx_unset_gas_limit_count = 0 - for tx in block.txs: - if tx.gas_limit is None: - tx_unset_gas_limit_count += 1 - else: - available_gas -= tx.gas_limit - if available_gas <= 0: + max_gas_limit = self.calculate_max_transaction_gas_limit( + txs, env, fork + ) + if max_gas_limit == 0: raise Exception( "test correctness: unable to automatically calculate gas " "limit for transactions (No remaining gas)." ) - max_gas_limit = available_gas // tx_unset_gas_limit_count - tx_gas_limit_cap = fork.transaction_gas_limit_cap() - if fork.is_eip_enabled(8037): - tx_gas_limit_cap = None - if tx_gas_limit_cap: - max_gas_limit = min(max_gas_limit, tx_gas_limit_cap) - for i in range(len(txs)): - if txs[i].gas_limit is None: - txs[i] = txs[i].with_gas_limit(max_gas_limit) + for tx in txs: + tx.set_gas_limit(max_gas_limit) txs = [tx.with_signature_and_sender() for tx in txs] if failing_tx_count := len([tx for tx in txs if tx.error]) > 0: diff --git a/packages/testing/src/execution_testing/specs/state.py b/packages/testing/src/execution_testing/specs/state.py index acbad117025..10fe5cc995b 100644 --- a/packages/testing/src/execution_testing/specs/state.py +++ b/packages/testing/src/execution_testing/specs/state.py @@ -362,7 +362,7 @@ def make_state_test_fixture( if fork.is_eip_enabled(8037): tx_gas_limit_cap = None gas_limit = tx_gas_limit_cap if tx_gas_limit_cap else env.gas_limit - tx = tx.with_gas_limit(gas_limit) + tx.set_gas_limit(gas_limit) tx = tx.with_signature_and_sender(keep_secret_key=True) pre_alloc = Alloc.merge( Alloc.model_validate(fork.pre_allocation()), @@ -422,18 +422,23 @@ def make_state_test_fixture( # First try reducing the gas limit only by one, if the validation # fails, it means that the traces change even with the slightest # modification to the gas. + tx_gas_limit = ( + int(tx.gas_limit) if tx.gas_limit is not None else None + ) + assert tx_gas_limit is not None + if self.verify_modified_gas_limit( t8n=t8n, base_tool_result=base_tool_result, base_tool_alloc=base_tool_alloc, fork=fork, - current_gas_limit=tx.gas_limit - 1, + current_gas_limit=tx_gas_limit - 1, pre_alloc=pre_alloc, env=env, ignore_gas_differences=ignore_gas_differences, ): minimum_gas_limit = 0 - maximum_gas_limit = int(tx.gas_limit) + maximum_gas_limit = tx_gas_limit while minimum_gas_limit < maximum_gas_limit: current_gas_limit = ( maximum_gas_limit + minimum_gas_limit diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index b923ba3e245..3f43d119ca9 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -571,10 +571,6 @@ def sign(self: "Transaction") -> None: # Signer remains `None` in this case pass - def with_gas_limit(self, gas_limit: int) -> Self: - """Return a new copy of the transaction with a defined gas limit.""" - return self.model_copy(update={"gas_limit": HexNumber(gas_limit)}) - def with_signature_and_sender( self, *, keep_secret_key: bool = False ) -> Self: @@ -844,6 +840,11 @@ def set_gas_price( if "max_fee_per_blob_gas" not in self.model_fields_set: self.max_fee_per_blob_gas = HexNumber(max_fee_per_blob_gas) + def set_gas_limit(self, gas_limit: int) -> None: + """Set the transaction gas limit if unset.""" + if "gas_limit" not in self.model_fields_set: + self.gas_limit = HexNumber(gas_limit) + def signer_minimum_balance(self, *, fork: Fork) -> int: """Return minimum balance of the signer.""" gas_price = self.gas_price or self.max_fee_per_gas @@ -1039,6 +1040,10 @@ def set_gas_price( max_fee_per_blob_gas=max_fee_per_blob_gas, ) + def set_gas_limit(self, gas_limit: int) -> None: + """Set the transaction gas limit if unset.""" + self.tx.set_gas_limit(gas_limit) + def signer_minimum_balance(self, *, fork: Fork) -> int: """Return minimum balance of the signer.""" return self.tx.signer_minimum_balance(fork=fork) From 1a9d3ca4d3d7df2aef5d04867cd41ac2b068d562 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 4 Jun 2026 09:05:35 -0600 Subject: [PATCH 13/46] fix(tests): Fix 7708+7843 --- .../test_fork_transition.py | 2 - .../test_transfer_logs.py | 4 -- .../eip7843_slotnum/test_fork_transition.py | 6 +- .../amsterdam/eip7843_slotnum/test_slotnum.py | 66 ++++++------------- 4 files changed, 21 insertions(+), 57 deletions(-) diff --git a/tests/amsterdam/eip7708_eth_transfer_logs/test_fork_transition.py b/tests/amsterdam/eip7708_eth_transfer_logs/test_fork_transition.py index 99ca74192fd..cfba6e930b8 100644 --- a/tests/amsterdam/eip7708_eth_transfer_logs/test_fork_transition.py +++ b/tests/amsterdam/eip7708_eth_transfer_logs/test_fork_transition.py @@ -11,7 +11,6 @@ Alloc, Block, BlockchainTestFiller, - Fork, Op, Transaction, TransactionReceipt, @@ -36,7 +35,6 @@ def test_burn_log_at_fork_transition( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, same_tx: bool, to_self: bool, ) -> None: diff --git a/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py b/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py index 94d37f936ac..70ebc714669 100644 --- a/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py +++ b/tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py @@ -172,7 +172,6 @@ def test_contract_creation_tx_collision( state_test: StateTestFiller, env: Environment, pre: Alloc, - fork: Fork, collision_nonce: int, collision_code: bytes, ) -> None: @@ -600,8 +599,6 @@ def test_create_out_of_gas_no_log( initcode: Bytecode, ) -> None: """Test that CREATE running out of gas does NOT emit transfer log.""" - # TODO: This test can be improved to be more precise: Subcall with crafted - # gas limit. tx_value = 1000 gas_limit = 100_000 if fork.is_eip_enabled(8037): @@ -1040,7 +1037,6 @@ def test_nested_calls_log_order( state_test: StateTestFiller, env: Environment, pre: Alloc, - fork: Fork, sender: EOA, call_depth: int, ) -> None: diff --git a/tests/amsterdam/eip7843_slotnum/test_fork_transition.py b/tests/amsterdam/eip7843_slotnum/test_fork_transition.py index 2660249284e..4c0bea784a0 100644 --- a/tests/amsterdam/eip7843_slotnum/test_fork_transition.py +++ b/tests/amsterdam/eip7843_slotnum/test_fork_transition.py @@ -6,7 +6,6 @@ Alloc, Block, BlockchainTestFiller, - Fork, Op, Transaction, ) @@ -21,7 +20,6 @@ def test_slotnum_at_fork_transition( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SLOTNUM behavior across the EIP-7843 fork transition. @@ -46,13 +44,11 @@ def test_slotnum_at_fork_transition( at_fork_slot = 200 post_fork_slot = 201 - gas_limit = 100_000 + code.gas_cost(fork.transitions_to()) - blocks = [ Block( timestamp=ts, slot_number=slot, - txs=[Transaction(sender=sender, to=contract, gas_limit=gas_limit)], + txs=[Transaction(sender=sender, to=contract)], ) for ts, slot in [ (14_999, None), diff --git a/tests/amsterdam/eip7843_slotnum/test_slotnum.py b/tests/amsterdam/eip7843_slotnum/test_slotnum.py index 1fd9856ef41..c567da8b441 100644 --- a/tests/amsterdam/eip7843_slotnum/test_slotnum.py +++ b/tests/amsterdam/eip7843_slotnum/test_slotnum.py @@ -34,7 +34,6 @@ def test_slotnum_value( state_test: StateTestFiller, pre: Alloc, - fork: Fork, slot_number: int, ) -> None: """ @@ -43,32 +42,26 @@ def test_slotnum_value( The slot number is provided by the consensus layer and should be accessible via the SLOTNUM opcode (0x4B). """ - # Store SLOTNUM result at storage key 0. Metadata pins the - # storage transition (0->slot_number) so `code.gas_cost(fork)` - # picks the right SSTORE branch under EIP-8037's 2D gas model. - code = Op.SSTORE( - key=0, - value=Op.SLOTNUM, - key_warm=False, - original_value=0, - new_value=slot_number, - ) + # Store SLOTNUM result at storage key 0 + code = Op.SSTORE(0, Op.SLOTNUM) code_address = pre.deploy_contract(code) - intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() - code_regular = code.gas_cost(fork) - tx = Transaction( sender=pre.fund_eoa(), - gas_limit=intrinsic_cost + code_regular, to=code_address, ) + post = { + code_address: Account( + storage={0: slot_number}, + ), + } + state_test( env=Environment(slot_number=slot_number), pre=pre, tx=tx, - post={code_address: Account(storage={0: slot_number})}, + post=post, ) @@ -96,47 +89,32 @@ def test_slotnum_gas_cost( callee_code = Op.SLOTNUM + Op.STOP callee_address = pre.deterministic_deploy_contract(deploy_code=callee_code) - # Caller calls the callee with `call_gas`; SSTOREs the call's - # success bit (1 if SLOTNUM had enough gas, 0 if it OOG'd). - sstore_value = 1 if call_succeeds else 0 - caller_code = Op.SSTORE( - key=0, - value=Op.CALL( - gas=call_gas, - address=callee_address, - address_warm=False, - ), - key_warm=False, - original_value=0, - new_value=sstore_value, - ) + # Caller calls the callee with limited gas and stores result + caller_code = Op.SSTORE(0, Op.CALL(gas=call_gas, address=callee_address)) caller_address = pre.deploy_contract(caller_code) - intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() - # Static opcode-metadata calc misses the gas burned in the inner - # CALL frame; add it back. `call_gas` is the full forwarded amount - # — for `enough_gas` SLOTNUM consumes it all; for `out_of_gas` - # the OOG burns the entire forwarded budget. - code_regular = caller_code.gas_cost(fork) + call_gas - tx = Transaction( sender=pre.fund_eoa(), - gas_limit=intrinsic_cost + code_regular, to=caller_address, ) + post = { + caller_address: Account( + storage={0: 1 if call_succeeds else 0}, + ), + } + state_test( env=Environment(slot_number=12345), pre=pre, tx=tx, - post={caller_address: Account(storage={0: sstore_value})}, + post=post, ) def test_slotnum_distinct_per_block( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test that SLOTNUM returns each block's own slot number. @@ -148,19 +126,15 @@ def test_slotnum_distinct_per_block( in the final post-state. """ sender = pre.fund_eoa() - code = Op.SSTORE(Op.NUMBER, Op.SLOTNUM, new_value=1) + Op.STOP - contract = pre.deploy_contract(code) + contract = pre.deploy_contract(Op.SSTORE(Op.NUMBER, Op.SLOTNUM) + Op.STOP) # Non-monotonic on purpose: decrease, increase, jump to large value. slot_numbers = [100, 42, 7, 2**32] - intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() - gas_limit = intrinsic_cost + code.gas_cost(fork) - blocks = [ Block( slot_number=slot, - txs=[Transaction(sender=sender, to=contract, gas_limit=gas_limit)], + txs=[Transaction(sender=sender, to=contract)], ) for slot in slot_numbers ] From c03111c97481573181ccffbe43f026d0ce115977 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 4 Jun 2026 15:23:01 -0600 Subject: [PATCH 14/46] fix(tests): Fix 7928 --- .../test_block_access_lists.py | 355 ++++-------------- .../test_block_access_lists_cross_index.py | 68 +--- .../test_block_access_lists_eip2935.py | 34 +- .../test_block_access_lists_eip4788.py | 27 +- .../test_block_access_lists_eip4895.py | 61 +-- .../test_block_access_lists_eip7002.py | 22 -- .../test_block_access_lists_eip7702.py | 26 -- .../test_block_access_lists_invalid.py | 33 +- .../test_block_access_lists_opcodes.py | 221 ++++++----- 9 files changed, 232 insertions(+), 615 deletions(-) diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py index 5901e2903ba..72b94884cd0 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py @@ -98,14 +98,15 @@ def test_bal_balance_changes( contract_creation=False, access_list=[], ) - tx_gas_limit = intrinsic_gas_cost + 1000 # add a small buffer + # Hard-coded gas price allows to calculate the tx final price + gas_price = 1_000_000_000 + tx_value = 100 tx = Transaction( sender=alice, to=bob, - value=100, - gas_limit=tx_gas_limit, - gas_price=1_000_000_000, + value=tx_value, + gas_price=gas_price, ) alice_account = pre[alice] @@ -114,7 +115,7 @@ def test_bal_balance_changes( # Account for both the value sent and gas cost (gas_price * gas_used) alice_final_balance = ( - alice_initial_balance - 100 - (intrinsic_gas_cost * 1_000_000_000) + alice_initial_balance - tx_value - (intrinsic_gas_cost * gas_price) ) block = Block( @@ -195,7 +196,6 @@ def test_bal_code_changes( tx = Transaction( sender=alice, to=factory_contract, - gas_limit=500000, ) created_contract = compute_create_address( @@ -289,9 +289,7 @@ def test_bal_account_access_target( code=account_access_opcode(target_contract), ) - tx = Transaction( - sender=alice, to=oracle_contract, gas_limit=5_000_000, gas_price=0xA - ) + tx = Transaction(sender=alice, to=oracle_contract) block = Block( txs=[tx], @@ -314,7 +312,6 @@ def test_bal_account_access_target( def test_bal_callcode_nested_value_transfer( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure BAL captures balance changes from nested value transfers @@ -327,16 +324,11 @@ def test_bal_callcode_nested_value_transfer( target_code = Op.CALL(0, bob, 100, 0, 0, 0, 0) target_contract = pre.deploy_contract(code=target_code) - callcode_gas = 50_000 - if fork.is_eip_enabled(8037): - callcode_gas = 500_000 # Oracle contract that uses CALLCODE to execute TargetContract's code - oracle_code = Op.CALLCODE(callcode_gas, target_contract, 100, 0, 0, 0, 0) + oracle_code = Op.CALLCODE(address=target_contract, value=100) oracle_contract = pre.deploy_contract(code=oracle_code, balance=200) - tx = Transaction( - sender=alice, to=oracle_contract, gas_limit=1_000_000, gas_price=0xA - ) + tx = Transaction(sender=alice, to=oracle_contract) block = Block( txs=[tx], @@ -372,25 +364,14 @@ def test_bal_callcode_nested_value_transfer( @pytest.mark.parametrize( "delegated_opcode", [ - pytest.param( - lambda target_addr, inner_gas: Op.DELEGATECALL( - inner_gas, target_addr, 0, 0, 0, 0 - ), - id="delegatecall", - ), - pytest.param( - lambda target_addr, inner_gas: Op.CALLCODE( - inner_gas, target_addr, 0, 0, 0, 0, 0 - ), - id="callcode", - ), + pytest.param(Op.DELEGATECALL, id="delegatecall"), + pytest.param(Op.CALLCODE, id="callcode"), ], ) def test_bal_delegated_storage_writes( pre: Alloc, blockchain_test: BlockchainTestFiller, - delegated_opcode: Callable[[Address, int], Op], - fork: Fork, + delegated_opcode: Op, ) -> None: """ Ensure BAL captures delegated storage writes via @@ -398,33 +379,16 @@ def test_bal_delegated_storage_writes( """ alice = pre.fund_eoa() - # TargetContract that writes 0x42 to slot 0x01. - # Metadata pins the 0->0x42 transition so the gas calculator - # accounts for SSTORE state gas under EIP-8037. - target_code = Op.SSTORE.with_metadata( - key_warm=False, - original_value=0, - current_value=0, - new_value=0x42, - )(0x01, 0x42) + # TargetContract that writes 0x42 to slot 0x01 + target_code = Op.SSTORE(0x01, 0x42) target_contract = pre.deploy_contract(code=target_code) - # Forward enough inner gas to cover both the regular and (under - # EIP-8037) the spilled state-gas portion of the SSTORE — the - # oracle frame inherits `state_gas_reservoir=0` since the outer - # tx_gas stays below TX_MAX_GAS_LIMIT. - inner_gas = target_code.gas_cost(fork) + 100 # small buffer - # Oracle contract that uses delegated opcode to execute # TargetContract's code - oracle_code = delegated_opcode(target_contract, inner_gas) + oracle_code = delegated_opcode(address=target_contract) oracle_contract = pre.deploy_contract(code=oracle_code) - tx = Transaction( - sender=alice, - to=oracle_contract, - gas_limit=1_000_000, - ) + tx = Transaction(sender=alice, to=oracle_contract) block = Block( txs=[tx], @@ -495,7 +459,6 @@ def test_bal_delegated_storage_reads( tx = Transaction( sender=alice, to=oracle_contract, - gas_limit=1_000_000, ) block = Block( @@ -524,8 +487,6 @@ def test_bal_block_rewards( fork: Fork, ) -> None: """Ensure BAL captures fee recipient balance changes from block rewards.""" - alice_initial_balance = 1_000_000 - alice = pre.fund_eoa(amount=alice_initial_balance) bob = pre.fund_eoa(amount=0) charlie = pre.fund_eoa(amount=0) # fee recipient @@ -537,11 +498,18 @@ def test_bal_block_rewards( ) tx_gas_limit = intrinsic_gas + 1000 # add a small buffer gas_price = 0xA + tx_value = 100 + extra_balance = 1000 + + alice_initial_balance = ( + (tx_gas_limit * gas_price) + tx_value + extra_balance + ) + alice = pre.fund_eoa(amount=alice_initial_balance) tx = Transaction( sender=alice, to=bob, - value=100, + value=tx_value, gas_limit=tx_gas_limit, gas_price=gas_price, ) @@ -559,7 +527,7 @@ def test_bal_block_rewards( ) tip_to_charlie = (gas_price - base_fee_per_gas) * intrinsic_gas - alice_final_balance = alice_initial_balance - 100 - total_gas_cost + alice_final_balance = alice_initial_balance - tx_value - total_gas_cost block = Block( txs=[tx], @@ -610,7 +578,6 @@ def test_bal_block_rewards( def test_bal_selfdestruct_to_coinbase( pre: Alloc, state_test: StateTestFiller, - fork: Fork, same_tx: bool, ) -> None: """ @@ -632,7 +599,6 @@ def test_bal_selfdestruct_to_coinbase( base_fee_per_gas=base_fee_per_gas, fee_recipient=coinbase ) - tx_gas_limit = fork.transaction_gas_limit_cap() account_expectations: dict[Address, BalAccountExpectation] if same_tx: @@ -698,7 +664,6 @@ def test_bal_selfdestruct_to_coinbase( tx = Transaction( sender=alice, to=tx_target, - gas_limit=tx_gas_limit, gas_price=base_fee_per_gas, ) @@ -730,13 +695,10 @@ def test_bal_2930_account_listed_but_untouched( storage_keys=[Hash(0x1)], ) - gas_limit = 1_000_000 - tx = Transaction( ty=1, sender=alice, to=bob, - gas_limit=gas_limit, access_list=[access_list], ) @@ -767,7 +729,6 @@ def test_bal_2930_account_listed_but_untouched( def test_bal_2930_slot_listed_but_untouched( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """Ensure BAL excludes untouched access list storage slots.""" alice = pre.fund_eoa() @@ -781,21 +742,10 @@ def test_bal_2930_slot_listed_but_untouched( storage_keys=[Hash(0x1)], ) - intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() - gas_limit = ( - intrinsic_gas_calculator( - calldata=b"", - contract_creation=False, - access_list=[access_list], - ) - + 1000 - ) # intrinsic + buffer - tx = Transaction( ty=1, sender=alice, to=pure_calculator, - gas_limit=gas_limit, access_list=[access_list], ) @@ -826,7 +776,6 @@ def test_bal_2930_slot_listed_but_untouched( def test_bal_2930_slot_listed_and_unlisted_writes( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure BAL includes storage writes regardless of access list presence. @@ -843,24 +792,10 @@ def test_bal_2930_slot_listed_and_unlisted_writes( storage_keys=[Hash(0x01)], ) - intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() - gas_buffer = 50_000 - if fork.is_eip_enabled(8037): - gas_buffer = 500_000 - gas_limit = ( - intrinsic_gas_calculator( - calldata=b"", - contract_creation=False, - access_list=[access_list], - ) - + gas_buffer - ) # intrinsic + buffer for storage writes - tx = Transaction( ty=1, sender=alice, to=storage_writer, - gas_limit=gas_limit, access_list=[access_list], ) @@ -910,7 +845,6 @@ def test_bal_2930_slot_listed_and_unlisted_writes( def test_bal_2930_slot_listed_and_unlisted_reads( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """Ensure BAL includes storage reads regardless of access list presence.""" alice = pre.fund_eoa() @@ -926,21 +860,10 @@ def test_bal_2930_slot_listed_and_unlisted_reads( storage_keys=[Hash(0x01)], ) - intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() - gas_limit = ( - intrinsic_gas_calculator( - calldata=b"", - contract_creation=False, - access_list=[access_list], - ) - + 50000 - ) # intrinsic + buffer for storage reads - tx = Transaction( ty=1, sender=alice, to=storage_reader, - gas_limit=gas_limit, access_list=[access_list], ) @@ -1107,11 +1030,7 @@ def test_bal_net_zero_balance_transfer( ) tx = Transaction( - sender=alice, - to=net_zero_bal_contract, - value=transfer_amount, - gas_limit=1_000_000, - gas_price=0xA, + sender=alice, to=net_zero_bal_contract, value=transfer_amount ) expected_balance_in_slot = initial_balance + transfer_amount @@ -1180,18 +1099,12 @@ def test_bal_net_zero_balance_transfer( def test_bal_pure_contract_call( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """Test that BAL captures contract access for pure computation calls.""" alice = pre.fund_eoa() pure_contract = pre.deploy_contract(code=Op.ADD(0x3, 0x2)) - intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() - gas_limit = intrinsic_gas_calculator() + 5_000 # Buffer - - tx = Transaction( - sender=alice, to=pure_contract, gas_limit=gas_limit, gas_price=0xA - ) + tx = Transaction(sender=alice, to=pure_contract) block = Block( txs=[tx], @@ -1214,7 +1127,6 @@ def test_bal_pure_contract_call( def test_bal_noop_storage_write( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """Test that BAL correctly handles no-op storage write.""" alice = pre.fund_eoa() @@ -1223,12 +1135,7 @@ def test_bal_noop_storage_write( ) storage_contract = pre.deploy_contract(code=code, storage={0x01: 0x42}) - intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() - gas_limit = intrinsic_gas_calculator() + code.gas_cost(fork) - - tx = Transaction( - sender=alice, to=storage_contract, gas_limit=gas_limit, gas_price=0xA - ) + tx = Transaction(sender=alice, to=storage_contract) block = Block( txs=[tx], @@ -1267,9 +1174,7 @@ def test_bal_aborted_storage_access( storage={0x01: 0x10}, # Pre-existing value in slot 0x01 ) - tx = Transaction( - sender=alice, to=storage_contract, gas_limit=5_000_000, gas_price=0xA - ) + tx = Transaction(sender=alice, to=storage_contract) block = Block( txs=[tx], @@ -1351,9 +1256,7 @@ def test_bal_aborted_account_access( code=account_access_opcode(target_contract) + abort_opcode, ) - tx = Transaction( - sender=alice, to=abort_contract, gas_limit=5_000_000, gas_price=0xA - ) + tx = Transaction(sender=alice, to=abort_contract) block = Block( txs=[tx], @@ -1391,7 +1294,6 @@ def test_bal_aborted_account_access( def test_bal_parent_revert_state_access( pre: Alloc, state_test: StateTestFiller, - fork: Fork, inner_action: str, outer_abort: Op, ) -> None: @@ -1425,9 +1327,7 @@ def test_bal_parent_revert_state_access( code=Op.CALL(gas=Op.GAS, address=inner) + outer_abort ) - tx = Transaction( - sender=alice, to=outer, gas_limit=fork.transaction_gas_limit_cap() - ) + tx = Transaction(sender=alice, to=outer) account_expectations: dict[Address, BalAccountExpectation] if inner_action in ("sstore", "sload"): @@ -1465,7 +1365,6 @@ def test_bal_parent_revert_state_access( def test_bal_outer_revert_with_inner_insufficient_funds( pre: Alloc, state_test: StateTestFiller, - fork: Fork, inner_op: str, ) -> None: """ @@ -1531,9 +1430,7 @@ def test_bal_outer_revert_with_inner_insufficient_funds( code=Op.CALL(gas=Op.GAS, address=inner) + Op.REVERT(0, 0) ) - tx = Transaction( - sender=alice, to=outer, gas_limit=fork.transaction_gas_limit_cap() - ) + tx = Transaction(sender=alice, to=outer) state_test( pre=pre, @@ -1577,9 +1474,7 @@ def test_bal_fully_unmutated_account( storage={0x01: 0x42}, # Pre-existing value ) - tx = Transaction( - sender=alice, to=oracle, gas_limit=1_000_000, value=0, gas_price=0xA - ) + tx = Transaction(sender=alice, to=oracle, value=0, gas_price=0xA) block = Block( txs=[tx], @@ -1635,8 +1530,6 @@ def test_bal_coinbase_zero_tip( fork: Fork, ) -> None: """Ensure BAL includes coinbase even when priority fee is zero.""" - alice_initial_balance = 1_000_000 - alice = pre.fund_eoa(amount=alice_initial_balance) bob = pre.fund_eoa(amount=0) coinbase = pre.fund_eoa(amount=0) # fee recipient @@ -1657,16 +1550,19 @@ def test_bal_coinbase_zero_tip( ) # Set gas_price equal to base_fee so tip = 0 + tx_value = 5 + alice_initial_balance = (tx_gas_limit * base_fee_per_gas) + tx_value + alice = pre.fund_eoa(amount=alice_initial_balance) tx = Transaction( sender=alice, to=bob, - value=5, + value=tx_value, gas_limit=tx_gas_limit, gas_price=base_fee_per_gas, ) alice_final_balance = ( - alice_initial_balance - 5 - (intrinsic_gas * base_fee_per_gas) + alice_initial_balance - tx_value - (intrinsic_gas * base_fee_per_gas) ) block = Block( @@ -1789,7 +1685,6 @@ def test_bal_precompile_funded( sender=alice, to=precompile, value=value, - gas_limit=5_000_000, data=tx_data, ) @@ -1846,15 +1741,10 @@ def test_bal_precompile_call_opcode( alice = pre.fund_eoa() oracle = pre.deploy_contract( - code=call_opcode(gas=100_000, address=precompile) + Op.STOP + code=call_opcode(address=precompile) + Op.STOP ) - tx = Transaction( - sender=alice, - to=oracle, - gas_limit=200_000, - gas_price=0xA, - ) + tx = Transaction(sender=alice, to=oracle) block = Block( txs=[tx], @@ -1884,7 +1774,7 @@ def test_bal_precompile_call_opcode( "value", [ pytest.param(0, id="zero_value"), - pytest.param(10**18, id="positive_value"), + pytest.param(1, id="positive_value"), ], ) def test_bal_nonexistent_value_transfer( @@ -1898,14 +1788,9 @@ def test_bal_nonexistent_value_transfer( Alice sends value directly to non-existent Bob. """ alice = pre.fund_eoa() - bob = Address(0xB0B) + bob = pre.nonexistent_account() - tx = Transaction( - sender=alice, - to=bob, - value=value, - gas_limit=100_000, - ) + tx = Transaction(sender=alice, to=bob, value=value) block = Block( txs=[tx], @@ -1981,17 +1866,13 @@ def test_bal_nonexistent_account_access_read_only( STATICCALL, DELEGATECALL). """ alice = pre.fund_eoa() - bob = Address(0xB0B) + bob = pre.nonexistent_account() oracle_balance = 2 * 10**18 oracle_code = account_access_opcode(bob) oracle = pre.deploy_contract(code=oracle_code, balance=oracle_balance) - tx = Transaction( - sender=alice, - to=oracle, - gas_limit=1_000_000, - ) + tx = Transaction(sender=alice, to=oracle) block = Block( txs=[tx], @@ -2020,18 +1901,23 @@ def test_bal_nonexistent_account_access_read_only( @pytest.mark.parametrize( - "opcode_type,value", + "opcode", + [ + pytest.param(Op.CALL), + pytest.param(Op.CALLCODE), + ], +) +@pytest.mark.parametrize( + "value", [ - pytest.param("call", 0, id="call_zero_value"), - pytest.param("call", 10**18, id="call_positive_value"), - pytest.param("callcode", 0, id="callcode_zero_value"), - pytest.param("callcode", 10**18, id="callcode_positive_value"), + pytest.param(0, id="zero_value"), + pytest.param(10**18, id="positive_value"), ], ) def test_bal_nonexistent_account_access_value_transfer( pre: Alloc, blockchain_test: BlockchainTestFiller, - opcode_type: str, + opcode: Op, value: int, ) -> None: """ @@ -2044,30 +1930,23 @@ def test_bal_nonexistent_account_access_value_transfer( - CALLCODE: Self-transfer (net zero), Bob accessed for code """ alice = pre.fund_eoa() - bob = Address(0xB0B) - oracle_balance = 2 * 10**18 + bob = pre.nonexistent_account() + oracle_balance = value + 10**18 - if opcode_type == "call": - oracle_code = Op.CALL(100_000, bob, value, 0, 0, 0, 0) - else: # callcode - oracle_code = Op.CALLCODE(100_000, bob, value, 0, 0, 0, 0) + oracle_code = opcode(gas=0, address=bob, value=value) oracle = pre.deploy_contract(code=oracle_code, balance=oracle_balance) - tx = Transaction( - sender=alice, - to=oracle, - gas_limit=1_000_000, - ) + tx = Transaction(sender=alice, to=oracle) # Calculate expected balances - if opcode_type == "call" and value > 0: + if opcode == Op.CALL and value > 0: # CALL: Oracle loses value, Bob gains value oracle_final_balance = oracle_balance - value bob_final_balance = value bob_has_balance_change = True oracle_has_balance_change = True - elif opcode_type == "callcode" and value > 0: + elif opcode == Op.CALLCODE and value > 0: # CALLCODE: Self-transfer (net zero), Bob just accessed for code oracle_final_balance = oracle_balance bob_final_balance = 0 @@ -2396,7 +2275,6 @@ def test_bal_nested_delegatecall_storage_writes_net_zero( def test_bal_create_transaction_empty_code( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure BAL does not record spurious code changes when a CREATE transaction @@ -2405,15 +2283,10 @@ def test_bal_create_transaction_empty_code( alice = pre.fund_eoa() contract_address = compute_create_address(address=alice, nonce=0) - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 - tx = Transaction( sender=alice, to=None, data=b"", - gas_limit=gas_limit, ) account_expectations = { @@ -2454,7 +2327,6 @@ def test_bal_cross_tx_storage_write( pre: Alloc, blockchain_test: BlockchainTestFiller, tx2_value: int, - fork: Fork, ) -> None: """ Tx1's storage_change must be preserved regardless of tx2's write. @@ -2469,40 +2341,16 @@ def test_bal_cross_tx_storage_write( contract = pre.deploy_contract(code=Op.SSTORE(0, Op.CALLDATALOAD(0))) - # Size each tx_gas_limit precisely against its SSTORE transition - # under EIP-8037's 2D gas model (regular + state). - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - tx1_data = Hash(tx1_value) - tx2_data = Hash(tx2_value) - tx1_code = Op.SSTORE.with_metadata( - key_warm=False, - original_value=0, - current_value=0, - new_value=tx1_value, - )(0, Op.CALLDATALOAD(0)) - tx2_code = Op.SSTORE.with_metadata( - key_warm=False, - original_value=tx1_value, - current_value=tx1_value, - new_value=tx2_value, - )(0, Op.CALLDATALOAD(0)) - tx1 = Transaction( sender=alice, to=contract, - data=tx1_data, - gas_limit=( - intrinsic_calc(calldata=tx1_data) + tx1_code.gas_cost(fork) - ), + data=Hash(tx1_value), ) tx2 = Transaction( sender=alice, to=contract, - data=tx2_data, - gas_limit=( - intrinsic_calc(calldata=tx2_data) + tx2_code.gas_cost(fork) - ), + data=Hash(tx2_value), ) slot_changes = [ @@ -2548,7 +2396,6 @@ def test_bal_cross_tx_storage_write( def test_bal_cross_tx_storage_chain( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Verify clients apply BAL state changes from prior transactions before @@ -2590,7 +2437,6 @@ def test_bal_cross_tx_storage_chain( sender=sender, to=contract, data=Hash(i), - gas_limit=fork.transaction_gas_limit_cap(), ) ) @@ -2643,7 +2489,6 @@ def test_bal_cross_tx_deploy_then_call( pre: Alloc, blockchain_test: BlockchainTestFiller, create_opcode: Op, - fork: Fork, ) -> None: """ Verify clients apply Tx1's CREATE to their state view before @@ -2687,12 +2532,10 @@ def test_bal_cross_tx_deploy_then_call( sender=alice, to=factory, data=initcode_bytes, - gas_limit=fork.transaction_gas_limit_cap(), ) tx_call = Transaction( sender=bob, to=target, - gas_limit=fork.transaction_gas_limit_cap(), ) account_expectations = { @@ -2903,7 +2746,6 @@ def test_bal_cross_tx_balance_dependency( pre: Alloc, blockchain_test: BlockchainTestFiller, funding_method: str, - fork: Fork, ) -> None: """ Verify clients apply Tx1's balance change before executing Tx2 in @@ -2931,23 +2773,14 @@ def test_bal_cross_tx_balance_dependency( ) if funding_method == "direct_call": - tx_send = Transaction( - sender=alice, - to=contract, - value=transferred, - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx_send = Transaction(sender=alice, to=contract, value=transferred) send_expectations: dict = {} elif funding_method == "selfdestruct": killer = pre.deploy_contract( code=Op.SELFDESTRUCT(contract), balance=transferred, ) - tx_send = Transaction( - sender=alice, - to=killer, - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx_send = Transaction(sender=alice, to=killer) send_expectations = { killer: BalAccountExpectation( balance_changes=[ @@ -2958,12 +2791,7 @@ def test_bal_cross_tx_balance_dependency( else: raise ValueError(f"unknown funding_method: {funding_method}") - tx_read = Transaction( - sender=bob, - to=contract, - data=b"\x01", - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx_read = Transaction(sender=bob, to=contract, data=b"\x01") account_expectations = { contract: BalAccountExpectation( @@ -3267,13 +3095,7 @@ def test_bal_cross_block_ripemd160_state_leak( # Block 1: Call RIPEMD-160 successfully block1 = Block( - txs=[ - Transaction( - sender=alice, - to=ripemd_caller, - gas_limit=100_000, - ) - ], + txs=[Transaction(sender=alice, to=ripemd_caller)], expected_block_access_list=BlockAccessListExpectation( account_expectations={ alice: BalAccountExpectation( @@ -3292,13 +3114,7 @@ def test_bal_cross_block_ripemd160_state_leak( # If internal state leaked from Block 1, RIPEMD-160 would incorrectly # appear in Block 2's BAL. block2 = Block( - txs=[ - Transaction( - sender=bob, - to=exception_contract, - gas_limit=100_000, - ) - ], + txs=[Transaction(sender=bob, to=exception_contract)], expected_block_access_list=BlockAccessListExpectation( account_expectations={ alice: None, @@ -3328,7 +3144,6 @@ def test_bal_cross_block_ripemd160_state_leak( def test_bal_all_transaction_types( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Test BAL with all 5 tx types in single block. @@ -3345,10 +3160,6 @@ def test_bal_all_transaction_types( """ from tests.prague.eip7702_set_code_tx.spec import Spec as Spec7702 - gas_limit = 100_000 - if fork.is_eip_enabled(8037): - gas_limit = 500_000 - # Create senders for each transaction type sender_0 = pre.fund_eoa() # Type 0 - Legacy sender_1 = pre.fund_eoa() # Type 1 - Access List @@ -3375,7 +3186,6 @@ def test_bal_all_transaction_types( ty=0, sender=sender_0, to=contract_0, - gas_limit=gas_limit, gas_price=10, data=Hash(0x01), # Value to store ) @@ -3385,7 +3195,6 @@ def test_bal_all_transaction_types( ty=1, sender=sender_1, to=contract_1, - gas_limit=gas_limit, gas_price=10, data=Hash(0x02), access_list=[ @@ -3401,7 +3210,6 @@ def test_bal_all_transaction_types( ty=2, sender=sender_2, to=contract_2, - gas_limit=gas_limit, max_fee_per_gas=50, max_priority_fee_per_gas=5, data=Hash(0x03), @@ -3414,7 +3222,6 @@ def test_bal_all_transaction_types( ty=3, sender=sender_3, to=contract_3, - gas_limit=gas_limit, max_fee_per_gas=50, max_priority_fee_per_gas=5, max_fee_per_blob_gas=10, @@ -3427,7 +3234,6 @@ def test_bal_all_transaction_types( ty=4, sender=sender_4, to=alice, - gas_limit=gas_limit, max_fee_per_gas=50, max_priority_fee_per_gas=5, authorization_list=[ @@ -3642,11 +3448,7 @@ def test_bal_lexicographic_address_ordering( contract = pre.deploy_contract(code=contract_code) - tx = Transaction( - sender=alice, - to=contract, - gas_limit=1_000_000, - ) + tx = Transaction(sender=alice, to=contract) # BAL must be sorted lexicographically by address bytes # Order: low < mid < high < endian_low < endian_high @@ -3755,7 +3557,6 @@ def test_bal_gas_limit_boundary( sender=alice, to=bob, value=1, - gas_limit=21_000, gas_price=base_fee_per_gas, ) ) @@ -3837,18 +3638,14 @@ def test_bal_intra_tx_multiple_sstores_same_slot( single storage change with the final post-value; intermediate writes (0xAA, 0xBB) must not appear in the BAL. """ - alice = pre.fund_eoa(amount=10**18) + alice = pre.fund_eoa() code = ( Op.SSTORE(0x01, 0xAA) + Op.SSTORE(0x01, 0xBB) + Op.SSTORE(0x01, 0xCC) ) contract = pre.deploy_contract(code=code, storage={0x01: pre_value}) - tx = Transaction( - sender=alice, - to=contract, - gas_limit=200_000, - ) + tx = Transaction(sender=alice, to=contract) blockchain_test( pre=pre, @@ -3930,18 +3727,14 @@ def test_bal_intra_tx_sstores_same_slot_net_zero( net-zero result are filtered: the slot must appear in storage_reads (it was accessed) but must not appear in storage_changes. """ - alice = pre.fund_eoa(amount=10**18) + alice = pre.fund_eoa() code = Op.SSTORE(0x01, writes[0]) for v in writes[1:]: code += Op.SSTORE(0x01, v) contract = pre.deploy_contract(code=code, storage={0x01: pre_value}) - tx = Transaction( - sender=alice, - to=contract, - gas_limit=200_000, - ) + tx = Transaction(sender=alice, to=contract) blockchain_test( pre=pre, diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py index 90715853114..d5b6f59bbd4 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py @@ -24,8 +24,6 @@ BlockAccessListExpectation, BlockchainTestFiller, Bytecode, - Fork, - Header, Op, Transaction, ) @@ -71,7 +69,6 @@ def test_bal_withdrawal_contract_cross_index( to=WITHDRAWAL_REQUEST_ADDRESS, value=1, data=withdrawal_calldata, - gas_limit=1_000_000, ) blockchain_test( @@ -144,7 +141,6 @@ def test_bal_consolidation_contract_cross_index( to=CONSOLIDATION_REQUEST_ADDRESS, value=1, data=consolidation_calldata, - gas_limit=1_000_000, ) blockchain_test( @@ -199,7 +195,6 @@ def test_bal_consolidation_contract_cross_index( def test_bal_noop_write_filtering( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Test that NOOP writes (writing same value or 0 to empty) are filtered. @@ -209,37 +204,15 @@ def test_bal_noop_write_filtering( 2. Writing the same value to a slot doesn't appear in BAL 3. Only actual changes are tracked """ - # Metadata pins each SSTORE's actual transition so the gas - # calculator picks the right branch under EIP-8037's 2D model. test_code = Bytecode( # Write 0 to uninitialized slot 1 (noop) - Op.SSTORE.with_metadata( - key_warm=False, - original_value=0, - current_value=0, - new_value=0, - )(1, 0) - # Write 42 to slot 2 (0->42, charges sstore_state_gas) - + Op.SSTORE.with_metadata( - key_warm=False, - original_value=0, - current_value=0, - new_value=42, - )(2, 42) - # Write 100 to slot 3 (same as pre-state, should be filtered) - + Op.SSTORE.with_metadata( - key_warm=False, - original_value=100, - current_value=100, - new_value=100, - )(3, 100) - # Write 200 to slot 4 (150->200, regular update) - + Op.SSTORE.with_metadata( - key_warm=False, - original_value=150, - current_value=150, - new_value=200, - )(4, 200) + Op.SSTORE(1, 0) + # Write 42 to slot 2 + + Op.SSTORE(2, 42) + # Write 100 to slot 3 (will be same as pre-state, should be filtered) + + Op.SSTORE(3, 100) + # Write 200 to slot 4 (different from pre-state 150, should appear) + + Op.SSTORE(4, 200) ) sender = pre.fund_eoa() @@ -248,12 +221,7 @@ def test_bal_noop_write_filtering( storage={3: 100, 4: 150}, ) - intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() - tx = Transaction( - sender=sender, - to=test_address, - gas_limit=intrinsic_cost + test_code.gas_cost(fork), - ) + tx = Transaction(sender=sender, to=test_address) # Expected BAL should only show actual changes expected_block_access_list = BlockAccessListExpectation( @@ -281,17 +249,9 @@ def test_bal_noop_write_filtering( } ) - # Header `gas_used = max(regular, state)` for the single tx; the - # SSTORE metadata pins each transition so `regular_cost`/`state_cost` - # return the actual fork-priced amount. - expected_regular = intrinsic_cost + test_code.regular_cost(fork) - expected_state = test_code.state_cost(fork) block = Block( txs=[tx], expected_block_access_list=expected_block_access_list, - header_verify=Header( - gas_used=max(expected_regular, expected_state), - ), ) blockchain_test( @@ -334,8 +294,8 @@ def test_bal_intra_tx_round_trip_after_prior_tx_write( # Both txs go into the same block; tx 1 makes the real 0 -> 0x42 # change, tx 2 starts from 0x42 and ends at 0x42 (per-tx no-op). - tx_1 = Transaction(sender=sender_a, to=contract, gas_limit=200_000) - tx_2 = Transaction(sender=sender_b, to=contract, gas_limit=200_000) + tx_1 = Transaction(sender=sender_a, to=contract) + tx_2 = Transaction(sender=sender_b, to=contract) expected_block_access_list = BlockAccessListExpectation( account_expectations={ @@ -415,7 +375,6 @@ def test_bal_system_contract_noop_filtering( sender=sender, to=receiver, value=100, - gas_limit=21_000, ) # withdrawal and consolidation contracts should NOT have any storage @@ -495,14 +454,9 @@ def test_bal_withdrawal_predeploy_balance_observed_cross_tx( to=WITHDRAWAL_REQUEST_ADDRESS, value=fee, data=withdrawal_calldata, - gas_limit=1_000_000, ) - tx_read_balance = Transaction( - sender=sender_1, - to=reader, - gas_limit=200_000, - ) + tx_read_balance = Transaction(sender=sender_1, to=reader) expected_block_access_list = BlockAccessListExpectation( account_expectations={ diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip2935.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip2935.py index 72ca12b5de7..174fd5947e2 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip2935.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip2935.py @@ -12,7 +12,6 @@ Block, BlockAccessListExpectation, BlockchainTestFiller, - Fork, Hash, Op, Transaction, @@ -56,7 +55,6 @@ def block_hash_system_call_expectations(block_number: int) -> dict: def test_bal_2935_simple( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure BAL captures history storage writes during system call. @@ -71,19 +69,9 @@ def test_bal_2935_simple( transfer_value = 10 - tx1 = Transaction( - sender=alice, - to=charlie, - value=transfer_value, - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx1 = Transaction(sender=alice, to=charlie, value=transfer_value) - tx2 = Transaction( - sender=bob, - to=charlie, - value=transfer_value, - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx2 = Transaction(sender=bob, to=charlie, value=transfer_value) account_expectations = block_hash_system_call_expectations(0) @@ -162,7 +150,6 @@ def test_bal_2935_empty_block( def test_bal_2935_query( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, query_block_number: int, is_valid: bool, value: int, @@ -204,7 +191,6 @@ def test_bal_2935_query( to=oracle, data=Hash(query_block_number), value=value, - gas_limit=fork.transaction_gas_limit_cap(), ) # A setup up block that writes genesis block-hash @@ -291,7 +277,6 @@ def test_bal_2935_query( def test_bal_2935_selfdestruct_to_history_storage( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure BAL captures SELFDESTRUCT to history storage address alongside @@ -314,11 +299,7 @@ def test_bal_2935_selfdestruct_to_history_storage( balance=contract_balance, ) - tx = Transaction( - sender=alice, - to=selfdestruct_contract, - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx = Transaction(sender=alice, to=selfdestruct_contract) account_expectations = block_hash_system_call_expectations(0) @@ -372,7 +353,6 @@ def test_bal_2935_selfdestruct_to_history_storage( def test_bal_2935_invalid_calldata_size( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, calldata_size: int, value: int, ) -> None: @@ -409,13 +389,7 @@ def test_bal_2935_invalid_calldata_size( # Pad calldata to requested size calldata = b"\x00" * calldata_size - tx = Transaction( - sender=alice, - to=oracle, - data=calldata, - value=value, - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx = Transaction(sender=alice, to=oracle, data=calldata, value=value) # Block 1: Setup block that writes genesis block-hash via system call block_1 = Block( diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip4788.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip4788.py index 65e0b376dc7..13d08f06e6d 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip4788.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip4788.py @@ -13,7 +13,6 @@ Block, BlockAccessListExpectation, BlockchainTestFiller, - Fork, Hash, Op, Transaction, @@ -113,7 +112,6 @@ def build_beacon_root_setup_block( def test_bal_4788_simple( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure BAL captures beacon root storage writes during pre-execution @@ -132,19 +130,9 @@ def test_bal_4788_simple( transfer_value = 10 - tx1 = Transaction( - sender=alice, - to=charlie, - value=transfer_value, - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx1 = Transaction(sender=alice, to=charlie, value=transfer_value) - tx2 = Transaction( - sender=bob, - to=charlie, - value=transfer_value, - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx2 = Transaction(sender=bob, to=charlie, value=transfer_value) # Build BAL expectations starting with system call account_expectations = beacon_root_system_call_expectations( @@ -243,7 +231,6 @@ def test_bal_4788_empty_block( def test_bal_4788_query( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, timestamp: int, beacon_root: Hash, query_timestamp: int, @@ -295,7 +282,6 @@ def test_bal_4788_query( to=query_contract, data=Hash(query_timestamp), value=value, - gas_limit=fork.transaction_gas_limit_cap(), ) # Build BAL expectations for block 2 @@ -406,7 +392,6 @@ def test_bal_4788_query( def test_bal_4788_invalid_calldata_size( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, calldata_size: int, value: int, ) -> None: @@ -451,7 +436,6 @@ def test_bal_4788_invalid_calldata_size( to=query_contract, data=calldata, value=value, - gas_limit=fork.transaction_gas_limit_cap(), ) account_expectations = beacon_root_system_call_expectations( @@ -505,7 +489,6 @@ def test_bal_4788_invalid_calldata_size( def test_bal_4788_selfdestruct_to_beacon_root( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure BAL captures SELFDESTRUCT to beacon root address alongside @@ -530,11 +513,7 @@ def test_bal_4788_selfdestruct_to_beacon_root( balance=contract_balance, ) - tx = Transaction( - sender=alice, - to=selfdestruct_contract, - gas_limit=fork.transaction_gas_limit_cap(), - ) + tx = Transaction(sender=alice, to=selfdestruct_contract) # Build BAL expectations starting with system call account_expectations = beacon_root_system_call_expectations( diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip4895.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip4895.py index d72f262c240..a78d67763dc 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip4895.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip4895.py @@ -267,12 +267,7 @@ def test_bal_withdrawal_and_state_access_same_account( storage={0x01: 0x42}, ) - tx = Transaction( - sender=alice, - to=oracle, - gas_limit=1_000_000, - gas_price=0xA, - ) + tx = Transaction(sender=alice, to=oracle) block = Block( txs=[tx], @@ -449,12 +444,7 @@ def test_bal_withdrawal_and_selfdestruct( code=Op.SELFDESTRUCT(bob), ) - tx = Transaction( - sender=alice, - to=oracle, - gas_limit=1_000_000, - gas_price=0xA, - ) + tx = Transaction(sender=alice, to=oracle) block = Block( txs=[tx], @@ -525,8 +515,6 @@ def test_bal_withdrawal_and_new_contract( to=None, data=initcode, value=5 * GWEI, - gas_limit=1_000_000, - gas_price=0xA, ) block = Block( @@ -724,10 +712,12 @@ def test_bal_withdrawal_largest_amount( ) +@pytest.mark.parametrize("tx_type", [0, 2]) def test_bal_withdrawal_to_coinbase( pre: Alloc, blockchain_test: BlockchainTestFiller, fork: Fork, + tx_type: int, ) -> None: """ Ensure BAL captures withdrawal to coinbase address. @@ -741,16 +731,6 @@ def test_bal_withdrawal_to_coinbase( intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() intrinsic_gas = intrinsic_gas_calculator() - tx_gas_limit = intrinsic_gas + 1000 - gas_price = 0xA - - tx = Transaction( - sender=alice, - to=bob, - value=5, - gas_limit=tx_gas_limit, - gas_price=gas_price, - ) # Calculate tip to coinbase genesis_env = Environment(base_fee_per_gas=0x7) @@ -759,8 +739,29 @@ def test_bal_withdrawal_to_coinbase( parent_gas_used=0, parent_gas_limit=genesis_env.gas_limit, ) - tip_to_coinbase = (gas_price - base_fee_per_gas) * intrinsic_gas - coinbase_final_balance = tip_to_coinbase + (10 * GWEI) + priority_fee = 1 + + tx_kwargs = {} + if tx_type == 2: + tx_kwargs["ty"] = 2 + tx_kwargs["max_fee_per_gas"] = base_fee_per_gas + priority_fee + tx_kwargs["max_priority_fee_per_gas"] = base_fee_per_gas + priority_fee + else: + tx_kwargs["ty"] = 0 + tx_kwargs["gas_price"] = base_fee_per_gas + priority_fee + + tx_value = 5 + tx = Transaction( + sender=alice, + to=bob, + value=tx_value, + gas_limit=intrinsic_gas, + **tx_kwargs, + ) + + tip_to_coinbase = priority_fee * intrinsic_gas + withdrawal_amount = 10 + coinbase_final_balance = tip_to_coinbase + (withdrawal_amount * GWEI) block = Block( txs=[tx], @@ -771,7 +772,7 @@ def test_bal_withdrawal_to_coinbase( index=0, validator_index=0, address=coinbase, - amount=10, + amount=withdrawal_amount, ) ], expected_block_access_list=BlockAccessListExpectation( @@ -783,7 +784,9 @@ def test_bal_withdrawal_to_coinbase( ), bob: BalAccountExpectation( balance_changes=[ - BalBalanceChange(block_access_index=1, post_balance=5) + BalBalanceChange( + block_access_index=1, post_balance=tx_value + ) ], ), coinbase: BalAccountExpectation( @@ -806,7 +809,7 @@ def test_bal_withdrawal_to_coinbase( blocks=[block], post={ alice: Account(nonce=1), - bob: Account(balance=5), + bob: Account(balance=tx_value), coinbase: Account(balance=coinbase_final_balance), }, genesis_environment=genesis_env, diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7002.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7002.py index 05f7c0574ae..bf9384224e6 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7002.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7002.py @@ -15,7 +15,6 @@ Block, BlockAccessListExpectation, BlockchainTestFiller, - Fork, Op, Transaction, ) @@ -177,7 +176,6 @@ def _build_incremental_changes( def test_bal_7002_clean_sweep( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, pubkey: bytes, amount: int, ) -> None: @@ -197,18 +195,12 @@ def test_bal_7002_clean_sweep( fee=Spec7002.get_fee(0), ) - # Predeploy sweep performs first-time SSTOREs for queue, count, and - # tail slots. `sstore_state_gas()` is 0 pre-EIP-8037 and scales with - # cpsb on Amsterdam, keeping this budget CPSB-agnostic. - gas_limit = 200_000 + 5 * Op.SSTORE(new_value=1).state_cost(fork) - # Transaction to system contract tx = Transaction( sender=alice, to=Address(Spec7002.WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS), value=withdrawal_request.fee, data=withdrawal_request.calldata, - gas_limit=gas_limit, ) # Build queue writes and reads based on pubkey @@ -290,7 +282,6 @@ def test_bal_7002_clean_sweep( def test_bal_7002_partial_sweep( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure BAL correctly tracks queue overflow when requests exceed MAX. @@ -301,11 +292,6 @@ def test_bal_7002_partial_sweep( fee = Spec7002.get_fee(0) senders = [pre.fund_eoa() for _ in range(num_requests)] - # Predeploy sweep performs first-time SSTOREs for queue, count, and - # tail slots. `sstore_state_gas()` is 0 pre-EIP-8037 and scales with - # cpsb on Amsterdam, keeping this budget CPSB-agnostic. - gas_limit = 200_000 + 5 * Op.SSTORE(new_value=1).state_cost(fork) - # Block 1: 20 withdrawal requests withdrawal_requests = [ WithdrawalRequest(validator_pubkey=i + 1, amount=0, fee=fee) @@ -320,7 +306,6 @@ def test_bal_7002_partial_sweep( to=eip7002_address, value=withdrawal_request.fee, data=withdrawal_request.calldata, - gas_limit=gas_limit, ) for sender, withdrawal_request in zip( senders, withdrawal_requests, strict=True @@ -468,7 +453,6 @@ def test_bal_7002_partial_sweep( def test_bal_7002_no_withdrawal_requests( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure BAL captures EIP-7002 system contract dequeue operation even @@ -483,16 +467,10 @@ def test_bal_7002_no_withdrawal_requests( value = 10 - # Predeploy sweep performs first-time SSTOREs for queue, count, and - # tail slots. `sstore_state_gas()` is 0 pre-EIP-8037 and scales with - # cpsb on Amsterdam, keeping this budget CPSB-agnostic. - gas_limit = 200_000 + 5 * Op.SSTORE(new_value=1).state_cost(fork) - tx = Transaction( sender=alice, to=bob, value=value, - gas_limit=gas_limit, ) block = Block( diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py index 68fd84b1f97..dd0f036a714 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py @@ -66,7 +66,6 @@ def test_bal_7702_delegation_create( sender=sender, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=oracle, @@ -191,7 +190,6 @@ def test_bal_7702_delegation_update( sender=sender_create, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=oracle1, @@ -206,7 +204,6 @@ def test_bal_7702_delegation_update( sender=sender_update, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=oracle2, @@ -330,7 +327,6 @@ def test_bal_7702_delegation_clear( sender=sender, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=oracle, @@ -345,7 +341,6 @@ def test_bal_7702_delegation_clear( sender=sender, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=abyss, @@ -441,8 +436,6 @@ def test_bal_7702_delegated_storage_access( sender=bob, to=alice, # Bob calls Alice (delegated account) value=10, - gas_limit=1_000_000, - gas_price=0xA, ) block = Block( @@ -506,7 +499,6 @@ def test_bal_7702_invalid_nonce_authorization( sender=relayer, # Sponsored transaction to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=oracle, @@ -572,7 +564,6 @@ def test_bal_7702_invalid_authority_has_code_authorization( sender=relayer, # Sponsored transaction to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=oracle, @@ -631,7 +622,6 @@ def test_bal_7702_invalid_chain_id_authorization( sender=relayer, # Sponsored transaction to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( chain_id=999, # Wrong chain id @@ -710,8 +700,6 @@ def test_bal_7702_delegated_via_call_opcode( tx = Transaction( sender=bob, to=caller, # `bob` calls caller contract - gas_limit=10_000_000, - gas_price=0xA, ) block = Block( @@ -774,7 +762,6 @@ def test_bal_7702_multi_hop_delegation_chain( tx = Transaction( sender=alice, to=entry_address, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=auth_b, @@ -884,7 +871,6 @@ def test_bal_7702_cross_tx_delegation_then_call( sender=relayer, to=bob, value=0, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=counter, @@ -896,14 +882,10 @@ def test_bal_7702_cross_tx_delegation_then_call( tx_call_1 = Transaction( sender=bob, to=alice, - gas_limit=200_000, - gas_price=0xA, ) tx_call_2 = Transaction( sender=charlie, to=alice, - gas_limit=200_000, - gas_price=0xA, ) block = Block( @@ -970,7 +952,6 @@ def test_bal_7702_null_address_delegation_no_code_change( sender=alice, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=0, @@ -1050,7 +1031,6 @@ def test_bal_7702_double_auth_reset( sender=alice if self_funded else relayer, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=contract_a, @@ -1138,7 +1118,6 @@ def test_bal_7702_double_auth_swap( sender=relayer, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=contract_a, @@ -1239,7 +1218,6 @@ def test_bal_selfdestruct_to_7702_delegation( sender=relayer, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=oracle, @@ -1257,8 +1235,6 @@ def test_bal_selfdestruct_to_7702_delegation( nonce=1, sender=relayer, to=caller, - gas_limit=1_000_000, - gas_price=0xA, ) alice_final_balance = alice_initial_balance + victim_balance @@ -1371,7 +1347,6 @@ def test_bal_withdrawal_to_7702_delegation( sender=relayer, to=bob, value=10, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=oracle, @@ -1502,7 +1477,6 @@ def test_bal_7702_delegated_create( tx = Transaction( sender=alice, to=deployer, - gas_limit=1_000_000, authorization_list=[ AuthorizationTuple( address=deployer, diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py index 52d366019d8..9ae157823fc 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_invalid.py @@ -87,7 +87,6 @@ def test_bal_invalid_missing_nonce( sender=sender, to=receiver, value=10**15, - gas_limit=21_000, ) blockchain_test( @@ -132,7 +131,6 @@ def test_bal_invalid_nonce_value( sender=sender, to=receiver, value=10**15, - gas_limit=21_000, ) blockchain_test( @@ -180,11 +178,7 @@ def test_bal_invalid_storage_value( storage=storage.canary(), ) - tx = Transaction( - sender=sender, - to=contract, - gas_limit=100_000, - ) + tx = Transaction(sender=sender, to=contract) blockchain_test( pre=pre, @@ -259,14 +253,12 @@ def test_bal_invalid_tx_order( sender=sender1, to=receiver, value=10**15, - gas_limit=21_000, ) tx2 = Transaction( sender=sender2, to=receiver, value=2 * 10**15, - gas_limit=21_000, ) blockchain_test( @@ -332,7 +324,6 @@ def test_bal_invalid_account( sender=sender, to=receiver, value=10**15, - gas_limit=21_000, ) blockchain_test( @@ -390,7 +381,6 @@ def test_bal_invalid_duplicate_account( sender=sender, to=receiver, value=10**15, - gas_limit=21_000, ) blockchain_test( @@ -442,7 +432,6 @@ def test_bal_invalid_account_order( sender=sender, to=receiver, value=10**15, - gas_limit=21_000, ) blockchain_test( @@ -494,17 +483,12 @@ def test_bal_invalid_complex_corruption( storage=storage.canary(), ) - tx1 = Transaction( - sender=sender, - to=contract, - gas_limit=100_000, - ) + tx1 = Transaction(sender=sender, to=contract) tx2 = Transaction( sender=sender, to=receiver, value=10**15, - gas_limit=21_000, ) blockchain_test( @@ -603,7 +587,6 @@ def test_bal_invalid_missing_account( sender=sender, to=omitted, value=10**15, - gas_limit=21_000, ) post: dict = { sender: Account(balance=10**18, nonce=0), @@ -620,11 +603,7 @@ def test_bal_invalid_missing_account( elif scenario == "access_only": omitted = pre.fund_eoa(amount=1) checker = pre.deploy_contract(code=Op.BALANCE(omitted)) - tx = Transaction( - sender=sender, - to=checker, - gas_limit=100_000, - ) + tx = Transaction(sender=sender, to=checker) post = { sender: Account(balance=10**18, nonce=0), omitted: Account(balance=1), @@ -677,7 +656,6 @@ def test_bal_invalid_missing_withdrawal_account( sender=alice, to=bob, value=5, - gas_limit=21_000, ) blockchain_test( @@ -832,7 +810,6 @@ def test_bal_invalid_balance_value( sender=sender, to=receiver, value=10**15, - gas_limit=21_000, ) blockchain_test( @@ -1006,7 +983,6 @@ def test_bal_invalid_extraneous_entries( sender=alice, to=oracle, value=transfer_value, - gas_limit=1_000_000, ) blockchain_test( @@ -1121,7 +1097,6 @@ def test_bal_invalid_duplicate_entries( sender=alice, to=oracle, value=100, - gas_limit=2_000_000, ) blockchain_test( @@ -1205,7 +1180,6 @@ def test_bal_invalid_hash_mismatch( sender=sender, to=receiver, value=10**15, - gas_limit=21_000, ) blockchain_test( @@ -1289,7 +1263,6 @@ def test_bal_invalid_field_entries( sender=alice, to=oracle, value=100, - gas_limit=2_000_000, ) blockchain_test( diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_opcodes.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_opcodes.py index a445801805d..7e210d870e9 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_opcodes.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_opcodes.py @@ -359,11 +359,7 @@ def test_bal_account_touch_system_address( toucher = pre.deploy_contract(code=access_opcode(SYSTEM_ADDRESS) + Op.STOP) - tx = Transaction( - sender=alice, - to=toucher, - gas_limit=200_000, - ) + tx = Transaction(sender=alice, to=toucher) block = Block( txs=[tx], @@ -389,7 +385,6 @@ def test_bal_account_touch_system_address( def test_bal_selfdestruct_to_system_address_zero_balance( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Ensure `SYSTEM_ADDRESS` is in BAL when accessed via `SELFDESTRUCT`, @@ -407,8 +402,6 @@ def test_bal_selfdestruct_to_system_address_zero_balance( to=None, # CREATE value=0, # zero contract balance at SELFDESTRUCT time data=init_code, - gas_limit=fork.transaction_gas_limit_cap(), - gas_price=10, ) block = Block( @@ -1882,11 +1875,7 @@ def test_bal_storage_write_read_same_frame( ) oracle = pre.deploy_contract(code=oracle_code, storage={0x01: 0x99}) - tx = Transaction( - sender=alice, - to=oracle, - gas_limit=1_000_000, - ) + tx = Transaction(sender=alice, to=oracle) block = Block( txs=[tx], @@ -1975,11 +1964,7 @@ def test_bal_storage_write_read_cross_frame( oracle = pre.deploy_contract(code=oracle_code, storage={0x01: 0x99}) - tx = Transaction( - sender=alice, - to=oracle, - gas_limit=1_000_000, - ) + tx = Transaction(sender=alice, to=oracle) block = Block( txs=[tx], @@ -2017,10 +2002,18 @@ def test_bal_storage_write_read_cross_frame( ) +@pytest.mark.parametrize( + "sufficient_gas", + [ + pytest.param(False, id="insufficient_gas"), + pytest.param(True, id="sufficient_gas"), + ], +) def test_bal_create_oog_code_deposit( pre: Alloc, blockchain_test: BlockchainTestFiller, fork: Fork, + sufficient_gas: bool, ) -> None: """ Ensure BAL correctly handles CREATE that runs out of gas during code @@ -2031,31 +2024,46 @@ def test_bal_create_oog_code_deposit( # create init code that returns a very large contract to force OOG deposited_len = 10_000 - initcode = Op.RETURN(0, deposited_len) + initcode = Op.RETURN( + 0, + deposited_len, + old_memory_size=0, + new_memory_size=deposited_len, + code_deposit_size=deposited_len, + ) + + create_code = Op.MSTORE( + 0, + Op.PUSH32(bytes(initcode)), + new_memory_size=len(initcode), + ) + Op.CREATE( + offset=32 - len(initcode), + size=len(initcode), + init_code_size=len(initcode), + ) + return_code = Op.PUSH1[0] + Op.MSTORE + Op.RETURN(0, 32) + factory_code = create_code + return_code - factory = pre.deploy_contract( - code=Op.MSTORE(0, Op.PUSH32(bytes(initcode))) - + Op.SSTORE( - 1, Op.CREATE(offset=32 - len(initcode), size=len(initcode)) - ) - + Op.STOP, - storage={1: 0xDEADBEEF}, - ) + factory = pre.deploy_contract(code=factory_code) contract_address = compute_create_address(address=factory, nonce=1) - intrinsic_gas_calculator = fork.transaction_intrinsic_cost_calculator() - intrinsic_gas = intrinsic_gas_calculator( - calldata=b"", - contract_creation=False, - access_list=[], + initcode_cost = initcode.gas_cost(fork) + gas = (initcode_cost * 64 // 63) + create_code.gas_cost(fork) + if not sufficient_gas: + gas -= 1 + + entry_code = Op.SSTORE( + 0, Op.CALL(gas=gas, address=factory, ret_size=32) + ) + Op.SSTORE(1, Op.MLOAD(0)) + entry = pre.deploy_contract( + entry_code, storage={0: 0xDEADBEEF, 1: 0xDEADBEEF} ) - # NEW_ACCOUNT keeps the budget CPSB-agnostic but short of the deposit. tx = Transaction( sender=alice, - to=factory, - gas_limit=(intrinsic_gas + 500_000 + fork.gas_costs().NEW_ACCOUNT), + to=entry, + gas_limit=fork.transaction_gas_limit_cap(), # No state reservoir ) # BAL expectations: @@ -2063,23 +2071,56 @@ def test_bal_create_oog_code_deposit( # - Factory: nonce change (CREATE increments factory nonce) # - Contract address: empty changes (read during collision check, # nonce/code changes rolled back on OOG) + if sufficient_gas: + entry_storage_changes = [ + BalStorageSlot( + slot=0, + slot_changes=[ + BalStorageChange(block_access_index=1, post_value=1), + ], + ), + BalStorageSlot( + slot=1, + slot_changes=[ + # SSTORE saves address (CREATE succeeded) + BalStorageChange( + block_access_index=1, post_value=contract_address + ), + ], + ), + ] + else: + entry_storage_changes = [ + BalStorageSlot( + slot=0, + slot_changes=[ + BalStorageChange(block_access_index=1, post_value=1), + ], + ), + BalStorageSlot( + slot=1, + slot_changes=[ + # SSTORE saves 0 (CREATE failed) + BalStorageChange(block_access_index=1, post_value=0), + ], + ), + ] + account_expectations = { alice: BalAccountExpectation( nonce_changes=[BalNonceChange(block_access_index=1, post_nonce=1)], ), factory: BalAccountExpectation( nonce_changes=[BalNonceChange(block_access_index=1, post_nonce=2)], - storage_changes=[ - BalStorageSlot( - slot=1, - slot_changes=[ - # SSTORE saves 0 (CREATE failed) - BalStorageChange(block_access_index=1, post_value=0), - ], - ) - ], ), - contract_address: BalAccountExpectation.empty(), + entry: BalAccountExpectation( + storage_changes=entry_storage_changes, + ), + contract_address: BalAccountExpectation( + nonce_changes=[BalNonceChange(block_access_index=1, post_nonce=1)], + ) + if sufficient_gas + else BalAccountExpectation.empty(), } blockchain_test( @@ -2094,8 +2135,14 @@ def test_bal_create_oog_code_deposit( ], post={ alice: Account(nonce=1), - factory: Account(nonce=2, storage={1: 0}), - contract_address: Account.NONEXISTENT, + factory: Account(nonce=2), + entry: Account( + nonce=1, + storage={0: 1, 1: contract_address if sufficient_gas else 0}, + ), + contract_address: Account(nonce=1) + if sufficient_gas + else Account.NONEXISTENT, }, ) @@ -2128,11 +2175,7 @@ def test_bal_sstore_static_context( storage={0: 0xDEAD}, # non-zero so STATICCALL result (0) is detectable ) - tx = Transaction( - sender=alice, - to=contract_a, - gas_limit=2_000_000, - ) + tx = Transaction(sender=alice, to=contract_a) blockchain_test( pre=pre, @@ -2213,10 +2256,7 @@ def blockchain_test_under_static_call( ) tx = Transaction( - sender=alice, - to=static_caller, - gas_limit=2_000_000, - access_list=tx_access_list, + sender=alice, to=static_caller, access_list=tx_access_list ) # Inner call fails (returns 0) when forbidden opcodes are tested @@ -2496,11 +2536,7 @@ def test_bal_create_contract_init_revert( created_address = compute_create_address(address=factory, nonce=1) - tx = Transaction( - sender=alice, - to=caller, - gas_limit=500_000, - ) + tx = Transaction(sender=alice, to=caller) blockchain_test( pre=pre, @@ -2616,12 +2652,7 @@ def test_bal_call_revert_insufficient_funds( AccessList(address=delegation_target, storage_keys=[]) ) - tx = Transaction( - sender=alice, - to=caller, - gas_limit=1_000_000, - access_list=access_list, - ) + tx = Transaction(sender=alice, to=caller, access_list=access_list) account_expectations: Dict[Address, BalAccountExpectation | None] = { alice: BalAccountExpectation( @@ -2680,7 +2711,6 @@ def test_bal_call_revert_insufficient_funds( def test_bal_create_selfdestruct_to_self_with_call( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, ) -> None: """ Test BAL with init code that CALLs Oracle, writes storage, then @@ -2708,12 +2738,8 @@ def test_bal_create_selfdestruct_to_self_with_call( # 1. Calls Oracle (which writes to its slot 0x01) # 2. Writes 0x42 to own slot 0x01 # 3. Selfdestructs to self - # - # Forward enough gas for Oracle's first-time SSTORE - # (regular base + state gas, CPSB-agnostic). - oracle_call_gas = 100_000 + Op.SSTORE(new_value=1).state_cost(fork) initcode_runtime = ( - Op.CALL(oracle_call_gas, oracle, 0, 0, 0, 0, 0) + Op.CALL(address=oracle) + Op.POP # Write to own storage slot 0x01 + Op.SSTORE(0x01, 0x42) @@ -2774,18 +2800,7 @@ def test_bal_create_selfdestruct_to_self_with_call( opcode=Op.CREATE2, ) - # Budget for CREATE2 + 3 first-time SSTOREs, CPSB-agnostic via state gas. - gas_limit = ( - 1_000_000 - + fork.gas_costs().NEW_ACCOUNT - + 3 * Op.SSTORE(new_value=1).state_cost(fork) - ) - - tx = Transaction( - sender=alice, - to=factory, - gas_limit=gas_limit, - ) + tx = Transaction(sender=alice, to=factory) block = Block( txs=[tx], @@ -3063,11 +3078,7 @@ def test_bal_transient_storage_not_tracked( contract = pre.deploy_contract(code=contract_code) - tx = Transaction( - sender=alice, - to=contract, - gas_limit=1_000_000, - ) + tx = Transaction(sender=alice, to=contract) block = Block( txs=[tx], @@ -3464,11 +3475,7 @@ def test_bal_create_early_failure( opcode=create_opcode, ) - tx = Transaction( - sender=alice, - to=factory, - gas_limit=1_000_000, - ) + tx = Transaction(sender=alice, to=factory) block = Block( txs=[tx], @@ -3567,12 +3574,7 @@ def test_bal_create_storage_op_then_selfdestruct_same_tx( ) pre.fund_address(target_a, fund_amount) - tx = Transaction( - sender=alice, - to=factory, - data=initcode_bytes, - gas_limit=1_000_000, - ) + tx = Transaction(sender=alice, to=factory, data=initcode_bytes) block = Block( txs=[tx], @@ -3618,7 +3620,6 @@ def test_bal_create_storage_op_then_selfdestruct_same_tx( def test_bal_create2_selfdestruct_then_recreate_same_block( pre: Alloc, blockchain_test: BlockchainTestFiller, - fork: Fork, pre_balance: int, ) -> None: """ @@ -3673,20 +3674,8 @@ def test_bal_create2_selfdestruct_then_recreate_same_block( if pre_balance > 0: pre.fund_address(target_a, pre_balance) - # Headroom for the self-destruct to fund a fresh beneficiary. - gas_limit = (fork.transaction_gas_limit_cap() or 0) + 2_000_000 - tx1 = Transaction( - sender=alice, - to=factory, - data=initcode_bytes, - gas_limit=gas_limit, - ) - tx2 = Transaction( - sender=alice, - to=factory, - data=initcode_bytes, - gas_limit=gas_limit, - ) + tx1 = Transaction(sender=alice, to=factory, data=initcode_bytes) + tx2 = Transaction(sender=alice, to=factory, data=initcode_bytes) target_a_balance_changes = [] if pre_balance > 0: From 090caa63dd214b9b25b4edeaf91d60e8d9c09956 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 4 Jun 2026 15:25:26 -0600 Subject: [PATCH 15/46] fix(test-types): Fix `Transaction.set_gas_limit` --- .../src/execution_testing/test_types/transaction_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 3f43d119ca9..2e5c1666c70 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -842,7 +842,7 @@ def set_gas_price( def set_gas_limit(self, gas_limit: int) -> None: """Set the transaction gas limit if unset.""" - if "gas_limit" not in self.model_fields_set: + if "gas_limit" not in self.model_fields_set or self.gas_limit is None: self.gas_limit = HexNumber(gas_limit) def signer_minimum_balance(self, *, fork: Fork) -> int: From cef5cf2c289f59d513112cb6ca0a8d37093200f9 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 4 Jun 2026 16:06:02 -0600 Subject: [PATCH 16/46] fix(test-specs): Fix typing --- .../src/execution_testing/specs/blockchain.py | 6 +- .../specs/tests/test_benchmark.py | 63 ++++++++++--------- .../test_types/transaction_types.py | 5 +- .../tools/utility/generators.py | 4 +- 4 files changed, 45 insertions(+), 33 deletions(-) diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index 02d0860e3da..fc05d04bc47 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -1421,13 +1421,17 @@ def make_stateful_fixture( f"max_priority_fee_per_gas={max_priority_fee_per_gas}, " f"max_fee_per_blob_gas={max_fee_per_blob_gas}." ) - required_balances = execute_plan.get_required_sender_balances( + execute_plan.prepare_transactions( + env=self.genesis_environment, gas_price=gas_price, max_fee_per_gas=max_fee_per_gas, max_priority_fee_per_gas=max_priority_fee_per_gas, max_fee_per_blob_gas=max_fee_per_blob_gas, fork=session_fork, ) + required_balances = execute_plan.get_required_sender_balances( + fork=session_fork, + ) resolve_deferred() min_balance( required_balances, diff --git a/packages/testing/src/execution_testing/specs/tests/test_benchmark.py b/packages/testing/src/execution_testing/specs/tests/test_benchmark.py index 3f859417d05..d2720a840b0 100644 --- a/packages/testing/src/execution_testing/specs/tests/test_benchmark.py +++ b/packages/testing/src/execution_testing/specs/tests/test_benchmark.py @@ -55,41 +55,40 @@ def test_split_transaction( f"{gas_benchmark_value_millions}M gas, got {len(split_txs)}" ) + total_gas = 0 + for i, tx in enumerate(split_txs): + tx_gas_limit = tx.gas_limit + assert tx_gas_limit is not None, f"Unexpected `None` gas_limit: {tx}" + total_gas += tx_gas_limit + # Verify no tx exceeds the cap + assert tx_gas_limit <= gas_limit_cap, ( + f"Transaction {i} gas limit {tx_gas_limit} " + f"exceeds cap {gas_limit_cap}" + ) + # Verify gas distribution + if i < len(split_txs) - 1: # All but last should be at cap + assert tx_gas_limit == gas_limit_cap, ( + f"Transaction {i} should have gas limit {gas_limit_cap}, " + f"got {tx_gas_limit}" + ) + else: + # Last transaction should have the remainder + if expected_splits > 1: + expected_last_gas = gas_benchmark_value - ( + gas_limit_cap * (expected_splits - 1) + ) + assert tx_gas_limit == expected_last_gas, ( + f"Last transaction should have {expected_last_gas} gas, " + f"got {tx_gas_limit}" + ) + # Verify nonces increment correctly + assert tx.nonce == i, f"Transaction {i} has incorrect nonce {tx.nonce}" # Verify total gas equals the benchmark value - total_gas = sum(tx.gas_limit for tx in split_txs) assert total_gas == gas_benchmark_value, ( f"Total gas {total_gas} doesn't match benchmark " f"value {gas_benchmark_value}" ) - # Verify no transaction exceeds the cap - for i, tx in enumerate(split_txs): - assert tx.gas_limit <= gas_limit_cap, ( - f"Transaction {i} gas limit {tx.gas_limit} " - f"exceeds cap {gas_limit_cap}" - ) - - # Verify nonces increment correctly - for i, tx in enumerate(split_txs): - assert tx.nonce == i, f"Transaction {i} has incorrect nonce {tx.nonce}" - - # Verify gas distribution - for i, tx in enumerate(split_txs[:-1]): # All but last should be at cap - assert tx.gas_limit == gas_limit_cap, ( - f"Transaction {i} should have gas limit {gas_limit_cap}, " - f"got {tx.gas_limit}" - ) - - # Last transaction should have the remainder - if expected_splits > 1: - expected_last_gas = gas_benchmark_value - ( - gas_limit_cap * (expected_splits - 1) - ) - assert split_txs[-1].gas_limit == expected_last_gas, ( - f"Last transaction should have {expected_last_gas} gas, " - f"got {split_txs[-1].gas_limit}" - ) - @pytest.mark.parametrize( "gas_benchmark_value,gas_limit_cap", @@ -132,6 +131,10 @@ def test_split_transaction_edge_cases( # When cap > benchmark, gas_limit should be # min of tx.gas_limit and benchmark assert benchmark_test.tx is not None, "Transaction should not be None" + benchmark_test_tx_gas_limit = benchmark_test.tx.gas_limit + assert benchmark_test_tx_gas_limit is not None, ( + "Transaction gas limit should not be None" + ) assert split_txs[0].gas_limit == min( - benchmark_test.tx.gas_limit, gas_benchmark_value + benchmark_test_tx_gas_limit, gas_benchmark_value ) diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 2e5c1666c70..0967332bfb6 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -310,7 +310,7 @@ def strip_hash_from_t8n_output(cls, data: Any) -> Any: data.pop("hash", None) return data - gas_limit: HexNumber | None = Field( + gas_limit: HexNumber | None = Field( # type: ignore None, serialization_alias="gas", validation_alias=AliasChoices("gas_limit", "gasLimit", "gas"), @@ -852,6 +852,9 @@ def signer_minimum_balance(self, *, fork: Fork) -> int: "Impossible to calculate minimum balance without gas price" ) gas_limit = self.gas_limit + assert gas_limit is not None, ( + "Impossible to calculate minimum balance without gas limit" + ) if self.ty == 3 and self.blob_versioned_hashes is not None: max_fee_per_blob_gas = self.max_fee_per_blob_gas assert max_fee_per_blob_gas is not None, ( diff --git a/packages/testing/src/execution_testing/tools/utility/generators.py b/packages/testing/src/execution_testing/tools/utility/generators.py index 028a114a6c4..add884f0180 100644 --- a/packages/testing/src/execution_testing/tools/utility/generators.py +++ b/packages/testing/src/execution_testing/tools/utility/generators.py @@ -155,7 +155,9 @@ def generate_system_contract_deploy_test( deploy_tx = Transaction.model_validate(tx_json).with_signature_and_sender() gas_price = deploy_tx.gas_price assert gas_price is not None - deployer_required_balance = deploy_tx.gas_limit * gas_price + gas_limit = deploy_tx.gas_limit + assert gas_limit is not None + deployer_required_balance = gas_limit * gas_price deployer_address = deploy_tx.sender if "hash" in tx_json: assert deploy_tx.hash == Hash(tx_json["hash"]) From e839f056251309420464ce6da565adbd46da9705 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 4 Jun 2026 16:06:18 -0600 Subject: [PATCH 17/46] fix(tests): Fix Shanghai typing --- tests/shanghai/eip4895_withdrawals/test_withdrawals.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/shanghai/eip4895_withdrawals/test_withdrawals.py b/tests/shanghai/eip4895_withdrawals/test_withdrawals.py index 8c4c62adf60..749d6a3e346 100644 --- a/tests/shanghai/eip4895_withdrawals/test_withdrawals.py +++ b/tests/shanghai/eip4895_withdrawals/test_withdrawals.py @@ -80,11 +80,13 @@ def tx(self, sender: EOA, recipient: EOA) -> Transaction: # noqa: D102 @pytest.fixture def withdrawal(self, tx: Transaction, sender: EOA) -> Withdrawal: # noqa: D102 + tx_gas_limit = tx.gas_limit + assert tx_gas_limit is not None return Withdrawal( index=0, validator_index=0, address=sender, - amount=tx.gas_limit + 1, + amount=tx_gas_limit + 1, ) @pytest.fixture From b2e26e4cf625f663bb851a764ef4a3d1f906a526 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 4 Jun 2026 16:06:27 -0600 Subject: [PATCH 18/46] fix(tests): Fix benchmark typing --- tests/benchmark/compute/instruction/test_storage.py | 4 +++- tests/benchmark/stateful/helpers.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/benchmark/compute/instruction/test_storage.py b/tests/benchmark/compute/instruction/test_storage.py index bb2814a9252..14cb73382fc 100644 --- a/tests/benchmark/compute/instruction/test_storage.py +++ b/tests/benchmark/compute/instruction/test_storage.py @@ -360,8 +360,10 @@ def calldata_generator( ) ) for exec_tx in exec_txs: + exec_tx_gas_limit = exec_tx.gas_limit + assert exec_tx_gas_limit is not None if tx_result == TransactionResult.OUT_OF_GAS: - expected_gas_used += exec_tx.gas_limit + expected_gas_used += exec_tx_gas_limit else: expected_gas_used += exec_tx.gas_cost diff --git a/tests/benchmark/stateful/helpers.py b/tests/benchmark/stateful/helpers.py index c746038a7d2..9c7b278ba40 100644 --- a/tests/benchmark/stateful/helpers.py +++ b/tests/benchmark/stateful/helpers.py @@ -158,13 +158,15 @@ def pack_transactions_into_blocks( current_gas = 0 for tx in transactions: - if current_gas + tx.gas_limit > gas_limit and current_txs: + tx_gas_limit = tx.gas_limit + assert tx_gas_limit is not None + if current_gas + tx_gas_limit > gas_limit and current_txs: blocks.append(Block(txs=current_txs)) current_txs = [] current_gas = 0 current_txs.append(tx) - current_gas += tx.gas_limit + current_gas += tx_gas_limit if current_txs: blocks.append(Block(txs=current_txs)) From db6ac80f4b8e2d5ea58777b6ce7e187393df01b2 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 09:51:48 -0600 Subject: [PATCH 19/46] fix(tests): Fix EIP-1153 --- .../cancun/eip1153_tstore/test_basic_tload.py | 56 +++------------ .../cancun/eip1153_tstore/test_tload_calls.py | 12 +--- .../eip1153_tstore/test_tload_reentrancy.py | 10 +-- tests/cancun/eip1153_tstore/test_tstorage.py | 70 +++---------------- .../test_tstorage_clear_after_tx.py | 29 ++------ .../test_tstorage_execution_contexts.py | 9 +-- .../test_tstorage_reentrancy_contexts.py | 6 +- .../test_tstorage_selfdestruct.py | 6 +- .../eip1153_tstore/test_tstore_reentrancy.py | 8 +-- 9 files changed, 35 insertions(+), 171 deletions(-) diff --git a/tests/cancun/eip1153_tstore/test_basic_tload.py b/tests/cancun/eip1153_tstore/test_basic_tload.py index 6cd9eddd647..acbb4c5cd24 100644 --- a/tests/cancun/eip1153_tstore/test_basic_tload.py +++ b/tests/cancun/eip1153_tstore/test_basic_tload.py @@ -10,7 +10,6 @@ Account, Address, Alloc, - Environment, Fork, Op, StateTestFiller, @@ -62,16 +61,9 @@ def test_basic_tload_transaction_begin( ) } - tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), - to=address_to, - gas_price=10, - data=b"", - gas_limit=5000000, - value=0, - ) + tx = Transaction(sender=pre.fund_eoa(), to=address_to) - state_test(env=Environment(), pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.ported_from( @@ -120,16 +112,9 @@ def test_basic_tload_works( ) } - tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), - to=address_to, - gas_price=10, - data=b"", - gas_limit=5000000, - value=0, - ) + tx = Transaction(sender=pre.fund_eoa(), to=address_to) - state_test(env=Environment(), pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.ported_from( @@ -174,16 +159,9 @@ def test_basic_tload_other_after_tstore( ) } - tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), - to=address_to, - gas_price=10, - data=b"", - gas_limit=5000000, - value=0, - ) + tx = Transaction(sender=pre.fund_eoa(), to=address_to) - state_test(env=Environment(), pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.ported_from( @@ -270,16 +248,9 @@ def test_basic_tload_gasprice( ) } - tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), - to=address_to, - gas_price=10, - data=b"", - gas_limit=5000000, - value=0, - ) + tx = Transaction(sender=pre.fund_eoa(), to=address_to) - state_test(env=Environment(), pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.ported_from( @@ -324,13 +295,6 @@ def test_basic_tload_after_store( } ) - tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), - to=address_to, - gas_price=10, - data=b"", - gas_limit=5000000, - value=0, - ) + tx = Transaction(sender=pre.fund_eoa(), to=address_to) - state_test(env=Environment(), pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/cancun/eip1153_tstore/test_tload_calls.py b/tests/cancun/eip1153_tstore/test_tload_calls.py index fdfeb521937..3e153e7330b 100644 --- a/tests/cancun/eip1153_tstore/test_tload_calls.py +++ b/tests/cancun/eip1153_tstore/test_tload_calls.py @@ -8,7 +8,6 @@ Address, Alloc, Bytecode, - Environment, Op, StateTestFiller, Transaction, @@ -104,13 +103,6 @@ def make_call(call_type: Op, address: Address) -> Bytecode: ), } - tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), - to=address_to, - gas_price=10, - data=b"", - gas_limit=5000000, - value=0, - ) + tx = Transaction(sender=pre.fund_eoa(), to=address_to) - state_test(env=Environment(), pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/cancun/eip1153_tstore/test_tload_reentrancy.py b/tests/cancun/eip1153_tstore/test_tload_reentrancy.py index 57e3ae2b10b..d659622090a 100644 --- a/tests/cancun/eip1153_tstore/test_tload_reentrancy.py +++ b/tests/cancun/eip1153_tstore/test_tload_reentrancy.py @@ -11,7 +11,6 @@ Alloc, Bytecode, Case, - Environment, Hash, Op, StateTestFiller, @@ -165,12 +164,7 @@ def make_call(call_type: Op) -> Bytecode: } tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), - to=address_to, - gas_price=10, - data=Hash(do_reenter), - gas_limit=5000000, - value=0, + sender=pre.fund_eoa(), to=address_to, data=Hash(do_reenter) ) - state_test(env=Environment(), pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/cancun/eip1153_tstore/test_tstorage.py b/tests/cancun/eip1153_tstore/test_tstorage.py index 14ca24b69bd..6544c5a4931 100644 --- a/tests/cancun/eip1153_tstore/test_tstorage.py +++ b/tests/cancun/eip1153_tstore/test_tstorage.py @@ -13,7 +13,6 @@ Alloc, Bytecode, CodeGasMeasure, - Environment, Fork, Op, StateTestFiller, @@ -44,8 +43,6 @@ def test_transient_storage_unset_values( 9b00b68593f5869eb51a6659e1cc983e875e616b/src/EIPTestsFiller/StateTests/ stEIP1153-transientStorage/01_tloadBeginningTxnFiller.yml)", """ - env = Environment() - slots_under_test = [0, 1, 2, 2**128, 2**256 - 1] code = sum(Op.SSTORE(slot, Op.TLOAD(slot)) for slot in slots_under_test) @@ -54,20 +51,11 @@ def test_transient_storage_unset_values( storage=dict.fromkeys(slots_under_test, 1), ) - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=1_000_000, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) post = {code_address: Account(storage=dict.fromkeys(slots_under_test, 0))} - state_test( - env=env, - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) def test_tload_after_tstore(state_test: StateTestFiller, pre: Alloc) -> None: @@ -81,8 +69,6 @@ def test_tload_after_tstore(state_test: StateTestFiller, pre: Alloc) -> None: 9b00b68593f5869eb51a6659e1cc983e875e616b/src/EIPTestsFiller/StateTests/ stEIP1153-transientStorage/02_tloadAfterTstoreFiller.yml)", """ - env = Environment() - slots_under_test = [0, 1, 2, 2**128, 2**256 - 1] code = sum( Op.TSTORE(slot, slot) + Op.SSTORE(slot, Op.TLOAD(slot)) @@ -93,11 +79,7 @@ def test_tload_after_tstore(state_test: StateTestFiller, pre: Alloc) -> None: storage=dict.fromkeys(slots_under_test, 0xFF), ) - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=1_000_000, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) post = { code_address: Account( @@ -105,12 +87,7 @@ def test_tload_after_tstore(state_test: StateTestFiller, pre: Alloc) -> None: ) } - state_test( - env=env, - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) def test_tload_after_sstore(state_test: StateTestFiller, pre: Alloc) -> None: @@ -125,8 +102,6 @@ def test_tload_after_sstore(state_test: StateTestFiller, pre: Alloc) -> None: EIPTestsFiller/StateTests/stEIP1153-transientStorage/ 18_tloadAfterStoreFiller.yml)", """ - env = Environment() - slots_under_test = [1, 3, 2**128, 2**256 - 1] code = sum( Op.SSTORE(slot - 1, 0xFF) + Op.SSTORE(slot, Op.TLOAD(slot - 1)) @@ -137,11 +112,7 @@ def test_tload_after_sstore(state_test: StateTestFiller, pre: Alloc) -> None: storage=dict.fromkeys(slots_under_test, 1), ) - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=1_000_000, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) post = { code_address: Account( @@ -151,12 +122,7 @@ def test_tload_after_sstore(state_test: StateTestFiller, pre: Alloc) -> None: ) } - state_test( - env=env, - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) def test_tload_after_tstore_is_zero( @@ -171,8 +137,6 @@ def test_tload_after_tstore_is_zero( EIPTestsFiller/StateTests/ stEIP1153-transientStorage/03_tloadAfterStoreIs0Filler.yml)", """ - env = Environment() - slots_to_write = [1, 4, 2**128, 2**256 - 2] slots_to_read = [slot - 1 for slot in slots_to_write] + [ slot + 1 for slot in slots_to_write @@ -188,11 +152,7 @@ def test_tload_after_tstore_is_zero( storage=dict.fromkeys(slots_to_write + slots_to_read, 0xFFFF), ) - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=1_000_000, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) post = { code_address: Account( @@ -201,12 +161,7 @@ def test_tload_after_tstore_is_zero( ) } - state_test( - env=env, - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) @unique @@ -260,16 +215,11 @@ def test_gas_usage( extra_stack_items=extra_stack_items, ) - env = Environment() code_address = pre.deploy_contract(code=gas_measure_bytecode) - tx = Transaction( - sender=pre.fund_eoa(), - to=code_address, - gas_limit=1_000_000, - ) + tx = Transaction(sender=pre.fund_eoa(), to=code_address) post = { code_address: Account( code=gas_measure_bytecode, storage={0: expected_gas} ), } - state_test(env=env, pre=pre, tx=tx, post=post) + state_test(pre=pre, tx=tx, post=post) diff --git a/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py b/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py index 21f4eebfc41..22049cfbe7c 100644 --- a/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py +++ b/tests/cancun/eip1153_tstore/test_tstorage_clear_after_tx.py @@ -6,7 +6,6 @@ Alloc, Block, BlockchainTestFiller, - Environment, Initcode, Op, Transaction, @@ -29,8 +28,6 @@ def test_tstore_clear_after_deployment_tx( 1. The transient storage should be cleared after creating the contract (at tx-level), so the storage should stay empty. """ - env = Environment() - init_code = Op.TSTORE(1, 1) deploy_code = Op.SSTORE(1, Op.TLOAD(1)) @@ -38,11 +35,7 @@ def test_tstore_clear_after_deployment_tx( sender = pre.fund_eoa() - deployment_tx = Transaction( - data=code, - to=None, - sender=sender, - ) + deployment_tx = Transaction(data=code, to=None, sender=sender) address = deployment_tx.created_contract @@ -54,9 +47,7 @@ def test_tstore_clear_after_deployment_tx( address: Account(storage={0x01: 0x00}), } - blockchain_test( - genesis_environment=env, pre=pre, post=post, blocks=[Block(txs=txs)] - ) + blockchain_test(pre=pre, post=post, blocks=[Block(txs=txs)]) @pytest.mark.valid_from("Cancun") @@ -69,22 +60,14 @@ def test_tstore_clear_after_tx( slot 1. The second tx will re-call the contract. The storage should stay empty, because the transient storage is cleared after the transaction. """ - env = Environment() - code = Op.SSTORE(1, Op.TLOAD(1)) + Op.TSTORE(1, 1) account = pre.deploy_contract(code) sender = pre.fund_eoa() - poke_tstore_tx = Transaction( - gas_limit=100000, - to=account, - sender=sender, - ) + poke_tstore_tx = Transaction(to=account, sender=sender) - re_poke_tstore_tx = Transaction( - gas_limit=100000, to=account, sender=sender - ) + re_poke_tstore_tx = Transaction(to=account, sender=sender) txs = [poke_tstore_tx, re_poke_tstore_tx] @@ -92,6 +75,4 @@ def test_tstore_clear_after_tx( account: Account(storage={0x01: 0x00}), } - blockchain_test( - genesis_environment=env, pre=pre, post=post, blocks=[Block(txs=txs)] - ) + blockchain_test(pre=pre, post=post, blocks=[Block(txs=txs)]) diff --git a/tests/cancun/eip1153_tstore/test_tstorage_execution_contexts.py b/tests/cancun/eip1153_tstore/test_tstorage_execution_contexts.py index 25708e81a15..9f9048dab30 100644 --- a/tests/cancun/eip1153_tstore/test_tstorage_execution_contexts.py +++ b/tests/cancun/eip1153_tstore/test_tstorage_execution_contexts.py @@ -350,7 +350,6 @@ def tx( # noqa: D103 sender=pre.fund_eoa(), to=caller_address, data=Hash(callee_address, left_padding=True), - gas_limit=1_000_000, ) @@ -384,7 +383,7 @@ def test_subcall( - `DELEGATECALL` - `STATICCALL` """ - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.ported_from( @@ -421,11 +420,7 @@ def test_tstore_rollback_on_callcode_revert( caller_address = pre.deploy_contract(caller_code) sender = pre.fund_eoa() - tx = Transaction( - sender=sender, - to=caller_address, - gas_limit=1_000_000, - ) + tx = Transaction(sender=sender, to=caller_address) post = { # CALLCODE returns 0 (reverted), TLOAD(4) = 0 (rolled back) diff --git a/tests/cancun/eip1153_tstore/test_tstorage_reentrancy_contexts.py b/tests/cancun/eip1153_tstore/test_tstorage_reentrancy_contexts.py index ad52b674dac..0a121c508d3 100644 --- a/tests/cancun/eip1153_tstore/test_tstorage_reentrancy_contexts.py +++ b/tests/cancun/eip1153_tstore/test_tstorage_reentrancy_contexts.py @@ -12,7 +12,6 @@ Bytecode, CalldataCase, Conditional, - Environment, Hash, Op, StateTestFiller, @@ -342,17 +341,14 @@ def test_reentrant_call( expected_storage: Dict, ) -> None: """Test transient storage in different reentrancy contexts.""" - env = Environment() - callee_address = pre.deploy_contract(bytecode) tx = Transaction( sender=pre.fund_eoa(), to=callee_address, data=Hash(1), - gas_limit=1_000_000, ) post = {callee_address: Account(code=bytecode, storage=expected_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/cancun/eip1153_tstore/test_tstorage_selfdestruct.py b/tests/cancun/eip1153_tstore/test_tstorage_selfdestruct.py index b1d9cd3d1cf..7557602b971 100644 --- a/tests/cancun/eip1153_tstore/test_tstorage_selfdestruct.py +++ b/tests/cancun/eip1153_tstore/test_tstorage_selfdestruct.py @@ -14,7 +14,6 @@ Alloc, Bytecode, CalldataCase, - Environment, Hash, Initcode, Op, @@ -255,8 +254,6 @@ def test_reentrant_selfdestructing_call( Test transient storage in different reentrancy contexts after selfdestructing. """ - env = Environment() - caller_address = pre.deploy_contract(code=caller_bytecode) data: bytes | Bytecode @@ -272,7 +269,6 @@ def test_reentrant_selfdestructing_call( tx = Transaction( sender=pre.fund_eoa(), to=caller_address, - gas_limit=1_000_000, data=data, ) @@ -285,4 +281,4 @@ def test_reentrant_selfdestructing_call( else: post[callee_address] = Account.NONEXISTENT - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/cancun/eip1153_tstore/test_tstore_reentrancy.py b/tests/cancun/eip1153_tstore/test_tstore_reentrancy.py index 9fb864cbcfb..ce4146fd56e 100644 --- a/tests/cancun/eip1153_tstore/test_tstore_reentrancy.py +++ b/tests/cancun/eip1153_tstore/test_tstore_reentrancy.py @@ -9,7 +9,6 @@ Alloc, Bytecode, Case, - Environment, Hash, Op, StateTestFiller, @@ -228,12 +227,9 @@ def make_call(call_type: Op) -> Bytecode: } tx = Transaction( - sender=pre.fund_eoa(7_000_000_000_000_000_000), + sender=pre.fund_eoa(), to=address_to, - gas_price=10, data=Hash(do_reenter), - gas_limit=5000000, - value=0, ) - state_test(env=Environment(), pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) From 6aaafb13c617feff916a2d29a8f7e01bbeefef6b Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 10:07:50 -0600 Subject: [PATCH 20/46] fix(test-fixtures): lint --- .../src/execution_testing/fixtures/tests/test_blockchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/testing/src/execution_testing/fixtures/tests/test_blockchain.py b/packages/testing/src/execution_testing/fixtures/tests/test_blockchain.py index 6e398deadce..827a430751a 100644 --- a/packages/testing/src/execution_testing/fixtures/tests/test_blockchain.py +++ b/packages/testing/src/execution_testing/fixtures/tests/test_blockchain.py @@ -654,7 +654,7 @@ "transactions": [ Transaction( to=0x1234, -gas_limit=0x5208, + gas_limit=0x5208, data=b"\x01\x00", access_list=[ AccessList( From 75c30f2d2688b1b2ed90b1e2db7875354e4eefa2 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 10:08:35 -0600 Subject: [PATCH 21/46] fix(tests): Fix EIP-4844 --- .../eip4844_blobs/test_excess_blob_gas.py | 35 ++----------------- .../test_point_evaluation_precompile.py | 10 ------ .../test_point_evaluation_precompile_gas.py | 11 +----- 3 files changed, 3 insertions(+), 53 deletions(-) diff --git a/tests/cancun/eip4844_blobs/test_excess_blob_gas.py b/tests/cancun/eip4844_blobs/test_excess_blob_gas.py index f34cf973971..c9e3be46953 100644 --- a/tests/cancun/eip4844_blobs/test_excess_blob_gas.py +++ b/tests/cancun/eip4844_blobs/test_excess_blob_gas.py @@ -105,34 +105,6 @@ def tx_blob_data_cost( return tx_max_fee_per_blob_gas * blob_gas_per_blob * new_blobs -@pytest.fixture -def tx_gas_limit(fork: Fork) -> int: # noqa: D103 - if fork.is_eip_enabled(8037): - return 500_000 - return 45000 - - -@pytest.fixture -def tx_exact_cost( - tx_value: int, - tx_max_fee_per_gas: int, - tx_blob_data_cost: int, - tx_gas_limit: int, - new_blobs: int, - fork: Fork, -) -> int: - """Calculate exact cost for all transactions.""" - if new_blobs == 0: - num_transactions = 1 - else: - num_transactions = ( - new_blobs + fork.max_blobs_per_tx() - 1 - ) // fork.max_blobs_per_tx() - base_cost_per_tx = (tx_gas_limit * tx_max_fee_per_gas) + tx_value - total_base_cost = base_cost_per_tx * num_transactions - return total_base_cost + tx_blob_data_cost - - @pytest.fixture def destination_account_bytecode() -> Bytecode: # noqa: D103 # Verify that the BLOBBASEFEE opcode reflects the current blob gas cost @@ -148,8 +120,8 @@ def destination_account( # noqa: D103 @pytest.fixture -def sender(pre: Alloc, tx_exact_cost: int) -> Address: # noqa: D103 - return pre.fund_eoa(tx_exact_cost) +def sender(pre: Alloc) -> Address: # noqa: D103 + return pre.fund_eoa() @pytest.fixture @@ -158,7 +130,6 @@ def txs( # noqa: D103 new_blobs: int, tx_max_fee_per_gas: int, tx_max_fee_per_blob_gas: int, - tx_gas_limit: int, destination_account: Address, fork: Fork, ) -> List[Transaction]: @@ -170,7 +141,6 @@ def txs( # noqa: D103 sender=sender, to=destination_account, value=1, - gas_limit=tx_gas_limit, max_fee_per_gas=tx_max_fee_per_gas, max_priority_fee_per_gas=0, access_list=[], @@ -189,7 +159,6 @@ def txs( # noqa: D103 sender=sender, to=destination_account, value=1, - gas_limit=tx_gas_limit, max_fee_per_gas=tx_max_fee_per_gas, max_priority_fee_per_gas=0, max_fee_per_blob_gas=tx_max_fee_per_blob_gas, diff --git a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py index d73ae12916c..ba706445ea4 100644 --- a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py +++ b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py @@ -51,7 +51,6 @@ Storage, Transaction, TransactionReceipt, - TransitionFork, call_return_code, ) @@ -201,15 +200,12 @@ def tx( precompile_caller_address: Address, precompile_input: bytes, sender: EOA, - fork: Fork | TransitionFork, ) -> Transaction: """Prepare transaction used to call the precompile caller account.""" return Transaction( sender=sender, data=precompile_input, to=precompile_caller_address, - gas_limit=fork.transitions_to().gas_costs().PRECOMPILE_POINT_EVALUATION - * 100, ) @@ -777,14 +773,10 @@ def test_precompile_during_fork( precompile_caller_address: Address, precompile_input: bytes, sender: EOA, - fork: TransitionFork, ) -> None: """ Test calling the Point Evaluation Precompile during the appropriate fork. """ - precompile_gas = ( - fork.transitions_to().gas_costs().PRECOMPILE_POINT_EVALUATION - ) # Blocks before fork blocks = [ Block( @@ -794,7 +786,6 @@ def test_precompile_during_fork( sender=sender, data=precompile_input, to=precompile_caller_address, - gas_limit=precompile_gas * 100, ) ], ) @@ -809,7 +800,6 @@ def test_precompile_during_fork( sender=sender, data=precompile_input, to=precompile_caller_address, - gas_limit=precompile_gas * 100, ) ], ) diff --git a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py index 0efdab78b44..c69d750f67c 100644 --- a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py +++ b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py @@ -14,7 +14,6 @@ Alloc, Bytecode, CodeGasMeasure, - Environment, Fork, Op, StateTestFiller, @@ -149,15 +148,12 @@ def tx( pre: Alloc, precompile_caller_address: Address, precompile_input: bytes, - fork: Fork, ) -> Transaction: """Prepare transaction used to call the precompile caller account.""" return Transaction( sender=pre.fund_eoa(), data=precompile_input, to=precompile_caller_address, - value=0, - gas_limit=fork.gas_costs().PRECOMPILE_POINT_EVALUATION * 20, ) @@ -218,9 +214,4 @@ def test_point_evaluation_precompile_gas_usage( Test using different gas limits (exact gas, insufficient gas, extra gas) - Test using correct and incorrect proofs """ - state_test( - env=Environment(), - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) From e2241864f32c853af179cc99f659668232eb5781 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 10:13:04 -0600 Subject: [PATCH 22/46] fix(tests): Fix EIP-5656 --- tests/cancun/eip5656_mcopy/test_mcopy.py | 16 ++-------------- .../cancun/eip5656_mcopy/test_mcopy_contexts.py | 15 ++------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/tests/cancun/eip5656_mcopy/test_mcopy.py b/tests/cancun/eip5656_mcopy/test_mcopy.py index 9c87d23ccbf..e14cc607cc7 100644 --- a/tests/cancun/eip5656_mcopy/test_mcopy.py +++ b/tests/cancun/eip5656_mcopy/test_mcopy.py @@ -10,7 +10,6 @@ Address, Alloc, Bytecode, - Environment, Hash, Op, StateTestFiller, @@ -196,12 +195,7 @@ def test_valid_mcopy_operations( - Memory extensions (copy to a location that is out of bounds) - Memory clear (copy from a location that is out of bounds). """ - state_test( - env=Environment(), - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) PATTERN = bytes.fromhex( @@ -286,7 +280,6 @@ def test_mcopy_repeated( post = {contract: Account(storage=storage)} state_test( - env=Environment(), pre=pre, post=post, tx=Transaction( @@ -312,9 +305,4 @@ def test_mcopy_on_empty_memory( Perform MCOPY operations on an empty memory, using different offsets and lengths. """ - state_test( - env=Environment(), - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/cancun/eip5656_mcopy/test_mcopy_contexts.py b/tests/cancun/eip5656_mcopy/test_mcopy_contexts.py index 662adc0902a..0fdb84441fa 100644 --- a/tests/cancun/eip5656_mcopy/test_mcopy_contexts.py +++ b/tests/cancun/eip5656_mcopy/test_mcopy_contexts.py @@ -13,7 +13,6 @@ Address, Alloc, Bytecode, - Environment, Op, StateTestFiller, Storage, @@ -175,12 +174,7 @@ def test_no_memory_corruption_on_upper_call_stack_levels( Perform a subcall with any of the following opcodes, which uses MCOPY during its execution, and verify that the caller's memory is unaffected. """ - state_test( - env=Environment(), - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -203,9 +197,4 @@ def test_no_memory_corruption_on_upper_create_stack_levels( - `CREATE` - `CREATE2`. """ - state_test( - env=Environment(), - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) From 18151d6cd9bac7359bc463c8f717a27848befa6e Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 10:22:52 -0600 Subject: [PATCH 23/46] fix(tests): Fix EIP-6780 --- ..._dynamic_create2_selfdestruct_collision.py | 5 -- .../test_journal_revert.py | 9 +-- .../test_reentrancy_selfdestruct_revert.py | 9 +-- .../eip6780_selfdestruct/test_selfdestruct.py | 70 ------------------- .../test_selfdestruct_revert.py | 10 --- 5 files changed, 3 insertions(+), 100 deletions(-) diff --git a/tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py b/tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py index 4fc6232dc95..8ee8e65c663 100644 --- a/tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py +++ b/tests/cancun/eip6780_selfdestruct/test_dynamic_create2_selfdestruct_collision.py @@ -253,7 +253,6 @@ def test_dynamic_create2_selfdestruct_collision( tx = Transaction( to=address_to, data=initcode, - gas_limit=5_000_000, sender=sender, ) @@ -526,13 +525,11 @@ def test_dynamic_create2_selfdestruct_collision_two_different_transactions( Transaction( to=address_to, data=initcode, - gas_limit=5_000_000, sender=sender, ), Transaction( to=address_to_second, data=initcode, - gas_limit=5_000_000, sender=sender, ), ] @@ -805,13 +802,11 @@ def test_dynamic_create2_selfdestruct_collision_multi_tx( Transaction( to=address_to, data=initcode, - gas_limit=5_000_000, sender=sender, ), Transaction( to=address_to, data=initcode, - gas_limit=5_000_000, sender=sender, ), ] diff --git a/tests/cancun/eip6780_selfdestruct/test_journal_revert.py b/tests/cancun/eip6780_selfdestruct/test_journal_revert.py index 6dfe7fa5d57..0c35da6058f 100644 --- a/tests/cancun/eip6780_selfdestruct/test_journal_revert.py +++ b/tests/cancun/eip6780_selfdestruct/test_journal_revert.py @@ -8,7 +8,6 @@ Alloc, BalAccountExpectation, BlockAccessListExpectation, - Environment, Fork, Op, StateTestFiller, @@ -24,7 +23,6 @@ @pytest.mark.valid_from("Cancun") def test_selfdestruct_balance_transfer_reverted( state_test: StateTestFiller, - env: Environment, pre: Alloc, fork: Fork, ) -> None: @@ -49,13 +47,12 @@ def test_selfdestruct_balance_transfer_reverted( # Controller calls victim (triggers SELFDESTRUCT) then reverts. controller = pre.deploy_contract( - Op.POP(Op.CALL(gas=100_000, address=victim)) - + Op.REVERT(offset=0, size=0) + Op.POP(Op.CALL(address=victim)) + Op.REVERT(offset=0, size=0) ) # Outer calls controller, then checks beneficiary balance. outer = pre.deploy_contract( - Op.POP(Op.CALL(gas=200_000, address=controller)) + Op.POP(Op.CALL(address=controller)) + Op.SSTORE( storage.store_next(beneficiary_balance, "beneficiary_balance"), Op.BALANCE(beneficiary), @@ -92,7 +89,6 @@ def test_selfdestruct_balance_transfer_reverted( ) state_test( - env=env, pre=pre, post={ outer: Account(storage=storage), @@ -104,7 +100,6 @@ def test_selfdestruct_balance_transfer_reverted( tx=Transaction( sender=sender, to=outer, - gas_limit=1_000_000, expected_receipt=expected_receipt, ), expected_block_access_list=expected_bal, diff --git a/tests/cancun/eip6780_selfdestruct/test_reentrancy_selfdestruct_revert.py b/tests/cancun/eip6780_selfdestruct/test_reentrancy_selfdestruct_revert.py index bea4490a985..c5bb7c78851 100644 --- a/tests/cancun/eip6780_selfdestruct/test_reentrancy_selfdestruct_revert.py +++ b/tests/cancun/eip6780_selfdestruct/test_reentrancy_selfdestruct_revert.py @@ -12,7 +12,6 @@ Address, Alloc, Bytecode, - Environment, Fork, Op, StateTestFiller, @@ -146,7 +145,6 @@ def revert_contract_address( ) def test_reentrancy_selfdestruct_revert( pre: Alloc, - env: Environment, sender: EOA, fork: Fork, first_selfdestruct: Op, @@ -258,15 +256,10 @@ def test_reentrancy_selfdestruct_revert( ) expected_receipt = TransactionReceipt(logs=expected_logs) - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( sender=sender, to=executor_contract_address, - gas_limit=gas_limit, - value=0, expected_receipt=expected_receipt, ) - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/cancun/eip6780_selfdestruct/test_selfdestruct.py b/tests/cancun/eip6780_selfdestruct/test_selfdestruct.py index 934c904aa1b..d37cfbb4490 100644 --- a/tests/cancun/eip6780_selfdestruct/test_selfdestruct.py +++ b/tests/cancun/eip6780_selfdestruct/test_selfdestruct.py @@ -373,15 +373,11 @@ def test_create_selfdestruct_same_tx( # retain the stored values for verification. entry_code += Op.RETURN(max(len(selfdestruct_contract_initcode), 32), 1) - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( value=entry_code_balance, data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, ) assert tx.created_contract == entry_code_address @@ -522,15 +518,11 @@ def test_self_destructing_initcode( selfdestruct_contract_initial_balance, ) - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( value=entry_code_balance, data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, ) entry_code_address = tx.created_contract @@ -605,15 +597,11 @@ def test_self_destructing_initcode_create_tx( - Different initial balances for the self-destructing contract - Different transaction value amounts """ - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( sender=sender, value=tx_value, data=selfdestruct_code, to=None, - gas_limit=gas_limit, ) selfdestruct_contract_address = tx.created_contract if selfdestruct_contract_initial_balance > 0: @@ -758,9 +746,6 @@ def test_recreate_self_destructed_contract_different_txs( if addr == SELF_ADDRESS: sendall_recipient_addresses[i] = selfdestruct_contract_address - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 txs: List[Transaction] = [] for i in range(recreate_times + 1): expected_receipt = None @@ -795,7 +780,6 @@ def test_recreate_self_destructed_contract_different_txs( data=Hash(i), sender=sender, to=entry_code_address, - gas_limit=gas_limit, expected_receipt=expected_receipt, ) ) @@ -1009,15 +993,11 @@ def test_selfdestruct_pre_existing( # retain the stored values for verification. entry_code += Op.RETURN(32, 1) - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( value=entry_code_balance, data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, ) assert tx.created_contract == entry_code_address @@ -1181,16 +1161,12 @@ def test_selfdestruct_created_same_block_different_tx( running_balance = 0 tx2_receipt = TransactionReceipt(logs=tx2_logs) - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 txs = [ Transaction( value=selfdestruct_contract_initial_balance, data=selfdestruct_contract_initcode, sender=sender, to=None, - gas_limit=gas_limit, expected_receipt=tx1_receipt, ), Transaction( @@ -1198,7 +1174,6 @@ def test_selfdestruct_created_same_block_different_tx( data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, expected_receipt=tx2_receipt, ), ] @@ -1341,15 +1316,11 @@ def test_calling_from_new_contract_to_pre_existing_contract( ), } - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( value=entry_code_balance, data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, ) if fork.is_eip_enabled(7708): @@ -1508,15 +1479,11 @@ def test_calling_from_pre_existing_contract_to_new_contract( # retain the stored values for verification. entry_code += Op.RETURN(max(len(selfdestruct_contract_initcode), 32), 1) - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( value=entry_code_balance, data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, ) entry_code_address = tx.created_contract @@ -1756,15 +1723,11 @@ def test_create_selfdestruct_same_tx_increased_nonce( # retain the stored values for verification. entry_code += Op.RETURN(max(len(selfdestruct_contract_initcode), 32), 1) - gas_limit = 1_000_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( value=entry_code_balance, data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, ) assert tx.created_contract == entry_code_address @@ -1905,15 +1868,10 @@ def test_create_and_destroy_multiple_contracts_same_tx( entry_code += Op.RETURN(32, 1) - gas_limit = 1_000_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( - value=0, data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, ) post: Dict[Address, Account] = { @@ -2084,22 +2042,15 @@ def test_create_multiple_contracts_destroy_one_then_destroy_other_next_tx( ) tx2_receipt = TransactionReceipt(logs=tx2_logs) - # tx1 does 2 CREATE2 (NEW_ACCOUNT each) plus several first-time - # SSTOREs across entry/init code; tx2 does one SSTORE call. - # Bump scales with cpsb on Amsterdam. - new_account = fork.gas_costs().NEW_ACCOUNT - sstore_state = Op.SSTORE(new_value=1).gas_cost(fork) txs = [ Transaction( sender=sender, to=entry_code_address, - gas_limit=1_000_000 + 2 * new_account + 6 * sstore_state, expected_receipt=tx1_receipt, ), Transaction( sender=sender, to=tx2_caller, - gas_limit=500_000 + sstore_state, expected_receipt=tx2_receipt, ), ] @@ -2222,29 +2173,10 @@ def test_parent_creates_child_selfdestruct_one( entry_code += Op.RETURN(32, 1) - intrinsic_calc = fork.transaction_intrinsic_cost_calculator() - # Three frames execute under this tx: - # 1. entry_code (the contract-creation initcode of the tx) - # 2. parent_code (called by entry) - # 3. child_code (created by parent and, when !destroy_parent, called - # by parent) - # Each CREATE incurs NEW_ACCOUNT state once. SSTORE regular costs - # are picked up by each bytecode's `gas_cost(fork)`; the trailing - # SSTORE `gas_cost(fork)` adds headroom for the EIP-8037 state-gas - # charge on the 0->nonzero SSTORE the static calc cannot infer. tx = Transaction( - value=0, data=entry_code, sender=sender, to=None, - gas_limit=( - intrinsic_calc(calldata=entry_code, contract_creation=True) - + entry_code.gas_cost(fork) - + parent_code.gas_cost(fork) - + child_code.gas_cost(fork) - + 2 * fork.gas_costs().NEW_ACCOUNT - + Op.SSTORE(new_value=1).gas_cost(fork) - ), ) post: Dict[Address, Account] = { @@ -2417,11 +2349,9 @@ def test_recursive_contract_creation_and_selfdestruct( entry_code += Op.RETURN(32, 1) tx = Transaction( - value=0, data=entry_code, sender=sender, to=None, - gas_limit=2_000_000, ) post: Dict[Address, Account] = { diff --git a/tests/cancun/eip6780_selfdestruct/test_selfdestruct_revert.py b/tests/cancun/eip6780_selfdestruct/test_selfdestruct_revert.py index 42854604177..f9f27484a9e 100644 --- a/tests/cancun/eip6780_selfdestruct/test_selfdestruct_revert.py +++ b/tests/cancun/eip6780_selfdestruct/test_selfdestruct_revert.py @@ -428,15 +428,10 @@ def test_selfdestruct_created_in_same_tx_with_revert( # noqa SC200 ) post[selfdestruct_recipient_address] = Account.NONEXISTENT # type: ignore - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( - value=0, data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, ) expected_block_access_list = None @@ -532,7 +527,6 @@ def test_selfdestruct_created_in_same_tx_with_revert( # noqa SC200 @pytest.mark.valid_from("Cancun") def test_selfdestruct_not_created_in_same_tx_with_revert( state_test: StateTestFiller, - fork: Fork, sender: EOA, env: Environment, entry_code_address: Address, @@ -596,15 +590,11 @@ def test_selfdestruct_not_created_in_same_tx_with_revert( ) post[selfdestruct_recipient_address] = Account.NONEXISTENT # type: ignore - gas_limit = 500_000 - if fork.is_eip_enabled(8037): - gas_limit = 5_000_000 tx = Transaction( value=0, data=entry_code, sender=sender, to=None, - gas_limit=gas_limit, ) state_test(env=env, pre=pre, post=post, tx=tx) From 9982e0df81a78ab2c8ef5135c519ca65fbec8b08 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 10:24:12 -0600 Subject: [PATCH 24/46] fix(tests): Fix EIP-7516 --- .../eip7516_blobgasfee/test_blobgasfee_opcode.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/cancun/eip7516_blobgasfee/test_blobgasfee_opcode.py b/tests/cancun/eip7516_blobgasfee/test_blobgasfee_opcode.py index ca483e637da..c28a18f991b 100644 --- a/tests/cancun/eip7516_blobgasfee/test_blobgasfee_opcode.py +++ b/tests/cancun/eip7516_blobgasfee/test_blobgasfee_opcode.py @@ -83,7 +83,6 @@ def tx(pre: Alloc, caller_address: Address) -> Transaction: """ return Transaction( sender=pre.fund_eoa(), - gas_limit=1_000_000, to=caller_address, value=1, ) @@ -118,7 +117,6 @@ def test_blobbasefee_stack_overflow( ), } state_test( - env=Environment(), pre=pre, tx=tx, post=post, @@ -154,7 +152,6 @@ def test_blobbasefee_out_of_gas( tx = Transaction( sender=pre.fund_eoa(), - gas_limit=1_000_000, to=caller_address, value=1, ) @@ -167,12 +164,7 @@ def test_blobbasefee_out_of_gas( balance=0, ), } - state_test( - env=Environment(), - pre=pre, - tx=tx, - post=post, - ) + state_test(pre=pre, tx=tx, post=post) @pytest.mark.parametrize("caller_pre_storage", [{1: 1}], ids=[""]) @@ -258,7 +250,6 @@ def test_blobbasefee_during_fork( ), } blockchain_test( - genesis_environment=Environment(), pre=pre, blocks=blocks, post=post, From ff3b69c45e0f0b5bfca5f998be4a419ac9764471 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 10:34:24 -0600 Subject: [PATCH 25/46] fix(tests): Fix Frontier (except test_scenarios.py) --- .../frontier/opcodes/test_blockhash_state_test_recency.py | 2 -- tests/frontier/opcodes/test_selfdestruct.py | 3 --- tests/frontier/precompiles/test_precompiles.py | 8 ++------ tests/frontier/precompiles/test_ripemd.py | 6 +----- tests/frontier/touch/test_touch.py | 1 - tests/frontier/validation/test_transaction.py | 1 - 6 files changed, 3 insertions(+), 18 deletions(-) diff --git a/tests/frontier/opcodes/test_blockhash_state_test_recency.py b/tests/frontier/opcodes/test_blockhash_state_test_recency.py index 401017f9bee..b88df1de786 100644 --- a/tests/frontier/opcodes/test_blockhash_state_test_recency.py +++ b/tests/frontier/opcodes/test_blockhash_state_test_recency.py @@ -91,7 +91,6 @@ def test_blockhash_zero_out_of_window( tx = Transaction( sender=sender, to=contract, - gas_limit=200_000, protected=False, # legacy tx so it fills on pre-EIP-155 forks too ) @@ -136,7 +135,6 @@ def test_blockhash_zero_in_window_control( tx = Transaction( sender=sender, to=contract, - gas_limit=200_000, protected=False, # legacy tx so it fills on pre-EIP-155 forks too ) diff --git a/tests/frontier/opcodes/test_selfdestruct.py b/tests/frontier/opcodes/test_selfdestruct.py index 6ab8ff78e05..23dc1420640 100644 --- a/tests/frontier/opcodes/test_selfdestruct.py +++ b/tests/frontier/opcodes/test_selfdestruct.py @@ -29,7 +29,6 @@ def test_double_kill( initcode = Initcode(deploy_code=deploy_code) create_tx = Transaction( - gas_limit=100_000, protected=False, to=None, data=initcode, @@ -39,14 +38,12 @@ def test_double_kill( block_1 = Block(txs=[create_tx]) first_kill = Transaction( - gas_limit=100_000, protected=False, to=create_tx.created_contract, sender=sender, ) second_kill = Transaction( - gas_limit=100_000, protected=False, to=create_tx.created_contract, sender=sender, diff --git a/tests/frontier/precompiles/test_precompiles.py b/tests/frontier/precompiles/test_precompiles.py index dce0628b465..acb06089fff 100644 --- a/tests/frontier/precompiles/test_precompiles.py +++ b/tests/frontier/precompiles/test_precompiles.py @@ -7,7 +7,6 @@ Account, Address, Alloc, - Environment, Fork, Op, StateTestFiller, @@ -83,10 +82,8 @@ def test_precompiles( precompiled contract exists at the given address. """ - env = Environment() - # Empty account to serve as reference - empty_account = pre.fund_eoa(amount=0) + empty_account = pre.nonexistent_account() # Memory args_offset = 0 @@ -134,7 +131,6 @@ def test_precompiles( tx = Transaction( to=account, sender=pre.fund_eoa(), - gas_limit=1_000_000, protected=True, ) @@ -142,4 +138,4 @@ def test_precompiles( # Expect 0x00 when a precompile exists at the address, 0x01 otherwise post = {account: Account(storage={0: 0 if precompile_exists else 1})} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/frontier/precompiles/test_ripemd.py b/tests/frontier/precompiles/test_ripemd.py index 3b788e20b2b..346e23aefd9 100644 --- a/tests/frontier/precompiles/test_ripemd.py +++ b/tests/frontier/precompiles/test_ripemd.py @@ -4,7 +4,6 @@ from execution_testing import ( Account, Alloc, - Environment, StateTestFiller, Transaction, ) @@ -153,8 +152,6 @@ def test_precompiles( """ Tests the behavior of `RIPEMD-160` precompiled contract. """ - env = Environment() - account = pre.deploy_contract( code=Op.CALLDATACOPY(0, 0, len(msg)) + Op.MLOAD(0) @@ -174,11 +171,10 @@ def test_precompiles( tx = Transaction( to=account, sender=pre.fund_eoa(), - gas_limit=1_000_0000, data=msg, protected=fork.supports_protected_txs(), ) post = {account: Account(storage={0: output if not oog else 0})} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/frontier/touch/test_touch.py b/tests/frontier/touch/test_touch.py index 6a70146af72..901d6b5d7a0 100644 --- a/tests/frontier/touch/test_touch.py +++ b/tests/frontier/touch/test_touch.py @@ -30,7 +30,6 @@ def test_zero_gas_price_and_touching( ) tx = Transaction( - gas_limit=500_000, to=contract, gas_price=0, # Part of the test, do not change. sender=sender, diff --git a/tests/frontier/validation/test_transaction.py b/tests/frontier/validation/test_transaction.py index 1b665a4e073..3e3f487317f 100644 --- a/tests/frontier/validation/test_transaction.py +++ b/tests/frontier/validation/test_transaction.py @@ -127,7 +127,6 @@ def test_sender_balance( """ Tests that the sender has sufficient balance. """ - sender = pre.fund_eoa() to = pre.fund_eoa() intrinsic_cost = fork.transaction_intrinsic_cost_calculator() From 268e550cf5ac268813bd090cd97ad84e91732f62 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 12:28:58 -0600 Subject: [PATCH 26/46] fix(tests): Fix Blake2 Delegate call --- .../eip152_blake2/test_blake2_delegatecall.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/istanbul/eip152_blake2/test_blake2_delegatecall.py b/tests/istanbul/eip152_blake2/test_blake2_delegatecall.py index aa2bd17a53a..53cb74fa3a8 100644 --- a/tests/istanbul/eip152_blake2/test_blake2_delegatecall.py +++ b/tests/istanbul/eip152_blake2/test_blake2_delegatecall.py @@ -6,7 +6,6 @@ from execution_testing import ( Account, Alloc, - Environment, Fork, Op, StateTestFiller, @@ -28,8 +27,6 @@ def test_blake2_precompile_delegatecall( Test delegatecall consumes specified gas for the Blake2B precompile when it exists. """ - env = Environment() - account = pre.deploy_contract( Op.SSTORE( 0, @@ -42,11 +39,7 @@ def test_blake2_precompile_delegatecall( storage={0: 0xDEADBEEF}, ) - tx = Transaction( - to=account, - sender=pre.fund_eoa(), - protected=True, - ) + tx = Transaction(to=account, sender=pre.fund_eoa()) # If precompile exists, DELEGATECALL will fail, otherwise DELEGATECALL will # succeed @@ -58,4 +51,4 @@ def test_blake2_precompile_delegatecall( ) } - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) From d0fa63b0d64be241de212f041b21584c85f30428 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 13:22:15 -0600 Subject: [PATCH 27/46] fix(tests): Refactor/improve Blake2 tests --- .../compute/precompile/test_blake2f.py | 16 +- tests/istanbul/eip152_blake2/common.py | 11 +- tests/istanbul/eip152_blake2/conftest.py | 34 +- tests/istanbul/eip152_blake2/test_blake2.py | 379 +++--------------- 4 files changed, 104 insertions(+), 336 deletions(-) diff --git a/tests/benchmark/compute/precompile/test_blake2f.py b/tests/benchmark/compute/precompile/test_blake2f.py index 7083d108e56..0fad03827b0 100644 --- a/tests/benchmark/compute/precompile/test_blake2f.py +++ b/tests/benchmark/compute/precompile/test_blake2f.py @@ -19,7 +19,7 @@ from tests.istanbul.eip152_blake2.common import Blake2bInput from tests.istanbul.eip152_blake2.spec import Spec as Blake2bSpec -from ..helpers import Precompile, concatenate_parameters +from ..helpers import Precompile @pytest.mark.parametrize( @@ -27,13 +27,7 @@ [ pytest.param( Blake2bSpec.BLAKE2_PRECOMPILE_ADDRESS, - concatenate_parameters( - [ - Blake2bInput( - rounds=0xFFFF, f=True - ).create_blake2b_tx_data(), - ] - ), + Blake2bInput(rounds=0xFFFF, f=True), id="blake2f", ), ], @@ -76,7 +70,7 @@ def test_blake2f_benchmark( if precompile_address not in fork.precompiles(): pytest.skip("Precompile not enabled") - calldata = Blake2bInput(rounds=num_rounds, f=True).create_blake2b_tx_data() + calldata = Blake2bInput(rounds=num_rounds, f=True) attack_block = Op.POP( Op.STATICCALL( @@ -163,9 +157,7 @@ def test_blake2f_uncachable( iteration_cost = loop.gas_cost(fork) - base_calldata = Blake2bInput( - rounds=num_rounds, f=True - ).create_blake2b_tx_data() + base_calldata = bytes(Blake2bInput(rounds=num_rounds, f=True)) txs: list[Transaction] = [] remaining_gas = gas_benchmark_value diff --git a/tests/istanbul/eip152_blake2/common.py b/tests/istanbul/eip152_blake2/common.py index 26e3b55e441..d748f197fd6 100644 --- a/tests/istanbul/eip152_blake2/common.py +++ b/tests/istanbul/eip152_blake2/common.py @@ -1,6 +1,6 @@ """Common classes used in the BLAKE2b precompile tests.""" -from execution_testing import Bytes, TestParameterGroup +from execution_testing import Bytes, Fork, TestParameterGroup from .spec import Spec, SpecTestVectors @@ -35,7 +35,7 @@ class Blake2bInput(TestParameterGroup): t_1: int | Bytes = SpecTestVectors.BLAKE2_OFFSET_COUNTER_1 f: bool | int = True - def create_blake2b_tx_data(self) -> bytes: + def __bytes__(self) -> bytes: """Generate input for the BLAKE2b precompile.""" _rounds = self.rounds.to_bytes( length=self.rounds_length, byteorder="big" @@ -60,19 +60,20 @@ def create_blake2b_tx_data(self) -> bytes: return _rounds + self.h + self.m + _t_0 + _t_1 + _f + def estimate_gas(self, fork: Fork) -> int: + """Estimate the gas used by the precompile call.""" + return self.rounds * fork.gas_costs().PRECOMPILE_BLAKE2F_PER_ROUND + class ExpectedOutput(TestParameterGroup): """ Expected test result. Attributes: - call_succeeds (str | bool): A hex string or boolean to indicate - whether the call was successful or not. data_1 (str): String value of the first updated state vector. data_2 (str): String value of the second updated state vector. """ - call_succeeds: str | bool data_1: str data_2: str diff --git a/tests/istanbul/eip152_blake2/conftest.py b/tests/istanbul/eip152_blake2/conftest.py index 1e793c12538..95ab61aa201 100644 --- a/tests/istanbul/eip152_blake2/conftest.py +++ b/tests/istanbul/eip152_blake2/conftest.py @@ -1,22 +1,52 @@ """pytest fixtures for testing the BLAKE2b precompile.""" import pytest -from execution_testing import Bytecode, Op +from execution_testing import Bytecode, Fork, Op +from .common import Blake2bInput from .spec import Spec @pytest.fixture -def blake2b_contract_bytecode(call_opcode: Op) -> Bytecode: +def precompile_gas(fork: Fork, data: Blake2bInput | bytes) -> int | None: + """ + Amount of gas to redirect to the precompile address. + + `None` means redirect all gas. + """ + assert isinstance(data, Blake2bInput), ( + "Tests that don't use `Blake2bInput` as input must specify " + "`precompile_gas`" + ) + return data.estimate_gas(fork) + + +@pytest.fixture +def precompile_gas_modifier() -> int: + """ + Amount of gas to redirect add or subtract from the call forwarded gas. + """ + return 0 + + +@pytest.fixture +def blake2b_contract_bytecode( + call_opcode: Op, + precompile_gas: int, + precompile_gas_modifier: int, +) -> Bytecode: """ Contract code that performs the provided opcode (CALL or CALLCODE) to the BLAKE2b precompile and stores the result. """ + if precompile_gas_modifier: + precompile_gas += precompile_gas_modifier return ( Op.CALLDATACOPY(0, 0, Op.CALLDATASIZE()) + Op.SSTORE( 0, call_opcode( + gas=precompile_gas, address=Spec.BLAKE2_PRECOMPILE_ADDRESS, args_offset=0, args_size=Op.CALLDATASIZE(), diff --git a/tests/istanbul/eip152_blake2/test_blake2.py b/tests/istanbul/eip152_blake2/test_blake2.py index 073b0f7e492..04e2422748e 100644 --- a/tests/istanbul/eip152_blake2/test_blake2.py +++ b/tests/istanbul/eip152_blake2/test_blake2.py @@ -2,15 +2,12 @@ Tests [EIP-152: BLAKE2b compression precompile](https://eips.ethereum.org/EIPS/eip-152). """ -from typing import List - import pytest from execution_testing import ( Account, Alloc, Bytecode, - Environment, - Fork, + Bytes, Op, StateTestFiller, Transaction, @@ -50,58 +47,8 @@ pytest.param( Blake2bInput( rounds=0, - rounds_length=0, - h="", - m="", - t_0="", - t_1="", - ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="empty-input", - ), - pytest.param( - Blake2bInput( - rounds_length=3, ), ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="invalid-rounds-length-short", - ), - pytest.param( - Blake2bInput( - rounds_length=5, - ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="invalid-rounds-length-long", - ), - pytest.param( - Blake2bInput( - f=2, - ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="invalid-final-block-flag-value-0x02", - ), - pytest.param( - Blake2bInput( - rounds=0, - ), - ExpectedOutput( - call_succeeds=True, data_1="0x08c9bcf367e6096a3ba7ca8485ae67bb2bf894fe72f36e3cf1361d5f3af54fa5", data_2="0xd282e6ad7f520e511f6c3e2b8c68059b9442be0454267ce079217e1319cde05b", ), @@ -110,7 +57,6 @@ pytest.param( Blake2bInput(), ExpectedOutput( - call_succeeds=True, data_1="0xba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d1", data_2="0x7d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923", ), @@ -121,7 +67,6 @@ f=False, ), ExpectedOutput( - call_succeeds=True, data_1="0x75ab69d3190a562c51aef8d88f1c2775876944407270c42c9844252c26d28752", data_2="0x98743e7f6d5ea2f2d3e8d226039cd31b4e426ac4f2d3d666a610c2116fde4735", ), @@ -132,24 +77,11 @@ rounds=1, ), ExpectedOutput( - call_succeeds=True, data_1="0xb63a380cb2897d521994a85234ee2c181b5f844d2c624c002677e9703449d2fb", data_2="0xa551b3a8333bcdf5f2f7e08993d53923de3d64fcc68c034e717b9293fed7a421", ), id="valid-rounds-1", ), - # Excessive number of rounds expects to run out of gas - pytest.param( - Blake2bInput( - rounds=4294967295, - ), - ExpectedOutput( - call_succeeds=False, - data_1="0x0", - data_2="0x0", - ), - id="oog-rounds-4294967295", - ), # Case from https://github.com/ethereum/tests/pull/948#issuecomment-925964632 pytest.param( Blake2bInput( @@ -157,7 +89,6 @@ t_0=5, ), ExpectedOutput( - call_succeeds=True, data_1="0xf3e89a60ec4b0b1854744984e421d22b82f181bd4601fb9b1726b2662da61c29", data_2="0xdff09e75814acb2639fd79e56616e55fc135f8476f0302b3dc8d44e082eb83a8", ), @@ -168,7 +99,6 @@ rounds=16, ), ExpectedOutput( - call_succeeds=True, data_1="0xa8ef8236e5f48a74af375df15681d128457891c1cc4706f30747b2d40300b2f4", data_2="0x9d19f80fbd0945fd87736e1fc1ff10a80fd85a7aa5125154f3aaa3789ddff673", ), @@ -179,7 +109,6 @@ rounds=32, ), ExpectedOutput( - call_succeeds=True, data_1="0xbc5e888ed71b546da7b1506179bdd6c184a6410c40de33f9c330207417797889", data_2="0x5dbe74144468aefe5c2afce693c62dbca99e5e076dd467fe90a41278b16d691e", ), @@ -190,7 +119,6 @@ rounds=64, ), ExpectedOutput( - call_succeeds=True, data_1="0x74097ae7b16ffd18c742aee5c55dc89d54b6f1a8a19e6139ccfb38afba56b6b0", data_2="0x2cc35c441c19c21194fefb6841e72202f7c9d05eb9c3cfd8f94c67aa77d473c1", ), @@ -201,7 +129,6 @@ rounds=128, ), ExpectedOutput( - call_succeeds=True, data_1="0xd82c6a670dc90af9d7f77644eacbeddfed91b760c65c927871784abceaab3f81", data_2="0x3759733a1736254fb1cfc515dbfee467930955af56e27ee435f836fc3e65969f", ), @@ -212,7 +139,6 @@ rounds=256, ), ExpectedOutput( - call_succeeds=True, data_1="0x5d6ff04d5ebaee5687d634613ab21e9a7d36f782033c74f91d562669aaf9d592", data_2="0xc86346cb2df390243a952834306b389e656876a67934e2c023bce4918a016d4e", ), @@ -223,7 +149,6 @@ rounds=512, ), ExpectedOutput( - call_succeeds=True, data_1="0xa2c1eb780a6e1249156fe0751e5d4687ea9357b0651c78df660ab004cb477363", data_2="0x6298bbbc683e4a0261574b6d857a6a99e06b2eea50b16f86343d2625ff222b98", ), @@ -234,7 +159,6 @@ rounds=1024, ), ExpectedOutput( - call_succeeds=True, data_1="0x689419d2bf32b5a9901a2c733b9946727026a60d8773117eabb35f04a52cdcf1", data_2="0xb8fb4473454cf03d46c36a10b3f784aae4dc80a24424960e66a8ad5a8c2bfb30", ), @@ -247,7 +171,6 @@ t_0=16, ), ExpectedOutput( - call_succeeds=True, data_1="0x4ab6df9d1f57140bbd27b5e164f42102d9e2b0bf4d53da501273f81a37e505c7", data_2="0xf6e136f9ca4b693aa6e990b04c6412296dc09540c23c395f183011a0c5d7392e", ), @@ -260,7 +183,6 @@ t_0=16, ), ExpectedOutput( - call_succeeds=True, data_1="0x7af9b4f9c25ba3e3fd4fcb957e703b7b2e648990fe8e24c6ca2a2dfac4ce76e6", data_2="0x18acffc26913d6759843362adeb4c95299777baaa977b5d94dd219d1777e4cb", ), @@ -273,7 +195,6 @@ t_0=16, ), ExpectedOutput( - call_succeeds=True, data_1="0x97eb79f7abc085a3da64d6e8643d196cbf522a51985ba2cc6a7ca14289b59df0", data_2="0x73366eb68e41966eb8b33ab5bd6078d0de2fa4edc986b1d2afc4c92f2fc30cda", ), @@ -286,7 +207,6 @@ t_0=16, ), ExpectedOutput( - call_succeeds=True, data_1="0x5ef3d6ee148936390a9053e91ab5a92f4de4dfc62ebb95d71485be26d9b78c8d", data_2="0x8989dfe319f2fb5f11784174db63a7bcfc50de04e13fad57bea159e46e8811df", ), @@ -299,7 +219,6 @@ t_0=16, ), ExpectedOutput( - call_succeeds=True, data_1="0xa36be13275fec9a91779f0c9b06b1b40d8c8a13ab0786d0764c2eb708cc8eb81", data_2="0xf1acb2a3c7abd2ff5a9fdfe88b81f6f56288dc5260a9c810f023ae83b9b64a1a", ), @@ -312,7 +231,6 @@ t_0=16, ), ExpectedOutput( - call_succeeds=True, data_1="0xc987e560e3f90833c0d10ae1282bd9d35a7ba06d8abaa13a994d0962ed2bbaa9", data_2="0xf69c1e1e7c9aedb75e72d1b46e9f1b2ad8f8c2f7f858a04ed8aec16f964a96da", ), @@ -325,7 +243,6 @@ t_0=16, ), ExpectedOutput( - call_succeeds=True, data_1="0x224138a6afa847230ff09c23e2ca66522e22d26884b09d7740e2dd127cb61057", data_2="0x90cecbd4de6a52a733ca4a59583c064ad6ec7653d5d457b681de332f16f3d45", ), @@ -338,7 +255,6 @@ t_0=120, ), ExpectedOutput( - call_succeeds=True, data_1="0xabcd200f2962ede252fc455ea70d12b236ad2f4046b91e17558a7741d9da39a2", data_2="0x548083b610bb8591ca50418eabd15b6489a936b178a435b4c182ffa475eba4d8", ), @@ -351,7 +267,6 @@ t_0=120, ), ExpectedOutput( - call_succeeds=True, data_1="0x39fc2077154fba422b3d628d10908c596beebea8dfd90f14566aec4f60bdb2bc", data_2="0xa75d73ab2b224d58c3568cbc7fc8905cc849f10745f00addef02384032d53729", ), @@ -364,29 +279,11 @@ t_0=120, ), ExpectedOutput( - call_succeeds=True, data_1="0x5bb981381beb687d5fdbe5e7c096fbd1ce193b780948c1d74ebbb7c58db364c7", data_2="0xb7695d32f918444dbdcbdcff476fc70a926e228c4cbb7d05473711d3b56e5b33", ), id="valid-rounds-64-offset-0x78", ), - pytest.param( - Blake2bInput( - rounds=0, - rounds_length=0, - h="00", - m="00", - t_0=0, - t_1=SpecTestVectors.BLAKE2_OFFSET_COUNTER_1, - f=0, - ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-RFC-7693-zero-input", - ), ], ) @pytest.mark.slow() @@ -395,181 +292,112 @@ def test_blake2b( pre: Alloc, call_opcode: Op, blake2b_contract_bytecode: Bytecode, - data: Blake2bInput | str | bytes, + data: Blake2bInput | bytes, output: ExpectedOutput, ) -> None: """Test BLAKE2b precompile.""" - env = Environment() - account = pre.deploy_contract( blake2b_contract_bytecode, storage={0: 0xDEADBEEF} ) sender = pre.fund_eoa() - if isinstance(data, Blake2bInput): - data = data.create_blake2b_tx_data() - elif isinstance(data, str): - data = bytes.fromhex(data) - - if isinstance(data, Blake2bInput): - data = data.create_blake2b_tx_data() - elif isinstance(data, str): - data = bytes.fromhex(data) - - tx = Transaction( - ty=0x0, - to=account, - data=data, - protected=True, - sender=sender, - value=100000, - ) + tx = Transaction(to=account, data=data, sender=sender) post = { account: Account( storage={ - 0: 0x1 if output.call_succeeds else 0x0, + 0: 0x1, 1: output.data_1, 2: output.data_2, } ) } - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("Istanbul") @pytest.mark.parametrize("call_opcode", [Op.CALL, Op.CALLCODE]) -@pytest.mark.parametrize("gas_limit", [90_000, 110_000, 200_000]) @pytest.mark.parametrize( - ["data", "output"], + ["data"], [ pytest.param( - b"", - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-case1-data0-invalid-low-gas", + Bytes(), + id="empty-input", + ), + pytest.param( + Bytes(b"\0" * 212), + id="one_too_short", + ), + pytest.param( + Bytes(b"\0" * 214), + id="one_too_long", ), pytest.param( Blake2bInput( rounds_length=3, ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-case1-data1-invalid-low-gas", + id="invalid_rounds_length_short", ), pytest.param( Blake2bInput( rounds_length=5, ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-case1-data2-invalid-low-gas", + id="invalid_rounds_length_long", ), pytest.param( Blake2bInput( f=2, ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-case1-data3-invalid-low-gas", + id="invalid_final_block_flag_value_0x02", ), pytest.param( Blake2bInput( - rounds=8000000, - ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", + rounds=0, + rounds_length=0, + h="00", + m="00", + t_0=0, + t_1=SpecTestVectors.BLAKE2_OFFSET_COUNTER_1, + f=0, ), - id="EIP-152-case1-data9-invalid-low-gas", + id="RFC_7693_zero_input", ), + # Excessive number of rounds expects to run out of gas, valid otherwise pytest.param( - "000c", - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", + Blake2bInput( + rounds=4294967295, ), - id="EIP-152-case1-data10-invalid-low-gas", + id="oog-rounds-4294967295", ), ], ) -@pytest.mark.eels_base_coverage -def test_blake2b_invalid_gas( +@pytest.mark.parametrize("precompile_gas", [0, 200_000]) +def test_blake2b_invalid_input( state_test: StateTestFiller, pre: Alloc, call_opcode: Op, blake2b_contract_bytecode: Bytecode, - gas_limit: int, - data: Blake2bInput | str | bytes, - output: ExpectedOutput, + data: Blake2bInput | bytes, ) -> None: """Test BLAKE2b precompile invalid calls using different gas limits.""" - env = Environment() - account = pre.deploy_contract( - blake2b_contract_bytecode, storage={0: 0xDEADBEEF} + blake2b_contract_bytecode, + storage={0: 0xDEADBEEF, 1: 0xDEADBEEF, 2: 0xDEADBEEF}, ) sender = pre.fund_eoa() - - if isinstance(data, Blake2bInput): - data = data.create_blake2b_tx_data() - elif isinstance(data, str): - data = bytes.fromhex(data) - - tx = Transaction( - ty=0x0, - to=account, - data=data, - gas_limit=gas_limit, - protected=True, - sender=sender, - value=0, - ) + tx = Transaction(to=account, data=data, sender=sender) post = { account: Account( - storage={ - 0: 0xDEADBEEF, - 1: output.data_1, - 2: output.data_2, - }, + storage={0: 0x0, 1: 0x0, 2: 0x0}, nonce=0x1, ) } - state_test(env=env, pre=pre, post=post, tx=tx) - - -def tx_gas_limits(fork: Fork) -> List[int | None]: - """List of tx gas limits.""" - # Three coverage levels for BLAKE2 + SSTORE base costs. The - # contract writes two first-time SSTOREs (data_1, data_2), each - # adding `sstore_state_gas` under EIP-8037 (0 otherwise). - sstore_state = Op.SSTORE(new_value=1).state_cost(fork) - return [ - None, - 90_000 + 2 * sstore_state, - 110_000 + 2 * sstore_state, - 200_000 + 2 * sstore_state, - ] + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("Istanbul") @pytest.mark.parametrize("call_opcode", [Op.CALL, Op.CALLCODE]) -@pytest.mark.parametrize_by_fork("gas_limit", tx_gas_limits) @pytest.mark.parametrize( ["data", "output"], [ @@ -578,7 +406,6 @@ def tx_gas_limits(fork: Fork) -> List[int | None]: rounds=0, ), ExpectedOutput( - call_succeeds=True, data_1="0x08c9bcf367e6096a3ba7ca8485ae67bb2bf894fe72f36e3cf1361d5f3af54fa5", data_2="0xd282e6ad7f520e511f6c3e2b8c68059b9442be0454267ce079217e1319cde05b", ), @@ -587,7 +414,6 @@ def tx_gas_limits(fork: Fork) -> List[int | None]: pytest.param( Blake2bInput(), ExpectedOutput( - call_succeeds=True, data_1="0xba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d1", data_2="0x7d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923", ), @@ -598,7 +424,6 @@ def tx_gas_limits(fork: Fork) -> List[int | None]: f=False, ), ExpectedOutput( - call_succeeds=True, data_1="0x75ab69d3190a562c51aef8d88f1c2775876944407270c42c9844252c26d28752", data_2="0x98743e7f6d5ea2f2d3e8d226039cd31b4e426ac4f2d3d666a610c2116fde4735", ), @@ -609,7 +434,6 @@ def tx_gas_limits(fork: Fork) -> List[int | None]: rounds=1, ), ExpectedOutput( - call_succeeds=True, data_1="0xb63a380cb2897d521994a85234ee2c181b5f844d2c624c002677e9703449d2fb", data_2="0xa551b3a8333bcdf5f2f7e08993d53923de3d64fcc68c034e717b9293fed7a421", ), @@ -625,7 +449,6 @@ def tx_gas_limits(fork: Fork) -> List[int | None]: f=0, ), ExpectedOutput( - call_succeeds=True, data_1="0x08c9bcf367e6096a3ba7ca8485ae67bb2bf894fe72f36e3cf1361d5f3af54fa5", data_2="0xd182e6ad7f520e511f6c3e2b8c68059b6bbd41fbabd9831f79217e1319cde05b", ), @@ -633,51 +456,44 @@ def tx_gas_limits(fork: Fork) -> List[int | None]: ), ], ) +@pytest.mark.parametrize( + "precompile_gas_modifier", + [ + pytest.param(0, id="sufficient_gas"), + pytest.param(-1, id="insufficient_gas"), + ], +) @pytest.mark.eels_base_coverage -def test_blake2b_gas_limit( +def test_blake2b_gas( state_test: StateTestFiller, pre: Alloc, call_opcode: Op, blake2b_contract_bytecode: Bytecode, - gas_limit: int, - data: Blake2bInput | str | bytes, + data: Blake2bInput | bytes, + precompile_gas: int, output: ExpectedOutput, + precompile_gas_modifier: int, ) -> None: """Test BLAKE2b precompile with different gas limits.""" + sufficient_gas = precompile_gas_modifier == 0 + if not sufficient_gas and precompile_gas == 0: + pytest.skip("Precompile cost is zero, cannot run oog") + account = pre.deploy_contract( blake2b_contract_bytecode, storage={0: 0xDEADBEEF} ) sender = pre.fund_eoa() - if isinstance(data, Blake2bInput): - data = data.create_blake2b_tx_data() - elif isinstance(data, str): - data = bytes.fromhex(data) - - tx = Transaction( - ty=0x0, - to=account, - data=data, - gas_limit=gas_limit, - protected=True, - sender=sender, - value=0, - ) + tx = Transaction(to=account, data=data, sender=sender) post = { account: Account( - storage={ - 0: 0x1 if output.call_succeeds else 0x0, - 1: output.data_1, - 2: output.data_2, - } + storage={0: 0x1, 1: output.data_1, 2: output.data_2} + if sufficient_gas + else {0: 0x0, 1: 0x0, 2: 0x0} ) } - state_test( - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("Istanbul") @@ -685,54 +501,11 @@ def test_blake2b_gas_limit( @pytest.mark.parametrize( ["data", "output"], [ - pytest.param( - b"", - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-case0-data0-large-gas-limit", - ), - pytest.param( - Blake2bInput( - rounds_length=3, - ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-case2-data1-large-gas-limit", - ), - pytest.param( - Blake2bInput( - rounds_length=5, - ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-case2-data2-large-gas-limit", - ), - pytest.param( - Blake2bInput( - f=2, - ), - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-case2-data3-large-gas-limit", - ), pytest.param( Blake2bInput( rounds=100_000, ), ExpectedOutput( - call_succeeds=True, data_1="0x165da71a32e91bca2623bfaeab079f7e6edfba2259028cc854ec497f9fb0fe75", data_2="0xd37f63034b83f4a0a07cd238483874862921ef0c40630826a76e41bf3b02ffe3", ), @@ -743,22 +516,12 @@ def test_blake2b_gas_limit( rounds=8000000, ), ExpectedOutput( - call_succeeds=True, data_1="0x6d2ce9e534d50e18ff866ae92d70cceba79bbcd14c63819fe48752c8aca87a4b", data_2="0xb7dcc230d22a4047f0486cfcfb50a17b24b2899eb8fca370f22240adb5170189", ), id="EIP-152-case8-data9-large-gas-limit", marks=pytest.mark.skip("Times-out during fill"), ), - pytest.param( - "000c", - ExpectedOutput( - call_succeeds=False, - data_1="0x00", - data_2="0x00", - ), - id="EIP-152-case9-data10-large-gas-limit", - ), ], ) @pytest.mark.slow() @@ -767,7 +530,7 @@ def test_blake2b_large_gas_limit( pre: Alloc, call_opcode: Op, blake2b_contract_bytecode: Bytecode, - data: Blake2bInput | str | bytes, + data: Blake2bInput | bytes, output: ExpectedOutput, ) -> None: """Test BLAKE2b precompile with large gas limit.""" @@ -776,27 +539,9 @@ def test_blake2b_large_gas_limit( ) sender = pre.fund_eoa() - if isinstance(data, Blake2bInput): - data = data.create_blake2b_tx_data() - elif isinstance(data, str): - data = bytes.fromhex(data) - - tx = Transaction( - ty=0x0, - to=account, - data=data, - protected=True, - sender=sender, - value=0, - ) + tx = Transaction(to=account, data=data, sender=sender) post = { - account: Account( - storage={ - 0: 0x1 if output.call_succeeds else 0x0, - 1: output.data_1, - 2: output.data_2, - } - ) + account: Account(storage={0: 0x1, 1: output.data_1, 2: output.data_2}) } state_test(pre=pre, post=post, tx=tx) From 81377621aef7054367986760e534ae425fde934e Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 14:37:18 -0600 Subject: [PATCH 28/46] fix(tests): Fix Osaka --- .../test_modexp_thresholds.py | 4 ---- .../test_modexp_thresholds_transition.py | 11 +---------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py index a31b86c2e19..dbc0dfaf14c 100644 --- a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py +++ b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py @@ -468,9 +468,7 @@ def test_contract_creation_transaction( tx = Transaction( sender=sender, - gas_limit=1_000_000, to=None, - value=0, data=contract_bytecode + bytes(modexp_input), ) @@ -558,9 +556,7 @@ def test_contract_initcode( tx = Transaction( sender=sender, - gas_limit=(1_000_000 if fork.is_eip_enabled(8037) else 200_000), to=factory_contract_address, - value=0, data=call_modexp_bytecode + bytes(modexp_input), ) diff --git a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds_transition.py b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds_transition.py index 2ef88752bc8..4fa9374838f 100644 --- a/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds_transition.py +++ b/tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds_transition.py @@ -10,7 +10,6 @@ BlockchainTestFiller, Bytecode, EIPChecklist, - Environment, Fork, Op, Transaction, @@ -42,7 +41,6 @@ def test_modexp_fork_transition( blockchain_test: BlockchainTestFiller, pre: Alloc, - env: Environment, fork: TransitionFork, gas_old: int, gas_new: int, @@ -94,10 +92,6 @@ def generate_code(fork: Fork) -> Bytecode: ) return code - def calc_tx_gas_limit(fork: Fork) -> int: - tx_gas_limit_cap = fork.transaction_gas_limit_cap() or env.gas_limit - return tx_gas_limit_cap - timestamps = [14_999, 15_000, 15_001] contracts = [ pre.deploy_contract(generate_code(fork.fork_at(timestamp=t))) @@ -110,10 +104,7 @@ def calc_tx_gas_limit(fork: Fork) -> int: timestamp=ts, txs=[ Transaction( - to=contract, - data=modexp_input, - sender=pre.fund_eoa(), - gas_limit=calc_tx_gas_limit(fork.fork_at(timestamp=ts)), + to=contract, data=modexp_input, sender=pre.fund_eoa() ) ], ) From b622ddcef7784cb846b8d3c3918abd036f27ffc0 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 14:51:24 -0600 Subject: [PATCH 29/46] fix(tests): Fix Prague --- .../test_block_hashes.py | 10 ++-------- .../test_contract_deployment.py | 6 +----- .../test_multi_type_requests.py | 1 - 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/tests/prague/eip2935_historical_block_hashes_from_state/test_block_hashes.py b/tests/prague/eip2935_historical_block_hashes_from_state/test_block_hashes.py index e82689e0b46..9f6f9bb710d 100644 --- a/tests/prague/eip2935_historical_block_hashes_from_state/test_block_hashes.py +++ b/tests/prague/eip2935_historical_block_hashes_from_state/test_block_hashes.py @@ -136,7 +136,7 @@ def test_block_hashes_history_at_transition( blocks: List[Block] = [] assert blocks_before_fork >= 1 and blocks_before_fork < Spec.FORK_TIMESTAMP - sender = pre.fund_eoa(10_000_000_000) + sender = pre.fund_eoa() post: Dict[Address, Account] = {} current_block_number = 1 fork_block_number = current_block_number + blocks_before_fork @@ -176,7 +176,6 @@ def test_block_hashes_history_at_transition( txs.append( Transaction( to=check_blocks_before_fork_address, - gas_limit=10_000_000, sender=sender, ) ) @@ -208,7 +207,6 @@ def test_block_hashes_history_at_transition( txs.append( Transaction( to=check_blocks_after_fork_address, - gas_limit=10_000_000, sender=sender, ) ) @@ -258,7 +256,7 @@ def test_block_hashes_history( """ blocks: List[Block] = [] - sender = pre.fund_eoa(10_000_000_000) + sender = pre.fund_eoa() post: Dict[Address, Account] = {} current_block_number = 1 fork_block_number = 0 # We fork at genesis @@ -328,7 +326,6 @@ def test_block_hashes_history( txs.append( Transaction( to=check_blocks_after_fork_address, - gas_limit=10_000_000, sender=sender, ) ) @@ -383,7 +380,6 @@ def test_block_hashes_call_opcodes( txs=[ Transaction( to=contract_address, - gas_limit=10_000_000, sender=pre.fund_eoa(), ) ] @@ -452,7 +448,6 @@ def test_invalid_history_contract_calls( txs = [ Transaction( to=check_contract_address, - gas_limit=10_000_000, sender=pre.fund_eoa(), ) ] @@ -515,7 +510,6 @@ def test_invalid_history_contract_calls_input_size( txs = [ Transaction( to=check_contract_address, - gas_limit=10_000_000, sender=pre.fund_eoa(), ) ] diff --git a/tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py b/tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py index e09070116d1..f22eef36184 100644 --- a/tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py +++ b/tests/prague/eip2935_historical_block_hashes_from_state/test_contract_deployment.py @@ -62,11 +62,7 @@ def test_system_contract_deployment( ) deployed_contract = pre.deploy_contract(code) - tx = Transaction( - to=deployed_contract, - gas_limit=10_000_000, - sender=pre.fund_eoa(), - ) + tx = Transaction(to=deployed_contract, sender=pre.fund_eoa()) yield Block(txs=[tx]) diff --git a/tests/prague/eip7685_general_purpose_el_requests/test_multi_type_requests.py b/tests/prague/eip7685_general_purpose_el_requests/test_multi_type_requests.py index cd3fb4b2d7c..b9d3bcf61e1 100644 --- a/tests/prague/eip7685_general_purpose_el_requests/test_multi_type_requests.py +++ b/tests/prague/eip7685_general_purpose_el_requests/test_multi_type_requests.py @@ -416,7 +416,6 @@ def test_valid_multi_type_request_from_same_tx( ) tx: Transaction = Transaction( - gas_limit=10_000_000, to=contract_address, value=total_value, data=calldata, From 099f5886709c3a74266e438f361c4bc2b5baf158 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 16:04:17 -0600 Subject: [PATCH 30/46] feat(test-forks): Introduce `state_gas_reservoir_enabled` --- packages/testing/src/execution_testing/forks/base_fork.py | 8 ++++++++ .../forks/forks/eips/amsterdam/eip_8037.py | 7 +++++++ .../testing/src/execution_testing/forks/forks/forks.py | 7 +++++++ 3 files changed, 22 insertions(+) diff --git a/packages/testing/src/execution_testing/forks/base_fork.py b/packages/testing/src/execution_testing/forks/base_fork.py index 0182fbd6252..ff4cd70e7f5 100644 --- a/packages/testing/src/execution_testing/forks/base_fork.py +++ b/packages/testing/src/execution_testing/forks/base_fork.py @@ -842,6 +842,14 @@ def transaction_gas_limit_cap(cls) -> int | None: """ pass + @classmethod + @abstractmethod + def state_gas_reservoir_enabled(cls) -> bool: + """ + Return True if the fork enables a state gas reservoir. + """ + pass + @classmethod @abstractmethod def code_deposit_state_gas(cls, *, code_size: int) -> int: diff --git a/packages/testing/src/execution_testing/forks/forks/eips/amsterdam/eip_8037.py b/packages/testing/src/execution_testing/forks/forks/eips/amsterdam/eip_8037.py index bfc33e6c342..f1c2a4a4bda 100644 --- a/packages/testing/src/execution_testing/forks/forks/eips/amsterdam/eip_8037.py +++ b/packages/testing/src/execution_testing/forks/forks/eips/amsterdam/eip_8037.py @@ -39,6 +39,13 @@ def cost_per_state_byte(cls) -> int: """ return 1530 + @classmethod + def state_gas_reservoir_enabled(cls) -> bool: + """ + State gas reservoir becomes enabled. + """ + return True + @classmethod def system_call_gas_limit(cls) -> int: """ diff --git a/packages/testing/src/execution_testing/forks/forks/forks.py b/packages/testing/src/execution_testing/forks/forks/forks.py index d592dc5b1a0..cd2777c88a0 100644 --- a/packages/testing/src/execution_testing/forks/forks/forks.py +++ b/packages/testing/src/execution_testing/forks/forks/forks.py @@ -1025,6 +1025,13 @@ def transaction_gas_limit_cap(cls) -> int | None: """At Genesis, no transaction gas limit cap is imposed.""" return None + @classmethod + def state_gas_reservoir_enabled(cls) -> bool: + """ + At Genesis, state gas reservoir is not enabled. + """ + return False + @classmethod def code_deposit_state_gas(cls, *, code_size: int) -> int: """Return the state gas for code deposit of the given size.""" From 19d05910382b53d1c75721cd8e71f5dc9394d08f Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 16:19:33 -0600 Subject: [PATCH 31/46] feat(test-forks): Introduce `state_gas_reservoir_enabled` --- .../src/execution_testing/execution/base.py | 2 +- .../execution/blob_transaction.py | 6 ++- .../execution/transaction_post.py | 6 ++- .../src/execution_testing/specs/blockchain.py | 18 ++++--- .../src/execution_testing/specs/state.py | 11 ++--- .../test_types/transaction_types.py | 47 +++++++++++++++++-- 6 files changed, 70 insertions(+), 20 deletions(-) diff --git a/packages/testing/src/execution_testing/execution/base.py b/packages/testing/src/execution_testing/execution/base.py index fe80aa8b1d3..4ba11b06824 100644 --- a/packages/testing/src/execution_testing/execution/base.py +++ b/packages/testing/src/execution_testing/execution/base.py @@ -65,7 +65,7 @@ def calculate_max_transaction_gas_limit( max_gas_limit = available_gas // unset_gas_limit_tx_count tx_gas_limit_cap = fork.transaction_gas_limit_cap() - if fork.is_eip_enabled(8037): + if fork.state_gas_reservoir_enabled(): tx_gas_limit_cap = None if tx_gas_limit_cap: max_gas_limit = min(max_gas_limit, tx_gas_limit_cap) diff --git a/packages/testing/src/execution_testing/execution/blob_transaction.py b/packages/testing/src/execution_testing/execution/blob_transaction.py index df759c24252..4ce76b995bf 100644 --- a/packages/testing/src/execution_testing/execution/blob_transaction.py +++ b/packages/testing/src/execution_testing/execution/blob_transaction.py @@ -171,7 +171,11 @@ def prepare_transactions( txs, env, fork ) for tx in txs: - tx.set_gas_limit(max_tx_gas_limit) + tx.set_gas_limit( + max_gas_limit=max_tx_gas_limit, + transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), + state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), + ) tx.set_gas_price( gas_price=gas_price, max_fee_per_gas=max_fee_per_gas, diff --git a/packages/testing/src/execution_testing/execution/transaction_post.py b/packages/testing/src/execution_testing/execution/transaction_post.py index 562ba6e9a1c..a391227916a 100644 --- a/packages/testing/src/execution_testing/execution/transaction_post.py +++ b/packages/testing/src/execution_testing/execution/transaction_post.py @@ -56,7 +56,11 @@ def prepare_transactions( block, env, fork ) for tx in block: - tx.set_gas_limit(max_tx_gas_limit) + tx.set_gas_limit( + max_gas_limit=max_tx_gas_limit, + transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), + state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), + ) tx.set_gas_price( gas_price=gas_price, max_fee_per_gas=max_fee_per_gas, diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index fc05d04bc47..7a1d6e9df7d 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -823,13 +823,13 @@ def calculate_max_transaction_gas_limit( if unset_gas_limit_tx_count == 0 or available_gas <= 0: return 0 - max_gas_limit = available_gas // unset_gas_limit_tx_count + max_tx_gas_limit = available_gas // unset_gas_limit_tx_count tx_gas_limit_cap = fork.transaction_gas_limit_cap() - if fork.is_eip_enabled(8037): + if fork.state_gas_reservoir_enabled(): tx_gas_limit_cap = None if tx_gas_limit_cap: - max_gas_limit = min(max_gas_limit, tx_gas_limit_cap) - return max_gas_limit + max_tx_gas_limit = min(max_tx_gas_limit, tx_gas_limit_cap) + return max_tx_gas_limit def generate_block_data( self, @@ -853,16 +853,20 @@ def generate_block_data( env = env.set_fork_requirements(fork) txs = block.txs[:] if any(tx.gas_limit is None for tx in block.txs): - max_gas_limit = self.calculate_max_transaction_gas_limit( + max_tx_gas_limit = self.calculate_max_transaction_gas_limit( txs, env, fork ) - if max_gas_limit == 0: + if max_tx_gas_limit == 0: raise Exception( "test correctness: unable to automatically calculate gas " "limit for transactions (No remaining gas)." ) for tx in txs: - tx.set_gas_limit(max_gas_limit) + tx.set_gas_limit( + max_gas_limit=max_tx_gas_limit, + transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), + state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), + ) txs = [tx.with_signature_and_sender() for tx in txs] if failing_tx_count := len([tx for tx in txs if tx.error]) > 0: diff --git a/packages/testing/src/execution_testing/specs/state.py b/packages/testing/src/execution_testing/specs/state.py index 10fe5cc995b..2221ed95484 100644 --- a/packages/testing/src/execution_testing/specs/state.py +++ b/packages/testing/src/execution_testing/specs/state.py @@ -357,12 +357,11 @@ def make_state_test_fixture( env = self.env.set_fork_requirements(fork) tx = self.tx - if tx.gas_limit is None: - tx_gas_limit_cap = fork.transaction_gas_limit_cap() - if fork.is_eip_enabled(8037): - tx_gas_limit_cap = None - gas_limit = tx_gas_limit_cap if tx_gas_limit_cap else env.gas_limit - tx.set_gas_limit(gas_limit) + tx.set_gas_limit( + max_gas_limit=env.gas_limit, + transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), + state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), + ) tx = tx.with_signature_and_sender(keep_secret_key=True) pre_alloc = Alloc.merge( Alloc.model_validate(fork.pre_allocation()), diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 0967332bfb6..b0123674f5a 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -331,6 +331,8 @@ def strip_hash_from_t8n_output(cls, data: Any) -> Any: expected_receipt: TransactionReceipt | None = Field(None, exclude=True) + state_gas_reservoir: int = Field(0, exclude=True) + zero: ClassVar[Literal[0]] = 0 metadata: TransactionTestMetadata | None = Field(None, exclude=True) @@ -840,10 +842,37 @@ def set_gas_price( if "max_fee_per_blob_gas" not in self.model_fields_set: self.max_fee_per_blob_gas = HexNumber(max_fee_per_blob_gas) - def set_gas_limit(self, gas_limit: int) -> None: + def set_gas_limit( + self, + *, + max_gas_limit: int, + transaction_gas_limit_cap: int | None, + state_gas_reservoir_enabled: bool = False, + ) -> None: """Set the transaction gas limit if unset.""" if "gas_limit" not in self.model_fields_set or self.gas_limit is None: - self.gas_limit = HexNumber(gas_limit) + tx_gas_limit = max_gas_limit + if ( + "state_gas_reservoir" in self.model_fields_set + and state_gas_reservoir_enabled + ): + assert transaction_gas_limit_cap is not None, ( + "Impossible to set calculate the tx gas limit for the " + "required state gas reservoir without a gas limit cap" + ) + if self.state_gas_reservoir > 0: + minimum_gas_with_reservoir = ( + transaction_gas_limit_cap + self.state_gas_reservoir + ) + assert tx_gas_limit >= minimum_gas_with_reservoir + tx_gas_limit = minimum_gas_with_reservoir + else: + if tx_gas_limit > transaction_gas_limit_cap: + tx_gas_limit = transaction_gas_limit_cap + elif transaction_gas_limit_cap is not None: + if tx_gas_limit > transaction_gas_limit_cap: + tx_gas_limit = transaction_gas_limit_cap + self.gas_limit = HexNumber(tx_gas_limit) def signer_minimum_balance(self, *, fork: Fork) -> int: """Return minimum balance of the signer.""" @@ -1043,9 +1072,19 @@ def set_gas_price( max_fee_per_blob_gas=max_fee_per_blob_gas, ) - def set_gas_limit(self, gas_limit: int) -> None: + def set_gas_limit( + self, + *, + max_gas_limit: int, + transaction_gas_limit_cap: int | None, + state_gas_reservoir_enabled: bool = False, + ) -> None: """Set the transaction gas limit if unset.""" - self.tx.set_gas_limit(gas_limit) + self.tx.set_gas_limit( + max_gas_limit=max_gas_limit, + transaction_gas_limit_cap=transaction_gas_limit_cap, + state_gas_reservoir_enabled=state_gas_reservoir_enabled, + ) def signer_minimum_balance(self, *, fork: Fork) -> int: """Return minimum balance of the signer.""" From 99fac845f0cd538f1893a7022e8404a689881d16 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 16:47:13 -0600 Subject: [PATCH 32/46] fix(test-types): Fix `set_gas_limit` logic --- .../test_types/transaction_types.py | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index b0123674f5a..eb381d03eb0 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -852,25 +852,27 @@ def set_gas_limit( """Set the transaction gas limit if unset.""" if "gas_limit" not in self.model_fields_set or self.gas_limit is None: tx_gas_limit = max_gas_limit - if ( - "state_gas_reservoir" in self.model_fields_set - and state_gas_reservoir_enabled - ): - assert transaction_gas_limit_cap is not None, ( - "Impossible to set calculate the tx gas limit for the " - "required state gas reservoir without a gas limit cap" - ) - if self.state_gas_reservoir > 0: - minimum_gas_with_reservoir = ( - transaction_gas_limit_cap + self.state_gas_reservoir + if state_gas_reservoir_enabled: + if "state_gas_reservoir" in self.model_fields_set: + assert transaction_gas_limit_cap is not None, ( + "Impossible to set calculate the tx gas limit for the " + "required state gas reservoir without a gas limit cap" ) - assert tx_gas_limit >= minimum_gas_with_reservoir - tx_gas_limit = minimum_gas_with_reservoir - else: - if tx_gas_limit > transaction_gas_limit_cap: - tx_gas_limit = transaction_gas_limit_cap - elif transaction_gas_limit_cap is not None: - if tx_gas_limit > transaction_gas_limit_cap: + if self.state_gas_reservoir > 0: + minimum_gas_with_reservoir = ( + transaction_gas_limit_cap + + self.state_gas_reservoir + ) + assert tx_gas_limit >= minimum_gas_with_reservoir + tx_gas_limit = minimum_gas_with_reservoir + else: + if tx_gas_limit > transaction_gas_limit_cap: + tx_gas_limit = transaction_gas_limit_cap + else: + if ( + transaction_gas_limit_cap is not None + and tx_gas_limit > transaction_gas_limit_cap + ): tx_gas_limit = transaction_gas_limit_cap self.gas_limit = HexNumber(tx_gas_limit) From a0d16e454b04f824ed971b6e41b075d672e95358 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 16:51:53 -0600 Subject: [PATCH 33/46] fix(tests): Shanghai: EIP-3860 --- tests/shanghai/eip3860_initcode/conftest.py | 8 +--- .../eip3860_initcode/test_initcode.py | 46 ++++--------------- 2 files changed, 10 insertions(+), 44 deletions(-) diff --git a/tests/shanghai/eip3860_initcode/conftest.py b/tests/shanghai/eip3860_initcode/conftest.py index 1a5f7534a74..009e25b27b1 100644 --- a/tests/shanghai/eip3860_initcode/conftest.py +++ b/tests/shanghai/eip3860_initcode/conftest.py @@ -1,13 +1,7 @@ """Fixtures for the EIP-3860 initcode tests.""" import pytest -from execution_testing import Alloc, Environment - - -@pytest.fixture -def env() -> Environment: - """Environment fixture.""" - return Environment() +from execution_testing import Alloc @pytest.fixture diff --git a/tests/shanghai/eip3860_initcode/test_initcode.py b/tests/shanghai/eip3860_initcode/test_initcode.py index ca478ddfe10..9037d46c7ca 100644 --- a/tests/shanghai/eip3860_initcode/test_initcode.py +++ b/tests/shanghai/eip3860_initcode/test_initcode.py @@ -16,7 +16,6 @@ Address, Alloc, Bytecode, - Environment, Fork, Initcode, Op, @@ -125,7 +124,6 @@ def initcode(fork: Fork, initcode_name: str) -> Initcode: @pytest.mark.eels_base_coverage def test_contract_creating_tx( state_test: StateTestFiller, - env: Environment, pre: Alloc, post: Alloc, sender: EOA, @@ -140,12 +138,7 @@ def test_contract_creating_tx( nonce=0, ) - tx = Transaction( - to=None, - data=initcode, - gas_limit=10_000_000, - sender=sender, - ) + tx = Transaction(to=None, data=initcode, sender=sender) if len(initcode) > fork.max_initcode_size(): # Initcode is above the max size, tx inclusion in the block makes @@ -157,12 +150,7 @@ def test_contract_creating_tx( # is ok and the contract is successfully created. post[create_contract_address] = Account(code=Op.STOP) - state_test( - env=env, - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) ZERO_GAS_SPECS = {"empty", "single_byte"} @@ -370,7 +358,6 @@ def post( def test_gas_usage( self, state_test: StateTestFiller, - env: Environment, pre: Alloc, post: Alloc, tx: Transaction, @@ -378,12 +365,7 @@ def test_gas_usage( """ Test transaction and contract creation using different gas limits. """ - state_test( - env=env, - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -471,7 +453,7 @@ def creator_contract_address( self, pre: Alloc, creator_code: Bytecode ) -> Address: """Return address of creator contract.""" - return pre.deploy_contract(creator_code) + return pre.deploy_contract(creator_code, label="creator_contract") @pytest.fixture def created_contract_address( # noqa: D103 @@ -499,7 +481,7 @@ def caller_code(self, creator_contract_address: Address) -> Bytecode: """ return Op.CALLDATACOPY(0, 0, Op.CALLDATASIZE) + Op.SSTORE( Op.CALL( - 5000000, creator_contract_address, 0, 0, Op.CALLDATASIZE, 0, 0 + address=creator_contract_address, args_size=Op.CALLDATASIZE ), 1, ) @@ -509,7 +491,7 @@ def caller_contract_address( self, pre: Alloc, caller_code: Bytecode ) -> Address: """Return address of the caller contract.""" - return pre.deploy_contract(caller_code) + return pre.deploy_contract(caller_code, label="caller_contract") @pytest.fixture def tx( @@ -519,7 +501,7 @@ def tx( return Transaction( to=caller_contract_address, data=initcode, - gas_limit=10_000_000, + state_gas_reservoir=0, # Don't hide state gas from Op.GAS sender=sender, ) @@ -528,7 +510,6 @@ def tx( def test_create_opcode_initcode( self, state_test: StateTestFiller, - env: Environment, pre: Alloc, post: Alloc, tx: Transaction, @@ -587,12 +568,7 @@ def test_create_opcode_initcode( }, ) - state_test( - env=env, - pre=pre, - post=post, - tx=tx, - ) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.ported_from( @@ -638,11 +614,7 @@ def test_create2_oversized_initcode_with_insufficient_balance( caller_address = pre.deploy_contract(caller_code) sender = pre.fund_eoa() - tx = Transaction( - sender=sender, - to=caller_address, - gas_limit=10_000_000, - ) + tx = Transaction(sender=sender, to=caller_address) post = { caller_address: Account(storage={1: expected_storage_1}), From 1687cd925573f51d7318249c4bfcd899aff7364d Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 5 Jun 2026 17:27:01 -0600 Subject: [PATCH 34/46] refactor(tests): Amsterdam: EIP-8037 (use `state_gas_reservoir`) --- .../test_block_2d_gas_accounting.py | 20 +-- .../test_eip_mainnet.py | 16 +- .../test_state_gas_call.py | 168 +++++------------- .../test_state_gas_calldata_floor.py | 18 +- .../test_state_gas_create.py | 107 +++-------- .../test_state_gas_delegation_pointer.py | 22 +-- .../test_state_gas_fork_transition.py | 12 +- .../test_state_gas_multi_block.py | 24 +-- .../test_state_gas_ordering.py | 8 +- .../test_state_gas_pricing.py | 26 +-- .../test_state_gas_reservoir.py | 61 ++----- .../test_state_gas_selfdestruct.py | 56 ++---- .../test_state_gas_set_code.py | 141 ++++----------- .../test_state_gas_sstore.py | 98 +++------- 14 files changed, 206 insertions(+), 571 deletions(-) diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_block_2d_gas_accounting.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_block_2d_gas_accounting.py index 0299ce309ba..a657275e98d 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_block_2d_gas_accounting.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_block_2d_gas_accounting.py @@ -237,8 +237,6 @@ def test_block_gas_refund_eip7778_no_block_reduction( (EIP-7778). State gas refund goes to the reservoir and DOES reduce `block_state_gas_used` (net zero state growth). """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -258,7 +256,7 @@ def test_block_gas_refund_eip7778_no_block_reduction( txs.append( Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) ) @@ -364,8 +362,6 @@ def test_block_gas_used_call_new_account( GAS_NEW_ACCOUNT state gas) then SSTORE. Combined with a STOP tx, the 2D max must reflect state gas from account creation. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = fork.gas_costs().NEW_ACCOUNT sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) @@ -383,9 +379,7 @@ def test_block_gas_used_call_new_account( txs = [ Transaction( to=parent, - gas_limit=( - gas_limit_cap + new_account_state_gas + sstore_state_gas - ), + state_gas_reservoir=new_account_state_gas + sstore_state_gas, sender=pre.fund_eoa(), ), ] + stop_txs(pre, fork, 1) @@ -409,8 +403,6 @@ def test_block_gas_used_create_tx( Contract creation charges GAS_NEW_ACCOUNT as intrinsic state gas. Combined with a STOP tx, verify the 2D max is correct. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None intrinsic_calc = fork.transaction_intrinsic_cost_calculator() create_state_gas = fork.create_state_gas(code_size=0) @@ -430,7 +422,7 @@ def test_block_gas_used_create_tx( Transaction( to=None, data=init_code, - gas_limit=gas_limit_cap + create_state_gas, + state_gas_reservoir=create_state_gas, sender=pre.fund_eoa(), ), ] + stop_txs(pre, fork, 1) @@ -624,9 +616,7 @@ def test_receipt_cumulative_differs_from_header_gas_used( tx_regular, tx_state = sstore_tx_gas(fork) num_txs = 3 - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - tx_gas_limit = gas_limit_cap + Op.SSTORE(new_value=1).state_cost(fork) + sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) per_tx_gas_used = tx_regular + tx_state txs: list[Transaction] = [] @@ -639,7 +629,7 @@ def test_receipt_cumulative_differs_from_header_gas_used( txs.append( Transaction( to=contract, - gas_limit=tx_gas_limit, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), expected_receipt=TransactionReceipt( cumulative_gas_used=(i + 1) * per_tx_gas_used, diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_eip_mainnet.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_eip_mainnet.py index bee5ed11565..f01b048ff3a 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_eip_mainnet.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_eip_mainnet.py @@ -7,7 +7,6 @@ from execution_testing import ( Account, Alloc, - Fork, Op, StateTestFiller, Storage, @@ -25,11 +24,8 @@ def test_sstore_zero_to_nonzero( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test SSTORE zero-to-nonzero charges state gas and succeeds.""" - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() contract = pre.deploy_contract( code=Op.SSTORE(storage.store_next(1), 1), @@ -37,7 +33,7 @@ def test_sstore_zero_to_nonzero( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -48,11 +44,8 @@ def test_sstore_zero_to_nonzero( def test_create_charges_state_gas( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test CREATE charges state gas for new account creation.""" - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None init_code = Op.STOP storage = Storage() @@ -72,7 +65,7 @@ def test_create_charges_state_gas( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -83,15 +76,12 @@ def test_create_charges_state_gas( def test_create_tx_deploys_contract( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """Test contract creation transaction succeeds with state gas.""" - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None tx = Transaction( to=None, data=Op.STOP, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_call.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_call.py index a31c1cdfd54..d90bfbcb63b 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_call.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_call.py @@ -22,7 +22,6 @@ Block, BlockchainTestFiller, Bytecode, - Environment, Fork, Header, Op, @@ -53,9 +52,6 @@ def test_child_call_uses_reservoir( (zero-to-nonzero). The state gas for the SSTORE is drawn from the reservoir passed from the parent. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) child_storage = Storage() @@ -75,7 +71,7 @@ def test_child_call_uses_reservoir( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -83,14 +79,13 @@ def test_child_call_uses_reservoir( parent: Account(storage=parent_storage), child: Account(storage=child_storage), } - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") def test_delegatecall_child_spill_not_double_charged( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test DELEGATECALL child state gas paid from `gas_left` is not recharged. @@ -100,8 +95,6 @@ def test_delegatecall_child_spill_not_double_charged( `gas_left`. The parent frame must not charge the same state growth again at frame end. """ - env = Environment() - child_code = sum(Op.SSTORE(i, i + 1) for i in range(6)) + Op.STOP child = pre.deploy_contract(code=child_code) @@ -127,7 +120,7 @@ def test_delegatecall_child_spill_not_double_charged( post = { caller: Account(storage={i: i + 1 for i in range(6)}), } - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -142,9 +135,6 @@ def test_reservoir_returned_on_revert( The child contract reverts. The parent should recover the reservoir and be able to use it for its own SSTORE. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) child = pre.deploy_contract(code=Op.REVERT(0, 0)) @@ -161,12 +151,12 @@ def test_reservoir_returned_on_revert( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {parent: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -181,9 +171,6 @@ def test_reservoir_returned_on_oog( The child runs out of regular gas. The parent recovers the reservoir and can use it for its own state operations. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) # Child that consumes all gas @@ -201,12 +188,12 @@ def test_reservoir_returned_on_oog( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {parent: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -225,9 +212,6 @@ def test_reservoir_restored_after_child_spill_and_revert( restored to the parent's reservoir. The parent can then perform two SSTOREs using only the recovered reservoir. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) # Child does two SSTOREs then reverts — the second SSTORE's @@ -250,12 +234,12 @@ def test_reservoir_restored_after_child_spill_and_revert( # Reservoir = 1 SSTORE's worth of state gas — child will spill tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {parent: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -275,9 +259,6 @@ def test_reservoir_restored_after_child_spill_and_halt( The parent does two SSTOREs: the first drains the recovered reservoir, the second spills from the parent's own `gas_left`. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) # Child does two SSTOREs then halts @@ -300,12 +281,12 @@ def test_reservoir_restored_after_child_spill_and_halt( # Reservoir = 1 SSTORE's worth of state gas — child will spill tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {parent: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -321,9 +302,6 @@ def test_reservoir_restored_after_child_full_drain_and_revert( (no spill into gas_left), then REVERTs. The full reservoir is returned to the parent. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) child = pre.deploy_contract( @@ -340,12 +318,12 @@ def test_reservoir_restored_after_child_full_drain_and_revert( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {parent: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -362,9 +340,6 @@ def test_sequential_calls_reservoir_restored_between_reverts( child failures restore the reservoir, so the parent can use it for its own SSTORE at the end. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) child = pre.deploy_contract( @@ -385,12 +360,12 @@ def test_sequential_calls_reservoir_restored_between_reverts( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {parent: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -406,9 +381,6 @@ def test_nested_calls_reservoir_passing( using the reservoir gas. After all calls return, A verifies success. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) c_storage = Storage() @@ -432,7 +404,7 @@ def test_nested_calls_reservoir_passing( tx = Transaction( to=a, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -440,7 +412,7 @@ def test_nested_calls_reservoir_passing( a: Account(storage=a_storage), c: Account(storage=c_storage), } - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -456,9 +428,6 @@ def test_call_value_transfer_new_account( new account, charging new-account state gas of state gas. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() new_account_state_gas = gas_costs.NEW_ACCOUNT # Target address that doesn't exist in pre-state @@ -477,19 +446,18 @@ def test_call_value_transfer_new_account( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) post = {parent: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") def test_call_value_transfer_existing_account_no_state_gas( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test CALL with value to existing account charges no state gas. @@ -497,8 +465,6 @@ def test_call_value_transfer_existing_account_no_state_gas( A CALL that transfers value to an already-alive account does not create new state, so no state gas is charged. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None # Existing target account target = pre.fund_eoa(amount=0) @@ -515,7 +481,7 @@ def test_call_value_transfer_existing_account_no_state_gas( tx = Transaction( to=parent, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -537,9 +503,6 @@ def test_child_state_gas_tracked_in_parent( succeeding with enough total gas but would OOG if state gas wasn't tracked across frames. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) child_storage = Storage() @@ -563,7 +526,7 @@ def test_child_state_gas_tracked_in_parent( # Provide enough reservoir for both SSTOREs tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas * 2, + state_gas_reservoir=sstore_state_gas * 2, sender=pre.fund_eoa(), ) @@ -571,7 +534,7 @@ def test_child_state_gas_tracked_in_parent( parent: Account(storage=parent_storage), child: Account(storage=child_storage), } - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -587,9 +550,6 @@ def test_delegatecall_reservoir_passing( The child's SSTORE writes to the parent's storage using state gas from the reservoir. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) # Library code that writes to slot 0 — runs in parent's context @@ -605,12 +565,12 @@ def test_delegatecall_reservoir_passing( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {parent: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -626,9 +586,6 @@ def test_staticcall_passes_reservoir( passed to the child but cannot be consumed. After the STATICCALL returns, the parent can still use the reservoir for its own SSTORE. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) # Child does a read-only operation @@ -647,12 +604,12 @@ def test_staticcall_passes_reservoir( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {parent: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -668,9 +625,6 @@ def test_gas_opcode_excludes_reservoir( reservoir is non-empty, the GAS return value should be less than the total remaining gas (gas_left + reservoir). """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) storage = Storage() @@ -687,7 +641,7 @@ def test_gas_opcode_excludes_reservoir( reservoir_gas = sstore_state_gas * 100 tx = Transaction( to=contract, - gas_limit=gas_limit_cap + reservoir_gas, + state_gas_reservoir=reservoir_gas, sender=pre.fund_eoa(), ) @@ -696,7 +650,7 @@ def test_gas_opcode_excludes_reservoir( # We can't check the exact value, but we verify the SSTORE # succeeded and the contract executed correctly post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -723,9 +677,6 @@ def test_call_insufficient_balance_returns_reservoir( subsequent SSTORE. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) target: int | Address @@ -752,12 +703,12 @@ def test_call_insufficient_balance_returns_reservoir( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + reservoir, + state_gas_reservoir=reservoir, sender=pre.fund_eoa(), ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -773,9 +724,6 @@ def test_create_insufficient_balance_returns_reservoir( for the endowment, the operation fails and both gas and state gas reservoir are returned to the parent frame. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) storage = Storage() @@ -794,12 +742,12 @@ def test_create_insufficient_balance_returns_reservoir( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -815,9 +763,6 @@ def test_call_stack_depth_returns_reservoir( and gas and state gas reservoir are returned. The parent can still use the reservoir for state operations. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) # Contract that recursively calls itself until depth exhausted, @@ -835,12 +780,12 @@ def test_call_stack_depth_returns_reservoir( tx = Transaction( to=recursive, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {recursive: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -864,8 +809,6 @@ def test_call_pre_charged_costs_excluded_from_forwarding( the child to OOG and the SSTORE to revert. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) # Child: SSTORE(0, 1) as proof of execution @@ -910,7 +853,7 @@ def test_call_pre_charged_costs_excluded_from_forwarding( tx = Transaction( sender=sender, to=caller, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, ) post = { @@ -934,8 +877,6 @@ def test_call_new_account_header_gas_used( correct 2D max(regular, state) accounting in the header. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = gas_costs.NEW_ACCOUNT target = pre.fund_eoa(amount=0) @@ -953,7 +894,7 @@ def test_call_new_account_header_gas_used( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) @@ -993,9 +934,6 @@ def test_call_value_to_self_destructed_same_tx_account( the no charge behavior lives in `test_call_value_to_self_destructed_header_gas_used`. """ - env = Environment() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = fork.gas_costs().NEW_ACCOUNT sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) @@ -1023,12 +961,12 @@ def test_call_value_to_self_destructed_same_tx_account( tx = Transaction( to=orchestrator, - gas_limit=gas_limit_cap + new_account_state_gas + sstore_state_gas, + state_gas_reservoir=new_account_state_gas + sstore_state_gas, sender=pre.fund_eoa(), ) post = {orchestrator: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -1065,8 +1003,6 @@ def test_call_value_to_self_destructed_header_gas_used( targeted itself or an external beneficiary, so the no charge behavior holds across both cases. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = fork.gas_costs().NEW_ACCOUNT if selfdestruct_beneficiary == "self": @@ -1095,7 +1031,7 @@ def test_call_value_to_self_destructed_header_gas_used( tx = Transaction( to=orchestrator, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) @@ -1138,8 +1074,6 @@ def test_call_value_to_self_destructed_burns_value( address. At the end of the transaction the account is removed and the accumulated balance is lost. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = fork.gas_costs().NEW_ACCOUNT inner_code = Op.SELFDESTRUCT(Op.ADDRESS) @@ -1182,7 +1116,7 @@ def test_call_value_to_self_destructed_burns_value( tx = Transaction( to=orchestrator, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) @@ -1220,8 +1154,6 @@ def test_call_zero_value_to_self_destructed_same_tx_account( value CALL (value gate broken) would double the state gas component. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = fork.gas_costs().NEW_ACCOUNT inner_code = Op.SELFDESTRUCT(Op.ADDRESS) @@ -1244,7 +1176,7 @@ def test_call_zero_value_to_self_destructed_same_tx_account( tx = Transaction( to=orchestrator, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) @@ -1284,8 +1216,6 @@ def test_call_value_to_pre_existing_selfdestructed_account( new account charge on the value bearing CALL would push the header up by that charge, breaking the assertion. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) # Enough probes that the combined probe state gas dominates the @@ -1320,7 +1250,7 @@ def test_call_value_to_pre_existing_selfdestructed_account( tx = Transaction( to=orchestrator, - gas_limit=gas_limit_cap + probe_state_gas, + state_gas_reservoir=probe_state_gas, sender=pre.fund_eoa(), ) @@ -1397,7 +1327,7 @@ def test_top_level_halt_refunds_total_state_gas( tx = Transaction( to=parent, - gas_limit=tx_gas, + state_gas_reservoir=reservoir, sender=pre.fund_eoa(), ) @@ -1429,8 +1359,6 @@ def test_callcode_value_no_new_account_state_gas( Verify CALLCODE with value does not charge new-account state gas, since the value stays with the caller. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) target = pre.fund_eoa(amount=0) @@ -1452,7 +1380,7 @@ def test_callcode_value_no_new_account_state_gas( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -1477,8 +1405,6 @@ def test_create_oog_during_state_gas_charge( SSTORE is forwarded only its regular stipend, so it succeeds only if the refund landed in the reservoir (not in `gas_left`). """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) @@ -1514,7 +1440,7 @@ def test_create_oog_during_state_gas_charge( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -1589,8 +1515,6 @@ def test_child_failure_refunds_state_gas_to_reservoir_not_gas_left( tight regular stipend. Covers SSTORE and CALL-value (new account) state-gas charge paths. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) @@ -1630,7 +1554,7 @@ def test_child_failure_refunds_state_gas_to_reservoir_not_gas_left( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + reservoir, + state_gas_reservoir=reservoir, sender=pre.fund_eoa(), ) diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_calldata_floor.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_calldata_floor.py index 8dc98e0d063..57257880a16 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_calldata_floor.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_calldata_floor.py @@ -16,7 +16,6 @@ Alloc, Block, BlockchainTestFiller, - Environment, Fork, Op, StateTestFiller, @@ -37,7 +36,6 @@ def test_calldata_floor_with_sstore( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test calldata floor does not affect state gas charging. @@ -45,8 +43,6 @@ def test_calldata_floor_with_sstore( A transaction with large calldata triggers the calldata floor for regular gas, but state gas for SSTORE is charged independently. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() contract = pre.deploy_contract( code=Op.SSTORE(storage.store_next(1), 1), @@ -58,7 +54,7 @@ def test_calldata_floor_with_sstore( tx = Transaction( to=contract, data=calldata, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -70,7 +66,6 @@ def test_calldata_floor_with_sstore( def test_calldata_floor_independent_of_state_gas( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test calldata floor applies only to regular gas dimension. @@ -80,8 +75,6 @@ def test_calldata_floor_independent_of_state_gas( high calldata and no state operations should succeed even when the floor exceeds actual execution gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None contract = pre.deploy_contract(code=Op.STOP) # Large calldata so the floor exceeds actual execution gas @@ -90,7 +83,7 @@ def test_calldata_floor_independent_of_state_gas( tx = Transaction( to=contract, data=calldata, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -109,9 +102,6 @@ def test_calldata_floor_higher_than_execution_with_state_ops( Even when calldata floor > actual regular gas used, state gas for SSTORE is charged normally from the reservoir or gas_left. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) storage = Storage() @@ -125,12 +115,12 @@ def test_calldata_floor_higher_than_execution_with_state_ops( tx = Transaction( to=contract, data=calldata, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py index dcd4663b51c..9d3ba0fe9e1 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py @@ -17,7 +17,6 @@ Block, BlockchainTestFiller, Bytecode, - Environment, Fork, Header, Initcode, @@ -43,7 +42,6 @@ def test_create_charges_state_gas( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test CREATE charges state gas for new account and code deposit. @@ -51,8 +49,6 @@ def test_create_charges_state_gas( A successful CREATE charges new-account state gas plus code deposit state gas proportional to the deployed code size. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None init_code = Op.STOP storage = Storage() @@ -72,7 +68,7 @@ def test_create_charges_state_gas( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -101,9 +97,6 @@ def test_create_with_reservoir( is drawn from the reservoir rather than gas_left. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() create_state_gas = gas_costs.NEW_ACCOUNT storage = Storage() @@ -130,12 +123,12 @@ def test_create_with_reservoir( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + create_state_gas, + state_gas_reservoir=create_state_gas, sender=pre.fund_eoa(), ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -150,8 +143,6 @@ def test_create2_child_spill_not_double_charged( pays new-account and storage state gas by spilling from `gas_left`. The factory must not charge the same state growth again at frame end. """ - env = Environment() - init_code = sum(Op.SSTORE(i, i + 1) for i in range(6)) + Op.STOP mstore_value, initcode_size = init_code_at_high_bytes(init_code) @@ -183,7 +174,7 @@ def test_create2_child_spill_not_double_charged( post = { created: Account(nonce=1, storage={i: i + 1 for i in range(6)}), } - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -218,9 +209,6 @@ def test_code_deposit_state_gas_scales_with_size( code_size = fork.max_code_size() + 1 assert isinstance(code_size, int) - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() # State gas: new account + code deposit total_state_gas = fork.create_state_gas(code_size=code_size) @@ -232,7 +220,7 @@ def test_code_deposit_state_gas_scales_with_size( tx = Transaction( to=None, data=init_code, - gas_limit=gas_limit_cap + total_state_gas, + state_gas_reservoir=total_state_gas, sender=sender, ) @@ -242,7 +230,7 @@ def test_code_deposit_state_gas_scales_with_size( else: post = {} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -316,7 +304,6 @@ def test_repeated_create_same_code_charges_each_account( def test_create_tx_state_gas( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test contract creation transaction charges intrinsic state gas. @@ -325,12 +312,10 @@ def test_create_tx_state_gas( as intrinsic state gas for the new account, plus code deposit state gas for the deployed bytecode. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None tx = Transaction( to=None, data=Op.STOP, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -341,7 +326,6 @@ def test_create_tx_state_gas( def test_create_revert_no_code_deposit_state_gas( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test reverted CREATE does not charge code deposit state gas. @@ -350,8 +334,6 @@ def test_create_revert_no_code_deposit_state_gas( account state gas is consumed but no code deposit state gas is charged because no code was deployed. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None init_code = Op.REVERT(0, 0) storage = Storage() @@ -371,7 +353,7 @@ def test_create_revert_no_code_deposit_state_gas( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -536,8 +518,6 @@ def test_code_deposit_oog_preserves_parent_reservoir( CREATE proves the reservoir was not inflated by a spill-then-halt refund. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() new_account_state_gas = gas_costs.NEW_ACCOUNT sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) @@ -582,7 +562,7 @@ def test_code_deposit_oog_preserves_parent_reservoir( # gas_left, which the limited CALL gas cannot cover. tx = Transaction( to=caller, - gas_limit=(gas_limit_cap + new_account_state_gas + sstore_state_gas), + state_gas_reservoir=new_account_state_gas + sstore_state_gas, sender=pre.fund_eoa(), ) @@ -916,12 +896,11 @@ def test_sstore_oog_no_reservoir_inflation( ) sender = pre.fund_eoa() - # gas_limit = cap, reservoir = 0 tx = Transaction( sender=sender, to=caller, data=bytes(initcode), - gas_limit=fork.transaction_gas_limit_cap(), + state_gas_reservoir=0, ) created = not gas_shortfall @@ -1030,13 +1009,11 @@ def test_max_initcode_size_gas_metering_via_create( + Op.STOP ) - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None tx = Transaction( sender=alice, to=caller, data=bytes(initcode), - gas_limit=gas_limit_cap + factory_state_gas, + state_gas_reservoir=factory_state_gas, ) created = not gas_shortfall @@ -1089,12 +1066,10 @@ def test_create_no_double_charge_new_account( ) ) - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None tx = Transaction( sender=pre.fund_eoa(), to=caller, - gas_limit=gas_limit_cap + create_state_gas, + state_gas_reservoir=create_state_gas, ) post = { @@ -1141,9 +1116,6 @@ def test_code_deposit_halt_discards_initcode_state_gas( in block_state_gas_used, which determines the block header gas_used via max(block_regular_gas, block_state_gas). """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - subcall_forwarded_value = 1 entry_account_value = 1 if state_opcode == Op.CALL: @@ -1175,7 +1147,7 @@ def test_code_deposit_halt_discards_initcode_state_gas( to=None, data=initcode, value=entry_account_value + subcall_forwarded_value, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ), ], @@ -1199,9 +1171,6 @@ def test_create_tx_header_gas_used( header. Catches bugs where clients report gas_limit instead of actual consumed gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - gas_costs = fork.gas_costs() initcode = Op.STOP create_state_gas = fork.create_state_gas(code_size=1) @@ -1209,7 +1178,7 @@ def test_create_tx_header_gas_used( tx = Transaction( to=None, data=initcode, - gas_limit=gas_limit_cap + create_state_gas, + state_gas_reservoir=create_state_gas, sender=pre.fund_eoa(), ) @@ -1261,7 +1230,7 @@ def test_create_initcode_halt_no_code_deposit_state_gas( tx = Transaction( to=None, data=initcode, - gas_limit=gas_limit, + state_gas_reservoir=intrinsic_state_gas, sender=pre.fund_eoa(), ) @@ -1298,9 +1267,6 @@ def test_state_gas_spill_header_gas_used( the reservoir and partially spilling into gas_left. Verify the block header gas_used reflects the correct 2D max accounting. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - # SSTORE zero-to-nonzero with small reservoir sstore_code = Op.SSTORE(0, 1) + Op.STOP contract = pre.deploy_contract(code=sstore_code) @@ -1313,11 +1279,10 @@ def test_state_gas_spill_header_gas_used( # Reservoir = half the SSTORE state gas, rest spills to gas_left reservoir = sstore_state_gas // 2 - gas_limit = gas_limit_cap + reservoir tx = Transaction( to=contract, - gas_limit=gas_limit, + state_gas_reservoir=reservoir, sender=pre.fund_eoa(), ) @@ -1360,8 +1325,6 @@ def test_failed_create_header_gas_used( halt). Verify the block is accepted with correct gas accounting. Parametrized across failure modes and create opcodes. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None create_state_gas = fork.create_state_gas(code_size=0) if failure_mode == "revert": @@ -1388,7 +1351,7 @@ def test_failed_create_header_gas_used( tx = Transaction( to=factory, - gas_limit=gas_limit_cap + create_state_gas, + state_gas_reservoir=create_state_gas, sender=pre.fund_eoa(), ) @@ -1422,8 +1385,6 @@ def test_create_silent_failure_refunds_state_gas( balance) refund `GAS_NEW_ACCOUNT` to the reservoir. Block state gas reflects only the probe SSTORE, not the refunded CREATE. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() @@ -1444,7 +1405,7 @@ def test_create_silent_failure_refunds_state_gas( tx = Transaction( to=factory, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -1573,8 +1534,6 @@ def test_create_child_halt_refunds_state_gas( but not enough to spill the state portion, so the probe SSTORE can only succeed via the refunded reservoir. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) new_account_state_gas = gas_costs.NEW_ACCOUNT @@ -1623,7 +1582,7 @@ def test_create_child_halt_refunds_state_gas( ) tx = Transaction( to=caller, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) @@ -1644,8 +1603,6 @@ def test_create_mixed_success_and_failure_block_accounting( One successful CREATE plus one failed CREATE (REVERT): block state gas reflects only the successful charges. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() create_account_state_gas = fork.create_state_gas(code_size=0) @@ -1677,7 +1634,7 @@ def call(size: int, salt: int) -> Bytecode: tx = Transaction( to=factory, - gas_limit=gas_limit_cap + 2 * create_account_state_gas, + state_gas_reservoir=2 * create_account_state_gas, sender=pre.fund_eoa(), ) @@ -1707,8 +1664,6 @@ def test_create_collision_refunds_state_gas( probe SSTORE can only succeed via the refunded reservoir, not by spilling state gas from `gas_left`. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) new_account_state_gas = gas_costs.NEW_ACCOUNT @@ -1758,7 +1713,7 @@ def test_create_collision_refunds_state_gas( ) tx = Transaction( to=caller, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) @@ -1782,8 +1737,6 @@ def test_create_code_deposit_oog_refunds_state_gas( `gas_left` so the probe SSTORE can only succeed via the refunded reservoir, not by spilling state gas from `gas_left`. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) new_account_state_gas = gas_costs.NEW_ACCOUNT @@ -1824,7 +1777,7 @@ def test_create_code_deposit_oog_refunds_state_gas( ) tx = Transaction( to=caller, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) @@ -1958,15 +1911,13 @@ def test_oversized_initcode_tx_no_state_gas( sender = pre.fund_eoa() create_address = compute_create_address(address=sender, nonce=0) - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None create_state_gas = fork.create_state_gas(code_size=len(Op.STOP)) tx = Transaction( sender=sender, to=None, data=initcode, - gas_limit=gas_limit_cap + create_state_gas, + state_gas_reservoir=create_state_gas, ) if initcode_size_delta > 0: @@ -2016,8 +1967,6 @@ def test_oversized_initcode_opcode_no_state_gas( initcode = Initcode(deploy_code=Op.STOP, initcode_length=size) initcode_bytes = bytes(initcode) - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() create_state_gas = gas_costs.NEW_ACCOUNT @@ -2052,7 +2001,7 @@ def test_oversized_initcode_opcode_no_state_gas( sender=pre.fund_eoa(), to=factory, data=initcode_bytes, - gas_limit=gas_limit_cap + create_state_gas, + state_gas_reservoir=create_state_gas, ) post: dict = {factory: Account(storage=storage)} @@ -2228,8 +2177,6 @@ def test_nested_create_fail_parent_revert_state_gas( Verify factory nonce is rolled back when the factory reverts after a failed inner CREATE, and preserved when the factory returns. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() create_state_gas = gas_costs.NEW_ACCOUNT @@ -2264,7 +2211,7 @@ def test_nested_create_fail_parent_revert_state_gas( tx = Transaction( to=caller, - gas_limit=gas_limit_cap + create_state_gas, + state_gas_reservoir=create_state_gas, sender=pre.fund_eoa(), ) @@ -2304,8 +2251,6 @@ def test_create_stack_depth_state_gas_consumed( Verify the state gas reservoir survives a deep recursion of nested CALLs that silently fail on gas or depth exhaustion. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) storage = Storage() @@ -2318,7 +2263,7 @@ def test_create_stack_depth_state_gas_consumed( tx = Transaction( to=recursive, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_delegation_pointer.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_delegation_pointer.py index b6c79007c1d..4907e573878 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_delegation_pointer.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_delegation_pointer.py @@ -14,7 +14,6 @@ Account, Alloc, AuthorizationTuple, - Environment, Fork, Op, StateTestFiller, @@ -42,9 +41,6 @@ def test_sstore_via_delegation_pointer( contract code in the EOA's context. The SSTORE state gas should be charged from the reservoir just as it would for a direct call. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -61,7 +57,7 @@ def test_sstore_via_delegation_pointer( sender = pre.fund_eoa() tx = Transaction( to=delegator, - gas_limit=(gas_limit_cap + auth_state_gas + sstore_state_gas), + state_gas_reservoir=auth_state_gas + sstore_state_gas, authorization_list=[ AuthorizationTuple( address=contract, @@ -74,7 +70,7 @@ def test_sstore_via_delegation_pointer( # SSTORE writes to the delegator's storage context post = {delegator: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -89,9 +85,6 @@ def test_sstore_direct_call_same_contract( Baseline comparison: calling the contract directly (not via a delegation pointer) charges SSTORE state gas identically. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) storage = Storage() @@ -102,12 +95,12 @@ def test_sstore_direct_call_same_contract( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=sender, ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -124,9 +117,6 @@ def test_delegation_pointer_new_account_state_gas( is charged identically to a direct call. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -151,7 +141,7 @@ def test_delegation_pointer_new_account_state_gas( sender = pre.fund_eoa() tx = Transaction( to=delegator, - gas_limit=(gas_limit_cap + auth_state_gas + new_account_state_gas), + state_gas_reservoir=auth_state_gas + new_account_state_gas, authorization_list=[ AuthorizationTuple( address=contract, @@ -164,4 +154,4 @@ def test_delegation_pointer_new_account_state_gas( # CALL success stored in delegator's storage context post = {delegator: Account(storage=parent_storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_fork_transition.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_fork_transition.py index 5438eaba8ce..2b0c379d36f 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_fork_transition.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_fork_transition.py @@ -42,7 +42,6 @@ def test_sstore_state_gas_at_transition( blockchain_test: BlockchainTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SSTORE state gas activates at the EIP-8037 fork boundary. @@ -52,9 +51,6 @@ def test_sstore_state_gas_at_transition( operation requires state gas. Both blocks use TX_MAX_GAS_LIMIT which provides enough gas in either regime. """ - after_fork = fork.fork_at(timestamp=15_000) - gas_limit_cap = after_fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None contract_before = pre.deploy_contract( code=Op.SSTORE(0, 1), ) @@ -69,7 +65,7 @@ def test_sstore_state_gas_at_transition( txs=[ Transaction( to=contract_before, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ), ], @@ -80,7 +76,7 @@ def test_sstore_state_gas_at_transition( txs=[ Transaction( to=contract_after, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ), ], @@ -196,8 +192,6 @@ def test_reservoir_available_after_transition( which child calls can draw from for state operations. """ after_fork = fork.fork_at(timestamp=15_000) - gas_limit_cap = after_fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(after_fork) child_storage = Storage() @@ -221,7 +215,7 @@ def test_reservoir_available_after_transition( txs=[ Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ), ], diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_multi_block.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_multi_block.py index 2398717d9c9..37ad180f529 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_multi_block.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_multi_block.py @@ -53,8 +53,6 @@ def test_exact_coinbase_fee_simple_sstore( where clients diverged on cumulative `receipt_gas_used`. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) # Gas breakdown for tx 1 (SSTORE zero-to-nonzero, no calldata): @@ -83,14 +81,14 @@ def test_exact_coinbase_fee_simple_sstore( txs=[ Transaction( to=sstore_contract, - gas_limit=(gas_limit_cap + sstore_state_gas), + state_gas_reservoir=sstore_state_gas, max_priority_fee_per_gas=1, max_fee_per_gas=8, sender=pre.fund_eoa(), ), Transaction( to=reporter, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, max_priority_fee_per_gas=1, max_fee_per_gas=8, sender=pre.fund_eoa(), @@ -122,8 +120,6 @@ def test_multi_block_mixed_state_operations( This mixed scenario tests that `receipt_gas_used` is consistent across different state gas paths within a multi-block chain. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) reverting_child = pre.deploy_contract( @@ -148,7 +144,7 @@ def test_multi_block_mixed_state_operations( block1_txs.append( Transaction( to=contract, - gas_limit=(gas_limit_cap + sstore_state_gas), + state_gas_reservoir=sstore_state_gas, max_priority_fee_per_gas=1, max_fee_per_gas=8, sender=pre.fund_eoa(), @@ -175,7 +171,7 @@ def test_multi_block_mixed_state_operations( block2_txs.append( Transaction( to=parent, - gas_limit=(gas_limit_cap + sstore_state_gas), + state_gas_reservoir=sstore_state_gas, max_priority_fee_per_gas=1, max_fee_per_gas=8, sender=pre.fund_eoa(), @@ -202,7 +198,7 @@ def test_multi_block_mixed_state_operations( block3_txs.append( Transaction( to=parent, - gas_limit=(gas_limit_cap + sstore_state_gas), + state_gas_reservoir=sstore_state_gas, max_priority_fee_per_gas=1, max_fee_per_gas=8, sender=pre.fund_eoa(), @@ -244,8 +240,6 @@ def test_multi_block_observed_coinbase_balance( (coinbase earns fee through different code path). Tx 4: Store `BALANCE(COINBASE)` in slot 0. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) reporter1 = pre.deploy_contract( @@ -278,14 +272,14 @@ def test_multi_block_observed_coinbase_balance( txs=[ Transaction( to=sstore_contract, - gas_limit=(gas_limit_cap + sstore_state_gas), + state_gas_reservoir=sstore_state_gas, max_priority_fee_per_gas=1, max_fee_per_gas=8, sender=pre.fund_eoa(), ), Transaction( to=reporter1, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, max_priority_fee_per_gas=1, max_fee_per_gas=8, sender=pre.fund_eoa(), @@ -296,14 +290,14 @@ def test_multi_block_observed_coinbase_balance( txs=[ Transaction( to=spill_parent, - gas_limit=(gas_limit_cap + sstore_state_gas), + state_gas_reservoir=sstore_state_gas, max_priority_fee_per_gas=1, max_fee_per_gas=8, sender=pre.fund_eoa(), ), Transaction( to=reporter2, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, max_priority_fee_per_gas=1, max_fee_per_gas=8, sender=pre.fund_eoa(), diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_ordering.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_ordering.py index 70661c498ec..d834129c84a 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_ordering.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_ordering.py @@ -139,7 +139,7 @@ def test_sstore_oog_reservoir_inflation_detection( sender=sender, to=caller, data=bytes(initcode), - gas_limit=fork.transaction_gas_limit_cap(), + state_gas_reservoir=0, ) post = { @@ -199,7 +199,7 @@ def test_call_oog_reservoir_inflation_detection( tx = Transaction( sender=sender, to=caller, - gas_limit=fork.transaction_gas_limit_cap(), + state_gas_reservoir=0, ) post = {caller: Account(storage=caller_storage)} @@ -251,7 +251,7 @@ def test_selfdestruct_oog_reservoir_inflation_detection( tx = Transaction( sender=sender, to=caller, - gas_limit=fork.transaction_gas_limit_cap(), + state_gas_reservoir=0, ) post = {caller: Account(storage=caller_storage)} @@ -331,7 +331,7 @@ def test_create_oog_reservoir_inflation_detection( tx = Transaction( sender=sender, to=caller, - gas_limit=fork.transaction_gas_limit_cap(), + state_gas_reservoir=0, ) post = {caller: Account(storage=caller_storage)} diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_pricing.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_pricing.py index 64ec9c00946..25819af3ba1 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_pricing.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_pricing.py @@ -98,9 +98,6 @@ def test_charge_draws_entirely_from_reservoir( gas_left should not be reduced by the state charge. Verify by performing a regular-gas-heavy computation after the SSTORE. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) storage = Storage() @@ -119,12 +116,12 @@ def test_charge_draws_entirely_from_reservoir( # Provide exact state gas in the reservoir tx = Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas * 2, + state_gas_reservoir=sstore_state_gas * 2, sender=pre.fund_eoa(), ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -140,9 +137,6 @@ def test_charge_spills_to_gas_left( state charge, the remainder is taken from gas_left. The SSTORE should still succeed. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) storage = Storage() @@ -154,12 +148,12 @@ def test_charge_spills_to_gas_left( half_state_gas = sstore_state_gas // 2 tx = Transaction( to=contract, - gas_limit=gas_limit_cap + half_state_gas, + state_gas_reservoir=half_state_gas, sender=pre.fund_eoa(), ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @EIPChecklist.GasCostChanges.Test.OutOfGas() @@ -201,7 +195,6 @@ def test_charge_oog_both_pools_insufficient( def test_refund_cap_includes_state_gas( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test the 1/5 refund cap includes state gas used from gas_left. @@ -212,8 +205,6 @@ def test_refund_cap_includes_state_gas( performs an SSTORE zero-to-nonzero-to-zero sequence to generate a refund and verifies the transaction succeeds. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None contract = pre.deploy_contract( code=(Op.SSTORE(0, 1) + Op.SSTORE(0, 0)), ) @@ -221,7 +212,7 @@ def test_refund_cap_includes_state_gas( # No reservoir — all gas from gas_left, refund cap applies tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -246,9 +237,6 @@ def test_refund_with_reservoir_state_gas( both dimensions. An SSTORE zero-to-nonzero-to-zero sequence should refund correctly. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) contract = pre.deploy_contract( @@ -257,13 +245,13 @@ def test_refund_with_reservoir_state_gas( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) # Slot 0 restored to zero post = {contract: Account(storage={0: 0})} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.exception_test diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py index e50d38e73ea..11d0de0ac94 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_reservoir.py @@ -113,10 +113,6 @@ def test_sstore_state_gas_source( When False, the reservoir is minimal (1 gas unit) and state gas must spill into gas_left. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() - storage = Storage() code = Bytecode() for _ in range(num_sstores): @@ -130,19 +126,18 @@ def test_sstore_state_gas_source( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + extra_gas, + state_gas_reservoir=extra_gas, sender=pre.fund_eoa(), ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") def test_sstore_state_gas_entirely_from_gas_left( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SSTORE state gas charged entirely from gas_left (no reservoir). @@ -150,8 +145,6 @@ def test_sstore_state_gas_entirely_from_gas_left( When tx.gas <= TX_MAX_GAS_LIMIT, the reservoir is zero. All state gas must come from gas_left. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() contract = pre.deploy_contract( code=Op.SSTORE(storage.store_next(1), 1), @@ -159,7 +152,7 @@ def test_sstore_state_gas_entirely_from_gas_left( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -584,15 +577,13 @@ def test_block_gas_used_with_state_ops( block_gas_used and block_state_gas_used. The block header gas_used is max(block_gas_used, block_state_gas_used). """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() code = Op.SSTORE(storage.store_next(1), 1) contract = pre.deploy_contract(code=code) tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -714,7 +705,6 @@ def test_create_tx_reservoir( assert gas_limit_cap is not None init_code = Op.STOP - env = Environment() create_state_gas = gas_costs.NEW_ACCOUNT if gas_above_cap: @@ -729,7 +719,7 @@ def test_create_tx_reservoir( sender=pre.fund_eoa(), ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.parametrize( @@ -785,7 +775,7 @@ def test_top_level_failure_refunds_execution_state_gas( tx = Transaction( to=contract, - gas_limit=tx_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), expected_receipt=TransactionReceipt( cumulative_gas_used=expected_cumulative, @@ -835,7 +825,7 @@ def test_top_level_failure_zeros_block_state_gas( tx_gas = gas_limit_cap + sstore_state_gas tx = Transaction( to=contract, - gas_limit=tx_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -887,7 +877,7 @@ def test_creation_tx_failure_preserves_intrinsic_state_gas( tx = Transaction( to=None, data=Op.SSTORE(0, 1) + Op.INVALID, - gas_limit=tx_gas, + state_gas_reservoir=create_intrinsic_state + sstore_state_gas, sender=pre.fund_eoa(), ) @@ -921,8 +911,6 @@ def test_subcall_failure_does_not_zero_top_level_state_gas( parent's own SSTORE contributes state gas that appears in `block_state_gas_used`. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) child = pre.deploy_contract(code=Op.REVERT(0, 0)) @@ -936,7 +924,7 @@ def test_subcall_failure_does_not_zero_top_level_state_gas( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -1013,7 +1001,7 @@ def test_top_level_failure_spilled_state_gas( tx = Transaction( to=contract, - gas_limit=tx_gas, + state_gas_reservoir=sstore_state_gas // 2, sender=pre.fund_eoa(), expected_receipt=TransactionReceipt( cumulative_gas_used=expected_cumulative, @@ -1093,7 +1081,7 @@ def test_top_level_failure_propagated_state_gas( tx = Transaction( to=parent, - gas_limit=tx_gas, + state_gas_reservoir=sstore_state_gas // 2, sender=pre.fund_eoa(), expected_receipt=TransactionReceipt( cumulative_gas_used=expected_cumulative, @@ -1369,7 +1357,7 @@ def test_nested_failure_resets_to_tx_reservoir( tx = Transaction( to=top, - gas_limit=tx_gas, + state_gas_reservoir=reservoir, sender=pre.fund_eoa(), expected_receipt=TransactionReceipt( cumulative_gas_used=expected_cumulative, @@ -1432,9 +1420,6 @@ def test_nested_state_gas_refund_consumed_at_depth( the chain returns; it succeeds only when its frame holds enough reservoir, so a missing or mis-propagated credit OOGs it. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - is_auth_scenario = refund_scenario == "auth_existing_leaf" probe_address = pre.deploy_contract(code=Op.SSTORE(0, 1)) @@ -1509,7 +1494,7 @@ def test_nested_state_gas_refund_consumed_at_depth( tx = Transaction( to=top, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, authorization_list=authorization_list, sender=pre.fund_eoa(), ) @@ -1625,8 +1610,6 @@ def test_access_list_warm_savings_stay_regular( fork: Fork, ) -> None: """Verify access-list warm savings stay in regular gas.""" - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) contract = pre.deploy_contract( @@ -1648,11 +1631,10 @@ def test_access_list_warm_savings_stay_regular( evm_gas = contract_code.gas_cost(fork) expected_gas_used = intrinsic_gas + evm_gas - gas_limit = gas_limit_cap + sstore_state_gas tx = Transaction( to=contract, - gas_limit=gas_limit, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), access_list=access_list, ) @@ -1705,8 +1687,6 @@ def test_subcall_revert_does_not_leak_grandchild_storage_clear_credit( state_gas_reservoir` would charge the sender 5 * sstore_state_gas less. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() @@ -1745,7 +1725,6 @@ def test_subcall_revert_does_not_leak_grandchild_storage_clear_credit( # Reservoir sized to the legitimate state cost only; any # phantom credit surfaces as residual reservoir at tx end. legit_state_cost = 2 * num_slots * sstore_state_gas - tx_gas = gas_limit_cap + legit_state_cost # `bytecode.gas_cost(fork)` sums each opcode's regular and state # contributions. Setup/phantom SSTOREs predict +sstore_state_gas @@ -1763,7 +1742,7 @@ def test_subcall_revert_does_not_leak_grandchild_storage_clear_credit( tx = Transaction( to=top, - gas_limit=tx_gas, + state_gas_reservoir=legit_state_cost, sender=pre.fund_eoa(), expected_receipt=TransactionReceipt( cumulative_gas_used=expected_cumulative, @@ -1810,8 +1789,6 @@ def test_revert_discards_descendant_storage_clear_credit_through_depth( `incorporate_child_on_error`. The receipt invariant holds for every `k`. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() @@ -1859,7 +1836,6 @@ def test_revert_discards_descendant_storage_clear_credit_through_depth( top = pre.deploy_contract(code=top_code) legit_state_cost = 2 * num_slots * sstore_state_gas - tx_gas = gas_limit_cap + legit_state_cost expected_cumulative = ( intrinsic_cost @@ -1871,7 +1847,7 @@ def test_revert_discards_descendant_storage_clear_credit_through_depth( tx = Transaction( to=top, - gas_limit=tx_gas, + state_gas_reservoir=legit_state_cost, sender=pre.fund_eoa(), expected_receipt=TransactionReceipt( cumulative_gas_used=expected_cumulative, @@ -1918,8 +1894,6 @@ def test_subcall_set_clear_revert_pays_no_state_gas( """ intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None set_op = Op.SSTORE.with_metadata( key_warm=False, @@ -1940,7 +1914,6 @@ def test_subcall_set_clear_revert_pays_no_state_gas( top = pre.deploy_contract(code=top_code) reservoir = 0 if spill_mode == "spill" else sstore_state_gas - tx_gas = gas_limit_cap + reservoir expected_cumulative = ( intrinsic_cost @@ -1950,7 +1923,7 @@ def test_subcall_set_clear_revert_pays_no_state_gas( tx = Transaction( to=top, - gas_limit=tx_gas, + state_gas_reservoir=reservoir, sender=pre.fund_eoa(), expected_receipt=TransactionReceipt( cumulative_gas_used=expected_cumulative, diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_selfdestruct.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_selfdestruct.py index 88df5dbefaa..5e5ee91ea08 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_selfdestruct.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_selfdestruct.py @@ -17,7 +17,6 @@ Block, BlockchainTestFiller, Bytecode, - Environment, Fork, Header, Initcode, @@ -48,9 +47,6 @@ def test_selfdestruct_new_beneficiary_charges_state_gas( creating the new beneficiary account. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() new_account_state_gas = gas_costs.NEW_ACCOUNT # Non-existent beneficiary @@ -63,18 +59,17 @@ def test_selfdestruct_new_beneficiary_charges_state_gas( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") def test_selfdestruct_existing_beneficiary_no_state_gas( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SELFDESTRUCT to existing beneficiary charges no state gas. @@ -82,8 +77,6 @@ def test_selfdestruct_existing_beneficiary_no_state_gas( When the beneficiary already exists, no new account is created and no state gas is charged. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None beneficiary = pre.fund_eoa(amount=0) contract = pre.deploy_contract( @@ -93,7 +86,7 @@ def test_selfdestruct_existing_beneficiary_no_state_gas( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -104,7 +97,6 @@ def test_selfdestruct_existing_beneficiary_no_state_gas( def test_selfdestruct_zero_balance_no_state_gas( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SELFDESTRUCT with zero balance charges no state gas. @@ -113,8 +105,6 @@ def test_selfdestruct_zero_balance_no_state_gas( transferred, so no new account is created even if the beneficiary does not exist. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None # Non-existent beneficiary but contract has zero balance beneficiary = 0xDEAD @@ -125,7 +115,7 @@ def test_selfdestruct_zero_balance_no_state_gas( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -145,9 +135,6 @@ def test_selfdestruct_state_gas_from_reservoir( for the non-existent beneficiary is drawn from the reservoir. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() new_account_state_gas = gas_costs.NEW_ACCOUNT beneficiary = 0xDEAD @@ -159,11 +146,11 @@ def test_selfdestruct_state_gas_from_reservoir( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -182,7 +169,6 @@ def test_selfdestruct_to_self_in_create_tx( """ gas_limit_cap = fork.transaction_gas_limit_cap() assert gas_limit_cap is not None - env = Environment() inner_code = Op.SELFDESTRUCT(Op.ADDRESS) @@ -204,7 +190,7 @@ def test_selfdestruct_to_self_in_create_tx( sender=pre.fund_eoa(), ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -221,8 +207,6 @@ def test_selfdestruct_new_beneficiary_header_gas_used( be accepted with correct 2D gas accounting in the header. """ gas_costs = fork.gas_costs() - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = gas_costs.NEW_ACCOUNT beneficiary = pre.fund_eoa(amount=0) @@ -241,7 +225,7 @@ def test_selfdestruct_new_beneficiary_header_gas_used( tx = Transaction( to=caller, - gas_limit=gas_limit_cap + new_account_state_gas, + state_gas_reservoir=new_account_state_gas, sender=pre.fund_eoa(), ) @@ -272,8 +256,6 @@ def test_create_selfdestruct_no_refund_account_and_storage( num_slots: int, ) -> None: """Verify same tx CREATE+SELFDESTRUCT does not refund state gas.""" - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = fork.gas_costs().NEW_ACCOUNT sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -313,7 +295,7 @@ def test_create_selfdestruct_no_refund_account_and_storage( tx = Transaction( to=factory, - gas_limit=gas_limit_cap + total_state_gas, + state_gas_reservoir=total_state_gas, sender=pre.fund_eoa(), ) @@ -347,8 +329,6 @@ def test_create_selfdestruct_no_refund_code_deposit_state_gas( state gas. """ assert code_size >= 2 - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = fork.gas_costs().NEW_ACCOUNT code_deposit_state_gas = fork.code_deposit_state_gas(code_size=code_size) @@ -391,7 +371,7 @@ def test_create_selfdestruct_no_refund_code_deposit_state_gas( tx = Transaction( to=factory, data=bytes(initcode), - gas_limit=gas_limit_cap + total_state_gas, + state_gas_reservoir=total_state_gas, sender=pre.fund_eoa(), ) @@ -412,8 +392,6 @@ def test_create_selfdestruct_code_deposit_no_refund_header_check( Verify block header gas reflects the full account plus code-deposit state-gas charge on a same-tx CREATE+SELFDESTRUCT. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() new_account_state_gas = gas_costs.NEW_ACCOUNT @@ -450,7 +428,7 @@ def test_create_selfdestruct_code_deposit_no_refund_header_check( tx = Transaction( to=factory, data=bytes(initcode), - gas_limit=gas_limit_cap + total_state_gas, + state_gas_reservoir=total_state_gas, sender=pre.fund_eoa(), ) @@ -479,8 +457,6 @@ def test_create_selfdestruct_sstore_restoration_refund( Verify SSTORE restoration still refunds its slot state gas when the surrounding contract SELFDESTRUCTs. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = fork.gas_costs().NEW_ACCOUNT sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -521,7 +497,7 @@ def test_create_selfdestruct_sstore_restoration_refund( tx = Transaction( to=factory, - gas_limit=gas_limit_cap + new_account_state_gas + sstore_state_gas, + state_gas_reservoir=new_account_state_gas + sstore_state_gas, sender=pre.fund_eoa(), ) @@ -551,8 +527,6 @@ def test_selfdestruct_pre_existing_account_no_refund( header `gas_used` reflects the full regular-gas tx cost (no state-gas refund offset). """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() # Victim deployed in `pre` (NOT same-tx-created). SELFDESTRUCTs @@ -571,7 +545,7 @@ def test_selfdestruct_pre_existing_account_no_refund( tx = Transaction( to=caller, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -606,8 +580,6 @@ def test_selfdestruct_via_delegatecall_chain_no_refund( Verify SELFDESTRUCT in a nested DELEGATECALL/CALLCODE frame below a same-tx-created contract does not refund state gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None new_account_state_gas = fork.gas_costs().NEW_ACCOUNT sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -709,7 +681,7 @@ def test_selfdestruct_via_delegatecall_chain_no_refund( tx = Transaction( to=factory, data=bytes(initcode), - gas_limit=gas_limit_cap + total_state_gas, + state_gas_reservoir=total_state_gas, sender=pre.fund_eoa(), ) diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_set_code.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_set_code.py index 07a00196c24..c094885e85e 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_set_code.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_set_code.py @@ -18,7 +18,6 @@ Block, BlockchainTestFiller, Bytecode, - Environment, Fork, Header, Op, @@ -59,9 +58,6 @@ def test_authorization_state_gas_scaling( cost_per_state_byte of intrinsic state gas. The transaction should succeed with enough total gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -82,19 +78,18 @@ def test_authorization_state_gas_scaling( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=gas_limit_cap + auth_state_gas * num_auths, + state_gas_reservoir=auth_state_gas * num_auths, authorization_list=authorization_list, sender=sender, ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") def test_existing_account_refund( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test authorization targeting existing account refunds state gas. @@ -104,10 +99,6 @@ def test_existing_account_refund( intrinsic_state_gas. Only 23 * cost_per_state_byte is effectively charged. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() - contract = pre.deploy_contract(code=Op.STOP) # Signer is an existing funded EOA (account_exists = True) @@ -127,12 +118,12 @@ def test_existing_account_refund( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, authorization_list=authorization_list, sender=sender, ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -148,9 +139,6 @@ def test_mixed_new_and_existing_auths( another targets a new account (no refund). The total state gas should reflect the mixed charges. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() full_auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -188,12 +176,12 @@ def test_mixed_new_and_existing_auths( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=gas_limit_cap + full_auth_state_gas * 2, + state_gas_reservoir=full_auth_state_gas * 2, authorization_list=authorization_list, sender=sender, ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -209,9 +197,6 @@ def test_authorization_with_sstore( contract performs an SSTORE. Both the authorization state gas and the SSTORE state gas are charged. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -234,13 +219,13 @@ def test_authorization_with_sstore( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=(gas_limit_cap + auth_state_gas + sstore_state_gas), + state_gas_reservoir=auth_state_gas + sstore_state_gas, authorization_list=authorization_list, sender=sender, ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -257,9 +242,6 @@ def test_existing_account_refund_enables_sstore( This refunded gas should then be available for SSTORE state gas in the execution phase. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -285,13 +267,13 @@ def test_existing_account_refund_enables_sstore( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=(gas_limit_cap + auth_state_gas + sstore_state_gas), + state_gas_reservoir=auth_state_gas + sstore_state_gas, authorization_list=authorization_list, sender=sender, ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -339,8 +321,6 @@ def test_auth_refund_block_gas_accounting( Verified via header `gas_used`, receipt `cumulative_gas_used`, and the authority post-state (catches a silently-skipped auth). """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None intrinsic_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -406,7 +386,7 @@ def test_auth_refund_block_gas_accounting( tx = Transaction( to=contract_new, - gas_limit=gas_limit_cap + intrinsic_state_gas, + state_gas_reservoir=intrinsic_state_gas, authorization_list=authorization_list, sender=pre.fund_eoa(), expected_receipt=TransactionReceipt( @@ -435,9 +415,6 @@ def test_invalid_nonce_auth_still_charges_intrinsic_state_gas( but its intrinsic state gas (135 * cpsb) is still charged upfront as part of the transaction's intrinsic gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -456,12 +433,12 @@ def test_invalid_nonce_auth_still_charges_intrinsic_state_gas( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=gas_limit_cap + auth_state_gas, + state_gas_reservoir=auth_state_gas, authorization_list=authorization_list, sender=sender, ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -476,9 +453,6 @@ def test_invalid_chain_id_auth_still_charges_intrinsic_state_gas( An authorization with a mismatched chain ID is skipped during processing, but intrinsic state gas is still charged upfront. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -498,12 +472,12 @@ def test_invalid_chain_id_auth_still_charges_intrinsic_state_gas( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=gas_limit_cap + auth_state_gas, + state_gas_reservoir=auth_state_gas, authorization_list=authorization_list, sender=sender, ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -520,9 +494,6 @@ def test_self_sponsored_authorization( charged. Since the sender account already exists, the new-account state gas refund applies. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -544,13 +515,13 @@ def test_self_sponsored_authorization( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + auth_state_gas, + state_gas_reservoir=auth_state_gas, authorization_list=authorization_list, sender=sender, ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -567,9 +538,6 @@ def test_duplicate_signer_authorizations( Only the last valid authorization takes effect, but all contribute to intrinsic state gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -596,12 +564,12 @@ def test_duplicate_signer_authorizations( sender = pre.fund_eoa() tx = Transaction( to=contract_a, - gas_limit=gas_limit_cap + auth_state_gas * 2, + state_gas_reservoir=auth_state_gas * 2, authorization_list=authorization_list, sender=sender, ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -617,9 +585,6 @@ def test_auth_with_calldata_and_access_list( authorization state gas. All components contribute to the total intrinsic gas requirement. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -643,14 +608,14 @@ def test_auth_with_calldata_and_access_list( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=(gas_limit_cap + auth_state_gas + sstore_state_gas), + state_gas_reservoir=auth_state_gas + sstore_state_gas, data=b"\x00" * 31 + b"\x42", # Calldata adds to intrinsic gas authorization_list=authorization_list, sender=sender, ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -677,9 +642,6 @@ def test_mixed_valid_and_invalid_auths( state gas is still consumed. The total intrinsic state gas equals (num_valid + num_invalid) * 135 * cpsb. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -714,12 +676,12 @@ def test_mixed_valid_and_invalid_auths( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=gas_limit_cap + auth_state_gas * total_auths, + state_gas_reservoir=auth_state_gas * total_auths, authorization_list=authorization_list, sender=sender, ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -735,9 +697,6 @@ def test_many_authorizations_state_gas( The total state gas is drawn from the reservoir. Verifies that large authorization lists scale correctly. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -759,12 +718,12 @@ def test_many_authorizations_state_gas( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=gas_limit_cap + auth_state_gas * num_auths, + state_gas_reservoir=auth_state_gas * num_auths, authorization_list=authorization_list, sender=sender, ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -780,9 +739,6 @@ def test_auth_with_multiple_sstores( charges all draw from the same reservoir. Verifies combined state gas accounting across intrinsic and execution phases. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -809,13 +765,13 @@ def test_auth_with_multiple_sstores( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=gas_limit_cap + total_state_gas, + state_gas_reservoir=total_state_gas, authorization_list=authorization_list, sender=sender, ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -902,9 +858,6 @@ def test_authorization_to_precompile_address( The authorization is processed and the signer's code is set to the precompile address delegation designator. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -924,12 +877,12 @@ def test_authorization_to_precompile_address( sender = pre.fund_eoa() tx = Transaction( to=signer, - gas_limit=gas_limit_cap + auth_state_gas, + state_gas_reservoir=auth_state_gas, authorization_list=authorization_list, sender=sender, ) - state_test(env=env, pre=pre, post={}, tx=tx) + state_test(pre=pre, post={}, tx=tx) @pytest.mark.valid_from("EIP8037") @@ -950,8 +903,6 @@ def test_multi_tx_block_auth_refund_and_sstore( Verifies block-level state gas accounting correctly handles both the auth refund from tx1 and the SSTORE charge from tx2. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -971,7 +922,7 @@ def test_multi_tx_block_auth_refund_and_sstore( sender_1 = pre.fund_eoa() tx_1 = Transaction( to=contract, - gas_limit=gas_limit_cap + auth_state_gas, + state_gas_reservoir=auth_state_gas, authorization_list=authorization_list, sender=sender_1, ) @@ -984,7 +935,7 @@ def test_multi_tx_block_auth_refund_and_sstore( sender_2 = pre.fund_eoa() tx_2 = Transaction( to=sstore_contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=sender_2, ) @@ -1015,9 +966,6 @@ def test_auth_refund_bypasses_one_fifth_cap( the SSTOREs would OOG. By succeeding, this test proves the refund bypasses the cap. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() auth_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -1054,15 +1002,13 @@ def test_auth_refund_bypasses_one_fifth_cap( sender = pre.fund_eoa() tx = Transaction( to=contract, - gas_limit=( - gas_limit_cap + auth_state_gas + sstore_state_gas * num_sstores - ), + state_gas_reservoir=auth_state_gas + sstore_state_gas * num_sstores, authorization_list=authorization_list, sender=sender, ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.parametrize( @@ -1091,8 +1037,6 @@ def test_existing_account_auth_header_gas_used_reflects_refund( header gas_used equals `max(intrinsic_regular, intrinsic_state - N * auth_refund)`. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None intrinsic_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=num_auths, ) @@ -1111,7 +1055,7 @@ def test_existing_account_auth_header_gas_used_reflects_refund( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + intrinsic_state_gas, + state_gas_reservoir=intrinsic_state_gas, authorization_list=authorization_list, sender=pre.fund_eoa(), ) @@ -1154,8 +1098,6 @@ def test_mixed_auths_header_gas_used_reflects_existing_refunds( authorities contribute none. Header gas_used is `max(intrinsic_regular, intrinsic_state - num_existing * refund)`. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None num_auths = num_existing + num_new intrinsic_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=num_auths, @@ -1190,7 +1132,7 @@ def test_mixed_auths_header_gas_used_reflects_existing_refunds( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + intrinsic_state_gas, + state_gas_reservoir=intrinsic_state_gas, authorization_list=authorization_list, sender=pre.fund_eoa(), ) @@ -1230,8 +1172,6 @@ def test_existing_auth_refund_survives_top_level_revert( with `execution_state` netting to 0 because of the revert. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None intrinsic_state_gas = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -1265,7 +1205,7 @@ def test_existing_auth_refund_survives_top_level_revert( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + intrinsic_state_gas, + state_gas_reservoir=intrinsic_state_gas, authorization_list=authorization_list, sender=pre.fund_eoa(), ) @@ -1352,7 +1292,7 @@ def test_auth_state_gas_in_header_after_failure( tx = Transaction( ty=4, to=target, - gas_limit=tx_gas, + state_gas_reservoir=auth_intrinsic_state, sender=pre.fund_eoa(), authorization_list=[ AuthorizationTuple( @@ -1405,9 +1345,6 @@ def test_auth_sender_billing_after_failure( the sender's bill via the billing formula. The sender pays less than in the new-account case by exactly the refund amount. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - auth_intrinsic_state = fork.transaction_intrinsic_state_gas( authorization_count=1, ) @@ -1424,8 +1361,6 @@ def test_auth_sender_billing_after_failure( else: signer = pre.fund_eoa(0) - tx_gas = gas_limit_cap + auth_intrinsic_state - revert_gas = (Op.REVERT(0, 0)).gas_cost(fork) auth_refund = new_account_refund if authority_exists else 0 expected_cumulative = intrinsic_total + revert_gas - auth_refund @@ -1437,7 +1372,7 @@ def test_auth_sender_billing_after_failure( tx = Transaction( ty=4, to=target, - gas_limit=tx_gas, + state_gas_reservoir=auth_intrinsic_state, sender=pre.fund_eoa(), authorization_list=[ AuthorizationTuple( diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py index 5d9479f4cc0..182423e7e5e 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py @@ -20,7 +20,6 @@ Block, BlockchainTestFiller, Bytecode, - Environment, Fork, Header, Op, @@ -41,7 +40,6 @@ def test_sstore_zero_to_nonzero( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SSTORE zero-to-nonzero charges state gas. @@ -50,8 +48,6 @@ def test_sstore_zero_to_nonzero( STATE_BYTES_PER_STORAGE_SET * cost_per_state_byte of state gas in addition to regular gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() contract = pre.deploy_contract( code=Op.SSTORE(storage.store_next(1), 1), @@ -59,7 +55,7 @@ def test_sstore_zero_to_nonzero( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -71,7 +67,6 @@ def test_sstore_zero_to_nonzero( def test_sstore_nonzero_to_nonzero( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SSTORE nonzero-to-nonzero charges no state gas. @@ -79,8 +74,6 @@ def test_sstore_nonzero_to_nonzero( Updating a slot that already holds a nonzero value to a different nonzero value does not create new state, so no state gas is charged. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() contract = pre.deploy_contract( code=Op.SSTORE(storage.store_next(2), 2), @@ -89,7 +82,7 @@ def test_sstore_nonzero_to_nonzero( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -101,7 +94,6 @@ def test_sstore_nonzero_to_nonzero( def test_sstore_nonzero_to_zero( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SSTORE nonzero-to-zero charges no state gas. @@ -109,8 +101,6 @@ def test_sstore_nonzero_to_zero( Clearing a storage slot (setting to zero) does not grow state and earns a regular gas refund (GAS_STORAGE_CLEAR_REFUND). """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() contract = pre.deploy_contract( code=Op.SSTORE(storage.store_next(0), 0), @@ -119,7 +109,7 @@ def test_sstore_nonzero_to_zero( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -131,7 +121,6 @@ def test_sstore_nonzero_to_zero( def test_sstore_zero_to_zero( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SSTORE zero-to-zero charges no state gas. @@ -139,8 +128,6 @@ def test_sstore_zero_to_zero( Writing zero to an already-zero slot creates no new state. Only the warm access regular gas cost is charged. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() contract = pre.deploy_contract( code=Op.SSTORE(storage.store_next(0), 0), @@ -148,7 +135,7 @@ def test_sstore_zero_to_zero( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -250,7 +237,6 @@ def test_sstore_restoration_refund_credits_local_reservoir( def test_sstore_restoration_refund( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test SSTORE zero-to-nonzero-to-zero restoration refunds state gas. @@ -260,15 +246,13 @@ def test_sstore_restoration_refund( (STATE_BYTES_PER_STORAGE_SET * cost_per_state_byte) is refunded via refund_counter along with the regular gas write cost. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None contract = pre.deploy_contract( code=(Op.SSTORE(0, 1) + Op.SSTORE(0, 0)), ) tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -281,7 +265,6 @@ def test_sstore_restoration_refund( def test_sstore_restoration_nonzero_no_state_refund( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test nonzero-to-nonzero-to-original restoration has no state gas refund. @@ -290,8 +273,6 @@ def test_sstore_restoration_nonzero_no_state_refund( restoring it never involves state gas (no state growth occurred), so only regular gas refunds apply. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None contract = pre.deploy_contract( code=(Op.SSTORE(0, 2) + Op.SSTORE(0, 1)), storage={0: 1}, @@ -299,7 +280,7 @@ def test_sstore_restoration_nonzero_no_state_refund( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -311,7 +292,6 @@ def test_sstore_restoration_nonzero_no_state_refund( def test_sstore_clear_refund_reversal( state_test: StateTestFiller, pre: Alloc, - fork: Fork, ) -> None: """ Test clearing a nonzero slot then un-clearing reverses the refund. @@ -320,8 +300,6 @@ def test_sstore_clear_refund_reversal( the clear refund is granted. If the slot is then set back to a nonzero value, the clear refund is reversed via refund_counter. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None contract = pre.deploy_contract( code=(Op.SSTORE(0, 0) + Op.SSTORE(0, 2)), storage={0: 1}, @@ -329,7 +307,7 @@ def test_sstore_clear_refund_reversal( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -350,7 +328,6 @@ def test_sstore_multiple_slots( state_test: StateTestFiller, pre: Alloc, num_slots: int, - fork: Fork, ) -> None: """ Test multiple zero-to-nonzero SSTOREs each charge state gas. @@ -358,8 +335,6 @@ def test_sstore_multiple_slots( Each slot written from zero to nonzero independently charges STATE_BYTES_PER_STORAGE_SET * cost_per_state_byte of state gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None storage = Storage() code = Bytecode() for _ in range(num_slots): @@ -368,7 +343,7 @@ def test_sstore_multiple_slots( tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -389,9 +364,6 @@ def test_sstore_state_gas_drawn_from_reservoir( SSTORE state gas from the reservoir, leaving gas_left untouched by the state gas charge. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None - env = Environment() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) storage = Storage() @@ -401,12 +373,12 @@ def test_sstore_state_gas_drawn_from_reservoir( tx = Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) post = {contract: Account(storage=storage)} - state_test(env=env, pre=pre, post=post, tx=tx) + state_test(pre=pre, post=post, tx=tx) @pytest.mark.with_all_typed_transactions @@ -496,12 +468,10 @@ def test_sstore_stipend_check_excludes_reservoir( ) ) - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None tx = Transaction( sender=pre.fund_eoa(), to=caller, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, ) post = {caller: Account(storage=caller_storage)} @@ -529,8 +499,6 @@ def test_sstore_restoration_block_state_gas_zero( `state_gas_reservoir` rather than `refund_counter`, so block state gas is not inflated by the charges. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -549,7 +517,7 @@ def test_sstore_restoration_block_state_gas_zero( contract = pre.deploy_contract(code=code) tx = Transaction( to=contract, - gas_limit=gas_limit_cap + num_cycles * sstore_state_gas, + state_gas_reservoir=num_cycles * sstore_state_gas, sender=pre.fund_eoa(), ) @@ -581,8 +549,6 @@ def test_sstore_restoration_mixed_with_genuine_sstore( persists, contributing exactly one `sstore_state_gas` to block state gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -605,7 +571,7 @@ def test_sstore_restoration_mixed_with_genuine_sstore( contract = pre.deploy_contract(code=code) tx = Transaction( to=contract, - gas_limit=gas_limit_cap + num_0_to_1 * sstore_state_gas, + state_gas_reservoir=num_0_to_1 * sstore_state_gas, sender=pre.fund_eoa(), ) @@ -632,8 +598,6 @@ def test_sstore_restoration_intermediate_values( first 0 to x; no charge for nonzero-to-nonzero; refund to reservoir at y to 0. Net block state gas is zero. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -657,7 +621,7 @@ def test_sstore_restoration_intermediate_values( contract = pre.deploy_contract(code=code) tx = Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -681,8 +645,6 @@ def test_sstore_restoration_then_reset( the subsequent 0 to 1 re-charges state gas. Net: one charge remains, one state gas worth counted in block state gas. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -707,7 +669,7 @@ def test_sstore_restoration_then_reset( contract = pre.deploy_contract(code=code) tx = Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -731,8 +693,6 @@ def test_sstore_restoration_reservoir_replenished_inline( on slot 0, the reservoir refill allows a second 0 to 1 on slot 1 to draw from it. Block state gas reflects only slot 1. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -752,7 +712,7 @@ def test_sstore_restoration_reservoir_replenished_inline( contract = pre.deploy_contract(code=code) tx = Transaction( to=contract, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -782,8 +742,6 @@ def test_sstore_restoration_cross_frame( applies regardless of storage ownership. Net block state gas is zero. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -808,7 +766,7 @@ def test_sstore_restoration_cross_frame( tx = Transaction( to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, sender=pre.fund_eoa(), ) @@ -850,8 +808,6 @@ def test_sstore_restoration_charge_in_ancestor( refund must propagate up the chain to the ancestor that charged the 0 to x. A probe SSTORE sized to OOG by 1 detects any loss. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None gas_costs = fork.gas_costs() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) probe_gas = ( @@ -897,7 +853,7 @@ def test_sstore_restoration_charge_in_ancestor( tx = Transaction( sender=pre.fund_eoa(), to=parent, - gas_limit=gas_limit_cap + sstore_state_gas, + state_gas_reservoir=sstore_state_gas, ) post = {parent: Account(storage=parent_storage)} @@ -952,7 +908,7 @@ def test_sstore_restoration_sub_frame_revert( tx = Transaction( sender=pre.fund_eoa(), to=caller, - gas_limit=fork.transaction_gas_limit_cap(), + state_gas_reservoir=0, ) post = {caller: Account(storage=caller_storage)} @@ -1036,7 +992,7 @@ def test_sstore_restoration_ancestor_revert( tx = Transaction( sender=pre.fund_eoa(), to=caller, - gas_limit=fork.transaction_gas_limit_cap(), + state_gas_reservoir=0, ) state_test( @@ -1069,8 +1025,6 @@ def test_sstore_restoration_charge_in_ancestor_intermediate_revert( """ gas_costs = fork.gas_costs() sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None intrinsic_cost = fork.transaction_intrinsic_cost_calculator()() # Probe SSTORE(0, 1): 2 pushes + cold storage write + state gas - 1, # so it OOGs by 1 when the reservoir is 0 and succeeds otherwise. @@ -1136,7 +1090,7 @@ def test_sstore_restoration_charge_in_ancestor_intermediate_revert( tx = Transaction( sender=pre.fund_eoa(), to=caller, - gas_limit=gas_limit_cap + 2 * sstore_state_gas, + state_gas_reservoir=2 * sstore_state_gas, ) state_test( @@ -1213,7 +1167,7 @@ def test_sstore_restoration_create_init_revert( # gas_limit at the cap means the caller's reservoir starts at 0. tx = Transaction( to=caller, - gas_limit=fork.transaction_gas_limit_cap(), + state_gas_reservoir=0, sender=pre.fund_eoa(), ) @@ -1237,8 +1191,6 @@ def test_sstore_restoration_create_init_success( restoration path works inside init and the refund doesn't disturb deployment. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) create_state_gas = fork.create_state_gas(code_size=0) @@ -1275,7 +1227,7 @@ def test_sstore_restoration_create_init_success( tx = Transaction( to=caller, - gas_limit=gas_limit_cap + create_state_gas + sstore_state_gas, + state_gas_reservoir=create_state_gas + sstore_state_gas, sender=pre.fund_eoa(), ) @@ -1297,8 +1249,6 @@ def test_sstore_restoration_reservoir_spillover( `state_gas_reservoir` (not back to gas_left), moving gas between buckets. Block state gas is zero. """ - gas_limit_cap = fork.transaction_gas_limit_cap() - assert gas_limit_cap is not None sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork) intrinsic_gas = fork.transaction_intrinsic_cost_calculator()() @@ -1313,7 +1263,7 @@ def test_sstore_restoration_reservoir_spillover( contract = pre.deploy_contract(code=code) tx = Transaction( to=contract, - gas_limit=gas_limit_cap, + state_gas_reservoir=0, sender=pre.fund_eoa(), ) From 9feb5654f72f8b38bc5175323cfec3f805712bd6 Mon Sep 17 00:00:00 2001 From: marioevz Date: Wed, 10 Jun 2026 10:37:07 -0600 Subject: [PATCH 35/46] fix(tests): Frontier: Rollback test_call_and_callcode_gas_calculation.py --- .../opcodes/test_call_and_callcode_gas_calculation.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py b/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py index 8645b4b3539..56e94cacfc0 100644 --- a/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py +++ b/tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py @@ -88,10 +88,7 @@ def sufficient_gas( metadata: dict = {"address_warm": False} if is_value_call: metadata["value_transfer"] = True - account_new = callee_opcode == Op.CALL - if fork.is_eip_enabled(8037): - account_new = False - metadata["account_new"] = account_new + metadata["account_new"] = callee_opcode == Op.CALL cost = callee_opcode(**metadata).gas_cost(fork) elif Byzantium <= fork < Berlin: cost = 700 # Pre-Berlin call cost @@ -203,9 +200,14 @@ def caller_address(pre: Alloc, caller_code: Bytecode) -> Address: @pytest.fixture def caller_tx(sender: EOA, caller_address: Address, fork: Fork) -> Transaction: """Transaction that performs the call to the caller contract.""" + gas_limit = 500_000 + if fork.is_eip_enabled(8037): + gas_limit = 1_000_000 + return Transaction( to=caller_address, value=1, + gas_limit=gas_limit, sender=sender, protected=fork.supports_protected_txs(), ) From a655864400f05f647a185d712cca827ae8e809ef Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 11 Jun 2026 08:45:26 -0600 Subject: [PATCH 36/46] refactor(test-types): Remove duplicated method Co-authored-by: Leo Lara --- .../src/execution_testing/execution/base.py | 32 ++--------------- .../execution/blob_transaction.py | 7 ++-- .../execution/transaction_post.py | 7 ++-- .../src/execution_testing/specs/blockchain.py | 35 +++---------------- .../test_types/transaction_types.py | 31 ++++++++++++++++ 5 files changed, 48 insertions(+), 64 deletions(-) diff --git a/packages/testing/src/execution_testing/execution/base.py b/packages/testing/src/execution_testing/execution/base.py index 4ba11b06824..159d66e9fe1 100644 --- a/packages/testing/src/execution_testing/execution/base.py +++ b/packages/testing/src/execution_testing/execution/base.py @@ -1,7 +1,7 @@ """Ethereum test execution base types.""" from abc import abstractmethod -from typing import Annotated, Any, ClassVar, Dict, List, Type +from typing import Annotated, Any, ClassVar, Dict, Type from pydantic import PlainSerializer, PlainValidator from pytest import FixtureRequest @@ -9,7 +9,7 @@ from execution_testing.base_types import Address, CamelModel from execution_testing.forks import Fork from execution_testing.rpc import EngineRPC, EthRPC -from execution_testing.test_types import Environment, Transaction +from execution_testing.test_types import Environment class ExecuteResult(CamelModel): @@ -43,34 +43,6 @@ def __pydantic_init_subclass__(cls, **kwargs: Any) -> None: # Register the new execute format BaseExecute.formats[cls.format_name] = cls - @staticmethod - def calculate_max_transaction_gas_limit( - txs: List[Transaction], env: Environment, fork: Fork - ) -> int: - """ - Calculate the maximum gas limit that can be set in a transaction - given a list of transactions with and without gas-limits set - and a maximum available environment gas. - """ - available_gas = int(env.gas_limit) - unset_gas_limit_tx_count = 0 - for tx in txs: - if tx.gas_limit is None: - unset_gas_limit_tx_count += 1 - else: - available_gas -= int(tx.gas_limit) - - if unset_gas_limit_tx_count == 0 or available_gas <= 0: - return 0 - - max_gas_limit = available_gas // unset_gas_limit_tx_count - tx_gas_limit_cap = fork.transaction_gas_limit_cap() - if fork.state_gas_reservoir_enabled(): - tx_gas_limit_cap = None - if tx_gas_limit_cap: - max_gas_limit = min(max_gas_limit, tx_gas_limit_cap) - return max_gas_limit - def prepare_transactions( self, *, diff --git a/packages/testing/src/execution_testing/execution/blob_transaction.py b/packages/testing/src/execution_testing/execution/blob_transaction.py index 4ce76b995bf..796f2c455ac 100644 --- a/packages/testing/src/execution_testing/execution/blob_transaction.py +++ b/packages/testing/src/execution_testing/execution/blob_transaction.py @@ -167,8 +167,11 @@ def prepare_transactions( txs.append(tx.tx) else: txs.append(tx) - max_tx_gas_limit = self.calculate_max_transaction_gas_limit( - txs, env, fork + max_tx_gas_limit = Transaction.calculate_max_gas_limit( + txs=txs, + env_gas_limit=int(env.gas_limit), + transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), + state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), ) for tx in txs: tx.set_gas_limit( diff --git a/packages/testing/src/execution_testing/execution/transaction_post.py b/packages/testing/src/execution_testing/execution/transaction_post.py index a391227916a..fc5efce3c99 100644 --- a/packages/testing/src/execution_testing/execution/transaction_post.py +++ b/packages/testing/src/execution_testing/execution/transaction_post.py @@ -52,8 +52,11 @@ def prepare_transactions( ) -> None: """Prepare transactions by setting their final gas properties.""" for block in self.blocks: - max_tx_gas_limit = self.calculate_max_transaction_gas_limit( - block, env, fork + max_tx_gas_limit = Transaction.calculate_max_gas_limit( + txs=block, + env_gas_limit=int(env.gas_limit), + transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), + state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), ) for tx in block: tx.set_gas_limit( diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index 7a1d6e9df7d..5de392afa26 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -803,34 +803,6 @@ def make_genesis( ).with_rlp(txs=[]), ) - @staticmethod - def calculate_max_transaction_gas_limit( - txs: List[Transaction], env: Environment, fork: Fork - ) -> int: - """ - Calculate the maximum gas limit that can be set in a transaction - given a list of transactions with and without gas-limits set - and a maximum available environment gas. - """ - available_gas = int(env.gas_limit) - unset_gas_limit_tx_count = 0 - for tx in txs: - if tx.gas_limit is None: - unset_gas_limit_tx_count += 1 - else: - available_gas -= int(tx.gas_limit) - - if unset_gas_limit_tx_count == 0 or available_gas <= 0: - return 0 - - max_tx_gas_limit = available_gas // unset_gas_limit_tx_count - tx_gas_limit_cap = fork.transaction_gas_limit_cap() - if fork.state_gas_reservoir_enabled(): - tx_gas_limit_cap = None - if tx_gas_limit_cap: - max_tx_gas_limit = min(max_tx_gas_limit, tx_gas_limit_cap) - return max_tx_gas_limit - def generate_block_data( self, t8n: FillerBackend, @@ -853,8 +825,11 @@ def generate_block_data( env = env.set_fork_requirements(fork) txs = block.txs[:] if any(tx.gas_limit is None for tx in block.txs): - max_tx_gas_limit = self.calculate_max_transaction_gas_limit( - txs, env, fork + max_tx_gas_limit = Transaction.calculate_max_gas_limit( + txs=txs, + env_gas_limit=int(env.gas_limit), + transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), + state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), ) if max_tx_gas_limit == 0: raise Exception( diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index eb381d03eb0..9364f721e29 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -801,6 +801,37 @@ def list_blob_versioned_hashes( for blob_versioned_hash in tx.blob_versioned_hashes ] + @staticmethod + def calculate_max_gas_limit( + *, + txs: List["Transaction"], + env_gas_limit: int, + transaction_gas_limit_cap: int | None, + state_gas_reservoir_enabled: bool, + ) -> int: + """ + Calculate the maximum gas limit that can be set in a transaction + given a list of transactions with and without gas-limits set + and a maximum available environment gas. + """ + available_gas = env_gas_limit + unset_gas_limit_tx_count = 0 + for tx in txs: + if tx.gas_limit is None: + unset_gas_limit_tx_count += 1 + else: + available_gas -= int(tx.gas_limit) + + if unset_gas_limit_tx_count == 0 or available_gas <= 0: + return 0 + + max_tx_gas_limit = available_gas // unset_gas_limit_tx_count + if state_gas_reservoir_enabled: + transaction_gas_limit_cap = None + if transaction_gas_limit_cap: + max_tx_gas_limit = min(max_tx_gas_limit, transaction_gas_limit_cap) + return max_tx_gas_limit + @cached_property def created_contract(self) -> Address: """Return address of the contract created by the transaction.""" From 10939b87efd57b12eea8a2de61c15ee7916459a9 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 11 Jun 2026 09:12:43 -0600 Subject: [PATCH 37/46] refactor(test-types): Remove `None` from gas_limit type Co-authored-by: Leo Lara --- .../plugins/execute/pre_alloc.py | 5 ++--- .../src/execution_testing/specs/blockchain.py | 2 +- .../test_types/transaction_types.py | 20 ++++++++----------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/pre_alloc.py b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/pre_alloc.py index 72ac35f808a..d41648cab7f 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/pre_alloc.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/plugins/execute/pre_alloc.py @@ -978,9 +978,8 @@ def minimum_balance_for_pending_transactions( max_priority_fee_per_gas=max_priority_fee_per_gas, max_fee_per_blob_gas=max_fee_per_blob_gas, ) - tx_gas_limit = tx.gas_limit - assert tx_gas_limit, "tx gas limit not set" - gas_consumption += tx_gas_limit + assert "gas_limit" in tx.model_fields_set, "tx gas limit not set" + gas_consumption += tx.gas_limit minimum_balance += tx.signer_minimum_balance(fork=fork) return minimum_balance + gas_consumption * gas_price, gas_consumption diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index 5de392afa26..eabf28a3dac 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -824,7 +824,7 @@ def generate_block_data( ) env = env.set_fork_requirements(fork) txs = block.txs[:] - if any(tx.gas_limit is None for tx in block.txs): + if any("gas_limit" not in tx.model_fields_set for tx in block.txs): max_tx_gas_limit = Transaction.calculate_max_gas_limit( txs=txs, env_gas_limit=int(env.gas_limit), diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 9364f721e29..192f703a1fc 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -310,8 +310,8 @@ def strip_hash_from_t8n_output(cls, data: Any) -> Any: data.pop("hash", None) return data - gas_limit: HexNumber | None = Field( # type: ignore - None, + gas_limit: HexNumber = Field( + HexNumber(21_000), serialization_alias="gas", validation_alias=AliasChoices("gas_limit", "gasLimit", "gas"), ) @@ -601,9 +601,6 @@ def with_signature_and_sender( if self.secret_key is None: raise ValueError("secret_key must be set to sign a transaction") - if self.gas_limit is None: - raise ValueError("gas_limit must be set to sign a transaction") - # Get the signing bytes signing_hash = self.rlp_signing_bytes().keccak256() @@ -817,7 +814,7 @@ def calculate_max_gas_limit( available_gas = env_gas_limit unset_gas_limit_tx_count = 0 for tx in txs: - if tx.gas_limit is None: + if "gas_limit" not in tx.model_fields_set: unset_gas_limit_tx_count += 1 else: available_gas -= int(tx.gas_limit) @@ -881,7 +878,7 @@ def set_gas_limit( state_gas_reservoir_enabled: bool = False, ) -> None: """Set the transaction gas limit if unset.""" - if "gas_limit" not in self.model_fields_set or self.gas_limit is None: + if "gas_limit" not in self.model_fields_set: tx_gas_limit = max_gas_limit if state_gas_reservoir_enabled: if "state_gas_reservoir" in self.model_fields_set: @@ -913,9 +910,8 @@ def signer_minimum_balance(self, *, fork: Fork) -> int: assert gas_price is not None, ( "Impossible to calculate minimum balance without gas price" ) - gas_limit = self.gas_limit - assert gas_limit is not None, ( - "Impossible to calculate minimum balance without gas limit" + assert "gas_limit" in self.model_fields_set, ( + "Impossible to calculate minimum balance without a set gas limit" ) if self.ty == 3 and self.blob_versioned_hashes is not None: max_fee_per_blob_gas = self.max_fee_per_blob_gas @@ -924,13 +920,13 @@ def signer_minimum_balance(self, *, fork: Fork) -> int: "max_fee_per_blob_gas" ) return ( - gas_price * gas_limit + gas_price * self.gas_limit + self.value + max_fee_per_blob_gas * (fork.blob_gas_per_blob() * len(self.blob_versioned_hashes)) ) else: - return gas_price * gas_limit + self.value + return gas_price * self.gas_limit + self.value def _format_field_value(self, value: Any) -> str: """ From 92ffb3d5f6a4ffcadc15350533191d61e0b19752 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 11 Jun 2026 09:13:48 -0600 Subject: [PATCH 38/46] fix(test-types): Typo Co-authored-by: Leo Lara --- .../src/execution_testing/test_types/transaction_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 192f703a1fc..e8206af8bb1 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -883,7 +883,7 @@ def set_gas_limit( if state_gas_reservoir_enabled: if "state_gas_reservoir" in self.model_fields_set: assert transaction_gas_limit_cap is not None, ( - "Impossible to set calculate the tx gas limit for the " + "Impossible to calculate the tx gas limit for the " "required state gas reservoir without a gas limit cap" ) if self.state_gas_reservoir > 0: From 7540d3236dc5c308e23f726509eee2930e2fe301 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 11 Jun 2026 09:31:13 -0600 Subject: [PATCH 39/46] refactor(test-specs): Copy transactions for state/blockchain filling Co-authored-by: Leo Lara --- .../src/execution_testing/specs/blockchain.py | 6 +- .../src/execution_testing/specs/state.py | 6 +- .../test_types/transaction_types.py | 80 +++++++++++++------ 3 files changed, 62 insertions(+), 30 deletions(-) diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index eabf28a3dac..cf6c474c4e9 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -836,12 +836,14 @@ def generate_block_data( "test correctness: unable to automatically calculate gas " "limit for transactions (No remaining gas)." ) - for tx in txs: - tx.set_gas_limit( + txs = [ + tx.with_gas_limit( max_gas_limit=max_tx_gas_limit, transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), ) + for tx in txs + ] txs = [tx.with_signature_and_sender() for tx in txs] if failing_tx_count := len([tx for tx in txs if tx.error]) > 0: diff --git a/packages/testing/src/execution_testing/specs/state.py b/packages/testing/src/execution_testing/specs/state.py index 2221ed95484..de5df257bbc 100644 --- a/packages/testing/src/execution_testing/specs/state.py +++ b/packages/testing/src/execution_testing/specs/state.py @@ -356,13 +356,11 @@ def make_state_test_fixture( ) env = self.env.set_fork_requirements(fork) - tx = self.tx - tx.set_gas_limit( + tx = self.tx.with_gas_limit( max_gas_limit=env.gas_limit, transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), - ) - tx = tx.with_signature_and_sender(keep_secret_key=True) + ).with_signature_and_sender(keep_secret_key=True) pre_alloc = Alloc.merge( Alloc.model_validate(fork.pre_allocation()), self.pre, diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index e8206af8bb1..7e14a6963d2 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -573,6 +573,57 @@ def sign(self: "Transaction") -> None: # Signer remains `None` in this case pass + def _calculate_gas_limit( + self, + *, + max_gas_limit: int, + transaction_gas_limit_cap: int | None, + state_gas_reservoir_enabled: bool = False, + ) -> HexNumber: + """Calculate the gas limit given the current external factors.""" + tx_gas_limit = max_gas_limit + if state_gas_reservoir_enabled: + if "state_gas_reservoir" in self.model_fields_set: + assert transaction_gas_limit_cap is not None, ( + "Impossible to calculate the tx gas limit for the " + "required state gas reservoir without a gas limit cap" + ) + if self.state_gas_reservoir > 0: + minimum_gas_with_reservoir = ( + transaction_gas_limit_cap + self.state_gas_reservoir + ) + assert tx_gas_limit >= minimum_gas_with_reservoir + tx_gas_limit = minimum_gas_with_reservoir + else: + if tx_gas_limit > transaction_gas_limit_cap: + tx_gas_limit = transaction_gas_limit_cap + else: + if ( + transaction_gas_limit_cap is not None + and tx_gas_limit > transaction_gas_limit_cap + ): + tx_gas_limit = transaction_gas_limit_cap + return HexNumber(tx_gas_limit) + + def with_gas_limit( + self, + *, + max_gas_limit: int, + transaction_gas_limit_cap: int | None, + state_gas_reservoir_enabled: bool = False, + ) -> Self: + """Return copy of the transaction with the set gas limit.""" + updated_values: Dict[str, Any] = {} + + if "gas_limit" not in self.model_fields_set: + updated_values["gas_limit"] = self._calculate_gas_limit( + max_gas_limit=max_gas_limit, + transaction_gas_limit_cap=transaction_gas_limit_cap, + state_gas_reservoir_enabled=state_gas_reservoir_enabled, + ) + + return self.model_copy(update=updated_values) + def with_signature_and_sender( self, *, keep_secret_key: bool = False ) -> Self: @@ -879,30 +930,11 @@ def set_gas_limit( ) -> None: """Set the transaction gas limit if unset.""" if "gas_limit" not in self.model_fields_set: - tx_gas_limit = max_gas_limit - if state_gas_reservoir_enabled: - if "state_gas_reservoir" in self.model_fields_set: - assert transaction_gas_limit_cap is not None, ( - "Impossible to calculate the tx gas limit for the " - "required state gas reservoir without a gas limit cap" - ) - if self.state_gas_reservoir > 0: - minimum_gas_with_reservoir = ( - transaction_gas_limit_cap - + self.state_gas_reservoir - ) - assert tx_gas_limit >= minimum_gas_with_reservoir - tx_gas_limit = minimum_gas_with_reservoir - else: - if tx_gas_limit > transaction_gas_limit_cap: - tx_gas_limit = transaction_gas_limit_cap - else: - if ( - transaction_gas_limit_cap is not None - and tx_gas_limit > transaction_gas_limit_cap - ): - tx_gas_limit = transaction_gas_limit_cap - self.gas_limit = HexNumber(tx_gas_limit) + self.gas_limit = self._calculate_gas_limit( + max_gas_limit=max_gas_limit, + transaction_gas_limit_cap=transaction_gas_limit_cap, + state_gas_reservoir_enabled=state_gas_reservoir_enabled, + ) def signer_minimum_balance(self, *, fork: Fork) -> int: """Return minimum balance of the signer.""" From 1b5659c1793621f4897bcd2b82c528472636bddc Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 11 Jun 2026 09:37:14 -0600 Subject: [PATCH 40/46] refactor(test-types): Raise when available gas is zero Co-authored-by: danceratopz --- .../execution_testing/test_types/transaction_types.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 7e14a6963d2..03b1ecb2355 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -870,9 +870,17 @@ def calculate_max_gas_limit( else: available_gas -= int(tx.gas_limit) - if unset_gas_limit_tx_count == 0 or available_gas <= 0: + if unset_gas_limit_tx_count == 0: return 0 + if available_gas <= 0: + raise Exception( + "test correctness: unable to automatically calculate gas " + "limit for transactions (no remaining gas: explicit " + "transaction gas limits already consume the full " + f"environment gas limit of {env_gas_limit})." + ) + max_tx_gas_limit = available_gas // unset_gas_limit_tx_count if state_gas_reservoir_enabled: transaction_gas_limit_cap = None From 8e8f9dd57bfeb7b75b8b19387800fdc25c4d1b1d Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 11 Jun 2026 09:46:31 -0600 Subject: [PATCH 41/46] chore(test-types): Verbose descriptions Co-authored-by: danceratopz --- .../test_types/transaction_types.py | 54 ++++++++++++++++--- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 03b1ecb2355..7df941c8110 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -331,7 +331,20 @@ def strip_hash_from_t8n_output(cls, data: Any) -> Any: expected_receipt: TransactionReceipt | None = Field(None, exclude=True) - state_gas_reservoir: int = Field(0, exclude=True) + state_gas_reservoir: int = Field( + 0, + exclude=True, + description=( + "Extra gas on top of the transaction gas limit cap, reserved " + "for state gas (EIP-8037). Only takes effect when `gas_limit` " + "is unset and the fork enables the state gas reservoir: " + "leaving it unset keeps the full implicit gas limit, an " + "explicit 0 pins the gas limit to exactly the cap (no " + "reservoir), and a positive value pins it to the cap plus the " + "requested reservoir. Requesting a positive reservoir on a " + "fork without the state gas reservoir raises an error." + ), + ) zero: ClassVar[Literal[0]] = 0 @@ -573,26 +586,51 @@ def sign(self: "Transaction") -> None: # Signer remains `None` in this case pass - def _calculate_gas_limit( + def _calculate_implicit_gas_limit( self, *, max_gas_limit: int, transaction_gas_limit_cap: int | None, state_gas_reservoir_enabled: bool = False, ) -> HexNumber: - """Calculate the gas limit given the current external factors.""" + """ + Calculate the gas limit given the current external factors. + + The implicit gas limit defaults to `max_gas_limit`, clamped to + the fork's transaction gas limit cap if there is one. On forks + with the state gas reservoir enabled (EIP-8037), + `state_gas_reservoir` refines this: unset keeps the full + `max_gas_limit` (any excess above the cap acts as an implicit + reservoir), an explicit 0 pins the gas limit to exactly the + cap, and a positive value pins it to the cap plus the requested + reservoir. + """ tx_gas_limit = max_gas_limit if state_gas_reservoir_enabled: if "state_gas_reservoir" in self.model_fields_set: assert transaction_gas_limit_cap is not None, ( - "Impossible to calculate the tx gas limit for the " - "required state gas reservoir without a gas limit cap" + "state_gas_reservoir_enabled is True but " + "transaction_gas_limit_cap is None; the state " + "gas reservoir is defined as gas above the cap " + "(EIP-8037 builds on EIP-7825), so a fork that " + "enables it must also define a cap" ) if self.state_gas_reservoir > 0: minimum_gas_with_reservoir = ( transaction_gas_limit_cap + self.state_gas_reservoir ) - assert tx_gas_limit >= minimum_gas_with_reservoir + if tx_gas_limit < minimum_gas_with_reservoir: + raise Exception( + "test correctness: the requested state " + "gas reservoir of " + f"{self.state_gas_reservoir} requires a " + f"gas limit of {minimum_gas_with_reservoir} " + "(transaction gas limit cap of " + f"{transaction_gas_limit_cap} plus " + "reservoir), but only " + f"{tx_gas_limit} gas is available for " + "this transaction." + ) tx_gas_limit = minimum_gas_with_reservoir else: if tx_gas_limit > transaction_gas_limit_cap: @@ -616,7 +654,7 @@ def with_gas_limit( updated_values: Dict[str, Any] = {} if "gas_limit" not in self.model_fields_set: - updated_values["gas_limit"] = self._calculate_gas_limit( + updated_values["gas_limit"] = self._calculate_implicit_gas_limit( max_gas_limit=max_gas_limit, transaction_gas_limit_cap=transaction_gas_limit_cap, state_gas_reservoir_enabled=state_gas_reservoir_enabled, @@ -938,7 +976,7 @@ def set_gas_limit( ) -> None: """Set the transaction gas limit if unset.""" if "gas_limit" not in self.model_fields_set: - self.gas_limit = self._calculate_gas_limit( + self.gas_limit = self._calculate_implicit_gas_limit( max_gas_limit=max_gas_limit, transaction_gas_limit_cap=transaction_gas_limit_cap, state_gas_reservoir_enabled=state_gas_reservoir_enabled, From f82f657ed2ff7f4d0a5ecd39b3aadb4aaae41d16 Mon Sep 17 00:00:00 2001 From: marioevz Date: Thu, 11 Jun 2026 09:54:51 -0600 Subject: [PATCH 42/46] fix(test-types): Raise when state gas reservoir is requested but not enabled Co-authored-by: danceratopz --- .../src/execution_testing/test_types/transaction_types.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 7df941c8110..884cb86ebe5 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -636,6 +636,13 @@ def _calculate_implicit_gas_limit( if tx_gas_limit > transaction_gas_limit_cap: tx_gas_limit = transaction_gas_limit_cap else: + if self.state_gas_reservoir > 0: + raise Exception( + "test correctness: transaction requests a state gas " + f"reservoir of {self.state_gas_reservoir} but the fork " + "does not enable the state gas reservoir; the request " + "would be silently ignored." + ) if ( transaction_gas_limit_cap is not None and tx_gas_limit > transaction_gas_limit_cap From 652c8159cc5c3caa26678644bcf73e13ac669e17 Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Fri, 12 Jun 2026 15:50:34 +0100 Subject: [PATCH 43/46] chore(tests): fix failing ci and revert some implicit gas limit removals --- .../src/execution_testing/specs/blockchain.py | 2 +- .../src/execution_testing/specs/state.py | 5 +---- .../test_types/tests/test_transactions.py | 15 +++++++++++++++ .../test_types/transaction_types.py | 10 ++++++++++ .../tools/utility/generators.py | 4 +--- .../test_state_gas_sstore.py | 9 ++++----- .../compute/instruction/test_storage.py | 4 +--- tests/benchmark/stateful/helpers.py | 1 - ...blob_reserve_price_with_bpo_transitions.py | 4 +--- .../test_max_block_rlp_size.py | 4 +--- .../test_modexp_0_0_0_22000.py | 19 +++++++++++++++++-- .../test_modexp_0_0_0_25000.py | 19 +++++++++++++++++-- .../test_modexp_0_0_0_35000.py | 19 +++++++++++++++++-- tests/prague/eip6110_deposits/conftest.py | 10 ++++++++++ tests/prague/eip6110_deposits/helpers.py | 3 +++ .../prague/eip6110_deposits/test_deposits.py | 9 ++------- .../test_withdrawal_requests_during_fork.py | 4 +--- .../test_consolidations_during_fork.py | 4 +--- .../eip4895_withdrawals/test_withdrawals.py | 4 +--- 19 files changed, 104 insertions(+), 45 deletions(-) diff --git a/packages/testing/src/execution_testing/specs/blockchain.py b/packages/testing/src/execution_testing/specs/blockchain.py index cf6c474c4e9..764217845bc 100644 --- a/packages/testing/src/execution_testing/specs/blockchain.py +++ b/packages/testing/src/execution_testing/specs/blockchain.py @@ -1403,7 +1403,7 @@ def make_stateful_fixture( f"max_fee_per_blob_gas={max_fee_per_blob_gas}." ) execute_plan.prepare_transactions( - env=self.genesis_environment, + env=Environment(gas_limit=HexNumber(start_block["gasLimit"])), gas_price=gas_price, max_fee_per_gas=max_fee_per_gas, max_priority_fee_per_gas=max_priority_fee_per_gas, diff --git a/packages/testing/src/execution_testing/specs/state.py b/packages/testing/src/execution_testing/specs/state.py index de5df257bbc..4fe88209fcf 100644 --- a/packages/testing/src/execution_testing/specs/state.py +++ b/packages/testing/src/execution_testing/specs/state.py @@ -419,10 +419,7 @@ def make_state_test_fixture( # First try reducing the gas limit only by one, if the validation # fails, it means that the traces change even with the slightest # modification to the gas. - tx_gas_limit = ( - int(tx.gas_limit) if tx.gas_limit is not None else None - ) - assert tx_gas_limit is not None + tx_gas_limit = int(tx.gas_limit) if self.verify_modified_gas_limit( t8n=t8n, diff --git a/packages/testing/src/execution_testing/test_types/tests/test_transactions.py b/packages/testing/src/execution_testing/test_types/tests/test_transactions.py index bb1b579b38a..2d0a9912736 100644 --- a/packages/testing/src/execution_testing/test_types/tests/test_transactions.py +++ b/packages/testing/src/execution_testing/test_types/tests/test_transactions.py @@ -284,3 +284,18 @@ def test_transaction_signing( assert tx.sender is not None assert tx.sender.hex() == expected_sender assert (tx.rlp().hex()) == expected_serialized + + +def test_gas_limit_none_is_unset() -> None: + """Test that `gas_limit=None` behaves exactly like omitting the field.""" + tx = Transaction(gas_limit=None) + assert "gas_limit" not in tx.model_fields_set + assert tx.gas_limit == 21_000 + + +@pytest.mark.parametrize("alias", ["gas_limit", "gasLimit", "gas"]) +def test_gas_limit_none_alias_is_unset(alias: str) -> None: + """Test that a `None` gas limit via any alias counts as unset.""" + tx = Transaction.model_validate({alias: None}) + assert "gas_limit" not in tx.model_fields_set + assert tx.gas_limit == 21_000 diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 884cb86ebe5..41cd265a6e6 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -310,6 +310,16 @@ def strip_hash_from_t8n_output(cls, data: Any) -> Any: data.pop("hash", None) return data + @model_validator(mode="before") + @classmethod + def treat_none_gas_limit_as_unset(cls, data: Any) -> Any: + """Treat a `None` gas limit (any alias) as unset.""" + if isinstance(data, dict): + for alias in ("gas_limit", "gasLimit", "gas"): + if alias in data and data[alias] is None: + del data[alias] + return data + gas_limit: HexNumber = Field( HexNumber(21_000), serialization_alias="gas", diff --git a/packages/testing/src/execution_testing/tools/utility/generators.py b/packages/testing/src/execution_testing/tools/utility/generators.py index add884f0180..028a114a6c4 100644 --- a/packages/testing/src/execution_testing/tools/utility/generators.py +++ b/packages/testing/src/execution_testing/tools/utility/generators.py @@ -155,9 +155,7 @@ def generate_system_contract_deploy_test( deploy_tx = Transaction.model_validate(tx_json).with_signature_and_sender() gas_price = deploy_tx.gas_price assert gas_price is not None - gas_limit = deploy_tx.gas_limit - assert gas_limit is not None - deployer_required_balance = gas_limit * gas_price + deployer_required_balance = deploy_tx.gas_limit * gas_price deployer_address = deploy_tx.sender if "hash" in tx_json: assert deploy_tx.hash == Hash(tx_json["hash"]) diff --git a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py index 182423e7e5e..d8b25968d91 100644 --- a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py +++ b/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py @@ -391,17 +391,16 @@ def test_sstore_state_gas_all_tx_types( """ Test SSTORE state gas works across all transaction types. - Different tx types (legacy, access list, EIP-1559, blob, SetCode) - have different intrinsic costs, which affects the gas split between - gas_left and state_gas_reservoir. Verify SSTORE succeeds with - each type. + With the gas limit pinned to the cap (zero reservoir), each tx + type's SSTORE state gas spills into gas_left despite differing + intrinsic costs. """ storage = Storage() contract = pre.deploy_contract( code=Op.SSTORE(storage.store_next(1), 1), ) - tx = typed_transaction.copy(to=contract) + tx = typed_transaction.copy(to=contract, state_gas_reservoir=0) post = {contract: Account(storage=storage)} state_test(pre=pre, post=post, tx=tx) diff --git a/tests/benchmark/compute/instruction/test_storage.py b/tests/benchmark/compute/instruction/test_storage.py index 14cb73382fc..bb2814a9252 100644 --- a/tests/benchmark/compute/instruction/test_storage.py +++ b/tests/benchmark/compute/instruction/test_storage.py @@ -360,10 +360,8 @@ def calldata_generator( ) ) for exec_tx in exec_txs: - exec_tx_gas_limit = exec_tx.gas_limit - assert exec_tx_gas_limit is not None if tx_result == TransactionResult.OUT_OF_GAS: - expected_gas_used += exec_tx_gas_limit + expected_gas_used += exec_tx.gas_limit else: expected_gas_used += exec_tx.gas_cost diff --git a/tests/benchmark/stateful/helpers.py b/tests/benchmark/stateful/helpers.py index 9c7b278ba40..033d5320499 100644 --- a/tests/benchmark/stateful/helpers.py +++ b/tests/benchmark/stateful/helpers.py @@ -159,7 +159,6 @@ def pack_transactions_into_blocks( for tx in transactions: tx_gas_limit = tx.gas_limit - assert tx_gas_limit is not None if current_gas + tx_gas_limit > gas_limit and current_txs: blocks.append(Block(txs=current_txs)) current_txs = [] diff --git a/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py b/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py index c2a2ee94c64..c34890a07aa 100644 --- a/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py +++ b/tests/osaka/eip7918_blob_reserve_price/test_blob_reserve_price_with_bpo_transitions.py @@ -264,9 +264,7 @@ def parent_block_txs( ) blob_txs_execution_gas = 0 for tx in parent_block_blob_txs: - tx_gas_limit = tx.gas_limit - assert tx_gas_limit is not None - blob_txs_execution_gas += tx_gas_limit + blob_txs_execution_gas += tx.gas_limit assert blob_txs_execution_gas <= required_gas_used extra_tx_gas_limit = required_gas_used - blob_txs_execution_gas assert extra_tx_gas_limit >= 21_000 diff --git a/tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py b/tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py index d47e6c7114f..21120f10cff 100644 --- a/tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py +++ b/tests/osaka/eip7934_block_rlp_limit/test_max_block_rlp_size.py @@ -560,9 +560,7 @@ def _exact_size_transactions_impl( transactions.append(last_tx) nonce += 1 - last_tx_gas_limit = last_tx.gas_limit - assert last_tx_gas_limit is not None - total_gas_used += last_tx_gas_limit + total_gas_used += last_tx.gas_limit current_size = get_block_rlp_size( fork, diff --git a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_22000.py b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_22000.py index d357264248d..19c7672ffd3 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_22000.py +++ b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_22000.py @@ -3,8 +3,9 @@ Ported from: state_tests/stPreCompiledContracts2/modexp_0_0_0_22000Filler.json +@manually-enhanced: Do not overwrite. tx_gas values bumped on +Amsterdam to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. -@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,6 +20,7 @@ StateTestFiller, Transaction, ) +from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -62,6 +64,7 @@ def test_modexp_0_0_0_22000( state_test: StateTestFiller, pre: Alloc, + fork: Fork, d: int, g: int, v: int, @@ -213,6 +216,7 @@ def test_modexp_0_0_0_22000( pc=Op.PC, condition=Op.ISZERO( Op.CALL( + gas=0x5F5E0FF, address=0x5, value=0x0, args_offset=0x160, @@ -227,6 +231,7 @@ def test_modexp_0_0_0_22000( + Op.PUSH1[0x21] + Op.POP( Op.CALL( + gas=0x15, address=0x4, value=0x0, args_offset=Op.DUP5, @@ -265,8 +270,18 @@ def test_modexp_0_0_0_22000( + Hash(0x0) + Hash(0x0), ] + tx_gas = [48136, 90000, 110000, 200000] + if fork.is_eip_enabled(8037): + # EIP-8037 state-gas spill OoGs the SSTORE; bump to fit. + tx_gas = [200000, 200000, 200000, 200000] - tx = Transaction(sender=sender, to=contract_0, data=tx_data[d], nonce=1) + tx = Transaction( + sender=sender, + to=contract_0, + data=tx_data[d], + gas_limit=tx_gas[g], + nonce=1, + ) post = { contract_1: Account(storage={}, code=b"", balance=1, nonce=0), diff --git a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_25000.py b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_25000.py index 97c883d5344..a9847bc8f27 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_25000.py +++ b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_25000.py @@ -3,8 +3,9 @@ Ported from: state_tests/stPreCompiledContracts2/modexp_0_0_0_25000Filler.json +@manually-enhanced: Do not overwrite. tx_gas values bumped on +Amsterdam to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. -@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,6 +20,7 @@ StateTestFiller, Transaction, ) +from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -62,6 +64,7 @@ def test_modexp_0_0_0_25000( state_test: StateTestFiller, pre: Alloc, + fork: Fork, d: int, g: int, v: int, @@ -213,6 +216,7 @@ def test_modexp_0_0_0_25000( pc=Op.PC, condition=Op.ISZERO( Op.CALL( + gas=0x5F5E0FF, address=0x5, value=0x0, args_offset=0x160, @@ -227,6 +231,7 @@ def test_modexp_0_0_0_25000( + Op.PUSH1[0x21] + Op.POP( Op.CALL( + gas=0x15, address=0x4, value=0x0, args_offset=Op.DUP5, @@ -265,8 +270,18 @@ def test_modexp_0_0_0_25000( + Hash(0x0) + Hash(0x0), ] + tx_gas = [47040, 90000, 110000, 200000] + if fork.is_eip_enabled(8037): + # EIP-8037 state-gas spill OoGs the SSTORE; bump to fit. + tx_gas = [200000, 200000, 200000, 200000] - tx = Transaction(sender=sender, to=contract_0, data=tx_data[d], nonce=1) + tx = Transaction( + sender=sender, + to=contract_0, + data=tx_data[d], + gas_limit=tx_gas[g], + nonce=1, + ) post = { contract_1: Account(storage={}, code=b"", balance=1, nonce=0), diff --git a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_35000.py b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_35000.py index 72973df8483..0ddf844021c 100644 --- a/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_35000.py +++ b/tests/ported_static/stPreCompiledContracts2/test_modexp_0_0_0_35000.py @@ -3,8 +3,9 @@ Ported from: state_tests/stPreCompiledContracts2/modexp_0_0_0_35000Filler.json +@manually-enhanced: Do not overwrite. tx_gas values bumped on +Amsterdam to cover EIP-8037 state-gas spill; pre-EIP-8037 unchanged. -@manually-enhanced: Do not overwrite. Explicit gas values removed. """ import pytest @@ -19,6 +20,7 @@ StateTestFiller, Transaction, ) +from execution_testing.forks import Fork from execution_testing.vm import Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -62,6 +64,7 @@ def test_modexp_0_0_0_35000( state_test: StateTestFiller, pre: Alloc, + fork: Fork, d: int, g: int, v: int, @@ -213,6 +216,7 @@ def test_modexp_0_0_0_35000( pc=Op.PC, condition=Op.ISZERO( Op.CALL( + gas=0x5F5E0FF, address=0x5, value=0x0, args_offset=0x160, @@ -227,6 +231,7 @@ def test_modexp_0_0_0_35000( + Op.PUSH1[0x21] + Op.POP( Op.CALL( + gas=0x15, address=0x4, value=0x0, args_offset=Op.DUP5, @@ -265,8 +270,18 @@ def test_modexp_0_0_0_35000( + Hash(0x0) + Hash(0x0), ] + tx_gas = [57040, 90000, 110000, 200000] + if fork.is_eip_enabled(8037): + # EIP-8037 state-gas spill OoGs the SSTORE; bump to fit. + tx_gas = [200000, 200000, 200000, 200000] - tx = Transaction(sender=sender, to=contract_0, data=tx_data[d], nonce=1) + tx = Transaction( + sender=sender, + to=contract_0, + data=tx_data[d], + gas_limit=tx_gas[g], + nonce=1, + ) post = { contract_1: Account(storage={}, code=b"", balance=1, nonce=0), diff --git a/tests/prague/eip6110_deposits/conftest.py b/tests/prague/eip6110_deposits/conftest.py index 6e50c4f2e36..2f26cde8ddb 100644 --- a/tests/prague/eip6110_deposits/conftest.py +++ b/tests/prague/eip6110_deposits/conftest.py @@ -12,6 +12,7 @@ Requests, Transaction, ) +from execution_testing.base_types import HexNumber from .helpers import DepositInteractionBase, DepositRequest @@ -30,12 +31,21 @@ def prepared_requests( @pytest.fixture def txs( + fork: Fork, prepared_requests: List[DepositInteractionBase], ) -> List[Transaction]: """List of transactions to include in the block.""" + floor_cost = fork.transaction_data_floor_cost_calculator() txs = [] for r in prepared_requests: txs += r.transactions() + for tx in txs: + if "gas_limit" in tx.model_fields_set and tx.error is None: + # Keep explicit limits above the fork's calldata floor + # (EIP-8037 repricing). Error tests keep their exact limit. + tx.gas_limit = HexNumber( + max(int(tx.gas_limit), floor_cost(data=tx.data) + 1) + ) return txs diff --git a/tests/prague/eip6110_deposits/helpers.py b/tests/prague/eip6110_deposits/helpers.py index 973a8b34b06..953c832dc38 100644 --- a/tests/prague/eip6110_deposits/helpers.py +++ b/tests/prague/eip6110_deposits/helpers.py @@ -286,6 +286,8 @@ def valid_requests(self, current_minimum_fee: int) -> List[DepositRequest]: class DepositContract(DepositInteractionBase): """Class used to describe a deposit originated from a contract.""" + tx_gas_limit: int | None = None + """Gas limit for the transaction. `None` uses the implicit gas limit.""" tx_value: int = 0 """Value to send with the transaction.""" @@ -337,6 +339,7 @@ def transactions(self) -> List[Transaction]: """Return a transaction for the deposit request.""" return [ Transaction( + gas_limit=self.tx_gas_limit, to=self.entry_address, value=self.tx_value, data=b"".join(r.calldata for r in self.requests), diff --git a/tests/prague/eip6110_deposits/test_deposits.py b/tests/prague/eip6110_deposits/test_deposits.py index 61ceccee4e0..82f42cd9fdf 100644 --- a/tests/prague/eip6110_deposits/test_deposits.py +++ b/tests/prague/eip6110_deposits/test_deposits.py @@ -486,16 +486,11 @@ ) for i in range(450) ], + tx_gas_limit=10_000_000, ), ], id="many_deposits_from_contract_oog", - marks=[ - pytest.mark.slow, - pytest.mark.xfail( - reason="Test needs update: amount of successful deposits " - "depends on fork gas schedule" - ), - ], + marks=pytest.mark.slow, ), pytest.param( [ diff --git a/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests_during_fork.py b/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests_during_fork.py index 6805a8b6061..2f8118690ed 100644 --- a/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests_during_fork.py +++ b/tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests_during_fork.py @@ -115,9 +115,7 @@ def test_withdrawal_requests_during_fork( tx_gas_price = deploy_tx.gas_price assert tx_gas_price is not None - tx_gas_limit = deploy_tx.gas_limit - assert tx_gas_limit is not None - deployer_required_balance = tx_gas_limit * tx_gas_price + deployer_required_balance = deploy_tx.gas_limit * tx_gas_price pre.fund_address( Spec.WITHDRAWAL_REQUEST_PREDEPLOY_SENDER, deployer_required_balance diff --git a/tests/prague/eip7251_consolidations/test_consolidations_during_fork.py b/tests/prague/eip7251_consolidations/test_consolidations_during_fork.py index 139dc7366a4..3a883580737 100644 --- a/tests/prague/eip7251_consolidations/test_consolidations_during_fork.py +++ b/tests/prague/eip7251_consolidations/test_consolidations_during_fork.py @@ -116,9 +116,7 @@ def test_consolidation_requests_during_fork( tx_gas_price = deploy_tx.gas_price assert tx_gas_price is not None - tx_gas_limit = deploy_tx.gas_limit - assert tx_gas_limit is not None - deployer_required_balance = tx_gas_limit * tx_gas_price + deployer_required_balance = deploy_tx.gas_limit * tx_gas_price pre.fund_address( Spec.CONSOLIDATION_REQUEST_PREDEPLOY_SENDER, deployer_required_balance diff --git a/tests/shanghai/eip4895_withdrawals/test_withdrawals.py b/tests/shanghai/eip4895_withdrawals/test_withdrawals.py index 749d6a3e346..8c4c62adf60 100644 --- a/tests/shanghai/eip4895_withdrawals/test_withdrawals.py +++ b/tests/shanghai/eip4895_withdrawals/test_withdrawals.py @@ -80,13 +80,11 @@ def tx(self, sender: EOA, recipient: EOA) -> Transaction: # noqa: D102 @pytest.fixture def withdrawal(self, tx: Transaction, sender: EOA) -> Withdrawal: # noqa: D102 - tx_gas_limit = tx.gas_limit - assert tx_gas_limit is not None return Withdrawal( index=0, validator_index=0, address=sender, - amount=tx_gas_limit + 1, + amount=tx.gas_limit + 1, ) @pytest.fixture From 0d8908cad314f9a27930bf5856e736a6e39b47ab Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Fri, 12 Jun 2026 16:03:55 +0100 Subject: [PATCH 44/46] fix(test-types): harden implicit gas-limit resolution --- .../test_types/transaction_types.py | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/testing/src/execution_testing/test_types/transaction_types.py b/packages/testing/src/execution_testing/test_types/transaction_types.py index 41cd265a6e6..4b808e08b16 100644 --- a/packages/testing/src/execution_testing/test_types/transaction_types.py +++ b/packages/testing/src/execution_testing/test_types/transaction_types.py @@ -646,13 +646,6 @@ def _calculate_implicit_gas_limit( if tx_gas_limit > transaction_gas_limit_cap: tx_gas_limit = transaction_gas_limit_cap else: - if self.state_gas_reservoir > 0: - raise Exception( - "test correctness: transaction requests a state gas " - f"reservoir of {self.state_gas_reservoir} but the fork " - "does not enable the state gas reservoir; the request " - "would be silently ignored." - ) if ( transaction_gas_limit_cap is not None and tx_gas_limit > transaction_gas_limit_cap @@ -660,6 +653,18 @@ def _calculate_implicit_gas_limit( tx_gas_limit = transaction_gas_limit_cap return HexNumber(tx_gas_limit) + def _check_state_gas_reservoir_supported( + self, *, state_gas_reservoir_enabled: bool + ) -> None: + """Raise if a positive reservoir is requested but unsupported.""" + if not state_gas_reservoir_enabled and self.state_gas_reservoir > 0: + raise Exception( + "test correctness: transaction requests a state gas " + f"reservoir of {self.state_gas_reservoir} but the fork " + "does not enable the state gas reservoir; the request " + "would be silently ignored." + ) + def with_gas_limit( self, *, @@ -670,6 +675,9 @@ def with_gas_limit( """Return copy of the transaction with the set gas limit.""" updated_values: Dict[str, Any] = {} + self._check_state_gas_reservoir_supported( + state_gas_reservoir_enabled=state_gas_reservoir_enabled + ) if "gas_limit" not in self.model_fields_set: updated_values["gas_limit"] = self._calculate_implicit_gas_limit( max_gas_limit=max_gas_limit, @@ -707,6 +715,9 @@ def with_signature_and_sender( if self.secret_key is None: raise ValueError("secret_key must be set to sign a transaction") + if "gas_limit" not in self.model_fields_set: + raise ValueError("gas_limit must be set to sign a transaction") + # Get the signing bytes signing_hash = self.rlp_signing_bytes().keccak256() @@ -992,6 +1003,9 @@ def set_gas_limit( state_gas_reservoir_enabled: bool = False, ) -> None: """Set the transaction gas limit if unset.""" + self._check_state_gas_reservoir_supported( + state_gas_reservoir_enabled=state_gas_reservoir_enabled + ) if "gas_limit" not in self.model_fields_set: self.gas_limit = self._calculate_implicit_gas_limit( max_gas_limit=max_gas_limit, From e26c9c5c91a2e6410522a1d7e3717a19a32185ad Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Fri, 12 Jun 2026 16:04:20 +0100 Subject: [PATCH 45/46] feat(test-types): add unit tests for implicit gas-limit resolution --- .../tests/test_implicit_gas_limit.py | 291 ++++++++++++++++++ 1 file changed, 291 insertions(+) create mode 100644 packages/testing/src/execution_testing/test_types/tests/test_implicit_gas_limit.py diff --git a/packages/testing/src/execution_testing/test_types/tests/test_implicit_gas_limit.py b/packages/testing/src/execution_testing/test_types/tests/test_implicit_gas_limit.py new file mode 100644 index 00000000000..979212f70de --- /dev/null +++ b/packages/testing/src/execution_testing/test_types/tests/test_implicit_gas_limit.py @@ -0,0 +1,291 @@ +""" +Test suite for implicit transaction gas-limit resolution. + +Covers `Transaction.set_gas_limit` and +`Transaction.calculate_max_gas_limit`: the even split of remaining +environment gas, gas limit cap clamping, the state gas reservoir +(EIP-8037) semantics, and the test correctness errors raised on +contradictory test definitions. +""" + +from typing import List + +import pytest + +from execution_testing.forks import Amsterdam, Fork, Osaka, Prague + +from ..transaction_types import Transaction + +_osaka_cap = Osaka.transaction_gas_limit_cap() +assert _osaka_cap is not None +OSAKA_CAP: int = _osaka_cap +_amsterdam_cap = Amsterdam.transaction_gas_limit_cap() +assert _amsterdam_cap is not None +AMSTERDAM_CAP: int = _amsterdam_cap + +assert Prague.transaction_gas_limit_cap() is None +assert not Prague.state_gas_reservoir_enabled() +assert not Osaka.state_gas_reservoir_enabled() +assert Amsterdam.state_gas_reservoir_enabled() + + +def calculate_max_transaction_gas_limit( + txs: List[Transaction], + *, + env_gas_limit: int, + fork: Fork, +) -> int: + """Split the environment gas across `txs` for the given fork.""" + return Transaction.calculate_max_gas_limit( + txs=txs, + env_gas_limit=env_gas_limit, + transaction_gas_limit_cap=fork.transaction_gas_limit_cap(), + state_gas_reservoir_enabled=fork.state_gas_reservoir_enabled(), + ) + + +class TestSetGasLimit: + """Test `Transaction.set_gas_limit` resolution of unset limits.""" + + def test_unset_no_cap(self) -> None: + """An unset gas limit resolves to the maximum, uncapped.""" + tx = Transaction() + tx.set_gas_limit(max_gas_limit=100, transaction_gas_limit_cap=None) + assert tx.gas_limit == 100 + + def test_unset_clamped_to_cap(self) -> None: + """An unset gas limit is clamped to the gas limit cap.""" + tx = Transaction() + tx.set_gas_limit(max_gas_limit=100, transaction_gas_limit_cap=60) + assert tx.gas_limit == 60 + + def test_unset_cap_above_max(self) -> None: + """A cap above the maximum does not raise the gas limit.""" + tx = Transaction() + tx.set_gas_limit(max_gas_limit=100, transaction_gas_limit_cap=200) + assert tx.gas_limit == 100 + + def test_explicit_gas_limit_untouched(self) -> None: + """An explicit gas limit is never modified.""" + tx = Transaction(gas_limit=21_000) + tx.set_gas_limit(max_gas_limit=100, transaction_gas_limit_cap=60) + assert tx.gas_limit == 21_000 + + def test_explicit_none_treated_as_unset(self) -> None: + """An explicit `gas_limit=None` is treated as unset.""" + tx = Transaction(gas_limit=None) + tx.set_gas_limit(max_gas_limit=100, transaction_gas_limit_cap=None) + assert tx.gas_limit == 100 + + def test_resolution_is_sticky(self) -> None: + """A second call does not overwrite the resolved gas limit.""" + tx = Transaction() + tx.set_gas_limit(max_gas_limit=100, transaction_gas_limit_cap=None) + tx.set_gas_limit(max_gas_limit=50, transaction_gas_limit_cap=None) + assert tx.gas_limit == 100 + + def test_signing_requires_gas_limit(self) -> None: + """Signing a transaction with an unset gas limit raises.""" + with pytest.raises(ValueError, match="gas_limit must be set"): + Transaction().with_signature_and_sender() + + +class TestSetGasLimitStateGasReservoir: + """Test the state gas reservoir (EIP-8037) gas-limit semantics.""" + + def test_reservoir_unset_keeps_full_maximum(self) -> None: + """With the reservoir unset, the cap does not clamp the limit.""" + tx = Transaction() + tx.set_gas_limit( + max_gas_limit=100, + transaction_gas_limit_cap=60, + state_gas_reservoir_enabled=True, + ) + assert tx.gas_limit == 100 + + def test_reservoir_zero_pins_to_cap(self) -> None: + """An explicit zero reservoir pins the limit to exactly the cap.""" + tx = Transaction(state_gas_reservoir=0) + tx.set_gas_limit( + max_gas_limit=100, + transaction_gas_limit_cap=60, + state_gas_reservoir_enabled=True, + ) + assert tx.gas_limit == 60 + + def test_reservoir_pins_to_cap_plus_reservoir(self) -> None: + """A positive reservoir pins the limit to cap plus reservoir.""" + tx = Transaction(state_gas_reservoir=40) + tx.set_gas_limit( + max_gas_limit=200, + transaction_gas_limit_cap=60, + state_gas_reservoir_enabled=True, + ) + assert tx.gas_limit == 100 + + def test_reservoir_ignored_with_explicit_gas_limit(self) -> None: + """A reservoir is ignored when the gas limit is explicit.""" + tx = Transaction(gas_limit=21_000, state_gas_reservoir=40) + tx.set_gas_limit( + max_gas_limit=200, + transaction_gas_limit_cap=60, + state_gas_reservoir_enabled=True, + ) + assert tx.gas_limit == 21_000 + + def test_reservoir_exceeding_available_gas_raises(self) -> None: + """A reservoir that does not fit the available gas raises.""" + tx = Transaction(state_gas_reservoir=50) + with pytest.raises( + Exception, match="test correctness: the requested state" + ): + tx.set_gas_limit( + max_gas_limit=100, + transaction_gas_limit_cap=60, + state_gas_reservoir_enabled=True, + ) + + @pytest.mark.parametrize( + "gas_limit", + [ + pytest.param(None, id="implicit_gas_limit"), + pytest.param(21_000, id="explicit_gas_limit"), + ], + ) + def test_reservoir_on_unsupported_fork_raises( + self, gas_limit: int | None + ) -> None: + """A positive reservoir raises if the fork has no reservoir.""" + tx = Transaction(gas_limit=gas_limit, state_gas_reservoir=1) + with pytest.raises( + Exception, match="test correctness: transaction requests" + ): + tx.set_gas_limit( + max_gas_limit=100, + transaction_gas_limit_cap=60, + state_gas_reservoir_enabled=False, + ) + + def test_reservoir_zero_on_unsupported_fork_clamps_to_cap(self) -> None: + """An explicit zero reservoir is valid on forks without one.""" + tx = Transaction(state_gas_reservoir=0) + tx.set_gas_limit( + max_gas_limit=100, + transaction_gas_limit_cap=60, + state_gas_reservoir_enabled=False, + ) + assert tx.gas_limit == 60 + + def test_reservoir_without_cap_is_internal_invariant(self) -> None: + """A reservoir request without a cap violates an invariant.""" + tx = Transaction(state_gas_reservoir=1) + with pytest.raises(AssertionError, match="must also define a cap"): + tx.set_gas_limit( + max_gas_limit=100, + transaction_gas_limit_cap=None, + state_gas_reservoir_enabled=True, + ) + + +class TestCalculateMaxTransactionGasLimit: + """Test the even split of environment gas across transactions.""" + + def test_no_implicit_transactions(self) -> None: + """Return 0 when all transactions have explicit gas limits.""" + txs = [Transaction(gas_limit=200_000)] + assert ( + calculate_max_transaction_gas_limit( + txs, env_gas_limit=100_000, fork=Prague + ) + == 0 + ) + + def test_empty_transaction_list(self) -> None: + """Return 0 for an empty transaction list.""" + assert ( + calculate_max_transaction_gas_limit( + [], env_gas_limit=100_000, fork=Prague + ) + == 0 + ) + + def test_single_implicit_transaction(self) -> None: + """A single implicit transaction gets the full environment gas.""" + txs = [Transaction()] + assert ( + calculate_max_transaction_gas_limit( + txs, env_gas_limit=100_000, fork=Prague + ) + == 100_000 + ) + + def test_explicit_limits_reduce_available_gas(self) -> None: + """Explicit gas limits are deducted from the environment gas.""" + txs = [Transaction(gas_limit=40_000), Transaction()] + assert ( + calculate_max_transaction_gas_limit( + txs, env_gas_limit=100_000, fork=Prague + ) + == 60_000 + ) + + def test_even_split_across_implicit_transactions(self) -> None: + """Remaining gas is split evenly across implicit transactions.""" + txs = [Transaction(gas_limit=10_000), Transaction(), Transaction()] + assert ( + calculate_max_transaction_gas_limit( + txs, env_gas_limit=100_000, fork=Prague + ) + == 45_000 + ) + + def test_split_clamped_to_cap(self) -> None: + """The per-transaction share is clamped to the fork's cap.""" + env_gas_limit = 100_000_000 + assert env_gas_limit > OSAKA_CAP + txs = [Transaction()] + assert ( + calculate_max_transaction_gas_limit( + txs, env_gas_limit=env_gas_limit, fork=Osaka + ) + == OSAKA_CAP + ) + + def test_state_gas_reservoir_fork_removes_cap(self) -> None: + """A fork with the state gas reservoir does not clamp the share.""" + env_gas_limit = 100_000_000 + assert env_gas_limit > AMSTERDAM_CAP + txs = [Transaction()] + assert ( + calculate_max_transaction_gas_limit( + txs, env_gas_limit=env_gas_limit, fork=Amsterdam + ) + == env_gas_limit + ) + + @pytest.mark.parametrize( + "explicit_gas_limit", + [ + pytest.param(100_000, id="exactly_consumed"), + pytest.param(150_000, id="over_consumed"), + ], + ) + def test_no_remaining_gas_raises(self, explicit_gas_limit: int) -> None: + """Raise when explicit limits leave implicit transactions no gas.""" + txs = [Transaction(gas_limit=explicit_gas_limit), Transaction()] + with pytest.raises( + Exception, match="test correctness: unable to automatically" + ): + calculate_max_transaction_gas_limit( + txs, env_gas_limit=100_000, fork=Prague + ) + + def test_no_remaining_gas_all_explicit_does_not_raise(self) -> None: + """Over-consumption without implicit transactions returns 0.""" + txs = [Transaction(gas_limit=150_000)] + assert ( + calculate_max_transaction_gas_limit( + txs, env_gas_limit=100_000, fork=Prague + ) + == 0 + ) From a2e13fb71164d37df9f1df962dc50a925200c608 Mon Sep 17 00:00:00 2001 From: marioevz Date: Fri, 12 Jun 2026 10:13:34 -0600 Subject: [PATCH 46/46] fix(tests): Fix requests tests using gas_limit=None Co-authored-by: Leo Lara --- tests/prague/eip6110_deposits/helpers.py | 30 ++++++++++++------- .../helpers.py | 30 ++++++++++++------- .../prague/eip7251_consolidations/helpers.py | 30 ++++++++++++------- 3 files changed, 60 insertions(+), 30 deletions(-) diff --git a/tests/prague/eip6110_deposits/helpers.py b/tests/prague/eip6110_deposits/helpers.py index 953c832dc38..dcccf62cba2 100644 --- a/tests/prague/eip6110_deposits/helpers.py +++ b/tests/prague/eip6110_deposits/helpers.py @@ -255,16 +255,26 @@ def transactions(self) -> List[Transaction]: assert self.sender_account is not None, ( "Sender account not initialized" ) - return [ - Transaction( - gas_limit=request.gas_limit, - to=request.interaction_contract_address, - value=request.value, - data=request.calldata, - sender=self.sender_account, - ) - for request in self.requests - ] + txs: List[Transaction] = [] + for request in self.requests: + gas_limit = request.gas_limit + if gas_limit is not None: + tx = Transaction( + gas_limit=request.gas_limit, + to=request.interaction_contract_address, + value=request.value, + data=request.calldata, + sender=self.sender_account, + ) + else: + tx = Transaction( + to=request.interaction_contract_address, + value=request.value, + data=request.calldata, + sender=self.sender_account, + ) + txs.append(tx) + return txs def update_pre(self, pre: Alloc) -> Self: """Return a copy of self with `sender_account` populated.""" diff --git a/tests/prague/eip7002_el_triggerable_withdrawals/helpers.py b/tests/prague/eip7002_el_triggerable_withdrawals/helpers.py index f8d9d1464ff..5eb36d1de2b 100644 --- a/tests/prague/eip7002_el_triggerable_withdrawals/helpers.py +++ b/tests/prague/eip7002_el_triggerable_withdrawals/helpers.py @@ -112,16 +112,26 @@ def transactions(self) -> List[Transaction]: assert self.sender_account is not None, ( "Sender account not initialized" ) - return [ - Transaction( - gas_limit=request.gas_limit, - to=request.interaction_contract_address, - value=request.value, - data=request.calldata, - sender=self.sender_account, - ) - for request in self.requests - ] + txs: List[Transaction] = [] + for request in self.requests: + gas_limit = request.gas_limit + if gas_limit is not None: + tx = Transaction( + gas_limit=request.gas_limit, + to=request.interaction_contract_address, + value=request.value, + data=request.calldata, + sender=self.sender_account, + ) + else: + tx = Transaction( + to=request.interaction_contract_address, + value=request.value, + data=request.calldata, + sender=self.sender_account, + ) + txs.append(tx) + return txs def update_pre(self, pre: Alloc) -> Self: """Return a copy of self with `sender_account` populated.""" diff --git a/tests/prague/eip7251_consolidations/helpers.py b/tests/prague/eip7251_consolidations/helpers.py index a5c94caf79e..6de1b365abb 100644 --- a/tests/prague/eip7251_consolidations/helpers.py +++ b/tests/prague/eip7251_consolidations/helpers.py @@ -107,16 +107,26 @@ def transactions(self) -> List[Transaction]: assert self.sender_account is not None, ( "Sender account not initialized" ) - return [ - Transaction( - gas_limit=request.gas_limit, - to=request.interaction_contract_address, - value=request.value, - data=request.calldata, - sender=self.sender_account, - ) - for request in self.requests - ] + txs: List[Transaction] = [] + for request in self.requests: + gas_limit = request.gas_limit + if gas_limit is not None: + tx = Transaction( + gas_limit=gas_limit, + to=request.interaction_contract_address, + value=request.value, + data=request.calldata, + sender=self.sender_account, + ) + else: + tx = Transaction( + to=request.interaction_contract_address, + value=request.value, + data=request.calldata, + sender=self.sender_account, + ) + txs.append(tx) + return txs def update_pre(self, pre: Alloc) -> Self: """Return a copy of self with `sender_account` populated."""