From e5ae2fde700ef2c7856387c05e7794cd7c47241c Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Tue, 28 Feb 2023 11:36:30 -0600 Subject: [PATCH 01/10] add name to every test filler. --- fillers/eips/eip3651.py | 9 ++- fillers/example/example.py | 2 +- fillers/vm/chain_id.py | 2 +- fillers/vm/dup.py | 2 +- fillers/withdrawals/withdrawals.py | 89 ++++++++++++++++++++----- src/ethereum_test_tools/filling/fill.py | 2 - 6 files changed, 82 insertions(+), 24 deletions(-) diff --git a/fillers/eips/eip3651.py b/fillers/eips/eip3651.py index 78cd5b8bbc0..13c92620ab2 100644 --- a/fillers/eips/eip3651.py +++ b/fillers/eips/eip3651.py @@ -121,7 +121,6 @@ def test_warm_coinbase_call_out_of_gas(fork): for i, data in enumerate( [to_hash(x) for x in range(0x100, 0x400 + 1, 0x100)] ): - tx = Transaction( ty=0x0, data=data, @@ -152,7 +151,13 @@ def test_warm_coinbase_call_out_of_gas(fork): } ) - yield StateTest(env=env, pre=pre, post=post, txs=[tx]) + yield StateTest( + env=env, + pre=pre, + post=post, + txs=[tx], + name="warm_coinbase_call_out_of_gas", + ) @test_from(fork="shanghai") diff --git a/fillers/example/example.py b/fillers/example/example.py index 70753dfd3e7..77f0fae5448 100644 --- a/fillers/example/example.py +++ b/fillers/example/example.py @@ -57,4 +57,4 @@ def test_yul(fork): ), } - yield StateTest(env=env, pre=pre, post=post, txs=[tx]) + yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="example_yul") diff --git a/fillers/vm/chain_id.py b/fillers/vm/chain_id.py index a518c016ea1..81666b4ad2b 100644 --- a/fillers/vm/chain_id.py +++ b/fillers/vm/chain_id.py @@ -49,4 +49,4 @@ def test_chain_id(fork): ), } - yield StateTest(env=env, pre=pre, post=post, txs=[tx]) + yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="vm_chain_id") diff --git a/fillers/vm/dup.py b/fillers/vm/dup.py index b1a073adb82..2c8d44e8de1 100644 --- a/fillers/vm/dup.py +++ b/fillers/vm/dup.py @@ -103,4 +103,4 @@ def test_dup(fork): post[account] = Account(storage=s) - yield StateTest(env=env, pre=pre, post=post, txs=txs) + yield StateTest(env=env, pre=pre, post=post, txs=txs, name="vm_dup") diff --git a/fillers/withdrawals/withdrawals.py b/fillers/withdrawals/withdrawals.py index b0b8f7eb6a1..ace52f09af2 100644 --- a/fillers/withdrawals/withdrawals.py +++ b/fillers/withdrawals/withdrawals.py @@ -92,7 +92,12 @@ def test_withdrawals_use_value_in_tx(_): ) ] - yield BlockchainTest(pre=pre, post={}, blocks=blocks) + yield BlockchainTest( + pre=pre, + post={}, + blocks=blocks, + name="withdrawals_use_value_in_tx_invalid", + ) blocks = [ Block( @@ -110,7 +115,12 @@ def test_withdrawals_use_value_in_tx(_): TestAddress: Account(balance=ONE_GWEI), } - yield BlockchainTest(pre=pre, post=post, blocks=blocks) + yield BlockchainTest( + pre=pre, + post=post, + blocks=blocks, + name="withdrawals_use_value_in_tx_valid", + ) @test_from(WITHDRAWALS_FORK) @@ -168,7 +178,12 @@ def test_withdrawals_use_value_in_contract(_): ), } - yield BlockchainTest(pre=pre, post=post, blocks=blocks) + yield BlockchainTest( + pre=pre, + post=post, + blocks=blocks, + name="withdrawals_use_value_in_contract", + ) @test_from(WITHDRAWALS_FORK) @@ -234,7 +249,12 @@ def test_withdrawals_balance_within_block(_): ) } - yield BlockchainTest(pre=pre, post=post, blocks=blocks) + yield BlockchainTest( + pre=pre, + post=post, + blocks=blocks, + name="withdrawals_balance_within_block", + ) @test_from(WITHDRAWALS_FORK) @@ -289,7 +309,12 @@ def test_withdrawals_multiple_withdrawals_same_address(_): storage={}, ) - yield BlockchainTest(pre=pre, post=post, blocks=blocks) + yield BlockchainTest( + pre=pre, + post=post, + blocks=blocks, + name="multiple_withdrawals_same_address", + ) # Similar test but now use multiple blocks each with multiple withdrawals # to the same withdrawal address. @@ -309,7 +334,12 @@ def test_withdrawals_multiple_withdrawals_same_address(_): for i in range(len(ADDRESSES)) ] - yield BlockchainTest(pre=pre, post=post, blocks=blocks) + yield BlockchainTest( + pre=pre, + post=post, + blocks=blocks, + name="multiple_withdrawals_same_address", + ) @test_from(WITHDRAWALS_FORK) @@ -350,7 +380,9 @@ def test_withdrawals_many_withdrawals(_): ), ] - yield BlockchainTest(pre=pre, post=post, blocks=blocks) + yield BlockchainTest( + pre=pre, post=post, blocks=blocks, name="many_withdrawals" + ) @test_from(WITHDRAWALS_FORK) @@ -404,7 +436,12 @@ def test_withdrawals_self_destructing_account(_): ), } - yield BlockchainTest(pre=pre, post=post, blocks=[block]) + yield BlockchainTest( + pre=pre, + post=post, + blocks=[block], + name="withdrawals_self_destructing_account", + ) @test_from(WITHDRAWALS_FORK) @@ -455,14 +492,18 @@ def test_withdrawals_newly_created_contract(_): ), } - yield BlockchainTest(pre=pre, post=post, blocks=[block]) + yield BlockchainTest( + pre=pre, post=post, blocks=[block], name="newly_created_contract" + ) # Same test but include value in the contract creating transaction tx.value = ONE_GWEI post[created_contract].balance = 2 * ONE_GWEI - yield BlockchainTest(pre=pre, post=post, blocks=[block]) + yield BlockchainTest( + pre=pre, post=post, blocks=[block], name="newly_created_contract" + ) @test_from(WITHDRAWALS_FORK) @@ -551,7 +592,9 @@ def test_withdrawals_no_evm_execution(_): to_address(0x400): Account(storage={1: 1}), } - yield BlockchainTest(pre=pre, post=post, blocks=blocks) + yield BlockchainTest( + pre=pre, post=post, blocks=blocks, name="withdrawals_no_evm_execution" + ) @test_from(WITHDRAWALS_FORK) @@ -601,7 +644,9 @@ def test_withdrawals_zero_amount(_): ), } - yield BlockchainTest(pre=pre, post=post, blocks=[block]) + yield BlockchainTest( + pre=pre, post=post, blocks=[block], name="withdrawals_zero_amount" + ) # Same test but add another withdrawal with positive amount in same # block. @@ -613,7 +658,9 @@ def test_withdrawals_zero_amount(_): ) block.withdrawals.append(withdrawal_2) post[to_address(0x200)].balance = ONE_GWEI - yield BlockchainTest(pre=pre, post=post, blocks=[block]) + yield BlockchainTest( + pre=pre, post=post, blocks=[block], name="withdrawals_zero_amount" + ) # Same test but add another withdrawal with max amount in same # block. @@ -625,13 +672,14 @@ def test_withdrawals_zero_amount(_): ) block.withdrawals.append(withdrawal_3) post[to_address(0x300)].balance = (2**64 - 1) * ONE_GWEI - yield BlockchainTest(pre=pre, post=post, blocks=[block]) # Same test but reverse order of withdrawals. block.withdrawals.reverse() set_withdrawal_index(block.withdrawals) - yield BlockchainTest(pre=pre, post=post, blocks=[block]) + yield BlockchainTest( + pre=pre, post=post, blocks=[block], name="withdrawals_zero_amount" + ) @test_from(WITHDRAWALS_FORK) @@ -663,7 +711,12 @@ def test_withdrawals_overflowing_balance(_): balance=(2**256 - 1), ), } - yield BlockchainTest(pre=pre, post=post, blocks=blocks) + yield BlockchainTest( + pre=pre, + post=post, + blocks=blocks, + name="withdrawals_overflowing_balance", + ) @test_from(WITHDRAWALS_FORK) @@ -704,4 +757,6 @@ def test_large_withdrawals(_: str): withdrawals=withdrawals, ) ] - yield BlockchainTest(pre=pre, post=post, blocks=blocks) + yield BlockchainTest( + pre=pre, post=post, blocks=blocks, name="large_withdrawals" + ) diff --git a/src/ethereum_test_tools/filling/fill.py b/src/ethereum_test_tools/filling/fill.py index 72fec42012f..3948c44ece6 100644 --- a/src/ethereum_test_tools/filling/fill.py +++ b/src/ethereum_test_tools/filling/fill.py @@ -25,9 +25,7 @@ def fill_test( """ fixtures: List[Fixture] = [] for fork in forks: - for index, test in enumerate(test_spec(fork)): - mapped = map_fork(fork) if mapped is None: # Fork not supported by t8n, skip From d1b8ffb62994290db54b584665ba4183e7ef3f74 Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Tue, 28 Feb 2023 11:43:56 -0600 Subject: [PATCH 02/10] remove withdrawals overflow (merge-conflicts). --- fillers/withdrawals/withdrawals.py | 37 ------------------------------ 1 file changed, 37 deletions(-) diff --git a/fillers/withdrawals/withdrawals.py b/fillers/withdrawals/withdrawals.py index ace52f09af2..9b67d3aaf00 100644 --- a/fillers/withdrawals/withdrawals.py +++ b/fillers/withdrawals/withdrawals.py @@ -682,43 +682,6 @@ def test_withdrawals_zero_amount(_): ) -@test_from(WITHDRAWALS_FORK) -def test_withdrawals_overflowing_balance(_): - """ - Test Withdrawals that overflows an account. - """ - pre = { - TestAddress: Account(balance=1000000000000000000000, nonce=0), - to_address(0x100): Account( - balance=(2**256 - 1), - ), - } - blocks = [ - Block( - withdrawals=[ - Withdrawal( - index=0, - validator=0, - address=to_address(0x100), - amount=1, - ) - ], - exception="invalid withdrawal", - ) - ] - post = { - to_address(0x100): Account( - balance=(2**256 - 1), - ), - } - yield BlockchainTest( - pre=pre, - post=post, - blocks=blocks, - name="withdrawals_overflowing_balance", - ) - - @test_from(WITHDRAWALS_FORK) def test_large_withdrawals(_: str): """ From d896120f5ff6519a41d35cbe91180f5eedb38569 Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Wed, 1 Mar 2023 15:42:46 -0600 Subject: [PATCH 03/10] change statetest gas used to zero. --- src/ethereum_test_tools/spec/state_test.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ethereum_test_tools/spec/state_test.py b/src/ethereum_test_tools/spec/state_test.py index 32b9fa4806c..3b0acb006ae 100644 --- a/src/ethereum_test_tools/spec/state_test.py +++ b/src/ethereum_test_tools/spec/state_test.py @@ -69,11 +69,7 @@ def make_genesis( difficulty=0x20000 if env.difficulty is None else env.difficulty, number=env.number - 1, gas_limit=env.gas_limit, - # We need the base fee to remain unchanged from the genesis - # to block 1. - # To do that we set the gas used to exactly half of the limit - # so the base fee is unchanged. - gas_used=env.gas_limit // 2, + gas_used=0, timestamp=0, extra_data="0x00", mix_digest="0x0000000000000000000000000000000000000000000000000000000000000000", # noqa: E501 From 0bafdd1f285b9b44d248b792233c1e8778bad85d Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Wed, 1 Mar 2023 16:32:56 -0600 Subject: [PATCH 04/10] change names according to new hive test name spec. --- fillers/eips/eip3651.py | 16 +++++---- fillers/eips/eip3855.py | 20 ++++------- fillers/eips/eip3860.py | 32 ++++++++--------- fillers/example/example.py | 2 +- fillers/vm/chain_id.py | 2 +- fillers/vm/dup.py | 2 +- fillers/withdrawals/withdrawals.py | 56 +++++++++++++----------------- 7 files changed, 61 insertions(+), 69 deletions(-) diff --git a/fillers/eips/eip3651.py b/fillers/eips/eip3651.py index 13c92620ab2..2a2960236dc 100644 --- a/fillers/eips/eip3651.py +++ b/fillers/eips/eip3651.py @@ -118,12 +118,16 @@ def test_warm_coinbase_call_out_of_gas(fork): to_address(0x400): Account(code=staticcall_code), } - for i, data in enumerate( - [to_hash(x) for x in range(0x100, 0x400 + 1, 0x100)] - ): + opcodes = { + "call": 0x100, + "callcode": 0x200, + "delegatecall": 0x300, + "staticcall": 0x400, + } + for opcode, data in opcodes.items(): tx = Transaction( ty=0x0, - data=data, + data=to_hash(data), chain_id=0x0, nonce=0, to="0xcccccccccccccccccccccccccccccccccccccccc", @@ -156,7 +160,7 @@ def test_warm_coinbase_call_out_of_gas(fork): pre=pre, post=post, txs=[tx], - name="warm_coinbase_call_out_of_gas", + name="opcode_" + opcode, ) @@ -261,5 +265,5 @@ def test_warm_coinbase_gas_usage(fork): pre=pre, post=post, txs=[tx], - name="warm_coinbase_opcode_" + opcode.lower(), + name="opcode_" + opcode.lower(), ) diff --git a/fillers/eips/eip3855.py b/fillers/eips/eip3855.py index 1580308dde2..fd4f082b9fd 100644 --- a/fillers/eips/eip3855.py +++ b/fillers/eips/eip3855.py @@ -45,9 +45,7 @@ def test_push0(fork): pre[addr_1] = Account(code=code) post[addr_1] = Account(storage={0x00: 0x01}) - yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="push0_key_sstore" - ) + yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="key_sstore") """ Test case 2: Fill stack with PUSH0, then OR all values and save using @@ -60,9 +58,7 @@ def test_push0(fork): pre[addr_1] = Account(code=code) post[addr_1] = Account(storage={0x00: 0x01}) - yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="push0_fill_stack" - ) + yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="fill_stack") """ Test case 3: Stack overflow by using PUSH0 1025 times @@ -74,7 +70,7 @@ def test_push0(fork): post[addr_1] = Account(storage={0x00: 0x00}) yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="push0_stack_overflow" + env=env, pre=pre, post=post, txs=[tx], name="stack_overflow" ) """ @@ -88,7 +84,7 @@ def test_push0(fork): post[addr_1] = Account(storage={0x00: 0x02, 0x01: 0x00}) yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="push0_storage_overwrite" + env=env, pre=pre, post=post, txs=[tx], name="storage_overwrite" ) """ @@ -118,7 +114,7 @@ def test_push0(fork): post[addr_1] = Account(storage={0x00: 0x01, 0x01: 0xFF}) yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="push0_during_staticcall" + env=env, pre=pre, post=post, txs=[tx], name="during_staticcall" ) del pre[addr_2] @@ -141,7 +137,7 @@ def test_push0(fork): post[addr_1] = Account(storage={0x00: 0x01}) yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="push0_before_jumpdest" + env=env, pre=pre, post=post, txs=[tx], name="before_jumpdest" ) """ @@ -155,6 +151,4 @@ def test_push0(fork): pre[addr_1] = Account(code=code) post[addr_1] = Account(storage={0x00: 0x02}) - yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="push0_gas_cost" - ) + yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="gas_cost") diff --git a/fillers/eips/eip3860.py b/fillers/eips/eip3860.py index 8f0f5c12967..2842c2313e5 100644 --- a/fillers/eips/eip3860.py +++ b/fillers/eips/eip3860.py @@ -105,61 +105,61 @@ def calculate_create_tx_execution_cost( deploy_code=INITCODE_RESULTING_DEPLOYED_CODE, initcode_length=MAX_INITCODE_SIZE, padding_byte=0x01, - name="max_size_ones_initcode", + name="max_size_ones", ) INITCODE_ZEROS_MAX_LIMIT = Initcode( deploy_code=INITCODE_RESULTING_DEPLOYED_CODE, initcode_length=MAX_INITCODE_SIZE, padding_byte=0x00, - name="max_size_zeros_initcode", + name="max_size_zeros", ) INITCODE_ONES_OVER_LIMIT = Initcode( deploy_code=INITCODE_RESULTING_DEPLOYED_CODE, initcode_length=MAX_INITCODE_SIZE + 1, padding_byte=0x01, - name="over_limit_ones_initcode", + name="over_limit_ones", ) INITCODE_ZEROS_OVER_LIMIT = Initcode( deploy_code=INITCODE_RESULTING_DEPLOYED_CODE, initcode_length=MAX_INITCODE_SIZE + 1, padding_byte=0x00, - name="over_limit_zeros_initcode", + name="over_limit_zeros", ) INITCODE_ZEROS_32_BYTES = Initcode( deploy_code=INITCODE_RESULTING_DEPLOYED_CODE, initcode_length=32, padding_byte=0x00, - name="32_bytes_initcode", + name="32_bytes", ) INITCODE_ZEROS_33_BYTES = Initcode( deploy_code=INITCODE_RESULTING_DEPLOYED_CODE, initcode_length=33, padding_byte=0x00, - name="33_bytes_initcode", + name="33_bytes", ) INITCODE_ZEROS_49120_BYTES = Initcode( deploy_code=INITCODE_RESULTING_DEPLOYED_CODE, initcode_length=49120, padding_byte=0x00, - name="49120_bytes_initcode", + name="49120_bytes", ) INITCODE_ZEROS_49121_BYTES = Initcode( deploy_code=INITCODE_RESULTING_DEPLOYED_CODE, initcode_length=49121, padding_byte=0x00, - name="49121_bytes_initcode", + name="49121_bytes", ) EMPTY_INITCODE = Initcode( deploy_code=bytes(), - name="empty_initcode", + name="empty", ) EMPTY_INITCODE.bytecode = bytes() EMPTY_INITCODE.deployment_gas = 0 @@ -167,7 +167,7 @@ def calculate_create_tx_execution_cost( SINGLE_BYTE_INITCODE = Initcode( deploy_code=bytes(), - name="single_byte_initcode", + name="single_byte", ) SINGLE_BYTE_INITCODE.bytecode = Op.STOP SINGLE_BYTE_INITCODE.deployment_gas = 0 @@ -225,7 +225,7 @@ def generate_tx_initcode_limit_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"initcode_tx_{initcode.name}", + name=f"{initcode.name}", ) @@ -315,7 +315,7 @@ def generate_gas_cost_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"{initcode.name}_tx_exact_intrinsic_gas", + name=f"{initcode.name}_exact_intrinsic_gas", ) """ @@ -341,7 +341,7 @@ def generate_gas_cost_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"{initcode.name}_tx_under_intrinsic_gas", + name=f"{initcode.name}_under_intrinsic_gas", ) """ @@ -367,7 +367,7 @@ def generate_gas_cost_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"{initcode.name}_tx_under_execution_gas", + name=f"{initcode.name}_under_execution_gas", ) """ @@ -388,7 +388,7 @@ def generate_gas_cost_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"{initcode.name}_tx_exact_execution_gas", + name=f"{initcode.name}_exact_execution_gas", ) @@ -602,7 +602,7 @@ def generate_create_opcode_initcode_test_cases( pre=pre, post=post, txs=[tx], - name=f"{opcode}_opcode_{initcode.name}", + name=f"{initcode.name}", ) diff --git a/fillers/example/example.py b/fillers/example/example.py index 77f0fae5448..70753dfd3e7 100644 --- a/fillers/example/example.py +++ b/fillers/example/example.py @@ -57,4 +57,4 @@ def test_yul(fork): ), } - yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="example_yul") + yield StateTest(env=env, pre=pre, post=post, txs=[tx]) diff --git a/fillers/vm/chain_id.py b/fillers/vm/chain_id.py index 81666b4ad2b..a518c016ea1 100644 --- a/fillers/vm/chain_id.py +++ b/fillers/vm/chain_id.py @@ -49,4 +49,4 @@ def test_chain_id(fork): ), } - yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="vm_chain_id") + yield StateTest(env=env, pre=pre, post=post, txs=[tx]) diff --git a/fillers/vm/dup.py b/fillers/vm/dup.py index 2c8d44e8de1..b1a073adb82 100644 --- a/fillers/vm/dup.py +++ b/fillers/vm/dup.py @@ -103,4 +103,4 @@ def test_dup(fork): post[account] = Account(storage=s) - yield StateTest(env=env, pre=pre, post=post, txs=txs, name="vm_dup") + yield StateTest(env=env, pre=pre, post=post, txs=txs) diff --git a/fillers/withdrawals/withdrawals.py b/fillers/withdrawals/withdrawals.py index 9b67d3aaf00..12381545d7c 100644 --- a/fillers/withdrawals/withdrawals.py +++ b/fillers/withdrawals/withdrawals.py @@ -60,7 +60,7 @@ def set_withdrawal_index( @test_from(WITHDRAWALS_FORK) -def test_withdrawals_use_value_in_tx(_): +def test_use_value_in_tx(_): """ Test sending a transaction from an address yet to receive a withdrawal """ @@ -96,7 +96,6 @@ def test_withdrawals_use_value_in_tx(_): pre=pre, post={}, blocks=blocks, - name="withdrawals_use_value_in_tx_invalid", ) blocks = [ @@ -119,12 +118,11 @@ def test_withdrawals_use_value_in_tx(_): pre=pre, post=post, blocks=blocks, - name="withdrawals_use_value_in_tx_valid", ) @test_from(WITHDRAWALS_FORK) -def test_withdrawals_use_value_in_contract(_): +def test_use_value_in_contract(_): """ Test sending value from contract that has not received a withdrawal """ @@ -182,12 +180,11 @@ def test_withdrawals_use_value_in_contract(_): pre=pre, post=post, blocks=blocks, - name="withdrawals_use_value_in_contract", ) @test_from(WITHDRAWALS_FORK) -def test_withdrawals_balance_within_block(_): +def test_balance_within_block(_): """ Test Withdrawal balance increase within the same block, inside contract call. @@ -253,12 +250,11 @@ def test_withdrawals_balance_within_block(_): pre=pre, post=post, blocks=blocks, - name="withdrawals_balance_within_block", ) @test_from(WITHDRAWALS_FORK) -def test_withdrawals_multiple_withdrawals_same_address(_): +def test_multiple_withdrawals_same_address(_): """ Test Withdrawals can be done to the same address multiple times in the same block. @@ -313,7 +309,6 @@ def test_withdrawals_multiple_withdrawals_same_address(_): pre=pre, post=post, blocks=blocks, - name="multiple_withdrawals_same_address", ) # Similar test but now use multiple blocks each with multiple withdrawals @@ -338,12 +333,12 @@ def test_withdrawals_multiple_withdrawals_same_address(_): pre=pre, post=post, blocks=blocks, - name="multiple_withdrawals_same_address", + name="multiple_blocks", ) @test_from(WITHDRAWALS_FORK) -def test_withdrawals_many_withdrawals(_): +def test_many_withdrawals(_): """ Test Withdrawals with a count of N withdrawals in a single block where N is a high number not expected to be seen in mainnet. @@ -380,13 +375,11 @@ def test_withdrawals_many_withdrawals(_): ), ] - yield BlockchainTest( - pre=pre, post=post, blocks=blocks, name="many_withdrawals" - ) + yield BlockchainTest(pre=pre, post=post, blocks=blocks) @test_from(WITHDRAWALS_FORK) -def test_withdrawals_self_destructing_account(_): +def test_self_destructing_account(_): """ Test Withdrawals can be done to self-destructed accounts. Account `0x100` self-destructs and sends all its balance to `0x200`. @@ -440,12 +433,11 @@ def test_withdrawals_self_destructing_account(_): pre=pre, post=post, blocks=[block], - name="withdrawals_self_destructing_account", ) @test_from(WITHDRAWALS_FORK) -def test_withdrawals_newly_created_contract(_): +def test_newly_created_contract(_): """ Test Withdrawing to a newly created contract. """ @@ -493,7 +485,7 @@ def test_withdrawals_newly_created_contract(_): } yield BlockchainTest( - pre=pre, post=post, blocks=[block], name="newly_created_contract" + pre=pre, post=post, blocks=[block] ) # Same test but include value in the contract creating transaction @@ -502,12 +494,12 @@ def test_withdrawals_newly_created_contract(_): post[created_contract].balance = 2 * ONE_GWEI yield BlockchainTest( - pre=pre, post=post, blocks=[block], name="newly_created_contract" + pre=pre, post=post, blocks=[block], name="with_tx_value" ) @test_from(WITHDRAWALS_FORK) -def test_withdrawals_no_evm_execution(_): +def test_no_evm_execution(_): """ Test Withdrawals don't trigger EVM execution. """ @@ -592,13 +584,11 @@ def test_withdrawals_no_evm_execution(_): to_address(0x400): Account(storage={1: 1}), } - yield BlockchainTest( - pre=pre, post=post, blocks=blocks, name="withdrawals_no_evm_execution" - ) + yield BlockchainTest(pre=pre, post=post, blocks=blocks) @test_from(WITHDRAWALS_FORK) -def test_withdrawals_zero_amount(_): +def test_zero_amount(_): """ Test Withdrawals where one of the withdrawal has a zero amount. """ @@ -644,9 +634,7 @@ def test_withdrawals_zero_amount(_): ), } - yield BlockchainTest( - pre=pre, post=post, blocks=[block], name="withdrawals_zero_amount" - ) + yield BlockchainTest(pre=pre, post=post, blocks=[block]) # Same test but add another withdrawal with positive amount in same # block. @@ -659,7 +647,7 @@ def test_withdrawals_zero_amount(_): block.withdrawals.append(withdrawal_2) post[to_address(0x200)].balance = ONE_GWEI yield BlockchainTest( - pre=pre, post=post, blocks=[block], name="withdrawals_zero_amount" + pre=pre, post=post, blocks=[block], name="with_extra_positive_amount" ) # Same test but add another withdrawal with max amount in same @@ -673,17 +661,21 @@ def test_withdrawals_zero_amount(_): block.withdrawals.append(withdrawal_3) post[to_address(0x300)].balance = (2**64 - 1) * ONE_GWEI + yield BlockchainTest( + pre=pre, post=post, blocks=[block], name="with_extra_max_amount" + ) + # Same test but reverse order of withdrawals. block.withdrawals.reverse() set_withdrawal_index(block.withdrawals) yield BlockchainTest( - pre=pre, post=post, blocks=[block], name="withdrawals_zero_amount" + pre=pre, post=post, blocks=[block], name="reverse_withdrawal_order" ) @test_from(WITHDRAWALS_FORK) -def test_large_withdrawals(_: str): +def test_large_amount(_: str): """ Test Withdrawals that have a large gwei amount, so that (gwei * 1e9) could overflow uint64 but not uint256. @@ -721,5 +713,7 @@ def test_large_withdrawals(_: str): ) ] yield BlockchainTest( - pre=pre, post=post, blocks=blocks, name="large_withdrawals" + pre=pre, + post=post, + blocks=blocks, ) From 7a82680101456327753a80c2e28a7fa17173730d Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Wed, 1 Mar 2023 16:55:44 -0600 Subject: [PATCH 05/10] change yielded test name to a yielded test tag. --- fillers/eips/eip3651.py | 4 ++-- fillers/eips/eip3855.py | 14 +++++++------- fillers/eips/eip3860.py | 14 +++++++------- fillers/withdrawals/withdrawals.py | 10 +++++----- src/ethereum_test_tools/filling/fill.py | 4 ++-- src/ethereum_test_tools/spec/base_test.py | 2 +- src/ethereum_test_tools/spec/blockchain_test.py | 2 +- src/ethereum_test_tools/spec/state_test.py | 2 +- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/fillers/eips/eip3651.py b/fillers/eips/eip3651.py index 2a2960236dc..abe756b6b5b 100644 --- a/fillers/eips/eip3651.py +++ b/fillers/eips/eip3651.py @@ -160,7 +160,7 @@ def test_warm_coinbase_call_out_of_gas(fork): pre=pre, post=post, txs=[tx], - name="opcode_" + opcode, + tag="opcode_" + opcode, ) @@ -265,5 +265,5 @@ def test_warm_coinbase_gas_usage(fork): pre=pre, post=post, txs=[tx], - name="opcode_" + opcode.lower(), + tag="opcode_" + opcode.lower(), ) diff --git a/fillers/eips/eip3855.py b/fillers/eips/eip3855.py index fd4f082b9fd..6569ebd2da9 100644 --- a/fillers/eips/eip3855.py +++ b/fillers/eips/eip3855.py @@ -45,7 +45,7 @@ def test_push0(fork): pre[addr_1] = Account(code=code) post[addr_1] = Account(storage={0x00: 0x01}) - yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="key_sstore") + yield StateTest(env=env, pre=pre, post=post, txs=[tx], tag="key_sstore") """ Test case 2: Fill stack with PUSH0, then OR all values and save using @@ -58,7 +58,7 @@ def test_push0(fork): pre[addr_1] = Account(code=code) post[addr_1] = Account(storage={0x00: 0x01}) - yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="fill_stack") + yield StateTest(env=env, pre=pre, post=post, txs=[tx], tag="fill_stack") """ Test case 3: Stack overflow by using PUSH0 1025 times @@ -70,7 +70,7 @@ def test_push0(fork): post[addr_1] = Account(storage={0x00: 0x00}) yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="stack_overflow" + env=env, pre=pre, post=post, txs=[tx], tag="stack_overflow" ) """ @@ -84,7 +84,7 @@ def test_push0(fork): post[addr_1] = Account(storage={0x00: 0x02, 0x01: 0x00}) yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="storage_overwrite" + env=env, pre=pre, post=post, txs=[tx], tag="storage_overwrite" ) """ @@ -114,7 +114,7 @@ def test_push0(fork): post[addr_1] = Account(storage={0x00: 0x01, 0x01: 0xFF}) yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="during_staticcall" + env=env, pre=pre, post=post, txs=[tx], tag="during_staticcall" ) del pre[addr_2] @@ -137,7 +137,7 @@ def test_push0(fork): post[addr_1] = Account(storage={0x00: 0x01}) yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="before_jumpdest" + env=env, pre=pre, post=post, txs=[tx], tag="before_jumpdest" ) """ @@ -151,4 +151,4 @@ def test_push0(fork): pre[addr_1] = Account(code=code) post[addr_1] = Account(storage={0x00: 0x02}) - yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="gas_cost") + yield StateTest(env=env, pre=pre, post=post, txs=[tx], tag="gas_cost") diff --git a/fillers/eips/eip3860.py b/fillers/eips/eip3860.py index 2842c2313e5..469dc084817 100644 --- a/fillers/eips/eip3860.py +++ b/fillers/eips/eip3860.py @@ -167,7 +167,7 @@ def calculate_create_tx_execution_cost( SINGLE_BYTE_INITCODE = Initcode( deploy_code=bytes(), - name="single_byte", + name="single_byte_initcode", ) SINGLE_BYTE_INITCODE.bytecode = Op.STOP SINGLE_BYTE_INITCODE.deployment_gas = 0 @@ -225,7 +225,7 @@ def generate_tx_initcode_limit_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"{initcode.name}", + tag=f"{initcode.name}", ) @@ -315,7 +315,7 @@ def generate_gas_cost_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"{initcode.name}_exact_intrinsic_gas", + tag=f"{initcode.name}_exact_intrinsic_gas", ) """ @@ -341,7 +341,7 @@ def generate_gas_cost_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"{initcode.name}_under_intrinsic_gas", + tag=f"{initcode.name}_under_intrinsic_gas", ) """ @@ -367,7 +367,7 @@ def generate_gas_cost_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"{initcode.name}_under_execution_gas", + tag=f"{initcode.name}_under_execution_gas", ) """ @@ -388,7 +388,7 @@ def generate_gas_cost_test_cases( post=post, blocks=[block], genesis_environment=env, - name=f"{initcode.name}_exact_execution_gas", + tag=f"{initcode.name}_exact_execution_gas", ) @@ -602,7 +602,7 @@ def generate_create_opcode_initcode_test_cases( pre=pre, post=post, txs=[tx], - name=f"{initcode.name}", + tag=f"{initcode.name}", ) diff --git a/fillers/withdrawals/withdrawals.py b/fillers/withdrawals/withdrawals.py index 12381545d7c..fb4606ecc50 100644 --- a/fillers/withdrawals/withdrawals.py +++ b/fillers/withdrawals/withdrawals.py @@ -333,7 +333,7 @@ def test_multiple_withdrawals_same_address(_): pre=pre, post=post, blocks=blocks, - name="multiple_blocks", + tag="multiple_blocks", ) @@ -494,7 +494,7 @@ def test_newly_created_contract(_): post[created_contract].balance = 2 * ONE_GWEI yield BlockchainTest( - pre=pre, post=post, blocks=[block], name="with_tx_value" + pre=pre, post=post, blocks=[block], tag="with_tx_value" ) @@ -647,7 +647,7 @@ def test_zero_amount(_): block.withdrawals.append(withdrawal_2) post[to_address(0x200)].balance = ONE_GWEI yield BlockchainTest( - pre=pre, post=post, blocks=[block], name="with_extra_positive_amount" + pre=pre, post=post, blocks=[block], tag="with_extra_positive_amount" ) # Same test but add another withdrawal with max amount in same @@ -662,7 +662,7 @@ def test_zero_amount(_): post[to_address(0x300)].balance = (2**64 - 1) * ONE_GWEI yield BlockchainTest( - pre=pre, post=post, blocks=[block], name="with_extra_max_amount" + pre=pre, post=post, blocks=[block], tag="with_extra_max_amount" ) # Same test but reverse order of withdrawals. @@ -670,7 +670,7 @@ def test_zero_amount(_): set_withdrawal_index(block.withdrawals) yield BlockchainTest( - pre=pre, post=post, blocks=[block], name="reverse_withdrawal_order" + pre=pre, post=post, blocks=[block], tag="reverse_withdrawal_order" ) diff --git a/src/ethereum_test_tools/filling/fill.py b/src/ethereum_test_tools/filling/fill.py index 3948c44ece6..a0a7516f4d7 100644 --- a/src/ethereum_test_tools/filling/fill.py +++ b/src/ethereum_test_tools/filling/fill.py @@ -49,7 +49,7 @@ def fill_test( eips=eips, ) except Exception as e: - print(f"Exception during test '{test.name}'") + print(f"Exception during test '{test.tag}'") raise e fixture = Fixture( @@ -63,7 +63,7 @@ def fill_test( pre_state=copy(test.pre), post_state=alloc_to_accounts(alloc), seal_engine=engine, - name=test.name, + name=test.tag, index=index, ) fixture.fill_info(t8n, b11r) diff --git a/src/ethereum_test_tools/spec/base_test.py b/src/ethereum_test_tools/spec/base_test.py index 4088fb78c9d..bde3b9b37f4 100644 --- a/src/ethereum_test_tools/spec/base_test.py +++ b/src/ethereum_test_tools/spec/base_test.py @@ -86,7 +86,7 @@ class BaseTest: """ pre: Mapping[str, Account] - name: str = "" + tag: str = "" @abstractmethod def make_genesis( diff --git a/src/ethereum_test_tools/spec/blockchain_test.py b/src/ethereum_test_tools/spec/blockchain_test.py index 10ec2dec845..f0f05bb900d 100644 --- a/src/ethereum_test_tools/spec/blockchain_test.py +++ b/src/ethereum_test_tools/spec/blockchain_test.py @@ -43,7 +43,7 @@ class BlockchainTest(BaseTest): post: Mapping[str, Account] blocks: List[Block] genesis_environment: Environment = Environment() - name: str = "" + tag: str = "" def make_genesis( self, diff --git a/src/ethereum_test_tools/spec/state_test.py b/src/ethereum_test_tools/spec/state_test.py index 3b0acb006ae..e9cd3c2e78b 100644 --- a/src/ethereum_test_tools/spec/state_test.py +++ b/src/ethereum_test_tools/spec/state_test.py @@ -42,7 +42,7 @@ class StateTest(BaseTest): pre: Mapping[str, Account] post: Mapping[str, Account] txs: List[Transaction] - name: str = "" + tag: str = "" def make_genesis( self, From 860c2c9c3645cdadddaaab5c6f7da43ab430bb5f Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Wed, 1 Mar 2023 16:56:26 -0600 Subject: [PATCH 06/10] change logging of tf to be more descriptive. --- src/ethereum_test_filling_tool/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ethereum_test_filling_tool/main.py b/src/ethereum_test_filling_tool/main.py index 634d1539df6..11487a1b199 100755 --- a/src/ethereum_test_filling_tool/main.py +++ b/src/ethereum_test_filling_tool/main.py @@ -136,7 +136,7 @@ def fill(self) -> None: os.makedirs(output_dir, exist_ok=True) path = os.path.join(output_dir, f"{name}.json") - self.log.debug(f"filling {name}") + self.log.debug(f"filling - {path[9:len(path)-5]}") fixture = filler(t8n, b11r, "NoProof") with open(path, "w", encoding="utf-8") as f: From 2c9bba34453c58c8dc512cc8b3ef858d5cf223bf Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Wed, 1 Mar 2023 16:58:50 -0600 Subject: [PATCH 07/10] small tag (name) change. --- fillers/eips/eip3860.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fillers/eips/eip3860.py b/fillers/eips/eip3860.py index 469dc084817..d0f04a8408c 100644 --- a/fillers/eips/eip3860.py +++ b/fillers/eips/eip3860.py @@ -167,7 +167,7 @@ def calculate_create_tx_execution_cost( SINGLE_BYTE_INITCODE = Initcode( deploy_code=bytes(), - name="single_byte_initcode", + name="single_byte", ) SINGLE_BYTE_INITCODE.bytecode = Op.STOP SINGLE_BYTE_INITCODE.deployment_gas = 0 From c755f0442e8d5076fee0b62bcef39b2216e38617 Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Wed, 1 Mar 2023 17:05:26 -0600 Subject: [PATCH 08/10] update logging of tf again. --- src/ethereum_test_filling_tool/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ethereum_test_filling_tool/main.py b/src/ethereum_test_filling_tool/main.py index 11487a1b199..c08dc0f9163 100755 --- a/src/ethereum_test_filling_tool/main.py +++ b/src/ethereum_test_filling_tool/main.py @@ -136,7 +136,8 @@ def fill(self) -> None: os.makedirs(output_dir, exist_ok=True) path = os.path.join(output_dir, f"{name}.json") - self.log.debug(f"filling - {path[9:len(path)-5]}") + name = path[9 : len(path) - 5].replace("/", ".") + self.log.debug(f"filling - {name}") fixture = filler(t8n, b11r, "NoProof") with open(path, "w", encoding="utf-8") as f: From 368e2cb164d97053e838c8c61c2c0ca9308fb44a Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Thu, 2 Mar 2023 17:29:33 -0600 Subject: [PATCH 09/10] fixture name: _ changed to / --- src/ethereum_test_tools/filling/fill.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ethereum_test_tools/filling/fill.py b/src/ethereum_test_tools/filling/fill.py index a0a7516f4d7..fb698e95a36 100644 --- a/src/ethereum_test_tools/filling/fill.py +++ b/src/ethereum_test_tools/filling/fill.py @@ -73,8 +73,8 @@ def fill_test( for fixture in fixtures: name = str(fixture.index).zfill(3) if fixture.name: - name += "_" + fixture.name.replace(" ", "_") - name += "_" + fixture.fork.lower() + name += "/" + fixture.name.replace(" ", "/") + name += "/" + fixture.fork.lower() out[name] = fixture return out From 674f84b906ff02c422ae4f18ac474d9d6e5925be Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Mon, 6 Mar 2023 18:07:37 -0600 Subject: [PATCH 10/10] update test fixtures in accordance with the previous zero gasUsed state test change. --- fillers/withdrawals/withdrawals.py | 4 +--- src/ethereum_test_tools/tests/test_filler.py | 10 +++++----- .../blockchain_london_invalid_filled.json | 2 +- .../blockchain_london_valid_filled.json | 2 +- .../test_fixtures/chainid_istanbul_filled.json | 16 ++++++++-------- .../test_fixtures/chainid_london_filled.json | 16 ++++++++-------- 6 files changed, 24 insertions(+), 26 deletions(-) diff --git a/fillers/withdrawals/withdrawals.py b/fillers/withdrawals/withdrawals.py index fb4606ecc50..28efff3e971 100644 --- a/fillers/withdrawals/withdrawals.py +++ b/fillers/withdrawals/withdrawals.py @@ -484,9 +484,7 @@ def test_newly_created_contract(_): ), } - yield BlockchainTest( - pre=pre, post=post, blocks=[block] - ) + yield BlockchainTest(pre=pre, post=post, blocks=[block]) # Same test but include value in the contract creating transaction diff --git a/src/ethereum_test_tools/tests/test_filler.py b/src/ethereum_test_tools/tests/test_filler.py index 0a80109937c..972619f4473 100644 --- a/src/ethereum_test_tools/tests/test_filler.py +++ b/src/ethereum_test_tools/tests/test_filler.py @@ -31,7 +31,7 @@ def remove_info(fixture_json: Dict[str, Any]): @pytest.mark.parametrize( - "fork,hash", [("Berlin", "0x87c5fa7cef8b"), ("London", "0xe3c84688fa32")] + "fork,hash", [("Berlin", "0x193e550de"), ("London", "0xb053deac0")] ) def test_make_genesis(fork: str, hash: str): env = Environment() @@ -59,7 +59,7 @@ def test_make_genesis(fork: str, hash: str): t8n = EvmTransitionTool() _, genesis = StateTest( - env=env, pre=pre, post={}, txs=[], name="some_state_test" + env=env, pre=pre, post={}, txs=[], tag="some_state_test" ).make_genesis(b11r, t8n, fork) assert genesis.hash is not None assert genesis.hash.startswith(hash) @@ -111,7 +111,7 @@ def test_fill_state_test(fork: str, expected_json_file: str): def generator(_) -> Generator[StateTest, None, None]: yield StateTest( - env=env, pre=pre, post=post, txs=[tx], name="my_chain_id_test" + env=env, pre=pre, post=post, txs=[tx], tag="my_chain_id_test" ) b11r = EvmBlockBuilder() @@ -390,7 +390,7 @@ def generator(_) -> Generator[BlockchainTest, None, None]: post=post, blocks=blocks, genesis_environment=genesis_environment, - name="my_blockchain_test", + tag="my_blockchain_test", ) b11r = EvmBlockBuilder() @@ -718,7 +718,7 @@ def generator(_) -> Generator[BlockchainTest, None, None]: post=post, blocks=blocks, genesis_environment=genesis_environment, - name="my_blockchain_test", + tag="my_blockchain_test", ) b11r = EvmBlockBuilder() diff --git a/src/ethereum_test_tools/tests/test_fixtures/blockchain_london_invalid_filled.json b/src/ethereum_test_tools/tests/test_fixtures/blockchain_london_invalid_filled.json index 2af8d707e21..35556ee78d5 100644 --- a/src/ethereum_test_tools/tests/test_fixtures/blockchain_london_invalid_filled.json +++ b/src/ethereum_test_tools/tests/test_fixtures/blockchain_london_invalid_filled.json @@ -1,5 +1,5 @@ { - "000_my_blockchain_test_london": { + "000/my_blockchain_test/london": { "blocks": [ { "rlp": "0xf9026ef901fea06241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a03eb2e72e8ed9a59768bb9ac05915b781a764f2582edcf111053fe6531e466613a0586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017ba029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000188016345785d8a0000830155340c80a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082036bf86ab86802f8650180018203e8830f424094cccccccccccccccccccccccccccccccccccccccc8001c080a03351b6993208fc7b03fd770c8c06440cfb0d75b29aafee0a4c64c8ba20a80e58a067817fdb3058e75c5d26e51a33d1e338346bc7d406e115447a4bb5f7ab01625bc0", diff --git a/src/ethereum_test_tools/tests/test_fixtures/blockchain_london_valid_filled.json b/src/ethereum_test_tools/tests/test_fixtures/blockchain_london_valid_filled.json index 512eabdd8e0..9200b1e5d20 100644 --- a/src/ethereum_test_tools/tests/test_fixtures/blockchain_london_valid_filled.json +++ b/src/ethereum_test_tools/tests/test_fixtures/blockchain_london_valid_filled.json @@ -1,5 +1,5 @@ { - "000_my_blockchain_test_london": { + "000/my_blockchain_test/london": { "blocks": [ { "rlp": "0xf9026ef901fea06241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a03eb2e72e8ed9a59768bb9ac05915b781a764f2582edcf111053fe6531e466613a0586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017ba029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000188016345785d8a0000830155340c80a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082036bf86ab86802f8650180018203e8830f424094cccccccccccccccccccccccccccccccccccccccc8001c080a03351b6993208fc7b03fd770c8c06440cfb0d75b29aafee0a4c64c8ba20a80e58a067817fdb3058e75c5d26e51a33d1e338346bc7d406e115447a4bb5f7ab01625bc0", diff --git a/src/ethereum_test_tools/tests/test_fixtures/chainid_istanbul_filled.json b/src/ethereum_test_tools/tests/test_fixtures/chainid_istanbul_filled.json index 21c1e3d4c2a..c811d5d717c 100644 --- a/src/ethereum_test_tools/tests/test_fixtures/chainid_istanbul_filled.json +++ b/src/ethereum_test_tools/tests/test_fixtures/chainid_istanbul_filled.json @@ -1,10 +1,10 @@ { - "000_my_chain_id_test_istanbul": { + "000/my_chain_id_test/istanbul": { "blocks": [ { - "rlp": "0xf90262f901f9a007a0192766c62d9bdb9e357ebdffd4d8c1d12c15b467c453772c3f8027f02886a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0330a7882a8fadd60d0b6bf3d8ce7a8ae024800ae31ad8fae24d654a6a83fcad6a08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0fa9e942c7bab1017c29ab8b7f9484e311f3a2ba680c2ec8abbaea2365cecc93eb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a02d8203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", + "rlp": "0xf90262f901f9a0fcf37297d9e49a1c75e6d18f0e490d1c0ecb3c49cb464f4fd95bb224a8262bdaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0330a7882a8fadd60d0b6bf3d8ce7a8ae024800ae31ad8fae24d654a6a83fcad6a08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0fa9e942c7bab1017c29ab8b7f9484e311f3a2ba680c2ec8abbaea2365cecc93eb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a02d8203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", "blockHeader": { - "parentHash": "0x07a0192766c62d9bdb9e357ebdffd4d8c1d12c15b467c453772c3f8027f02886", + "parentHash": "0xfcf37297d9e49a1c75e6d18f0e490d1c0ecb3c49cb464f4fd95bb224a8262bda", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "stateRoot": "0x330a7882a8fadd60d0b6bf3d8ce7a8ae024800ae31ad8fae24d654a6a83fcad6", @@ -19,7 +19,7 @@ "extraData": "0x00", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "hash": "0xe1eaa067c6bc24e4dd3dc7e2a8cff9d7dcc8783548228b1e0f85bdff2bfd087c" + "hash": "0xc413245fffae8b7c6392bcd3dfbbdee24118e94d9a58722a7abd91a4e1d048b7" }, "transactions": [ { @@ -46,15 +46,15 @@ "difficulty": "0x020000", "number": "0x00", "gasLimit": "0x02540be400", - "gasUsed": "0x012a05f200", + "gasUsed": "0x00", "timestamp": "0x00", "extraData": "0x00", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "hash": "0x07a0192766c62d9bdb9e357ebdffd4d8c1d12c15b467c453772c3f8027f02886" + "hash": "0xfcf37297d9e49a1c75e6d18f0e490d1c0ecb3c49cb464f4fd95bb224a8262bda" }, - "genesisRLP": "0xf901fff901faa00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be40085012a05f2008000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", - "lastblockhash": "0xe1eaa067c6bc24e4dd3dc7e2a8cff9d7dcc8783548228b1e0f85bdff2bfd087c", + "genesisRLP": "0xf901faf901f5a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be400808000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", + "lastblockhash": "0xc413245fffae8b7c6392bcd3dfbbdee24118e94d9a58722a7abd91a4e1d048b7", "network": "Istanbul", "pre": { "0x1000000000000000000000000000000000000000": { diff --git a/src/ethereum_test_tools/tests/test_fixtures/chainid_london_filled.json b/src/ethereum_test_tools/tests/test_fixtures/chainid_london_filled.json index 39e40c9c115..6562721cb67 100644 --- a/src/ethereum_test_tools/tests/test_fixtures/chainid_london_filled.json +++ b/src/ethereum_test_tools/tests/test_fixtures/chainid_london_filled.json @@ -1,10 +1,10 @@ { - "000_my_chain_id_test_london": { + "000/my_chain_id_test/london": { "blocks": [ { - "rlp": "0xf90263f901faa0c23ec9a992cd009c20de66b8b0b54f358f1b684ed55f841d71aa5031e1c11b5fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0a48abc194fdd8e58a32a90874e9144e19eb68306ec5e51bca9389d1043eeb20fa08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0c598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0ab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a8618203e800a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", + "rlp": "0xf90263f901faa0107e91b6c929ab8d50e2de4f3952d602f5531b3f5348430b4005fbbf9d195375a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0a48abc194fdd8e58a32a90874e9144e19eb68306ec5e51bca9389d1043eeb20fa08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0c598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0ab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a8618203e800a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", "blockHeader": { - "parentHash": "0xc23ec9a992cd009c20de66b8b0b54f358f1b684ed55f841d71aa5031e1c11b5f", + "parentHash": "0x107e91b6c929ab8d50e2de4f3952d602f5531b3f5348430b4005fbbf9d195375", "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "stateRoot": "0xa48abc194fdd8e58a32a90874e9144e19eb68306ec5e51bca9389d1043eeb20f", @@ -20,7 +20,7 @@ "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "baseFeePerGas": "0x07", - "hash": "0x1efac4df8d7cb16ef204132c796dba20ecda56a5bcd60be83eddd22330a0402a" + "hash": "0xe05293fe6050385e463d93c310bc52f87715f509aeb036455bbe4597cf36706a" }, "transactions": [ { @@ -47,16 +47,16 @@ "difficulty": "0x020000", "number": "0x00", "gasLimit": "0x02540be400", - "gasUsed": "0x012a05f200", + "gasUsed": "0x00", "timestamp": "0x00", "extraData": "0x00", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "baseFeePerGas": "0x07", - "hash": "0xc23ec9a992cd009c20de66b8b0b54f358f1b684ed55f841d71aa5031e1c11b5f" + "hash": "0x107e91b6c929ab8d50e2de4f3952d602f5531b3f5348430b4005fbbf9d195375" }, - "genesisRLP": "0xf90200f901fba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be40085012a05f2008000a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007c0c0", - "lastblockhash": "0x1efac4df8d7cb16ef204132c796dba20ecda56a5bcd60be83eddd22330a0402a", + "genesisRLP": "0xf901fbf901f6a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be400808000a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007c0c0", + "lastblockhash": "0xe05293fe6050385e463d93c310bc52f87715f509aeb036455bbe4597cf36706a", "network": "London", "pre": { "0x1000000000000000000000000000000000000000": {