From f306d8e266567e8fb3dcc6e1ef126134dbb60401 Mon Sep 17 00:00:00 2001 From: Spencer Taylor-Brown Date: Mon, 6 Feb 2023 13:42:16 -0600 Subject: [PATCH] Update existing fixture test format to export correct schema (#47) * Add function to correctly represent post accounts. * Add function to correctly pad fields within pre/post accounts. * Remove print statement :D * Update framework tests to have correct format. * Fix added format bug. * Update test fixtures due to bug. * Function refactor to work with other fields. * Add format filters to blockHeader and genesisBlockHeader. * Update test fixtures with formatted blockHeader and genesisBlockHeader. * Filter all coinbase and all hashes from reformating in blockHeader and genesisBlockHeader. * Filter trie's and bloom from reformating in blockHeader and genesisBlockHeader. * Add chainName/transactions/uncleHeader/withdrawals. * Unrelated additions to gitignore. * Fix format for block transactions. * Review changes, whitelist addition, more formatting. * Refactor helper function, add tests for them, fix for shanghai withdrawals only. --------- Co-authored-by: Mario Vega --- .gitignore | 5 +- src/ethereum_test_tools/common/__init__.py | 8 + src/ethereum_test_tools/common/types.py | 122 ++++++- src/ethereum_test_tools/filling/fill.py | 4 +- .../spec/blockchain_test.py | 3 + src/ethereum_test_tools/spec/state_test.py | 6 +- .../blockchain_london_invalid_filled.json | 321 ++++++++++++------ .../blockchain_london_valid_filled.json | 313 +++++++++++------ .../chainid_istanbul_filled.json | 170 +++++----- .../test_fixtures/chainid_london_filled.json | 174 +++++----- src/ethereum_test_tools/tests/test_types.py | 83 ++++- whitelist.txt | 2 + 12 files changed, 833 insertions(+), 378 deletions(-) diff --git a/.gitignore b/.gitignore index 353d297702f..a8545efa6a2 100644 --- a/.gitignore +++ b/.gitignore @@ -48,5 +48,8 @@ pip-delete-this-directory.txt .coverage # misc - +.vscode *.code-workspace + +# docs +_readthedocs \ No newline at end of file diff --git a/src/ethereum_test_tools/common/__init__.py b/src/ethereum_test_tools/common/__init__.py index 01dcb9ee4a4..50db4e5d153 100644 --- a/src/ethereum_test_tools/common/__init__.py +++ b/src/ethereum_test_tools/common/__init__.py @@ -27,6 +27,10 @@ Storage, Transaction, Withdrawal, + alloc_to_accounts, + even_padding, + key_value_padding, + storage_padding, str_or_none, to_json, to_json_or_none, @@ -48,10 +52,14 @@ "TestPrivateKey", "Transaction", "Withdrawal", + "alloc_to_accounts", + "even_padding", "ceiling_division", "compute_create2_address", "compute_create_address", "eip_2028_transaction_data_cost", + "key_value_padding", + "storage_padding", "str_or_none", "to_address", "to_hash", diff --git a/src/ethereum_test_tools/common/types.py b/src/ethereum_test_tools/common/types.py index de7b9cf03ce..559f5a06c6b 100644 --- a/src/ethereum_test_tools/common/types.py +++ b/src/ethereum_test_tools/common/types.py @@ -260,6 +260,15 @@ def must_be_equal(self, other: "Storage"): raise Storage.KeyValueMismatch(key, 0, other.data[key]) +def storage_padding(storage: Dict) -> Dict: + """ + Adds even padding to each storage element. + """ + return { + key_value_padding(k): key_value_padding(v) for k, v in storage.items() + } + + @dataclass(kw_only=True) class Account: """ @@ -425,6 +434,22 @@ def with_code(cls: Type, code: bytes | str | Code) -> "Account": return Account(nonce=1, code=code) +def alloc_to_accounts(got_alloc: Dict[str, Any]) -> Mapping[str, Account]: + """ + Converts the post state alloc returned from t8n to a mapping of accounts. + """ + accounts = {} + for address, value in got_alloc.items(): + account = Account( + nonce=int_or_none(value.get("nonce", None)), + balance=int_or_none(value.get("balance", None)), + code=value.get("code", None), + storage=value.get("storage", None), + ) + accounts[address] = account + return accounts + + ACCOUNT_DEFAULTS = Account(nonce=0, balance=0, code=bytes(), storage={}) @@ -832,7 +857,9 @@ class FixtureBlock: block_header: Optional[FixtureHeader] = None expected_exception: Optional[str] = None block_number: Optional[int] = None - chain_name: Optional[str] = None + txs: Optional[List[Transaction]] = None + ommers: Optional[List[Header]] = None + withdrawals: Optional[List[Withdrawal]] = None @dataclass(kw_only=True) @@ -879,9 +906,9 @@ def default(self, obj): obj.balance, hex(ACCOUNT_DEFAULTS.balance) ), "code": code_or_none(obj.code, "0x"), - "storage": to_json_or_none(obj.storage, {}), + "storage": storage_padding(to_json_or_none(obj.storage, {})), } - return account + return even_padding(account, excluded=["storage"]) elif isinstance(obj, Transaction): tx = { "type": hex(obj.ty), @@ -912,12 +939,13 @@ def default(self, obj): return {k: v for (k, v) in tx.items() if v is not None} elif isinstance(obj, Withdrawal): - return { + withdrawal = { "index": hex(obj.index), "validatorIndex": hex(obj.validator), "address": obj.address, "amount": hex(obj.amount), } + return withdrawal elif isinstance(obj, Environment): env = { "currentCoinbase": obj.coinbase, @@ -967,11 +995,52 @@ def default(self, obj): header["hash"] = obj.hash if obj.withdrawals_root is not None: header["withdrawalsRoot"] = obj.withdrawals_root - return header + return even_padding( + header, + excluded=[ + "parentHash", + "uncleHash", + "coinbase", + "transactionsTrie", + "receiptTrie", + "bloom", + "nonce", + "mixHash", + "hash", + "withdrawalsRoot", + ], + ) elif isinstance(obj, FixtureBlock): - b = { - "rlp": obj.rlp, - } + # Format Fixture Block Txs + b_txs = [ + even_padding( + to_json( + { + "nonce": hex(tx.nonce), + "to": tx.to if tx.to is not None else "", + "value": hex(tx.value), + "data": code_to_hex(tx.data), + "gasLimit": hex_or_none(tx.gas_limit), + "gasPrice": hex(tx.gas_price) + if tx.gas_price is not None + else "0x0A", + "secretKey": tx.secret_key, + } + ), + excluded=["to"], + ) + for tx in obj.txs or [] + ] + + # Format Fixture Block Withdrawals + b_wds = [] + if obj.withdrawals: + b_wds = [ + even_padding(to_json(wd), excluded=["address"]) + for wd in obj.withdrawals + ] + + b = {"rlp": obj.rlp} if obj.block_header is not None: b["blockHeader"] = json.loads( json.dumps(obj.block_header, cls=JSONEncoder) @@ -980,8 +1049,12 @@ def default(self, obj): b["expectException"] = obj.expected_exception if obj.block_number is not None: b["blocknumber"] = str(obj.block_number) - if obj.chain_name is not None: - b["chainname"] = obj.chain_name + if obj.txs is not None: + b["transactions"] = b_txs + if obj.ommers is not None: + b["uncleHeaders"] = obj.ommers + if obj.withdrawals is not None: + b["withdrawals"] = b_wds return b elif isinstance(obj, Fixture): f = { @@ -1005,3 +1078,32 @@ def default(self, obj): return f else: return super().default(obj) + + +def even_padding(input: Dict, excluded: List[Any | None]) -> Dict: + """ + Adds even padding to each field in the input (nested) dictionary. + """ + for key, value in input.items(): + if key not in excluded: + if isinstance(value, dict): + even_padding(value, excluded) + elif value != "0x" and value is not None: + input[key] = key_value_padding(value) + else: + input[key] = "0x" + return input + + +def key_value_padding(value: str) -> str: + """ + Adds even padding to a dictionary key or value string. + """ + if value is not None: + new_value = value.lstrip("0x").lstrip("0") + new_value = "00" if new_value == "" else new_value + if len(new_value) % 2 == 1: + new_value = "0" + new_value + return "0x" + new_value + else: + return "0x" diff --git a/src/ethereum_test_tools/filling/fill.py b/src/ethereum_test_tools/filling/fill.py index cfe6e4221b2..72fec42012f 100644 --- a/src/ethereum_test_tools/filling/fill.py +++ b/src/ethereum_test_tools/filling/fill.py @@ -7,7 +7,7 @@ from evm_block_builder import BlockBuilder from evm_transition_tool import TransitionTool, map_fork -from ..common import Fixture +from ..common import Fixture, alloc_to_accounts from ..spec import TestSpec from ..vm.fork import get_reward @@ -63,7 +63,7 @@ def fill_test( if eips is not None else fork, pre_state=copy(test.pre), - post_state=alloc, + post_state=alloc_to_accounts(alloc), seal_engine=engine, name=test.name, index=index, diff --git a/src/ethereum_test_tools/spec/blockchain_test.py b/src/ethereum_test_tools/spec/blockchain_test.py index 7c038cfb2d3..10ec2dec845 100644 --- a/src/ethereum_test_tools/spec/blockchain_test.py +++ b/src/ethereum_test_tools/spec/blockchain_test.py @@ -194,6 +194,9 @@ def make_block( rlp=rlp, block_header=header, block_number=header.number, + txs=block.txs if block.txs is not None else [], + ommers=[], + withdrawals=env.withdrawals, ), env.apply_new_parent(header), next_alloc, diff --git a/src/ethereum_test_tools/spec/state_test.py b/src/ethereum_test_tools/spec/state_test.py index 46c8449ca8d..32b9fa4806c 100644 --- a/src/ethereum_test_tools/spec/state_test.py +++ b/src/ethereum_test_tools/spec/state_test.py @@ -105,7 +105,6 @@ def make_blocks( Raises exception on invalid test behavior. """ env = self.env.apply_new_parent(genesis) - env = set_fork_requirements(env, fork) (alloc, result, txs_rlp) = t8n.evaluate( @@ -152,6 +151,7 @@ def make_blocks( "baseFeePerGas": result.get("currentBaseFee"), } ) + block, head = b11r.build( header=header.to_geth_dict(), txs=txs_rlp, @@ -159,11 +159,15 @@ def make_blocks( withdrawals=to_json_or_none(env.withdrawals), ) header.hash = head + return ( [ FixtureBlock( rlp=block, block_header=header, + txs=self.txs if self.txs is not None else [], + ommers=[], + withdrawals=env.withdrawals, ) ], head, 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 3be6f83f542..2af8d707e21 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 @@ -2,7 +2,6 @@ "000_my_blockchain_test_london": { "blocks": [ { - "blocknumber": "1", "rlp": "0xf9026ef901fea06241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a03eb2e72e8ed9a59768bb9ac05915b781a764f2582edcf111053fe6531e466613a0586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017ba029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000188016345785d8a0000830155340c80a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082036bf86ab86802f8650180018203e8830f424094cccccccccccccccccccccccccccccccccccccccc8001c080a03351b6993208fc7b03fd770c8c06440cfb0d75b29aafee0a4c64c8ba20a80e58a067817fdb3058e75c5d26e51a33d1e338346bc7d406e115447a4bb5f7ab01625bc0", "blockHeader": { "parentHash": "0x6241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957c", @@ -12,20 +11,32 @@ "transactionsTrie": "0x586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017b", "receiptTrie": "0x29b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x1", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x15534", - "timestamp": "0xc", + "difficulty": "0x020000", + "number": "0x01", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x015534", + "timestamp": "0x0c", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x36b", + "baseFeePerGas": "0x036b", "hash": "0x12bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586e" - } + }, + "blocknumber": "1", + "transactions": [ + { + "nonce": "0x00", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "value": "0x00", + "data": "0x01", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] }, { - "blocknumber": "2", "rlp": "0xf90349f901fea012bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0d9d9cc8ae73834ba9dc75fe8c68d36e980c82fcaf887dc220a05f152a327ae55a05521d9ad5adef72f021e4270a1f6851ca772dd56acaf4ff03362151bfb715298a0e225d44649351c3dccc61c1d904451d6f0f5a407c072099fe1085cfad88447d6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000288016345785d8a000083053c421880a000000000000000000000000000000000000000000000000000000000000000008800000000000000008202fef90144b86a02f86701010a8203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820201c080a06ea285a870a051df2b8c80c462b7d3517f984815e09c4748efc8548a40434050a052f635268c1b9e1538ac76b37cb69c7b897595744d6de2dda9507b6624d352d0b86a02f8670102648203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820202c080a0218549e818b36b3823c3f11a65ab5c1e16f6886469c385503cc2f1af1f53825da058b082850f55fd61290a99add11b7af6356ac8d55fbe4d513f06bf648824a64db86a02f8670103648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820203c001a0339e9ed3f6342f2644e4cd33a775b7e62a8208a137dcf2e354c7473caa77782aa074004c85b651c8ca9828aac28414997f3eff46edbba2bb606a545d95fd4c9b3ac0", "blockHeader": { "parentHash": "0x12bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586e", @@ -35,25 +46,55 @@ "transactionsTrie": "0x5521d9ad5adef72f021e4270a1f6851ca772dd56acaf4ff03362151bfb715298", "receiptTrie": "0xe225d44649351c3dccc61c1d904451d6f0f5a407c072099fe1085cfad88447d6", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x2", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x53c42", + "difficulty": "0x020000", + "number": "0x02", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x053c42", "timestamp": "0x18", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x2fe", + "baseFeePerGas": "0x02fe", "hash": "0x0e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010" - } + }, + "blocknumber": "2", + "transactions": [ + { + "nonce": "0x01", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "value": "0x00", + "data": "0x0201", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x02", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCD", + "value": "0x00", + "data": "0x0202", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x03", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE", + "value": "0x00", + "data": "0x0203", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] }, { - "blocknumber": "3", "rlp": "0xf902e1f901fea00e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a069f3a735c7a7e1ea24a03a7107eba6a880d2d0251aaf24eaa7f109ece7969bf9a0ab28cd18f912c2177d3f787591ccc9ba7742c877cdeabe0098e7263ead8893c1a0976beb67b634171d419ef326220dfdda98074e3495940240a105e17643f0a4efb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000388016345785d8a0000830155442480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082029ff8ddb86c02f86901048203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820301c001a0720e2870881f8b0e285b7ec02c169f1165847bcb5f36ea5f33f3db6079854f63a04448266b715d7d99acd1e31dcab50d7119faa620d44c69b3f64f97d636634169b86d02f86a0105830186a08203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820302c080a06c7fb2be7e001a210d72480522b9ebecade52d721360ce5242e34a6c05a02715a01220e3cb7418cd6294443b38d05f5ed9f2967b182d25c784e11e7863454b8f9bc0", - "expectException": "invalid transaction" + "expectException": "invalid transaction", + "blocknumber": "3" }, { - "blocknumber": "3", "rlp": "0xf9034ff901fea00e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0bb08d7ca9c904f3d01b78041a9d70f69e83b0a6ec7af471cbd00933a47fdacaea027f7b224df1d270bfa03ba564cd4962071b89f91c965dbbfacff55e7ec66c652a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000388016345785d8a000083053c422480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082029ff9014ab86c02f86901048203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820301c001a0720e2870881f8b0e285b7ec02c169f1165847bcb5f36ea5f33f3db6079854f63a04448266b715d7d99acd1e31dcab50d7119faa620d44c69b3f64f97d636634169b86a02f8670105648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820303c080a09c8531a41f9281633470c5e12b6c72c8930409a6433f26bf7b394a703d18512ea07a0c6151fde75f10a7e4efdd17a21f1f25206559bd4b8cf7880e5bc30e1cfe33b86e02f86b0106830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820304c001a0c8b85e158b532a0e3b3b5848fad0f4d5c6807805a4ce65e8591de13a62f3ac6aa03e923eb1be030c3ca69623f31ad3a357368b1ccb7ee48ac8deec5cb5dc49cb0cc0", "blockHeader": { "parentHash": "0x0e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010", @@ -63,25 +104,55 @@ "transactionsTrie": "0x27f7b224df1d270bfa03ba564cd4962071b89f91c965dbbfacff55e7ec66c652", "receiptTrie": "0xf42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2e", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x3", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x53c42", + "difficulty": "0x020000", + "number": "0x03", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x053c42", "timestamp": "0x24", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x29f", + "baseFeePerGas": "0x029f", "hash": "0x5c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8e" - } + }, + "blocknumber": "3", + "transactions": [ + { + "nonce": "0x04", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "value": "0x00", + "data": "0x0301", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x05", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE", + "value": "0x00", + "data": "0x0303", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x06", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCD", + "value": "0x00", + "data": "0x0304", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] }, { - "blocknumber": "4", "rlp": "0xf902e1f901fea05c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0e834ba6cd27f2702b0adf2ef6a85e2fbc340fb948c96e75b674e9a73a5dbc3d1a04ed2c2147e0a0d1c248330338f51778f350af8c209c528799278ac980786632ea0976beb67b634171d419ef326220dfdda98074e3495940240a105e17643f0a4efb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000488016345785d8a0000830155443080a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082024cf8ddb86c02f86901078203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820401c001a0113c54f83e1b1e5c689ba86d288ec0ce2877f350b71821c4c7a3f7073b46602ca0548848e711b86ceeb657fd0a0bf44b792f6665ed18ec8a04f498471e811f8f97b86d02f86a0108830186a08203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820402c001a0ebc8ad530ec3d510998aa2485763fcd1c6958c900c8d8ae6eaf86e1eddde8b23a0341e4a021f7b77da28d853c07d11253b92331ab640ad3f28f5d7b2cdbc7ceca7c0", - "expectException": "invalid transaction" + "expectException": "invalid transaction", + "blocknumber": "4" }, { - "blocknumber": "4", "rlp": "0xf9034ff901fea05c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0e2b2b992b108bcd0e036067ef693f2d1b94c2f48d074a4f6b9d98537bbf15e9aa07617400c1efcb3e64b8cf55ccaaae8e335621bd6897b5e439d93b8dc011a4331a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000488016345785d8a000083053c423080a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082024cf9014ab86c02f86901078203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820401c001a0113c54f83e1b1e5c689ba86d288ec0ce2877f350b71821c4c7a3f7073b46602ca0548848e711b86ceeb657fd0a0bf44b792f6665ed18ec8a04f498471e811f8f97b86a02f8670108648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820403c080a08d7ec1116399aab6e1297b09302b291d73c5898a0338fb62a46c74b037d15a15a03cacc1a12eb47c261394443d490b8436f53a99d2109dac9ca5018cf531e6b29db86e02f86b0109830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820404c001a054bd3a30ee3c2182d92f30223adb53feb0f51d76970a2628d9479536ff3edfe9a06f681aa0ad9362eeeafb981394526ca6425f3a24e1c7f44c413b68dd2e56e5d0c0", "blockHeader": { "parentHash": "0x5c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8e", @@ -91,17 +162,48 @@ "transactionsTrie": "0x7617400c1efcb3e64b8cf55ccaaae8e335621bd6897b5e439d93b8dc011a4331", "receiptTrie": "0xf42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2e", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x4", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x53c42", + "difficulty": "0x020000", + "number": "0x04", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x053c42", "timestamp": "0x30", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x24c", + "baseFeePerGas": "0x024c", "hash": "0xf5e2f23d9a212edbb35a07bc9f582f4a632b694bd4ef8742de8ad6c6acacf72c" - } + }, + "blocknumber": "4", + "transactions": [ + { + "nonce": "0x07", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "value": "0x00", + "data": "0x0401", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x08", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE", + "value": "0x00", + "data": "0x0403", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x09", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCD", + "value": "0x00", + "data": "0x0404", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] } ], "genesisBlockHeader": { @@ -112,15 +214,15 @@ "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x0", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x0", - "timestamp": "0x0", + "difficulty": "0x020000", + "number": "0x00", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x00", + "timestamp": "0x00", "extraData": "0x00", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x3e8", + "baseFeePerGas": "0x03e8", "hash": "0x6241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957c" }, "genesisRLP": "0xf90200f901fba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a089a5be1d3306f6f05b42678ef13ac3dbc37bef9a2a80862c21eb22eee29194c2a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008088016345785d8a0000808000a000000000000000000000000000000000000000000000000000000000000000008800000000000000008203e8c0c0", @@ -128,120 +230,127 @@ "network": "London", "pre": { "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x0", - "balance": "0x1000000000000000000", + "nonce": "0x00", + "balance": "0x01000000000000000000", "code": "0x", "storage": {} }, "0xd02d72E067e77158444ef2020Ff2d325f929B363": { - "nonce": "0x1", - "balance": "0x1000000000000000000", + "nonce": "0x01", + "balance": "0x01000000000000000000", "code": "0x", "storage": {} }, "0xcccccccccccccccccccccccccccccccccccccccc": { - "nonce": "0x1", - "balance": "0x10000000000", + "nonce": "0x01", + "balance": "0x010000000000", "code": "0x484355483a036110004301554761200043015500", "storage": {} }, "0xcccccccccccccccccccccccccccccccccccccccd": { - "nonce": "0x1", - "balance": "0x20000000000", + "nonce": "0x01", + "balance": "0x020000000000", "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", "storage": {} }, "0x000000000000000000000000000000000000c0de": { - "nonce": "0x1", - "balance": "0x0", + "nonce": "0x01", + "balance": "0x00", "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", "storage": {} }, "0xccccccccccccccccccccccccccccccccccccccce": { - "nonce": "0x1", - "balance": "0x20000000000", + "nonce": "0x01", + "balance": "0x020000000000", "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", "storage": {} } }, "postState": { "0x000000000000000000000000000000000000c0de": { + "nonce": "0x01", + "balance": "0x3000", "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000002fe", - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000000000000000000000000000000000000000029f", - "0x0000000000000000000000000000000000000000000000000000000000000004": "0x000000000000000000000000000000000000000000000000000000000000024c", - "0x0000000000000000000000000000000000000000000000000000000000001002": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001003": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001004": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000002002": "0x0000000000000000000000000000000000000000000000000000000000001000", - "0x0000000000000000000000000000000000000000000000000000000000002003": "0x0000000000000000000000000000000000000000000000000000000000002000", - "0x0000000000000000000000000000000000000000000000000000000000002004": "0x0000000000000000000000000000000000000000000000000000000000003000" - }, - "balance": "0x3000", - "nonce": "0x1" + "0x02": "0x02fe", + "0x03": "0x029f", + "0x04": "0x024c", + "0x1002": "0x64", + "0x1003": "0x64", + "0x1004": "0x64", + "0x2002": "0x1000", + "0x2003": "0x2000", + "0x2004": "0x3000" + } }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x0a", "balance": "0xfffffffffba0afe5e7", - "nonce": "0xa" + "code": "0x", + "storage": {} }, "0xba5e000000000000000000000000000000000000": { - "balance": "0x6f05b5a16c783b4b" + "nonce": "0x00", + "balance": "0x6f05b5a16c783b4b", + "code": "0x", + "storage": {} }, "0xcccccccccccccccccccccccccccccccccccccccc": { + "nonce": "0x01", + "balance": "0x010000000000", "code": "0x484355483a036110004301554761200043015500", "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x000000000000000000000000000000000000000000000000000000000000036b", - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000002fe", - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000000000000000000000000000000000000000029f", - "0x0000000000000000000000000000000000000000000000000000000000000004": "0x000000000000000000000000000000000000000000000000000000000000024c", - "0x0000000000000000000000000000000000000000000000000000000000001001": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000001002": "0x000000000000000000000000000000000000000000000000000000000000000a", - "0x0000000000000000000000000000000000000000000000000000000000001003": "0x0000000000000000000000000000000000000000000000000000000000000149", - "0x0000000000000000000000000000000000000000000000000000000000001004": "0x000000000000000000000000000000000000000000000000000000000000019c", - "0x0000000000000000000000000000000000000000000000000000000000002001": "0x0000000000000000000000000000000000000000000000000000010000000000", - "0x0000000000000000000000000000000000000000000000000000000000002002": "0x0000000000000000000000000000000000000000000000000000010000000000", - "0x0000000000000000000000000000000000000000000000000000000000002003": "0x0000000000000000000000000000000000000000000000000000010000000000", - "0x0000000000000000000000000000000000000000000000000000000000002004": "0x0000000000000000000000000000000000000000000000000000010000000000" - }, - "balance": "0x10000000000", - "nonce": "0x1" + "0x01": "0x036b", + "0x02": "0x02fe", + "0x03": "0x029f", + "0x04": "0x024c", + "0x1001": "0x01", + "0x1002": "0x0a", + "0x1003": "0x0149", + "0x1004": "0x019c", + "0x2001": "0x010000000000", + "0x2002": "0x010000000000", + "0x2003": "0x010000000000", + "0x2004": "0x010000000000" + } }, "0xcccccccccccccccccccccccccccccccccccccccd": { + "nonce": "0x01", + "balance": "0x020000000000", "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000002fe", - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000000000000000000000000000000000000000029f", - "0x0000000000000000000000000000000000000000000000000000000000000004": "0x000000000000000000000000000000000000000000000000000000000000024c", - "0x0000000000000000000000000000000000000000000000000000000000001002": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001003": "0x0000000000000000000000000000000000000000000000000000000000018401", - "0x0000000000000000000000000000000000000000000000000000000000001004": "0x0000000000000000000000000000000000000000000000000000000000018454", - "0x0000000000000000000000000000000000000000000000000000000000002002": "0x0000000000000000000000000000000000000000000000000000020000000000", - "0x0000000000000000000000000000000000000000000000000000000000002003": "0x0000000000000000000000000000000000000000000000000000020000000000", - "0x0000000000000000000000000000000000000000000000000000000000002004": "0x0000000000000000000000000000000000000000000000000000020000000000" - }, - "balance": "0x20000000000", - "nonce": "0x1" + "0x02": "0x02fe", + "0x03": "0x029f", + "0x04": "0x024c", + "0x1002": "0x64", + "0x1003": "0x018401", + "0x1004": "0x018454", + "0x2002": "0x020000000000", + "0x2003": "0x020000000000", + "0x2004": "0x020000000000" + } }, "0xccccccccccccccccccccccccccccccccccccccce": { + "nonce": "0x01", + "balance": "0x01ffffffd000", "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000002fe", - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000000000000000000000000000000000000000029f", - "0x0000000000000000000000000000000000000000000000000000000000000004": "0x000000000000000000000000000000000000000000000000000000000000024c", - "0x0000000000000000000000000000000000000000000000000000000000001002": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001003": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001004": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000002002": "0x000000000000000000000000000000000000000000000000000001fffffff000", - "0x0000000000000000000000000000000000000000000000000000000000002003": "0x000000000000000000000000000000000000000000000000000001ffffffe000", - "0x0000000000000000000000000000000000000000000000000000000000002004": "0x000000000000000000000000000000000000000000000000000001ffffffd000" - }, - "balance": "0x1ffffffd000", - "nonce": "0x1" + "0x02": "0x02fe", + "0x03": "0x029f", + "0x04": "0x024c", + "0x1002": "0x64", + "0x1003": "0x64", + "0x1004": "0x64", + "0x2002": "0x01fffffff000", + "0x2003": "0x01ffffffe000", + "0x2004": "0x01ffffffd000" + } }, "0xd02d72e067e77158444ef2020ff2d325f929b363": { - "balance": "0x1000000000000000000", - "nonce": "0x1" + "nonce": "0x01", + "balance": "0x01000000000000000000", + "code": "0x", + "storage": {} } }, "sealEngine": "NoProof" 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 e1e4861871c..512eabdd8e0 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 @@ -2,7 +2,6 @@ "000_my_blockchain_test_london": { "blocks": [ { - "blocknumber": "1", "rlp": "0xf9026ef901fea06241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a03eb2e72e8ed9a59768bb9ac05915b781a764f2582edcf111053fe6531e466613a0586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017ba029b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000188016345785d8a0000830155340c80a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082036bf86ab86802f8650180018203e8830f424094cccccccccccccccccccccccccccccccccccccccc8001c080a03351b6993208fc7b03fd770c8c06440cfb0d75b29aafee0a4c64c8ba20a80e58a067817fdb3058e75c5d26e51a33d1e338346bc7d406e115447a4bb5f7ab01625bc0", "blockHeader": { "parentHash": "0x6241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957c", @@ -12,20 +11,32 @@ "transactionsTrie": "0x586f963eea0fb4726f0f91f895f2aa5d67bffb5207a529b40d781244a0c7017b", "receiptTrie": "0x29b0562f7140574dd0d50dee8a271b22e1a0a7b78fca58f7c60370d8317ba2a9", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x1", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x15534", - "timestamp": "0xc", + "difficulty": "0x020000", + "number": "0x01", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x015534", + "timestamp": "0x0c", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x36b", + "baseFeePerGas": "0x036b", "hash": "0x12bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586e" - } + }, + "blocknumber": "1", + "transactions": [ + { + "nonce": "0x00", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "value": "0x00", + "data": "0x01", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] }, { - "blocknumber": "2", "rlp": "0xf90349f901fea012bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0d9d9cc8ae73834ba9dc75fe8c68d36e980c82fcaf887dc220a05f152a327ae55a05521d9ad5adef72f021e4270a1f6851ca772dd56acaf4ff03362151bfb715298a0e225d44649351c3dccc61c1d904451d6f0f5a407c072099fe1085cfad88447d6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000288016345785d8a000083053c421880a000000000000000000000000000000000000000000000000000000000000000008800000000000000008202fef90144b86a02f86701010a8203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820201c080a06ea285a870a051df2b8c80c462b7d3517f984815e09c4748efc8548a40434050a052f635268c1b9e1538ac76b37cb69c7b897595744d6de2dda9507b6624d352d0b86a02f8670102648203e8830f424094cccccccccccccccccccccccccccccccccccccccd80820202c080a0218549e818b36b3823c3f11a65ab5c1e16f6886469c385503cc2f1af1f53825da058b082850f55fd61290a99add11b7af6356ac8d55fbe4d513f06bf648824a64db86a02f8670103648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820203c001a0339e9ed3f6342f2644e4cd33a775b7e62a8208a137dcf2e354c7473caa77782aa074004c85b651c8ca9828aac28414997f3eff46edbba2bb606a545d95fd4c9b3ac0", "blockHeader": { "parentHash": "0x12bba91a7e1f277f1549e832e06820f8849308f70f8659acf846bdc15f5d586e", @@ -35,20 +46,50 @@ "transactionsTrie": "0x5521d9ad5adef72f021e4270a1f6851ca772dd56acaf4ff03362151bfb715298", "receiptTrie": "0xe225d44649351c3dccc61c1d904451d6f0f5a407c072099fe1085cfad88447d6", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x2", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x53c42", + "difficulty": "0x020000", + "number": "0x02", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x053c42", "timestamp": "0x18", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x2fe", + "baseFeePerGas": "0x02fe", "hash": "0x0e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010" - } + }, + "blocknumber": "2", + "transactions": [ + { + "nonce": "0x01", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "value": "0x00", + "data": "0x0201", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x02", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCD", + "value": "0x00", + "data": "0x0202", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x03", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE", + "value": "0x00", + "data": "0x0203", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] }, { - "blocknumber": "3", "rlp": "0xf9034ff901fea00e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0bb08d7ca9c904f3d01b78041a9d70f69e83b0a6ec7af471cbd00933a47fdacaea027f7b224df1d270bfa03ba564cd4962071b89f91c965dbbfacff55e7ec66c652a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000388016345785d8a000083053c422480a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082029ff9014ab86c02f86901048203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820301c001a0720e2870881f8b0e285b7ec02c169f1165847bcb5f36ea5f33f3db6079854f63a04448266b715d7d99acd1e31dcab50d7119faa620d44c69b3f64f97d636634169b86a02f8670105648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820303c080a09c8531a41f9281633470c5e12b6c72c8930409a6433f26bf7b394a703d18512ea07a0c6151fde75f10a7e4efdd17a21f1f25206559bd4b8cf7880e5bc30e1cfe33b86e02f86b0106830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820304c001a0c8b85e158b532a0e3b3b5848fad0f4d5c6807805a4ce65e8591de13a62f3ac6aa03e923eb1be030c3ca69623f31ad3a357368b1ccb7ee48ac8deec5cb5dc49cb0cc0", "blockHeader": { "parentHash": "0x0e043cb2eb0339900f6199c0ab517e5be3a81d898fa58078ed8b866ddc60b010", @@ -58,20 +99,50 @@ "transactionsTrie": "0x27f7b224df1d270bfa03ba564cd4962071b89f91c965dbbfacff55e7ec66c652", "receiptTrie": "0xf42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2e", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x3", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x53c42", + "difficulty": "0x020000", + "number": "0x03", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x053c42", "timestamp": "0x24", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x29f", + "baseFeePerGas": "0x029f", "hash": "0x5c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8e" - } + }, + "blocknumber": "3", + "transactions": [ + { + "nonce": "0x04", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "value": "0x00", + "data": "0x0301", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x05", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE", + "value": "0x00", + "data": "0x0303", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x06", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCD", + "value": "0x00", + "data": "0x0304", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] }, { - "blocknumber": "4", "rlp": "0xf9034ff901fea05c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ba5e000000000000000000000000000000000000a0e2b2b992b108bcd0e036067ef693f2d1b94c2f48d074a4f6b9d98537bbf15e9aa07617400c1efcb3e64b8cf55ccaaae8e335621bd6897b5e439d93b8dc011a4331a0f42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000488016345785d8a000083053c423080a0000000000000000000000000000000000000000000000000000000000000000088000000000000000082024cf9014ab86c02f86901078203e88203e8830f424094cccccccccccccccccccccccccccccccccccccccc80820401c001a0113c54f83e1b1e5c689ba86d288ec0ce2877f350b71821c4c7a3f7073b46602ca0548848e711b86ceeb657fd0a0bf44b792f6665ed18ec8a04f498471e811f8f97b86a02f8670108648203e8830f424094ccccccccccccccccccccccccccccccccccccccce80820403c080a08d7ec1116399aab6e1297b09302b291d73c5898a0338fb62a46c74b037d15a15a03cacc1a12eb47c261394443d490b8436f53a99d2109dac9ca5018cf531e6b29db86e02f86b0109830186a0830186a0830f424094cccccccccccccccccccccccccccccccccccccccd80820404c001a054bd3a30ee3c2182d92f30223adb53feb0f51d76970a2628d9479536ff3edfe9a06f681aa0ad9362eeeafb981394526ca6425f3a24e1c7f44c413b68dd2e56e5d0c0", "blockHeader": { "parentHash": "0x5c66e5b6d6513ec98e9d8ee88137f1a2418542550977ea02015439acd2bf8f8e", @@ -81,17 +152,48 @@ "transactionsTrie": "0x7617400c1efcb3e64b8cf55ccaaae8e335621bd6897b5e439d93b8dc011a4331", "receiptTrie": "0xf42d43454db7c51eadf004bd9e43522c4894f02c602b709cd45e67597c622f2e", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x4", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x53c42", + "difficulty": "0x020000", + "number": "0x04", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x053c42", "timestamp": "0x30", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x24c", + "baseFeePerGas": "0x024c", "hash": "0xf5e2f23d9a212edbb35a07bc9f582f4a632b694bd4ef8742de8ad6c6acacf72c" - } + }, + "blocknumber": "4", + "transactions": [ + { + "nonce": "0x07", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", + "value": "0x00", + "data": "0x0401", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x08", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE", + "value": "0x00", + "data": "0x0403", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + }, + { + "nonce": "0x09", + "to": "0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCD", + "value": "0x00", + "data": "0x0404", + "gasLimit": "0x0f4240", + "gasPrice": "0x0A", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] } ], "genesisBlockHeader": { @@ -102,15 +204,15 @@ "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x0", - "gasLimit": "0x16345785d8a0000", - "gasUsed": "0x0", - "timestamp": "0x0", + "difficulty": "0x020000", + "number": "0x00", + "gasLimit": "0x016345785d8a0000", + "gasUsed": "0x00", + "timestamp": "0x00", "extraData": "0x00", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", - "baseFeePerGas": "0x3e8", + "baseFeePerGas": "0x03e8", "hash": "0x6241b4534da26b654ec5bb30d29b1d5202454af544b05828433354da7471957c" }, "genesisRLP": "0xf90200f901fba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a089a5be1d3306f6f05b42678ef13ac3dbc37bef9a2a80862c21eb22eee29194c2a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008088016345785d8a0000808000a000000000000000000000000000000000000000000000000000000000000000008800000000000000008203e8c0c0", @@ -118,120 +220,127 @@ "network": "London", "pre": { "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x0", - "balance": "0x1000000000000000000", + "nonce": "0x00", + "balance": "0x01000000000000000000", "code": "0x", "storage": {} }, "0xd02d72E067e77158444ef2020Ff2d325f929B363": { - "nonce": "0x1", - "balance": "0x1000000000000000000", + "nonce": "0x01", + "balance": "0x01000000000000000000", "code": "0x", "storage": {} }, "0xcccccccccccccccccccccccccccccccccccccccc": { - "nonce": "0x1", - "balance": "0x10000000000", + "nonce": "0x01", + "balance": "0x010000000000", "code": "0x484355483a036110004301554761200043015500", "storage": {} }, "0xcccccccccccccccccccccccccccccccccccccccd": { - "nonce": "0x1", - "balance": "0x20000000000", + "nonce": "0x01", + "balance": "0x020000000000", "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", "storage": {} }, "0x000000000000000000000000000000000000c0de": { - "nonce": "0x1", - "balance": "0x0", + "nonce": "0x01", + "balance": "0x00", "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", "storage": {} }, "0xccccccccccccccccccccccccccccccccccccccce": { - "nonce": "0x1", - "balance": "0x20000000000", + "nonce": "0x01", + "balance": "0x020000000000", "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", "storage": {} } }, "postState": { "0x000000000000000000000000000000000000c0de": { + "nonce": "0x01", + "balance": "0x3000", "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000002fe", - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000000000000000000000000000000000000000029f", - "0x0000000000000000000000000000000000000000000000000000000000000004": "0x000000000000000000000000000000000000000000000000000000000000024c", - "0x0000000000000000000000000000000000000000000000000000000000001002": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001003": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001004": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000002002": "0x0000000000000000000000000000000000000000000000000000000000001000", - "0x0000000000000000000000000000000000000000000000000000000000002003": "0x0000000000000000000000000000000000000000000000000000000000002000", - "0x0000000000000000000000000000000000000000000000000000000000002004": "0x0000000000000000000000000000000000000000000000000000000000003000" - }, - "balance": "0x3000", - "nonce": "0x1" + "0x02": "0x02fe", + "0x03": "0x029f", + "0x04": "0x024c", + "0x1002": "0x64", + "0x1003": "0x64", + "0x1004": "0x64", + "0x2002": "0x1000", + "0x2003": "0x2000", + "0x2004": "0x3000" + } }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x0a", "balance": "0xfffffffffba0afe5e7", - "nonce": "0xa" + "code": "0x", + "storage": {} }, "0xba5e000000000000000000000000000000000000": { - "balance": "0x6f05b5a16c783b4b" + "nonce": "0x00", + "balance": "0x6f05b5a16c783b4b", + "code": "0x", + "storage": {} }, "0xcccccccccccccccccccccccccccccccccccccccc": { + "nonce": "0x01", + "balance": "0x010000000000", "code": "0x484355483a036110004301554761200043015500", "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x000000000000000000000000000000000000000000000000000000000000036b", - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000002fe", - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000000000000000000000000000000000000000029f", - "0x0000000000000000000000000000000000000000000000000000000000000004": "0x000000000000000000000000000000000000000000000000000000000000024c", - "0x0000000000000000000000000000000000000000000000000000000000001001": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000001002": "0x000000000000000000000000000000000000000000000000000000000000000a", - "0x0000000000000000000000000000000000000000000000000000000000001003": "0x0000000000000000000000000000000000000000000000000000000000000149", - "0x0000000000000000000000000000000000000000000000000000000000001004": "0x000000000000000000000000000000000000000000000000000000000000019c", - "0x0000000000000000000000000000000000000000000000000000000000002001": "0x0000000000000000000000000000000000000000000000000000010000000000", - "0x0000000000000000000000000000000000000000000000000000000000002002": "0x0000000000000000000000000000000000000000000000000000010000000000", - "0x0000000000000000000000000000000000000000000000000000000000002003": "0x0000000000000000000000000000000000000000000000000000010000000000", - "0x0000000000000000000000000000000000000000000000000000000000002004": "0x0000000000000000000000000000000000000000000000000000010000000000" - }, - "balance": "0x10000000000", - "nonce": "0x1" + "0x01": "0x036b", + "0x02": "0x02fe", + "0x03": "0x029f", + "0x04": "0x024c", + "0x1001": "0x01", + "0x1002": "0x0a", + "0x1003": "0x0149", + "0x1004": "0x019c", + "0x2001": "0x010000000000", + "0x2002": "0x010000000000", + "0x2003": "0x010000000000", + "0x2004": "0x010000000000" + } }, "0xcccccccccccccccccccccccccccccccccccccccd": { + "nonce": "0x01", + "balance": "0x020000000000", "code": "0x60008060008073cccccccccccccccccccccccccccccccccccccccc5af450", "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000002fe", - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000000000000000000000000000000000000000029f", - "0x0000000000000000000000000000000000000000000000000000000000000004": "0x000000000000000000000000000000000000000000000000000000000000024c", - "0x0000000000000000000000000000000000000000000000000000000000001002": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001003": "0x0000000000000000000000000000000000000000000000000000000000018401", - "0x0000000000000000000000000000000000000000000000000000000000001004": "0x0000000000000000000000000000000000000000000000000000000000018454", - "0x0000000000000000000000000000000000000000000000000000000000002002": "0x0000000000000000000000000000000000000000000000000000020000000000", - "0x0000000000000000000000000000000000000000000000000000000000002003": "0x0000000000000000000000000000000000000000000000000000020000000000", - "0x0000000000000000000000000000000000000000000000000000000000002004": "0x0000000000000000000000000000000000000000000000000000020000000000" - }, - "balance": "0x20000000000", - "nonce": "0x1" + "0x02": "0x02fe", + "0x03": "0x029f", + "0x04": "0x024c", + "0x1002": "0x64", + "0x1003": "0x018401", + "0x1004": "0x018454", + "0x2002": "0x020000000000", + "0x2003": "0x020000000000", + "0x2004": "0x020000000000" + } }, "0xccccccccccccccccccccccccccccccccccccccce": { + "nonce": "0x01", + "balance": "0x01ffffffd000", "code": "0x60008060008061100061c0de5af160008060008073cccccccccccccccccccccccccccccccccccccccc5af4905050", "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x00000000000000000000000000000000000000000000000000000000000002fe", - "0x0000000000000000000000000000000000000000000000000000000000000003": "0x000000000000000000000000000000000000000000000000000000000000029f", - "0x0000000000000000000000000000000000000000000000000000000000000004": "0x000000000000000000000000000000000000000000000000000000000000024c", - "0x0000000000000000000000000000000000000000000000000000000000001002": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001003": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000001004": "0x0000000000000000000000000000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000000000000000000000000002002": "0x000000000000000000000000000000000000000000000000000001fffffff000", - "0x0000000000000000000000000000000000000000000000000000000000002003": "0x000000000000000000000000000000000000000000000000000001ffffffe000", - "0x0000000000000000000000000000000000000000000000000000000000002004": "0x000000000000000000000000000000000000000000000000000001ffffffd000" - }, - "balance": "0x1ffffffd000", - "nonce": "0x1" + "0x02": "0x02fe", + "0x03": "0x029f", + "0x04": "0x024c", + "0x1002": "0x64", + "0x1003": "0x64", + "0x1004": "0x64", + "0x2002": "0x01fffffff000", + "0x2003": "0x01ffffffe000", + "0x2004": "0x01ffffffd000" + } }, "0xd02d72e067e77158444ef2020ff2d325f929b363": { - "balance": "0x1000000000000000000", - "nonce": "0x1" + "nonce": "0x01", + "balance": "0x01000000000000000000", + "code": "0x", + "storage": {} } }, "sealEngine": "NoProof" 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 e19cd0a6d94..21c1e3d4c2a 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,79 +1,97 @@ { - "000_my_chain_id_test_istanbul": { - "blocks": [ - { - "rlp": "0xf90262f901f9a007a0192766c62d9bdb9e357ebdffd4d8c1d12c15b467c453772c3f8027f02886a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0330a7882a8fadd60d0b6bf3d8ce7a8ae024800ae31ad8fae24d654a6a83fcad6a08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0fa9e942c7bab1017c29ab8b7f9484e311f3a2ba680c2ec8abbaea2365cecc93eb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a02d8203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", - "blockHeader": { - "parentHash": "0x07a0192766c62d9bdb9e357ebdffd4d8c1d12c15b467c453772c3f8027f02886", - "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "stateRoot": "0x330a7882a8fadd60d0b6bf3d8ce7a8ae024800ae31ad8fae24d654a6a83fcad6", - "transactionsTrie": "0x8151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcb", - "receiptTrie": "0xfa9e942c7bab1017c29ab8b7f9484e311f3a2ba680c2ec8abbaea2365cecc93e", - "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x1", - "gasLimit": "0x2540be400", - "gasUsed": "0xa02d", - "timestamp": "0x3e8", - "extraData": "0x00", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "hash": "0xe1eaa067c6bc24e4dd3dc7e2a8cff9d7dcc8783548228b1e0f85bdff2bfd087c" - } - } - ], - "genesisBlockHeader": { - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "0x0000000000000000000000000000000000000000", - "stateRoot": "0xaff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5a", - "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x0", - "gasLimit": "0x2540be400", - "gasUsed": "0x12a05f200", - "timestamp": "0x0", - "extraData": "0x00", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "hash": "0x07a0192766c62d9bdb9e357ebdffd4d8c1d12c15b467c453772c3f8027f02886" - }, - "genesisRLP": "0xf901fff901faa00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be40085012a05f2008000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", - "lastblockhash": "0xe1eaa067c6bc24e4dd3dc7e2a8cff9d7dcc8783548228b1e0f85bdff2bfd087c", - "network": "Istanbul", - "pre": { - "0x1000000000000000000000000000000000000000": { - "nonce": "0x0", - "balance": "0x0", - "code": "0x4660015500", - "storage": {} - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x0", - "balance": "0x3635c9adc5dea00000", - "code": "0x", - "storage": {} - } - }, - "postState": { - "0x1000000000000000000000000000000000000000": { - "code": "0x4660015500", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001" + "000_my_chain_id_test_istanbul": { + "blocks": [ + { + "rlp": "0xf90262f901f9a007a0192766c62d9bdb9e357ebdffd4d8c1d12c15b467c453772c3f8027f02886a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0330a7882a8fadd60d0b6bf3d8ce7a8ae024800ae31ad8fae24d654a6a83fcad6a08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0fa9e942c7bab1017c29ab8b7f9484e311f3a2ba680c2ec8abbaea2365cecc93eb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a02d8203e800a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", + "blockHeader": { + "parentHash": "0x07a0192766c62d9bdb9e357ebdffd4d8c1d12c15b467c453772c3f8027f02886", + "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "stateRoot": "0x330a7882a8fadd60d0b6bf3d8ce7a8ae024800ae31ad8fae24d654a6a83fcad6", + "transactionsTrie": "0x8151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcb", + "receiptTrie": "0xfa9e942c7bab1017c29ab8b7f9484e311f3a2ba680c2ec8abbaea2365cecc93e", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "difficulty": "0x020000", + "number": "0x01", + "gasLimit": "0x02540be400", + "gasUsed": "0xa02d", + "timestamp": "0x03e8", + "extraData": "0x00", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "hash": "0xe1eaa067c6bc24e4dd3dc7e2a8cff9d7dcc8783548228b1e0f85bdff2bfd087c" + }, + "transactions": [ + { + "nonce": "0x00", + "to": "0x1000000000000000000000000000000000000000", + "value": "0x00", + "data": "0x", + "gasLimit": "0x05f5e100", + "gasPrice": "0x0a", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] + } + ], + "genesisBlockHeader": { + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "coinbase": "0x0000000000000000000000000000000000000000", + "stateRoot": "0xaff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5a", + "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "difficulty": "0x020000", + "number": "0x00", + "gasLimit": "0x02540be400", + "gasUsed": "0x012a05f200", + "timestamp": "0x00", + "extraData": "0x00", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "hash": "0x07a0192766c62d9bdb9e357ebdffd4d8c1d12c15b467c453772c3f8027f02886" }, - "balance": "0x0" - }, - "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { - "balance": "0x1bc16d674ece41c2" - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "0x3635c9adc5de99be3e", - "nonce": "0x1" - } - }, - "sealEngine": "NoProof" - } + "genesisRLP": "0xf901fff901faa00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be40085012a05f2008000a00000000000000000000000000000000000000000000000000000000000000000880000000000000000c0c0", + "lastblockhash": "0xe1eaa067c6bc24e4dd3dc7e2a8cff9d7dcc8783548228b1e0f85bdff2bfd087c", + "network": "Istanbul", + "pre": { + "0x1000000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x00", + "code": "0x4660015500", + "storage": {} + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x00", + "balance": "0x3635c9adc5dea00000", + "code": "0x", + "storage": {} + } + }, + "postState": { + "0x1000000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x00", + "code": "0x4660015500", + "storage": { + "0x01": "0x01" + } + }, + "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { + "nonce": "0x00", + "balance": "0x1bc16d674ece41c2", + "code": "0x", + "storage": {} + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x01", + "balance": "0x3635c9adc5de99be3e", + "code": "0x", + "storage": {} + } + }, + "sealEngine": "NoProof" + } } \ No newline at end of file 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 2b82b0c3a1b..39e40c9c115 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,81 +1,99 @@ { - "000_my_chain_id_test_london": { - "blocks": [ - { - "rlp": "0xf90263f901faa0c23ec9a992cd009c20de66b8b0b54f358f1b684ed55f841d71aa5031e1c11b5fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0a48abc194fdd8e58a32a90874e9144e19eb68306ec5e51bca9389d1043eeb20fa08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0c598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0ab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a8618203e800a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", - "blockHeader": { - "parentHash": "0xc23ec9a992cd009c20de66b8b0b54f358f1b684ed55f841d71aa5031e1c11b5f", - "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "stateRoot": "0xa48abc194fdd8e58a32a90874e9144e19eb68306ec5e51bca9389d1043eeb20f", - "transactionsTrie": "0x8151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcb", - "receiptTrie": "0xc598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0a", - "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x1", - "gasLimit": "0x2540be400", - "gasUsed": "0xa861", - "timestamp": "0x3e8", - "extraData": "0x00", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "baseFeePerGas": "0x7", - "hash": "0x1efac4df8d7cb16ef204132c796dba20ecda56a5bcd60be83eddd22330a0402a" - } - } - ], - "genesisBlockHeader": { - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "0x0000000000000000000000000000000000000000", - "stateRoot": "0xaff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5a", - "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0x20000", - "number": "0x0", - "gasLimit": "0x2540be400", - "gasUsed": "0x12a05f200", - "timestamp": "0x0", - "extraData": "0x00", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "baseFeePerGas": "0x7", - "hash": "0xc23ec9a992cd009c20de66b8b0b54f358f1b684ed55f841d71aa5031e1c11b5f" - }, - "genesisRLP": "0xf90200f901fba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be40085012a05f2008000a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007c0c0", - "lastblockhash": "0x1efac4df8d7cb16ef204132c796dba20ecda56a5bcd60be83eddd22330a0402a", - "network": "London", - "pre": { - "0x1000000000000000000000000000000000000000": { - "nonce": "0x0", - "balance": "0x0", - "code": "0x4660015500", - "storage": {} - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "nonce": "0x0", - "balance": "0x3635c9adc5dea00000", - "code": "0x", - "storage": {} - } - }, - "postState": { - "0x1000000000000000000000000000000000000000": { - "code": "0x4660015500", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001" + "000_my_chain_id_test_london": { + "blocks": [ + { + "rlp": "0xf90263f901faa0c23ec9a992cd009c20de66b8b0b54f358f1b684ed55f841d71aa5031e1c11b5fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347942adc25665018aa1fe0e6bc666dac8fc2697ff9baa0a48abc194fdd8e58a32a90874e9144e19eb68306ec5e51bca9389d1043eeb20fa08151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcba0c598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0ab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018502540be40082a8618203e800a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007f863f861800a8405f5e10094100000000000000000000000000000000000000080801ba07e09e26678ed4fac08a249ebe8ed680bf9051a5e14ad223e4b2b9d26e0208f37a05f6e3f188e3e6eab7d7d3b6568f5eac7d687b08d307d3154ccd8c87b4630509bc0", + "blockHeader": { + "parentHash": "0xc23ec9a992cd009c20de66b8b0b54f358f1b684ed55f841d71aa5031e1c11b5f", + "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "coinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "stateRoot": "0xa48abc194fdd8e58a32a90874e9144e19eb68306ec5e51bca9389d1043eeb20f", + "transactionsTrie": "0x8151d548273f6683169524b66ca9fe338b9ce42bc3540046c828fd939ae23bcb", + "receiptTrie": "0xc598f69a5674cae9337261b669970e24abc0b46e6d284372a239ec8ccbf20b0a", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "difficulty": "0x020000", + "number": "0x01", + "gasLimit": "0x02540be400", + "gasUsed": "0xa861", + "timestamp": "0x03e8", + "extraData": "0x00", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "baseFeePerGas": "0x07", + "hash": "0x1efac4df8d7cb16ef204132c796dba20ecda56a5bcd60be83eddd22330a0402a" + }, + "transactions": [ + { + "nonce": "0x00", + "to": "0x1000000000000000000000000000000000000000", + "value": "0x00", + "data": "0x", + "gasLimit": "0x05f5e100", + "gasPrice": "0x0a", + "secretKey": "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" + } + ], + "uncleHeaders": [] + } + ], + "genesisBlockHeader": { + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "uncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "coinbase": "0x0000000000000000000000000000000000000000", + "stateRoot": "0xaff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5a", + "transactionsTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "receiptTrie": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "difficulty": "0x020000", + "number": "0x00", + "gasLimit": "0x02540be400", + "gasUsed": "0x012a05f200", + "timestamp": "0x00", + "extraData": "0x00", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "baseFeePerGas": "0x07", + "hash": "0xc23ec9a992cd009c20de66b8b0b54f358f1b684ed55f841d71aa5031e1c11b5f" }, - "balance": "0x0" - }, - "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { - "balance": "0x1bc16d674ec9f923" - }, - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "0x3635c9adc5de996c36", - "nonce": "0x1" - } - }, - "sealEngine": "NoProof" - } + "genesisRLP": "0xf90200f901fba00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0aff9f63320a482f8c4e4f15f659e6a7ac382138fbbb6919243b0cba4c5988a5aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808502540be40085012a05f2008000a0000000000000000000000000000000000000000000000000000000000000000088000000000000000007c0c0", + "lastblockhash": "0x1efac4df8d7cb16ef204132c796dba20ecda56a5bcd60be83eddd22330a0402a", + "network": "London", + "pre": { + "0x1000000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x00", + "code": "0x4660015500", + "storage": {} + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x00", + "balance": "0x3635c9adc5dea00000", + "code": "0x", + "storage": {} + } + }, + "postState": { + "0x1000000000000000000000000000000000000000": { + "nonce": "0x00", + "balance": "0x00", + "code": "0x4660015500", + "storage": { + "0x01": "0x01" + } + }, + "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { + "nonce": "0x00", + "balance": "0x1bc16d674ec9f923", + "code": "0x", + "storage": {} + }, + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "nonce": "0x01", + "balance": "0x3635c9adc5de996c36", + "code": "0x", + "storage": {} + } + }, + "sealEngine": "NoProof" + } } \ No newline at end of file diff --git a/src/ethereum_test_tools/tests/test_types.py b/src/ethereum_test_tools/tests/test_types.py index aa4dcc962e2..3cec657c6e8 100644 --- a/src/ethereum_test_tools/tests/test_types.py +++ b/src/ethereum_test_tools/tests/test_types.py @@ -2,11 +2,17 @@ Test suite for `ethereum_test` module. """ -from typing import Any, Dict +from typing import Any, Dict, List import pytest -from ..common import Account, Storage +from ..common import ( + Account, + Storage, + even_padding, + key_value_padding, + storage_padding, +) def test_storage(): @@ -226,3 +232,76 @@ def test_account_check_alloc( else: with pytest.raises(Exception) as _: account.check_alloc("test", alloc) + + +# Even Padding Test +@pytest.mark.parametrize( + ["input", "excluded", "expected"], + [ + ( + {"x": "0x12346", "y": "0xbcd", "z": {"a": "0x1"}}, + [None], + {"x": "0x012346", "y": "0x0bcd", "z": {"a": "0x01"}}, + ), + ( + {"a": "0x", "b": "0x", "c": None}, + [None], + {"a": "0x", "b": "0x", "c": "0x"}, + ), + ( + {"x": "0x12356", "y": "0xbed", "z": {"a": "0x1"}}, + ["y", "z"], + {"x": "0x012356", "y": "0xbed", "z": {"a": "0x1"}}, + ), + ], +) +def test_even_padding(input: Dict, excluded: List[str | None], expected: Dict): + assert even_padding(input, excluded) == expected + + +# Key Value Padding Test +@pytest.mark.parametrize( + ["value", "expected"], + [ + ( + "0x0000000012346", + "0x012346", + ), + ( + "0x", + "0x00", + ), + ( + None, + "0x", + ), + ], +) +def test_key_value_padding(value: str, expected: str): + assert key_value_padding(value) == expected + + +# Storage Padding Test +@pytest.mark.parametrize( + ["storage", "expected"], + [ + ( + {"0x0000000012346": "0x0000000deadbef"}, + {"0x012346": "0x0deadbef"}, + ), + ( + {}, + {}, + ), + ( + {"0x0003": "0x001"}, + {"0x03": "0x01"}, + ), + ( + {"0x": "0x"}, + {"0x00": "0x00"}, + ), + ], +) +def test_storage_padding(storage: Dict, expected: Dict): + assert storage_padding(storage) == expected diff --git a/whitelist.txt b/whitelist.txt index 955b493af53..208b44eb651 100644 --- a/whitelist.txt +++ b/whitelist.txt @@ -32,6 +32,8 @@ rlp t8n trie txs +wd +wds u256 utils validator