diff --git a/beacon/engine/types.go b/beacon/engine/types.go index a213648373..f520e4b066 100644 --- a/beacon/engine/types.go +++ b/beacon/engine/types.go @@ -328,9 +328,10 @@ func ExecutableDataToBlockNoHash(data ExecutableData, versionedHashes []common.H // even for empty blocks with no state transitions. // // If Amsterdam is not enabled yet, blockAccessListHash is expected - // to be nil. + // to be nil. An empty blockAccessList carries no access list: leave + // the hash unset so the block hash check catches the mismatch. var blockAccessListHash *common.Hash - if data.BlockAccessList != nil { + if len(data.BlockAccessList) > 0 { hash := crypto.Keccak256Hash(data.BlockAccessList) blockAccessListHash = &hash } @@ -359,7 +360,7 @@ func ExecutableDataToBlockNoHash(data ExecutableData, versionedHashes []common.H BlockAccessListHash: blockAccessListHash, } body := types.Body{Transactions: txs, Uncles: nil, Withdrawals: data.Withdrawals} - if data.BlockAccessList != nil { + if len(data.BlockAccessList) > 0 { var accessList bal.BlockAccessList if err := rlp.DecodeBytes(data.BlockAccessList, &accessList); err != nil { return nil, fmt.Errorf("failed to decode BAL: %w", err) diff --git a/cmd/evm/testdata/33/alloc.json b/cmd/evm/testdata/33/alloc.json index 6874a6b339..d3ae1fd061 100644 --- a/cmd/evm/testdata/33/alloc.json +++ b/cmd/evm/testdata/33/alloc.json @@ -1,30 +1,42 @@ { - "0x8a0a19589531694250d570040a0c4b74576919b8": { - "nonce": "0x00", - "balance": "0x0de0b6b3a7640000", - "code": "0x600060006000600060007310000000000000000000000000000000000000015af1600155600060006000600060007310000000000000000000000000000000000000025af16002553d600060003e600051600355", - "storage": { - "0x01": "0x0100", - "0x02": "0x0100", - "0x03": "0x0100" + "0x8a0a19589531694250d570040a0c4b74576919b8": { + "nonce": "0x00", + "balance": "0x0de0b6b3a7640000", + "code": "0x600060006000600060007310000000000000000000000000000000000000015af1600155600060006000600060007310000000000000000000000000000000000000025af16002553d600060003e600051600355", + "storage": { + "0x01": "0x0100", + "0x02": "0x0100", + "0x03": "0x0100" + } + }, + "0x000000000000000000000000000000000000aaaa": { + "nonce": "0x00", + "balance": "0x4563918244f40000", + "code": "0x58808080600173703c4b2bd70c169f5717101caee543299fc946c75af100", + "storage": {} + }, + "0x000000000000000000000000000000000000bbbb": { + "nonce": "0x00", + "balance": "0x29a2241af62c0000", + "code": "0x6042805500", + "storage": {} + }, + "0x71562b71999873DB5b286dF957af199Ec94617F7": { + "nonce": "0x00", + "balance": "0x6124fee993bc0000", + "code": "0x", + "storage": {} + }, + "0x00000961Ef480Eb55e80D19ad83579A64c007002": { + "balance": "0x0", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101f457600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603814608857366101f457346101f4575f5260205ff35b34106101f457600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101835782810160030260040181604c02815460601b8152601401816001015481526020019060020154807fffffffffffffffffffffffffffffffff00000000000000000000000000000000168252906010019060401c908160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360010160e1565b910180921461019557906002556101a0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14156101cd57505f5b6001546002828201116101e25750505f6101e8565b01600290035b5f555f600155604c025ff35b5f5ffd", + "nonce": "0x1", + "storage": {} + }, + "0x0000BBdDc7CE488642fb579F8B00f3a590007251": { + "balance": "0x0", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460d35760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461019a57600182026001905f5b5f82111560685781019083028483029004916001019190604d565b9093900492505050366060146088573661019a573461019a575f5260205ff35b341061019a57600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060021160e7575060025b5f5b8181146101295782810160040260040181607402815460601b815260140181600101548152602001816002015481526020019060030154905260010160e9565b910180921461013b5790600255610146565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561017357505f5b6001546001828201116101885750505f61018e565b01600190035b5f555f6001556074025ff35b5f5ffd", + "nonce": "0x1", + "storage": {} } - }, - "0x000000000000000000000000000000000000aaaa": { - "nonce": "0x00", - "balance": "0x4563918244f40000", - "code": "0x58808080600173703c4b2bd70c169f5717101caee543299fc946c75af100", - "storage": {} - }, - "0x000000000000000000000000000000000000bbbb": { - "nonce": "0x00", - "balance": "0x29a2241af62c0000", - "code": "0x6042805500", - "storage": {} - }, - "0x71562b71999873DB5b286dF957af199Ec94617F7": { - "nonce": "0x00", - "balance": "0x6124fee993bc0000", - "code": "0x", - "storage": {} - } } diff --git a/cmd/evm/testdata/33/exp.json b/cmd/evm/testdata/33/exp.json index 73aaf80a28..f0e6986537 100644 --- a/cmd/evm/testdata/33/exp.json +++ b/cmd/evm/testdata/33/exp.json @@ -8,6 +8,16 @@ "code": "0x6042805500", "balance": "0x29a2241af62c0000" }, + "0x00000961ef480eb55e80d19ad83579a64c007002": { + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101f457600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603814608857366101f457346101f4575f5260205ff35b34106101f457600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101835782810160030260040181604c02815460601b8152601401816001015481526020019060020154807fffffffffffffffffffffffffffffffff00000000000000000000000000000000168252906010019060401c908160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360010160e1565b910180921461019557906002556101a0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14156101cd57505f5b6001546002828201116101e25750505f6101e8565b01600290035b5f555f600155604c025ff35b5f5ffd", + "balance": "0x0", + "nonce": "0x1" + }, + "0x0000bbddc7ce488642fb579f8b00f3a590007251": { + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460d35760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461019a57600182026001905f5b5f82111560685781019083028483029004916001019190604d565b9093900492505050366060146088573661019a573461019a575f5260205ff35b341061019a57600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060021160e7575060025b5f5b8181146101295782810160040260040181607402815460601b815260140181600101548152602001816002015481526020019060030154905260010160e9565b910180921461013b5790600255610146565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561017357505f5b6001546001828201116101885750505f61018e565b01600190035b5f555f6001556074025ff35b5f5ffd", + "balance": "0x0", + "nonce": "0x1" + }, "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { "balance": "0x2bf52" }, @@ -35,29 +45,33 @@ } }, "result": { - "stateRoot": "0x9fdcacd4510e93c4488e537dc51578b5c6d505771db64a2610036eeb4be7b26f", + "stateRoot": "0x862606a83f3adba7e201d226aba4665e2781911fa129e0c0f04c3fd486883a2a", "txRoot": "0x5d13a0b074e80388dc754da92b22922313a63417b3e25a10f324935e09697a53", "receiptsRoot": "0x504c5d86c34391f70d210e6c482615b391db4bdb9f43479366399d9c5599850a", "logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","receipts": [{ - "type": "0x4", - "root": "0x", - "status": "0x1", - "cumulativeGasUsed": "0x15fa9", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","logs": [],"transactionHash": "0x0417aab7c1d8a3989190c3167c132876ce9b8afd99262c5a0f9d06802de3d7ef", - "contractAddress": "0x0000000000000000000000000000000000000000", - "gasUsed": "0x15fa9", - "effectiveGasPrice": null, - "blockHash": "0x1337000000000000000000000000000000000000000000000000000000000000", - "blockNumber": "0x1", - "transactionIndex": "0x0" - } - ], - "currentDifficulty": null, - "gasUsed": "0x15fa9", - "currentBaseFee": "0x7", - "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "requests": [] -} + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "receipts": [ + { + "type": "0x4", + "root": "0x", + "status": "0x1", + "cumulativeGasUsed": "0x15fa9", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": [], + "transactionHash": "0x0417aab7c1d8a3989190c3167c132876ce9b8afd99262c5a0f9d06802de3d7ef", + "contractAddress": "0x0000000000000000000000000000000000000000", + "gasUsed": "0x15fa9", + "effectiveGasPrice": null, + "blockHash": "0x1337000000000000000000000000000000000000000000000000000000000000", + "blockNumber": "0x1", + "transactionIndex": "0x0" + } + ], + "currentDifficulty": null, + "gasUsed": "0x15fa9", + "currentBaseFee": "0x7", + "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "requests": [] + } } diff --git a/cmd/evm/testdata/34/alloc.json b/cmd/evm/testdata/34/alloc.json index 199de13285..c3cbd0cf2e 100644 --- a/cmd/evm/testdata/34/alloc.json +++ b/cmd/evm/testdata/34/alloc.json @@ -1,6 +1,18 @@ { - "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "0x1000000000000000000", - "nonce": "0x0" - } -} \ No newline at end of file + "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "0x1000000000000000000", + "nonce": "0x0" + }, + "0x00000961Ef480Eb55e80D19ad83579A64c007002": { + "balance": "0x0", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101f457600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603814608857366101f457346101f4575f5260205ff35b34106101f457600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101835782810160030260040181604c02815460601b8152601401816001015481526020019060020154807fffffffffffffffffffffffffffffffff00000000000000000000000000000000168252906010019060401c908160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360010160e1565b910180921461019557906002556101a0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14156101cd57505f5b6001546002828201116101e25750505f6101e8565b01600290035b5f555f600155604c025ff35b5f5ffd", + "nonce": "0x1", + "storage": {} + }, + "0x0000BBdDc7CE488642fb579F8B00f3a590007251": { + "balance": "0x0", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460d35760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461019a57600182026001905f5b5f82111560685781019083028483029004916001019190604d565b9093900492505050366060146088573661019a573461019a575f5260205ff35b341061019a57600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060021160e7575060025b5f5b8181146101295782810160040260040181607402815460601b815260140181600101548152602001816002015481526020019060030154905260010160e9565b910180921461013b5790600255610146565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561017357505f5b6001546001828201116101885750505f61018e565b01600190035b5f555f6001556074025ff35b5f5ffd", + "nonce": "0x1", + "storage": {} + } +} diff --git a/cmd/evm/testdata/34/exp.json b/cmd/evm/testdata/34/exp.json index 56d24a532e..4b6552fe20 100644 --- a/cmd/evm/testdata/34/exp.json +++ b/cmd/evm/testdata/34/exp.json @@ -1,17 +1,27 @@ { "alloc": { + "0x00000961ef480eb55e80d19ad83579a64c007002": { + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101f457600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603814608857366101f457346101f4575f5260205ff35b34106101f457600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101835782810160030260040181604c02815460601b8152601401816001015481526020019060020154807fffffffffffffffffffffffffffffffff00000000000000000000000000000000168252906010019060401c908160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360010160e1565b910180921461019557906002556101a0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14156101cd57505f5b6001546002828201116101e25750505f6101e8565b01600290035b5f555f600155604c025ff35b5f5ffd", + "balance": "0x0", + "nonce": "0x1" + }, + "0x0000bbddc7ce488642fb579f8b00f3a590007251": { + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460d35760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461019a57600182026001905f5b5f82111560685781019083028483029004916001019190604d565b9093900492505050366060146088573661019a573461019a575f5260205ff35b341061019a57600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060021160e7575060025b5f5b8181146101295782810160040260040181607402815460601b815260140181600101548152602001816002015481526020019060030154905260010160e9565b910180921461013b5790600255610146565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561017357505f5b6001546001828201116101885750505f61018e565b01600190035b5f555f6001556074025ff35b5f5ffd", + "balance": "0x0", + "nonce": "0x1" + }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "balance": "0x1000000000000000000" } }, "result": { - "stateRoot": "0x01c28492482a1a1f66224726ef1059a7036fce69d1d2c991b65cd013725d5742", + "stateRoot": "0x483ed12ebbb83ddc8d5c6de80d5cb352580800285a5a141697bd922cac1d5a49", "txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "currentDifficulty": null, "receipts": [], + "currentDifficulty": null, "gasUsed": "0x0", "currentBaseFee": "0x10", "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -20,4 +30,4 @@ "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "requests": [] } -} \ No newline at end of file +} diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 7820ee3d58..0967c544f5 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -4129,6 +4129,7 @@ func TestEIP7702(t *testing.T) { }, }, } + gspec.Alloc = withSystemContracts(gspec.Alloc) // Sign authorization tuples. // The way the auths are combined, it becomes @@ -4432,7 +4433,7 @@ func TestGetCanonicalReceipt(t *testing.T) { funds = big.NewInt(1000000000000000000) gspec = &Genesis{ Config: params.MergedTestChainConfig, - Alloc: types.GenesisAlloc{address: {Balance: funds}}, + Alloc: withSystemContracts(types.GenesisAlloc{address: {Balance: funds}}), BaseFee: big.NewInt(params.InitialBaseFee), } signer = types.LatestSigner(gspec.Config) @@ -4544,3 +4545,19 @@ func TestSetHeadBeyondRootFinalizedBug(t *testing.T) { currentFinal.Number.Uint64()) } } + +// withSystemContracts adds the system contracts the post-shanghai forks issue +// system calls into to the given alloc. The request-producing ones invalidate +// the block when empty, so any chain generated on a merged config needs them. +// Entries the caller set explicitly are left alone. +func withSystemContracts(alloc types.GenesisAlloc) types.GenesisAlloc { + if alloc == nil { + alloc = types.GenesisAlloc{} + } + for addr, account := range SystemContractAllocs() { + if _, ok := alloc[addr]; !ok { + alloc[addr] = account + } + } + return alloc +} diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go index cc9672199e..26e8871dbf 100644 --- a/core/chain_makers_test.go +++ b/core/chain_makers_test.go @@ -44,10 +44,10 @@ func TestGeneratePOSChain(t *testing.T) { config = *params.MergedTestChainConfig gspec = &Genesis{ Config: &config, - Alloc: types.GenesisAlloc{ + Alloc: withSystemContracts(types.GenesisAlloc{ address: {Balance: funds}, params.BeaconRootsAddress: {Code: params.BeaconRootsCode}, - }, + }), BaseFee: big.NewInt(params.InitialBaseFee), Difficulty: common.Big1, GasLimit: 5_000_000, diff --git a/core/eip8246_test.go b/core/eip8246_test.go index b37e96d923..6d2c8236d7 100644 --- a/core/eip8246_test.go +++ b/core/eip8246_test.go @@ -55,9 +55,9 @@ func TestEIP8246SelfdestructNoBurn(t *testing.T) { gspec := &Genesis{ Config: &config, - Alloc: types.GenesisAlloc{ + Alloc: withSystemContracts(types.GenesisAlloc{ addr1: {Balance: newGwei(1_000_000_000)}, - }, + }), } // The contract created by addr1's first (nonce 0) transaction. created := crypto.CreateAddress(addr1, 0) @@ -138,10 +138,10 @@ func TestEIP8246SelfdestructRefunded(t *testing.T) { factoryCode = append(factoryCode, 0x00) gspec := &Genesis{ Config: &config, - Alloc: types.GenesisAlloc{ + Alloc: withSystemContracts(types.GenesisAlloc{ sender: {Balance: newGwei(1_000_000_000)}, factory: {Nonce: 1, Code: factoryCode, Balance: big.NewInt(15)}, - }, + }), } child := crypto.CreateAddress(factory, 1) db, blocks, _ := GenerateChainWithGenesis(gspec, engine, 1, func(_ int, b *BlockGen) { @@ -204,10 +204,10 @@ func TestEIP8246Create2RecreatesBalanceOnly(t *testing.T) { ) gspec := &Genesis{ Config: &config, - Alloc: types.GenesisAlloc{ + Alloc: withSystemContracts(types.GenesisAlloc{ sender: {Balance: newGwei(1_000_000_000)}, factory: {Nonce: 1, Code: factoryCode, Balance: common.Big0}, - }, + }), } var salt [32]byte salt[31] = 1 diff --git a/core/eth_transfer_logs_test.go b/core/eth_transfer_logs_test.go index a5a5f1894a..6979bd9e47 100644 --- a/core/eth_transfer_logs_test.go +++ b/core/eth_transfer_logs_test.go @@ -82,11 +82,11 @@ func testEthTransferLogs(t *testing.T, value uint64) { gspec := &Genesis{ Config: &config, - Alloc: types.GenesisAlloc{ + Alloc: withSystemContracts(types.GenesisAlloc{ addr1: {Balance: newGwei(1000000000)}, addr2: {Code: ethTransferTestCode}, addr3: {Code: ethTransferTestCode}, - }, + }), } _, blocks, receipts := GenerateChainWithGenesis(gspec, engine, 1, func(i int, b *BlockGen) { tx := types.MustSignNewTx(key1, signer, &types.DynamicFeeTx{ diff --git a/core/genesis.go b/core/genesis.go index 2cc3312f02..c0c526ccf4 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -21,6 +21,7 @@ import ( "encoding/json" "errors" "fmt" + "maps" "math/big" "strings" @@ -689,6 +690,29 @@ func DefaultHoodiGenesisBlock() *Genesis { } } +// SystemContractAllocs returns the genesis allocation of the system contracts +// that the post-shanghai forks issue system calls into. +func SystemContractAllocs() types.GenesisAlloc { + return types.GenesisAlloc{ + // EIP-4788 - Beacon block root in the EVM + params.BeaconRootsAddress: {Nonce: 1, Code: params.BeaconRootsCode, Balance: common.Big0}, + + // EIP-2935 - Historical block hashes from state + params.HistoryStorageAddress: {Nonce: 1, Code: params.HistoryStorageCode, Balance: common.Big0}, + + // EIP-7002 / EIP-7251 - Triggerable withdrawals and consolidations + params.WithdrawalQueueAddress: {Nonce: 1, Code: params.WithdrawalQueueCode, Balance: common.Big0}, + params.ConsolidationQueueAddress: {Nonce: 1, Code: params.ConsolidationQueueCode, Balance: common.Big0}, + + // EIP-8282 - Builder execution requests + params.BuilderDepositAddress: {Nonce: 1, Code: params.BuilderDepositCode, Balance: common.Big0}, + params.BuilderExitAddress: {Nonce: 1, Code: params.BuilderExitCode, Balance: common.Big0}, + + // EIP-7997 - Deterministic deployment factory + params.DeterministicFactoryAddress: {Nonce: 1, Code: params.DeterministicFactoryCode, Balance: common.Big0}, + } +} + // DeveloperGenesisBlock returns the 'geth --dev' genesis block. func DeveloperGenesisBlock(gasLimit uint64, faucet *common.Address) *Genesis { // Override the default period to the user requested one @@ -719,18 +743,10 @@ func DeveloperGenesisBlock(gasLimit uint64, faucet *common.Address) *Genesis { common.BytesToAddress([]byte{0x10}): {Balance: big.NewInt(1)}, // BLSG1MapG1 common.BytesToAddress([]byte{0x11}): {Balance: big.NewInt(1)}, // BLSG2MapG2 common.BytesToAddress([]byte{0x1, 00}): {Balance: big.NewInt(1)}, // P256Verify - // Pre-deploy system contracts - params.BeaconRootsAddress: {Nonce: 1, Code: params.BeaconRootsCode, Balance: common.Big0}, - params.HistoryStorageAddress: {Nonce: 1, Code: params.HistoryStorageCode, Balance: common.Big0}, - params.WithdrawalQueueAddress: {Nonce: 1, Code: params.WithdrawalQueueCode, Balance: common.Big0}, - params.ConsolidationQueueAddress: {Nonce: 1, Code: params.ConsolidationQueueCode, Balance: common.Big0}, - // EIP-8282 - Builder Execution Requests - params.BuilderDepositAddress: {Nonce: 1, Code: params.BuilderDepositCode, Balance: common.Big0}, - params.BuilderExitAddress: {Nonce: 1, Code: params.BuilderExitCode, Balance: common.Big0}, - // EIP-7997 - Deterministic deployment factory - params.DeterministicFactoryAddress: {Nonce: 1, Code: params.DeterministicFactoryCode, Balance: common.Big0}, }, } + // Pre-deploy the system contracts the enabled forks call into + maps.Copy(genesis.Alloc, SystemContractAllocs()) if faucet != nil { genesis.Alloc[*faucet] = types.Account{Balance: new(big.Int).Sub(new(big.Int).Lsh(big.NewInt(1), 256), big.NewInt(9))} } diff --git a/core/state_processor.go b/core/state_processor.go index 15ce6c9d99..05f4bee052 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -398,6 +398,9 @@ func ProcessBuilderExitQueue(requests *[][]byte, rules params.Rules, evm *vm.EVM } func processRequestsSystemCall(requests *[][]byte, rules params.Rules, evm *vm.EVM, requestType byte, addr common.Address, blockAccessIndex uint32, blockAccessList *bal.ConstructionBlockAccessList) error { + if evm.StateDB.GetCodeSize(addr) == 0 { + return fmt.Errorf("empty system contract: no code at %v", addr) + } if tracer := evm.Config.Tracer; tracer != nil { onSystemCallStart(tracer, evm.GetVMContext()) if tracer.OnSystemCallEnd != nil { diff --git a/core/state_processor_test.go b/core/state_processor_test.go index 2700aed505..267222b2b2 100644 --- a/core/state_processor_test.go +++ b/core/state_processor_test.go @@ -113,7 +113,7 @@ func TestStateProcessorErrors(t *testing.T) { db = rawdb.NewMemoryDatabase() gspec = &Genesis{ Config: config, - Alloc: types.GenesisAlloc{ + Alloc: withSystemContracts(types.GenesisAlloc{ common.HexToAddress("0x71562b71999873DB5b286dF957af199Ec94617F7"): types.Account{ Balance: big.NewInt(1000000000000000000), // 1 ether Nonce: 0, @@ -122,7 +122,7 @@ func TestStateProcessorErrors(t *testing.T) { Balance: big.NewInt(1000000000000000000), // 1 ether Nonce: math.MaxUint64, }, - }, + }), } blockchain, _ = NewBlockChain(db, gspec, beacon.New(ethash.NewFaker()), nil) tooBigInitCode = [params.MaxInitCodeSize + 1]byte{} @@ -330,13 +330,13 @@ func TestStateProcessorErrors(t *testing.T) { db = rawdb.NewMemoryDatabase() gspec = &Genesis{ Config: config, - Alloc: types.GenesisAlloc{ + Alloc: withSystemContracts(types.GenesisAlloc{ common.HexToAddress("0x71562b71999873DB5b286dF957af199Ec94617F7"): types.Account{ Balance: big.NewInt(1000000000000000000), // 1 ether Nonce: 0, Code: common.FromHex("0xB0B0FACE"), }, - }, + }), } blockchain, _ = NewBlockChain(db, gspec, beacon.New(ethash.NewFaker()), nil) ) diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index fbf1b6f8d4..e691165297 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -207,7 +207,7 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV3(ctx context.Context, update engine. return engine.STATUS_INVALID, attributesErr("missing withdrawals") case params.BeaconRoot == nil: return engine.STATUS_INVALID, attributesErr("missing beacon root") - case !api.checkFork(params.Timestamp, forks.Cancun, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5): + case !api.checkFork(params.Timestamp, forks.Cancun, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2): return engine.STATUS_INVALID, unsupportedForkErr("fcuV3 must only be called for cancun/prague/osaka payloads") } } @@ -229,9 +229,7 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV4(ctx context.Context, update engine. return engine.STATUS_INVALID, attributesErr("missing beacon root") case params.SlotNumber == nil: return engine.STATUS_INVALID, attributesErr("missing slot number") - case params.TargetGasLimit == nil: - return engine.STATUS_INVALID, attributesErr("missing target gas limit") - case !api.checkFork(params.Timestamp, forks.Amsterdam): + case !api.checkFork(params.Timestamp, forks.Amsterdam, forks.BPO3, forks.BPO4, forks.BPO5, forks.Bogota): return engine.STATUS_INVALID, unsupportedForkErr("fcuV4 must only be called for amsterdam payloads") } } @@ -502,9 +500,6 @@ func (api *ConsensusAPI) GetPayloadV5(payloadID engine.PayloadID) (*engine.Execu forks.Osaka, forks.BPO1, forks.BPO2, - forks.BPO3, - forks.BPO4, - forks.BPO5, }) } @@ -517,6 +512,10 @@ func (api *ConsensusAPI) GetPayloadV6(payloadID engine.PayloadID) (*engine.Execu []engine.PayloadVersion{engine.PayloadV4}, []forks.Fork{ forks.Amsterdam, + forks.BPO3, + forks.BPO4, + forks.BPO5, + forks.Bogota, }) } @@ -845,7 +844,7 @@ func (api *ConsensusAPI) NewPayloadV4(ctx context.Context, params engine.Executa return invalidStatus, paramsErr("nil beaconRoot post-cancun") case executionRequests == nil: return invalidStatus, paramsErr("nil executionRequests post-prague") - case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5): + case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2): return invalidStatus, unsupportedForkErr("newPayloadV4 must only be called for prague/osaka payloads") } requests := convertRequests(executionRequests) @@ -874,7 +873,7 @@ func (api *ConsensusAPI) NewPayloadV5(ctx context.Context, params engine.Executa return invalidStatus, paramsErr("nil slotnumber post-amsterdam") case params.BlockAccessList == nil: return invalidStatus, paramsErr("nil block access list post-amsterdam") - case !api.checkFork(params.Timestamp, forks.Amsterdam): + case !api.checkFork(params.Timestamp, forks.Amsterdam, forks.BPO3, forks.BPO4, forks.BPO5, forks.Bogota): return invalidStatus, unsupportedForkErr("newPayloadV5 must only be called for amsterdam payloads") } requests := convertRequests(executionRequests) diff --git a/eth/catalyst/api_forks_test.go b/eth/catalyst/api_forks_test.go new file mode 100644 index 0000000000..f6dd5df978 --- /dev/null +++ b/eth/catalyst/api_forks_test.go @@ -0,0 +1,228 @@ +// Copyright 2026 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package catalyst + +import ( + "context" + "testing" + + "github.com/ethereum/go-ethereum/beacon/engine" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" +) + +// engineFork pins one fork to the engine API versions that serve it. +type engineFork struct { + name string + + // activate turns the fork on at the given timestamp, along with the earlier + // ones it builds upon. + activate func(cfg *params.ChainConfig, at uint64) + + // beaconRoot and slotAndGas mark the optional payload attributes the fork's + // FCU version requires. + beaconRoot bool // cancun and later + slotAndGas bool // amsterdam and later + + fcu func(*ConsensusAPI, engine.ForkchoiceStateV1, *engine.PayloadAttributes) (engine.ForkChoiceResponse, error) + getPayload func(*ConsensusAPI, engine.PayloadID) (*engine.ExecutionPayloadEnvelope, error) + newPayload func(*ConsensusAPI, *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) +} + +func fcuV3(api *ConsensusAPI, state engine.ForkchoiceStateV1, attrs *engine.PayloadAttributes) (engine.ForkChoiceResponse, error) { + return api.ForkchoiceUpdatedV3(context.Background(), state, attrs) +} + +func newPayloadV4(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) { + return api.NewPayloadV4(context.Background(), *e.ExecutionPayload, []common.Hash{}, &witnessBeaconRoot, requestsOf(e)) +} + +var engineForks = []engineFork{ + { + name: "shanghai", + activate: func(cfg *params.ChainConfig, at uint64) { cfg.ShanghaiTime = &at }, + fcu: func(api *ConsensusAPI, state engine.ForkchoiceStateV1, attrs *engine.PayloadAttributes) (engine.ForkChoiceResponse, error) { + return api.ForkchoiceUpdatedV2(context.Background(), state, attrs) + }, + getPayload: func(api *ConsensusAPI, id engine.PayloadID) (*engine.ExecutionPayloadEnvelope, error) { + return api.GetPayloadV2(id) + }, + newPayload: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) { + return api.NewPayloadV2(context.Background(), *e.ExecutionPayload) + }, + }, + { + name: "cancun", + activate: func(cfg *params.ChainConfig, at uint64) { + cfg.ShanghaiTime, cfg.CancunTime = &at, &at + }, + beaconRoot: true, + fcu: fcuV3, + getPayload: func(api *ConsensusAPI, id engine.PayloadID) (*engine.ExecutionPayloadEnvelope, error) { + return api.GetPayloadV3(id) + }, + newPayload: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) { + return api.NewPayloadV3(context.Background(), *e.ExecutionPayload, []common.Hash{}, &witnessBeaconRoot) + }, + }, + { + name: "prague", + activate: func(cfg *params.ChainConfig, at uint64) { + cfg.ShanghaiTime, cfg.CancunTime, cfg.PragueTime = &at, &at, &at + }, + beaconRoot: true, + fcu: fcuV3, + getPayload: func(api *ConsensusAPI, id engine.PayloadID) (*engine.ExecutionPayloadEnvelope, error) { + return api.GetPayloadV4(id) + }, + newPayload: newPayloadV4, + }, + { + // Osaka reuses prague's fcu and newPayload but is the only fork that + // getPayloadV5 admits, so it is not redundant with prague here the way + // it is for the witness endpoints. + name: "osaka", + activate: func(cfg *params.ChainConfig, at uint64) { + cfg.ShanghaiTime, cfg.CancunTime, cfg.PragueTime = &at, &at, &at + cfg.OsakaTime = &at + }, + beaconRoot: true, + fcu: fcuV3, + getPayload: func(api *ConsensusAPI, id engine.PayloadID) (*engine.ExecutionPayloadEnvelope, error) { + return api.GetPayloadV5(id) + }, + newPayload: newPayloadV4, + }, + { + name: "amsterdam", + activate: func(cfg *params.ChainConfig, at uint64) { + cfg.ShanghaiTime, cfg.CancunTime, cfg.PragueTime = &at, &at, &at + cfg.OsakaTime, cfg.AmsterdamTime = &at, &at + }, + beaconRoot: true, + slotAndGas: true, + fcu: func(api *ConsensusAPI, state engine.ForkchoiceStateV1, attrs *engine.PayloadAttributes) (engine.ForkChoiceResponse, error) { + return api.ForkchoiceUpdatedV4(context.Background(), state, attrs, nil) + }, + getPayload: func(api *ConsensusAPI, id engine.PayloadID) (*engine.ExecutionPayloadEnvelope, error) { + return api.GetPayloadV6(id) + }, + newPayload: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) { + return api.NewPayloadV5(context.Background(), *e.ExecutionPayload, []common.Hash{}, &witnessBeaconRoot, requestsOf(e)) + }, + }, +} + +// TestEngineAPIAcrossForks drives every fork through the block lifecycle the +// consensus client performs: forkchoiceUpdated starts a build, getPayload +// collects it, newPayload imports it, and a second forkchoiceUpdated makes it +// the head. +func TestEngineAPIAcrossForks(t *testing.T) { + for _, fork := range engineForks { + t.Run(fork.name, func(t *testing.T) { + testEngineRoundtrip(t, fork) + }) + } +} + +func testEngineRoundtrip(t *testing.T, fork engineFork) { + genesis, blocks := forkTestChain(t, 10) + + // Activate the fork just past the chain we preload, so the block we build is + // the first one under it. Only the config is touched here: it is not part of + // the genesis hash, so the already-generated blocks still chain onto it. + forkTime := blocks[len(blocks)-2].Time() + 5 + fork.activate(genesis.Config, forkTime) + genesis.Config.BlobScheduleConfig = params.DefaultBlobSchedule + + n, ethservice := startEthService(t, genesis, blocks[:9]) + defer n.Close() + + api := newConsensusAPIWithoutHeartbeat(ethservice) + + // The pool is primed so the builder has work, but the block's contents are + // deliberately not asserted: the versioned getPayload resolves to whatever + // the builder had ready and stops it, so the transaction count is a race. + // Block contents under each fork are covered by TestWitnessAPIsAcrossForks, + // which resolves the full payload. + ethservice.TxPool().Add(blocks[9].Transactions(), true) + + parent := blocks[8] + attrs := &engine.PayloadAttributes{ + Timestamp: parent.Time() + 5, + Withdrawals: make([]*types.Withdrawal, 0), + } + if fork.beaconRoot { + attrs.BeaconRoot = &witnessBeaconRoot + } + if fork.slotAndGas { + attrs.SlotNumber = &witnessSlotNumber + attrs.TargetGasLimit = &witnessGasTarget + } + state := engine.ForkchoiceStateV1{ + HeadBlockHash: parent.Hash(), + } + resp, err := fork.fcu(api, state, attrs) + if err != nil { + t.Fatalf("forkchoiceUpdated: %v", err) + } + if resp.PayloadStatus.Status != engine.VALID { + t.Fatalf("forkchoiceUpdated status %q, want %q", resp.PayloadStatus.Status, engine.VALID) + } + if resp.PayloadID == nil { + t.Fatal("forkchoiceUpdated returned no payload id") + } + envelope, err := fork.getPayload(api, *resp.PayloadID) + if err != nil { + t.Fatalf("getPayload: %v", err) + } + payload := envelope.ExecutionPayload + if payload.ParentHash != parent.Hash() { + t.Fatalf("built on %x, want %x", payload.ParentHash, parent.Hash()) + } + // Import the block the way a node that did not build it would. + status, err := fork.newPayload(api, envelope) + if err != nil { + t.Fatalf("newPayload: %v", err) + } + if status.Status != engine.VALID { + t.Fatalf("newPayload status %q, want %q (%v)", status.Status, engine.VALID, status.ValidationError) + } + if status.LatestValidHash == nil || *status.LatestValidHash != payload.BlockHash { + t.Fatalf("newPayload latest valid hash = %v, want %x", status.LatestValidHash, payload.BlockHash) + } + // Importing alone must not move the head; only the forkchoice call does. + if head := ethservice.BlockChain().CurrentBlock().Hash(); head != parent.Hash() { + t.Fatalf("head moved on newPayload alone: %x, want %x", head, parent.Hash()) + } + // Now adopt it, and check it really became canonical. + resp, err = fork.fcu(api, engine.ForkchoiceStateV1{HeadBlockHash: payload.BlockHash}, nil) + if err != nil { + t.Fatalf("forkchoiceUpdated (adopt): %v", err) + } + if resp.PayloadStatus.Status != engine.VALID { + t.Fatalf("forkchoiceUpdated (adopt) status %q, want %q", resp.PayloadStatus.Status, engine.VALID) + } + head := ethservice.BlockChain().CurrentBlock() + if head.Hash() != payload.BlockHash { + t.Fatalf("head = %x, want %x", head.Hash(), payload.BlockHash) + } + if head.Number.Uint64() != parent.NumberU64()+1 { + t.Fatalf("head number = %d, want %d", head.Number.Uint64(), parent.NumberU64()+1) + } +} diff --git a/eth/catalyst/api_test.go b/eth/catalyst/api_test.go index 9f200cc422..8f16917db6 100644 --- a/eth/catalyst/api_test.go +++ b/eth/catalyst/api_test.go @@ -88,6 +88,16 @@ func generateMergeChain(n int, merged bool) (*core.Genesis, []*types.Block) { Nonce: 0, Balance: big.NewInt(0), }, + // The post-shanghai forks issue system calls into these contracts on + // every block, and an empty one invalidates the block, so they have + // to be present from genesis. The alloc feeds the genesis hash, so + // they cannot be added after the chain has been generated. + params.HistoryStorageAddress: {Nonce: 1, Code: params.HistoryStorageCode, Balance: common.Big0}, + params.WithdrawalQueueAddress: {Nonce: 1, Code: params.WithdrawalQueueCode, Balance: common.Big0}, + params.ConsolidationQueueAddress: {Nonce: 1, Code: params.ConsolidationQueueCode, Balance: common.Big0}, + params.BuilderDepositAddress: {Nonce: 1, Code: params.BuilderDepositCode, Balance: common.Big0}, + params.BuilderExitAddress: {Nonce: 1, Code: params.BuilderExitCode, Balance: common.Big0}, + params.DeterministicFactoryAddress: {Nonce: 1, Code: params.DeterministicFactoryCode, Balance: common.Big0}, }, ExtraData: []byte("test genesis"), Timestamp: 9000, diff --git a/eth/catalyst/witness.go b/eth/catalyst/witness.go index c0137ae8cc..ade92109d5 100644 --- a/eth/catalyst/witness.go +++ b/eth/catalyst/witness.go @@ -27,6 +27,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/stateless" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params/forks" @@ -85,6 +86,31 @@ func (api *ConsensusAPI) ForkchoiceUpdatedWithWitnessV3(ctx context.Context, upd return api.forkchoiceUpdated(ctx, update, params, engine.PayloadV3, true) } +// ForkchoiceUpdatedWithWitnessV4 is analogous to ForkchoiceUpdatedV4, only it +// generates an execution witness too if block building was requested. +func (api *ConsensusAPI) ForkchoiceUpdatedWithWitnessV4(ctx context.Context, update engine.ForkchoiceStateV1, params *engine.PayloadAttributes, custodyColumns *types.CustodyBitmap) (engine.ForkChoiceResponse, error) { + if params != nil { + switch { + case params.Withdrawals == nil: + return engine.STATUS_INVALID, attributesErr("missing withdrawals") + case params.BeaconRoot == nil: + return engine.STATUS_INVALID, attributesErr("missing beacon root") + case params.SlotNumber == nil: + return engine.STATUS_INVALID, attributesErr("missing slot number") + case !api.checkFork(params.Timestamp, forks.Amsterdam): + return engine.STATUS_INVALID, unsupportedForkErr("fcuV4 must only be called for amsterdam payloads") + } + } + if custodyColumns != nil { + api.eth.BlobFetcher().UpdateCustody(*custodyColumns) + } + // TODO(matt): the spec requires that fcu is applied when called on a valid + // hash, even if params are wrong. To do this we need to split up + // forkchoiceUpdate into a function that only updates the head and then a + // function that kicks off block construction. + return api.forkchoiceUpdated(ctx, update, params, engine.PayloadV4, true) +} + // NewPayloadWithWitnessV1 is analogous to NewPayloadV1, only it also generates // and returns a stateless witness after running the payload. func (api *ConsensusAPI) NewPayloadWithWitnessV1(ctx context.Context, params engine.ExecutableData) (engine.PayloadStatusV1, error) { @@ -152,7 +178,7 @@ func (api *ConsensusAPI) NewPayloadWithWitnessV4(ctx context.Context, params eng return invalidStatus, paramsErr("nil beaconRoot post-cancun") case executionRequests == nil: return invalidStatus, paramsErr("nil executionRequests post-prague") - case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5, forks.Bogota): + case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2): return invalidStatus, unsupportedForkErr("newPayloadV4 must only be called for prague/osaka payloads") } requests := convertRequests(executionRequests) @@ -182,7 +208,7 @@ func (api *ConsensusAPI) NewPayloadWithWitnessV5(ctx context.Context, params eng return invalidStatus, paramsErr("nil block access list post-amsterdam") case params.SlotNumber == nil: return invalidStatus, paramsErr("nil slotnumber post-amsterdam") - case !api.checkFork(params.Timestamp, forks.Amsterdam): + case !api.checkFork(params.Timestamp, forks.Amsterdam, forks.BPO3, forks.BPO4, forks.BPO5, forks.Bogota): return invalidStatus, unsupportedForkErr("newPayloadV5 must only be called for amsterdam payloads") } requests := convertRequests(executionRequests) @@ -259,7 +285,37 @@ func (api *ConsensusAPI) ExecuteStatelessPayloadV4(params engine.ExecutableData, return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil beaconRoot post-cancun") case executionRequests == nil: return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil executionRequests post-prague") - case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5, forks.Bogota): + case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2): + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, unsupportedForkErr("newPayloadV4 must only be called for prague/osaka payloads") + } + requests := convertRequests(executionRequests) + if err := validateRequests(requests); err != nil { + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(err) + } + return api.executeStatelessPayload(params, versionedHashes, beaconRoot, requests, opaqueWitness) +} + +// ExecuteStatelessPayloadV5 is analogous to NewPayloadV5, only it operates in +// a stateless mode on top of a provided witness instead of the local database. +func (api *ConsensusAPI) ExecuteStatelessPayloadV5(params engine.ExecutableData, versionedHashes []common.Hash, beaconRoot *common.Hash, executionRequests []hexutil.Bytes, opaqueWitness hexutil.Bytes) (engine.StatelessPayloadStatusV1, error) { + switch { + case params.Withdrawals == nil: + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil withdrawals post-shanghai") + case params.ExcessBlobGas == nil: + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil excessBlobGas post-cancun") + case params.BlobGasUsed == nil: + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil blobGasUsed post-cancun") + case versionedHashes == nil: + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil versionedHashes post-cancun") + case beaconRoot == nil: + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil beaconRoot post-cancun") + case executionRequests == nil: + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil executionRequests post-prague") + case params.SlotNumber == nil: + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil slotnumber post-amsterdam") + case params.BlockAccessList == nil: + return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil block access list post-amsterdam") + case !api.checkFork(params.Timestamp, forks.Amsterdam, forks.BPO3, forks.BPO4, forks.BPO5, forks.Bogota): return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, unsupportedForkErr("newPayloadV4 must only be called for prague/osaka payloads") } requests := convertRequests(executionRequests) diff --git a/eth/catalyst/witness_fork_test.go b/eth/catalyst/witness_fork_test.go new file mode 100644 index 0000000000..40dd63cb8b --- /dev/null +++ b/eth/catalyst/witness_fork_test.go @@ -0,0 +1,276 @@ +// Copyright 2026 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package catalyst + +import ( + "context" + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/beacon/engine" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/consensus/beacon" + "github.com/ethereum/go-ethereum/consensus/ethash" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" +) + +var ( + witnessBeaconRoot = common.Hash{42} + witnessSlotNumber = uint64(1) + witnessGasTarget = uint64(15_000_000) +) + +// witnessFork pins one fork to the engine API versions that serve it. The +// request/response plumbing differs per version, so each fork supplies the three +// calls; everything else about driving a payload is shared by testWitnessRoundtrip. +type witnessFork struct { + name string + + // activate turns the fork on at the given timestamp. Later forks must also + // enable the earlier ones. + activate func(cfg *params.ChainConfig, at uint64) + + // version selects the payload variant the built block is retrieved as. + version engine.PayloadVersion + + // beaconRoot and slotAndGas mark the optional payload attributes the fork's + // FCU version requires. + beaconRoot bool // cancun and later + slotAndGas bool // amsterdam and later + + fcu func(*ConsensusAPI, engine.ForkchoiceStateV1, *engine.PayloadAttributes) (engine.ForkChoiceResponse, error) + newPayload func(*ConsensusAPI, *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) + stateless func(*ConsensusAPI, *engine.ExecutionPayloadEnvelope, hexutil.Bytes) (engine.StatelessPayloadStatusV1, error) +} + +// requestsOf returns the envelope's execution requests in the shape the V4/V5 +// endpoints expect: non-nil even when the block produced none, since those +// endpoints reject a nil list post-prague. +func requestsOf(envelope *engine.ExecutionPayloadEnvelope) []hexutil.Bytes { + reqs := make([]hexutil.Bytes, len(envelope.Requests)) + for i, r := range envelope.Requests { + reqs[i] = r + } + return reqs +} + +var witnessForks = []witnessFork{ + { + name: "shanghai", + activate: func(cfg *params.ChainConfig, at uint64) { cfg.ShanghaiTime = &at }, + version: engine.PayloadV2, + fcu: func(api *ConsensusAPI, state engine.ForkchoiceStateV1, attrs *engine.PayloadAttributes) (engine.ForkChoiceResponse, error) { + return api.ForkchoiceUpdatedWithWitnessV2(context.Background(), state, attrs) + }, + newPayload: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) { + return api.NewPayloadWithWitnessV2(context.Background(), *e.ExecutionPayload) + }, + stateless: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope, w hexutil.Bytes) (engine.StatelessPayloadStatusV1, error) { + return api.ExecuteStatelessPayloadV2(*e.ExecutionPayload, w) + }, + }, + { + name: "cancun", + activate: func(cfg *params.ChainConfig, at uint64) { + cfg.ShanghaiTime, cfg.CancunTime = &at, &at + }, + version: engine.PayloadV3, + beaconRoot: true, + fcu: func(api *ConsensusAPI, state engine.ForkchoiceStateV1, attrs *engine.PayloadAttributes) (engine.ForkChoiceResponse, error) { + return api.ForkchoiceUpdatedWithWitnessV3(context.Background(), state, attrs) + }, + newPayload: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) { + return api.NewPayloadWithWitnessV3(context.Background(), *e.ExecutionPayload, []common.Hash{}, &witnessBeaconRoot) + }, + stateless: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope, w hexutil.Bytes) (engine.StatelessPayloadStatusV1, error) { + return api.ExecuteStatelessPayloadV3(*e.ExecutionPayload, []common.Hash{}, &witnessBeaconRoot, w) + }, + }, + { + name: "prague", + activate: func(cfg *params.ChainConfig, at uint64) { + cfg.ShanghaiTime, cfg.CancunTime, cfg.PragueTime = &at, &at, &at + }, + version: engine.PayloadV3, + beaconRoot: true, + fcu: func(api *ConsensusAPI, state engine.ForkchoiceStateV1, attrs *engine.PayloadAttributes) (engine.ForkChoiceResponse, error) { + return api.ForkchoiceUpdatedWithWitnessV3(context.Background(), state, attrs) + }, + newPayload: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) { + return api.NewPayloadWithWitnessV4(context.Background(), *e.ExecutionPayload, []common.Hash{}, &witnessBeaconRoot, requestsOf(e)) + }, + stateless: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope, w hexutil.Bytes) (engine.StatelessPayloadStatusV1, error) { + return api.ExecuteStatelessPayloadV4(*e.ExecutionPayload, []common.Hash{}, &witnessBeaconRoot, requestsOf(e), w) + }, + }, + { + name: "amsterdam", + activate: func(cfg *params.ChainConfig, at uint64) { + cfg.ShanghaiTime, cfg.CancunTime, cfg.PragueTime = &at, &at, &at + cfg.OsakaTime, cfg.AmsterdamTime = &at, &at + }, + version: engine.PayloadV4, + beaconRoot: true, + slotAndGas: true, + fcu: func(api *ConsensusAPI, state engine.ForkchoiceStateV1, attrs *engine.PayloadAttributes) (engine.ForkChoiceResponse, error) { + return api.ForkchoiceUpdatedWithWitnessV4(context.Background(), state, attrs, nil) + }, + newPayload: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope) (engine.PayloadStatusV1, error) { + return api.NewPayloadWithWitnessV5(context.Background(), *e.ExecutionPayload, []common.Hash{}, &witnessBeaconRoot, requestsOf(e)) + }, + stateless: func(api *ConsensusAPI, e *engine.ExecutionPayloadEnvelope, w hexutil.Bytes) (engine.StatelessPayloadStatusV1, error) { + return api.ExecuteStatelessPayloadV5(*e.ExecutionPayload, []common.Hash{}, &witnessBeaconRoot, requestsOf(e), w) + }, + }, +} + +// TestWitnessAPIsAcrossForks drives every fork through the full witness path: +// forkchoiceUpdatedWithWitness builds a block, newPayloadWithWitness re-executes +// it, and executeStatelessPayload replays it from each of the two witnesses with +// no state of its own. +func TestWitnessAPIsAcrossForks(t *testing.T) { + for _, fork := range witnessForks { + t.Run(fork.name, func(t *testing.T) { + testWitnessRoundtrip(t, fork) + }) + } +} + +func testWitnessRoundtrip(t *testing.T, fork witnessFork) { + genesis, blocks := forkTestChain(t, 10) + + // Activate the fork just past the chain we preload, so the block we build is + // the first one under it. Only the config is touched here: it is not part of + // the genesis hash, so the already-generated blocks still chain onto it. + forkTime := blocks[len(blocks)-2].Time() + 5 + fork.activate(genesis.Config, forkTime) + genesis.Config.BlobScheduleConfig = params.DefaultBlobSchedule + + n, ethservice := startEthService(t, genesis, blocks[:9]) + defer n.Close() + + api := newConsensusAPIWithoutHeartbeat(ethservice) + + // Give the builder something to include, so the witness is not trivially empty. + ethservice.TxPool().Add(blocks[9].Transactions(), true) + + attrs := &engine.PayloadAttributes{ + Timestamp: blocks[8].Time() + 5, + Withdrawals: make([]*types.Withdrawal, 0), + } + if fork.beaconRoot { + attrs.BeaconRoot = &witnessBeaconRoot + } + if fork.slotAndGas { + attrs.SlotNumber = &witnessSlotNumber + attrs.TargetGasLimit = &witnessGasTarget + } + state := engine.ForkchoiceStateV1{ + HeadBlockHash: blocks[8].Hash(), + } + resp, err := fork.fcu(api, state, attrs) + if err != nil { + t.Fatalf("forkchoiceUpdatedWithWitness: %v", err) + } + if resp.PayloadID == nil { + t.Fatal("forkchoiceUpdatedWithWitness returned no payload id") + } + envelope, err := api.getPayload(*resp.PayloadID, true, nil, nil) + if err != nil { + t.Fatalf("getPayload: %v", err) + } + if envelope.Witness == nil { + t.Fatal("built payload carries no witness") + } + if have, want := len(envelope.ExecutionPayload.Transactions), blocks[9].Transactions().Len(); have != want { + t.Fatalf("built %d transactions, want %d", have, want) + } + // The witness handed out at build time must replay the block on its own. + assertStatelessRoots(t, api, fork, envelope, *envelope.Witness, "build") + + // Importing the block must produce a witness of its own, which must replay + // the block just as well. This is the path a node takes for a block it did + // not build, so a regression here is invisible to the build-side check above. + status, err := fork.newPayload(api, envelope) + if err != nil { + t.Fatalf("newPayloadWithWitness: %v", err) + } + if status.Status != engine.VALID { + t.Fatalf("newPayloadWithWitness status %q, want %q", status.Status, engine.VALID) + } + if status.Witness == nil { + t.Fatal("imported payload carries no witness") + } + assertStatelessRoots(t, api, fork, envelope, *status.Witness, "import") +} + +// assertStatelessRoots replays the payload from the given witness with the state +// and receipt roots blanked, so that a stateless run that quietly echoed the +// input back cannot pass, and checks it recomputes the originals. +func assertStatelessRoots(t *testing.T, api *ConsensusAPI, fork witnessFork, envelope *engine.ExecutionPayloadEnvelope, witness hexutil.Bytes, side string) { + t.Helper() + + wantState := envelope.ExecutionPayload.StateRoot + wantReceipts := envelope.ExecutionPayload.ReceiptsRoot + + envelope.ExecutionPayload.StateRoot = common.Hash{} + envelope.ExecutionPayload.ReceiptsRoot = common.Hash{} + defer func() { + envelope.ExecutionPayload.StateRoot = wantState + envelope.ExecutionPayload.ReceiptsRoot = wantReceipts + }() + + res, err := fork.stateless(api, envelope, witness) + if err != nil { + t.Fatalf("executeStatelessPayload (%s witness): %v", side, err) + } + if res.Status != engine.VALID { + t.Fatalf("executeStatelessPayload (%s witness) status %q, want %q", side, res.Status, engine.VALID) + } + if res.StateRoot != wantState { + t.Errorf("stateless state root (%s witness) = %x, want %x", side, res.StateRoot, wantState) + } + if res.ReceiptsRoot != wantReceipts { + t.Errorf("stateless receipt root (%s witness) = %x, want %x", side, res.ReceiptsRoot, wantReceipts) + } +} + +// forkTestChain builds a merged chain of n blocks, each carrying one transaction +// so that the payloads under test are not empty. The genesis comes from +// generateMergeChain, which pre-deploys the system contracts every post-shanghai +// fork calls into. +func forkTestChain(t *testing.T, n int) (*core.Genesis, []*types.Block) { + t.Helper() + + genesis, _ := generateMergeChain(0, true) + var nonce uint64 + _, blocks, _ := core.GenerateChainWithGenesis(genesis, beacon.New(ethash.NewFaker()), n, func(i int, g *core.BlockGen) { + g.OffsetTime(5) + tx, err := types.SignTx( + types.NewTransaction(nonce, common.Address{0xaa}, common.Big1, params.TxGas, big.NewInt(params.InitialBaseFee*2), nil), + types.LatestSigner(genesis.Config), testKey) + if err != nil { + t.Fatalf("signing chain tx: %v", err) + } + g.AddTx(tx) + nonce++ + }) + return genesis, blocks +} diff --git a/eth/protocols/snap/handler_test.go b/eth/protocols/snap/handler_test.go index b0522c20bb..a1994f3989 100644 --- a/eth/protocols/snap/handler_test.go +++ b/eth/protocols/snap/handler_test.go @@ -56,6 +56,9 @@ func makeTestBAL(minSize int) *bal.BlockAccessList { func getChainWithBALs(nBlocks int, balSize int) (*core.BlockChain, []common.Hash, []rlp.RawValue) { gspec := &core.Genesis{ Config: params.MergedTestChainConfig, + // The config is merged up to the latest fork, so the system contracts it + // calls into have to be deployed for the generated blocks to be valid. + Alloc: core.SystemContractAllocs(), } db := rawdb.NewMemoryDatabase() engine := beacon.New(ethash.NewFaker()) diff --git a/eth/tracers/api_test.go b/eth/tracers/api_test.go index 79888b4933..961bf003ae 100644 --- a/eth/tracers/api_test.go +++ b/eth/tracers/api_test.go @@ -1387,14 +1387,14 @@ func TestTraceBlockWithBasefee(t *testing.T) { t.Parallel() accounts := newAccounts(1) target := common.HexToAddress("0x1111111111111111111111111111111111111111") + alloc := core.SystemContractAllocs() + alloc[accounts[0].addr] = types.Account{Balance: big.NewInt(1 * params.Ether)} + alloc[target] = types.Account{Nonce: 1, Code: []byte{ + byte(vm.BASEFEE), byte(vm.STOP), + }} genesis := &core.Genesis{ Config: params.AllDevChainProtocolChanges, - Alloc: types.GenesisAlloc{ - accounts[0].addr: {Balance: big.NewInt(1 * params.Ether)}, - target: {Nonce: 1, Code: []byte{ - byte(vm.BASEFEE), byte(vm.STOP), - }}, - }, + Alloc: alloc, } genBlocks := 1 signer := types.HomesteadSigner{} diff --git a/eth/tracers/internal/tracetest/selfdestruct_state_test.go b/eth/tracers/internal/tracetest/selfdestruct_state_test.go index 39067e8efc..72d76f62b5 100644 --- a/eth/tracers/internal/tracetest/selfdestruct_state_test.go +++ b/eth/tracers/internal/tracetest/selfdestruct_state_test.go @@ -591,6 +591,18 @@ func TestSelfdestructStateTracer(t *testing.T) { t.Run(tt.name, func(t *testing.T) { t.Parallel() + // The post-6780 cases run on a config merged up to the latest fork, + // whose system calls invalidate the block unless their contracts are + // deployed. Anything the case allocated explicitly wins. + if tt.genesis.Alloc == nil { + tt.genesis.Alloc = types.GenesisAlloc{} + } + for addr, account := range core.SystemContractAllocs() { + if _, ok := tt.genesis.Alloc[addr]; !ok { + tt.genesis.Alloc[addr] = account + } + } + var ( signer = types.HomesteadSigner{} tx *types.Transaction diff --git a/eth/tracers/internal/tracetest/supply_test.go b/eth/tracers/internal/tracetest/supply_test.go index 2b5a8212aa..d01e1ac6d3 100644 --- a/eth/tracers/internal/tracetest/supply_test.go +++ b/eth/tracers/internal/tracetest/supply_test.go @@ -72,6 +72,10 @@ func TestSupplyOmittedFields(t *testing.T) { config = *params.MergedTestChainConfig gspec = &core.Genesis{ Config: &config, + // The config is merged up to the latest fork, so the system contracts + // it calls into have to be deployed. They hold no balance, so the + // traced supply is unaffected. + Alloc: core.SystemContractAllocs(), } ) @@ -84,7 +88,7 @@ func TestSupplyOmittedFields(t *testing.T) { expected := supplyInfo{ Number: 0, - Hash: common.HexToHash("0x3055fc27d6b4a08eb07033a0d1ee755a4b2988086f28a6189eac1b507525eeb1"), + Hash: common.HexToHash("0x15b41f6dfb24667e4b631d45f847b7afcc63fa2abbc95692bb8bf0ac0c0e35ef"), ParentHash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), } actual := out[expected.Number] @@ -273,6 +277,10 @@ func TestSupplyWithdrawals(t *testing.T) { config = *params.MergedTestChainConfig gspec = &core.Genesis{ Config: &config, + // The config is merged up to the latest fork, so the system contracts + // it calls into have to be deployed. They hold no balance, so the + // traced supply is unaffected. + Alloc: core.SystemContractAllocs(), } ) diff --git a/ethclient/ethclient_test.go b/ethclient/ethclient_test.go index fb04d77669..902a7da751 100644 --- a/ethclient/ethclient_test.go +++ b/ethclient/ethclient_test.go @@ -67,10 +67,9 @@ var ( var genesis = &core.Genesis{ Config: params.AllDevChainProtocolChanges, - Alloc: types.GenesisAlloc{ - testAddr: {Balance: testBalance}, - revertContractAddr: {Code: revertCode}, - }, + // The config activates every fork from genesis, so the system contracts it + // calls into have to be deployed for the chain to be valid. + Alloc: genesisAlloc(), ExtraData: []byte("test genesis"), Timestamp: 9000, BaseFee: big.NewInt(params.InitialBaseFee), @@ -1050,3 +1049,12 @@ func TestSimulateV1WithBlockNumberOrHash(t *testing.T) { t.Fatalf("expected 1 block result, got %d", len(results)) } } + +// genesisAlloc funds the test accounts on top of the system contracts every +// enabled fork calls into. +func genesisAlloc() types.GenesisAlloc { + alloc := core.SystemContractAllocs() + alloc[testAddr] = types.Account{Balance: testBalance} + alloc[revertContractAddr] = types.Account{Code: revertCode} + return alloc +} diff --git a/ethclient/simulated/backend.go b/ethclient/simulated/backend.go index 160ad924bf..d80c6e1202 100644 --- a/ethclient/simulated/backend.go +++ b/ethclient/simulated/backend.go @@ -18,6 +18,7 @@ package simulated import ( "errors" + "maps" "time" "github.com/ethereum/go-ethereum" @@ -78,11 +79,17 @@ func NewBackend(alloc types.GenesisAlloc, options ...func(nodeConf *node.Config, nodeConf.DataDir = "" nodeConf.P2P = p2p.Config{NoDiscovery: true} + // The dev chain starts out on every fork, so the system contracts those forks + // call into have to be present from genesis. The caller's alloc wins on + // conflict, and is copied rather than mutated in place. + genesisAlloc := core.SystemContractAllocs() + maps.Copy(genesisAlloc, alloc) + ethConf := ethconfig.Defaults ethConf.Genesis = &core.Genesis{ Config: params.AllDevChainProtocolChanges, GasLimit: ethconfig.Defaults.Miner.GasCeil, - Alloc: alloc, + Alloc: genesisAlloc, } ethConf.SyncMode = ethconfig.FullSync ethConf.TxPool.NoLocals = true diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index 80a9036ecc..ab0ccb2046 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -466,8 +466,20 @@ func newTestBackend(t *testing.T, n int, gspec *core.Genesis, engine consensus.E options.TxLookupLimit = 0 // index all txs accman, acc := newTestAccountManager(t) + if gspec.Alloc == nil { + gspec.Alloc = types.GenesisAlloc{} + } gspec.Alloc[acc.Address] = types.Account{Balance: big.NewInt(params.Ether)} + // Most of the configs used here are merged up to the latest fork, whose + // system calls invalidate every generated block unless the contracts they + // target are deployed. Anything the caller allocated explicitly wins. + for addr, account := range core.SystemContractAllocs() { + if _, ok := gspec.Alloc[addr]; !ok { + gspec.Alloc[addr] = account + } + } + // Generate blocks for testing db, blocks, receipts := core.GenerateChainWithGenesis(gspec, engine, n+1, generator) diff --git a/internal/ethapi/testdata/eth_getBlockByHash-hash-1.json b/internal/ethapi/testdata/eth_getBlockByHash-hash-1.json index 11c0545ffa..2a027dd1c0 100644 --- a/internal/ethapi/testdata/eth_getBlockByHash-hash-1.json +++ b/internal/ethapi/testdata/eth_getBlockByHash-hash-1.json @@ -4,17 +4,17 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xeeb5c1852740ca4bbe65b0f57baf80634ed12a2b44affe30eec3fb54437c3926", + "hash": "0x905befae7e53cf8e68e667f3b8b43c7baf6785c5df04cc350d919ede888420a3", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0x1", - "parentHash": "0x98e056de84de969782b238b4509b32814627ba443ea622054a79c2bc7e4d92c7", + "parentHash": "0x876370be1a166be5dc6f0daf18b737a78f1145053529b57ee5269c05e34a5fc6", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x26a", - "stateRoot": "0x4acfcd1a6ab9f5e62411021ecd8a749976ae50b0590e967471264b372d7ac55b", + "stateRoot": "0x49564ccda9b624135d5895ecbf8143b267e2eaac2749ef4ff8647893feabc4aa", "timestamp": "0xa", "transactions": [ "0x644a31c354391520d00e95b9affbbb010fc79ac268144ab8e28207f4cf51097e" diff --git a/internal/ethapi/testdata/eth_getBlockByHash-hash-genesis.json b/internal/ethapi/testdata/eth_getBlockByHash-hash-genesis.json index 134d60c67a..c27fba4ee6 100644 --- a/internal/ethapi/testdata/eth_getBlockByHash-hash-genesis.json +++ b/internal/ethapi/testdata/eth_getBlockByHash-hash-genesis.json @@ -4,7 +4,7 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x0", - "hash": "0x98e056de84de969782b238b4509b32814627ba443ea622054a79c2bc7e4d92c7", + "hash": "0x876370be1a166be5dc6f0daf18b737a78f1145053529b57ee5269c05e34a5fc6", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -14,7 +14,7 @@ "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x200", - "stateRoot": "0xd883f48b83cc9c1e8389453beb4ad4e572462eec049ca4fffbe16ecefb3fe937", + "stateRoot": "0x08c0a4621b80820d1ff6a202cd06d5743da1d7d2cd446c9eb0055d83952a0deb", "timestamp": "0x0", "transactions": [], "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", diff --git a/internal/ethapi/testdata/eth_getBlockByHash-hash-latest-1-fullTx.json b/internal/ethapi/testdata/eth_getBlockByHash-hash-latest-1-fullTx.json index 6aac5b682e..f687bcac42 100644 --- a/internal/ethapi/testdata/eth_getBlockByHash-hash-latest-1-fullTx.json +++ b/internal/ethapi/testdata/eth_getBlockByHash-hash-latest-1-fullTx.json @@ -4,21 +4,21 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "hash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0x9", - "parentHash": "0xcd7d78eaa8b0ddbd2956fc37e1883c30df27b43e8cc9a982020310656736637c", + "parentHash": "0x3dd2e9ec409275432d322ebdf3b8ef6549373a23d13d8b4237c14fd372465dcc", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x26a", - "stateRoot": "0x78b2b19ef1a0276dbbc23a875dbf60ae5d10dafa0017098473c4871abd3e7b5c", + "stateRoot": "0xbc2f293d79edc4ee38e8fa8e01ecdeb38a5d07d6cd84394b696eb77b8905d5b5", "timestamp": "0x5a", "transactions": [ { - "blockHash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "blockHash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "blockNumber": "0x9", "blockTimestamp": "0x5a", "from": "0x703c4b2bd70c169f5717101caee543299fc946c7", diff --git a/internal/ethapi/testdata/eth_getBlockByHash-hash-latest.json b/internal/ethapi/testdata/eth_getBlockByHash-hash-latest.json index 13876b5a52..e90e0d0548 100644 --- a/internal/ethapi/testdata/eth_getBlockByHash-hash-latest.json +++ b/internal/ethapi/testdata/eth_getBlockByHash-hash-latest.json @@ -4,17 +4,17 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xa063415a5020f1569fae73ecb0d37bc5649ebe86d59e764a389eb37814bd42cb", + "hash": "0x4e06dbb49c6882dfcd688155fbe77d53fe28502832b22d3d775ae732de83e630", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0xa", - "parentHash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "parentHash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x26a", - "stateRoot": "0x118f1433ae23c4d1c12f5bd652baddb72611c55ac1cd6af6620d209db222f9e6", + "stateRoot": "0x113f4408a512695349093f9325c26229c5baf240fd61441c8ee1b38371526188", "timestamp": "0x64", "transactions": [ "0x3ee4094ca1e0b07a66dd616a057e081e53144ca7e9685a126fd4dda9ca042644" diff --git a/internal/ethapi/testdata/eth_getBlockByNumber-number-0.json b/internal/ethapi/testdata/eth_getBlockByNumber-number-0.json index 134d60c67a..c27fba4ee6 100644 --- a/internal/ethapi/testdata/eth_getBlockByNumber-number-0.json +++ b/internal/ethapi/testdata/eth_getBlockByNumber-number-0.json @@ -4,7 +4,7 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x0", - "hash": "0x98e056de84de969782b238b4509b32814627ba443ea622054a79c2bc7e4d92c7", + "hash": "0x876370be1a166be5dc6f0daf18b737a78f1145053529b57ee5269c05e34a5fc6", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -14,7 +14,7 @@ "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x200", - "stateRoot": "0xd883f48b83cc9c1e8389453beb4ad4e572462eec049ca4fffbe16ecefb3fe937", + "stateRoot": "0x08c0a4621b80820d1ff6a202cd06d5743da1d7d2cd446c9eb0055d83952a0deb", "timestamp": "0x0", "transactions": [], "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", diff --git a/internal/ethapi/testdata/eth_getBlockByNumber-number-1.json b/internal/ethapi/testdata/eth_getBlockByNumber-number-1.json index 11c0545ffa..2a027dd1c0 100644 --- a/internal/ethapi/testdata/eth_getBlockByNumber-number-1.json +++ b/internal/ethapi/testdata/eth_getBlockByNumber-number-1.json @@ -4,17 +4,17 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xeeb5c1852740ca4bbe65b0f57baf80634ed12a2b44affe30eec3fb54437c3926", + "hash": "0x905befae7e53cf8e68e667f3b8b43c7baf6785c5df04cc350d919ede888420a3", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0x1", - "parentHash": "0x98e056de84de969782b238b4509b32814627ba443ea622054a79c2bc7e4d92c7", + "parentHash": "0x876370be1a166be5dc6f0daf18b737a78f1145053529b57ee5269c05e34a5fc6", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x26a", - "stateRoot": "0x4acfcd1a6ab9f5e62411021ecd8a749976ae50b0590e967471264b372d7ac55b", + "stateRoot": "0x49564ccda9b624135d5895ecbf8143b267e2eaac2749ef4ff8647893feabc4aa", "timestamp": "0xa", "transactions": [ "0x644a31c354391520d00e95b9affbbb010fc79ac268144ab8e28207f4cf51097e" diff --git a/internal/ethapi/testdata/eth_getBlockByNumber-number-latest-1.json b/internal/ethapi/testdata/eth_getBlockByNumber-number-latest-1.json index 6aac5b682e..f687bcac42 100644 --- a/internal/ethapi/testdata/eth_getBlockByNumber-number-latest-1.json +++ b/internal/ethapi/testdata/eth_getBlockByNumber-number-latest-1.json @@ -4,21 +4,21 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "hash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0x9", - "parentHash": "0xcd7d78eaa8b0ddbd2956fc37e1883c30df27b43e8cc9a982020310656736637c", + "parentHash": "0x3dd2e9ec409275432d322ebdf3b8ef6549373a23d13d8b4237c14fd372465dcc", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x26a", - "stateRoot": "0x78b2b19ef1a0276dbbc23a875dbf60ae5d10dafa0017098473c4871abd3e7b5c", + "stateRoot": "0xbc2f293d79edc4ee38e8fa8e01ecdeb38a5d07d6cd84394b696eb77b8905d5b5", "timestamp": "0x5a", "transactions": [ { - "blockHash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "blockHash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "blockNumber": "0x9", "blockTimestamp": "0x5a", "from": "0x703c4b2bd70c169f5717101caee543299fc946c7", diff --git a/internal/ethapi/testdata/eth_getBlockByNumber-tag-latest.json b/internal/ethapi/testdata/eth_getBlockByNumber-tag-latest.json index 13876b5a52..e90e0d0548 100644 --- a/internal/ethapi/testdata/eth_getBlockByNumber-tag-latest.json +++ b/internal/ethapi/testdata/eth_getBlockByNumber-tag-latest.json @@ -4,17 +4,17 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xa063415a5020f1569fae73ecb0d37bc5649ebe86d59e764a389eb37814bd42cb", + "hash": "0x4e06dbb49c6882dfcd688155fbe77d53fe28502832b22d3d775ae732de83e630", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0xa", - "parentHash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "parentHash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x26a", - "stateRoot": "0x118f1433ae23c4d1c12f5bd652baddb72611c55ac1cd6af6620d209db222f9e6", + "stateRoot": "0x113f4408a512695349093f9325c26229c5baf240fd61441c8ee1b38371526188", "timestamp": "0x64", "transactions": [ "0x3ee4094ca1e0b07a66dd616a057e081e53144ca7e9685a126fd4dda9ca042644" diff --git a/internal/ethapi/testdata/eth_getBlockByNumber-tag-pending-fullTx.json b/internal/ethapi/testdata/eth_getBlockByNumber-tag-pending-fullTx.json index fc60111244..2ac240b1ae 100644 --- a/internal/ethapi/testdata/eth_getBlockByNumber-tag-pending-fullTx.json +++ b/internal/ethapi/testdata/eth_getBlockByNumber-tag-pending-fullTx.json @@ -10,15 +10,15 @@ "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": null, "number": "0xb", - "parentHash": "0xa063415a5020f1569fae73ecb0d37bc5649ebe86d59e764a389eb37814bd42cb", + "parentHash": "0x4e06dbb49c6882dfcd688155fbe77d53fe28502832b22d3d775ae732de83e630", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x26a", - "stateRoot": "0xce0e05397e548614a5b93254662174329466f8f4b1b391eb36fec9a7a591e58e", + "stateRoot": "0xca16697183bb8f4e0745aab7b1ac80a92bfc91f462459f3576d036696d537340", "timestamp": "0x6e", "transactions": [ { - "blockHash": "0xfda6c7cb7a3a712e0c424909a7724cab0448e89e286617fa8d5fd27f63f28bd2", + "blockHash": "0x5054a5f11da927cbad0d49689bd55e0b3ce6b6516a66218162451559c7790435", "blockNumber": "0xb", "blockTimestamp": "0x6e", "from": "0x703c4b2bd70c169f5717101caee543299fc946c7", diff --git a/internal/ethapi/testdata/eth_getBlockByNumber-tag-pending.json b/internal/ethapi/testdata/eth_getBlockByNumber-tag-pending.json index 3254482cd9..34f6fbce66 100644 --- a/internal/ethapi/testdata/eth_getBlockByNumber-tag-pending.json +++ b/internal/ethapi/testdata/eth_getBlockByNumber-tag-pending.json @@ -10,11 +10,11 @@ "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": null, "number": "0xb", - "parentHash": "0xa063415a5020f1569fae73ecb0d37bc5649ebe86d59e764a389eb37814bd42cb", + "parentHash": "0x4e06dbb49c6882dfcd688155fbe77d53fe28502832b22d3d775ae732de83e630", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x26a", - "stateRoot": "0xce0e05397e548614a5b93254662174329466f8f4b1b391eb36fec9a7a591e58e", + "stateRoot": "0xca16697183bb8f4e0745aab7b1ac80a92bfc91f462459f3576d036696d537340", "timestamp": "0x6e", "transactions": [ "0xd773fbb47ec87b1a958ac16430943ddf2797ecae2b33fe7b16ddb334e30325ed" diff --git a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-blob-tx.json b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-blob-tx.json index f05cdb1cfd..998207f9e0 100644 --- a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-blob-tx.json +++ b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-blob-tx.json @@ -2,7 +2,7 @@ { "blobGasPrice": "0x1", "blobGasUsed": "0x20000", - "blockHash": "0x5f58514bcb3b216908f0aff6ced44666c3aa250df06093150ac850a7a7850f3c", + "blockHash": "0xe2f3ebf9a6babca5d8765c59467e2e61048b938bef07a137a22c3009ae053563", "blockNumber": "0x6", "contractAddress": null, "cumulativeGasUsed": "0x5208", diff --git a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-contract-create-tx.json b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-contract-create-tx.json index 453e0abe8a..142459e771 100644 --- a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-contract-create-tx.json +++ b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-contract-create-tx.json @@ -1,6 +1,6 @@ [ { - "blockHash": "0xb3e447c77374fd285964cba692e96b1673a88a959726826b5b6e2dca15472b0a", + "blockHash": "0x88b8eb895bc8f203b01fb0b6608d375ebd90233d348efde19970f1fc66fac815", "blockNumber": "0x2", "contractAddress": "0xae9bea628c4ce503dcfd7e305cab4e29e7476592", "cumulativeGasUsed": "0xcf50", diff --git a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-dynamic-fee-tx.json b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-dynamic-fee-tx.json index 2595e38b20..1368930dc1 100644 --- a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-dynamic-fee-tx.json +++ b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-dynamic-fee-tx.json @@ -1,6 +1,6 @@ [ { - "blockHash": "0x47cd44027bb55856a175e36be0396bad221e52172529d9c1bf12bf5424a041ae", + "blockHash": "0x9f48b38b91aaedc1a4a063221ee19a758a3a942c4a87dbe76e9906c4047b1ad1", "blockNumber": "0x4", "contractAddress": null, "cumulativeGasUsed": "0x5564", diff --git a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-legacy-contract-call-tx.json b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-legacy-contract-call-tx.json index d3ba5aca9b..22d0964095 100644 --- a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-legacy-contract-call-tx.json +++ b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-legacy-contract-call-tx.json @@ -1,6 +1,6 @@ [ { - "blockHash": "0xcc6225bf39327429a3d869af71182d619a354155187d0b5a8ecd6a9309cffcaa", + "blockHash": "0x46bce7ad1b4614ad7b452d82c1422e695b048afdbc6d6a3465b15da0bdf06b08", "blockNumber": "0x3", "contractAddress": null, "cumulativeGasUsed": "0x5e28", @@ -19,7 +19,7 @@ "blockNumber": "0x3", "transactionHash": "0xeaf3921cbf03ba45bad4e6ab807b196ce3b2a0b5bacc355b6272fa96b11b4287", "transactionIndex": "0x0", - "blockHash": "0xcc6225bf39327429a3d869af71182d619a354155187d0b5a8ecd6a9309cffcaa", + "blockHash": "0x46bce7ad1b4614ad7b452d82c1422e695b048afdbc6d6a3465b15da0bdf06b08", "blockTimestamp": "0x1e", "logIndex": "0x0", "removed": false diff --git a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-legacy-transfer-tx.json b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-legacy-transfer-tx.json index 7af5016079..b216a2385a 100644 --- a/internal/ethapi/testdata/eth_getBlockReceipts-block-with-legacy-transfer-tx.json +++ b/internal/ethapi/testdata/eth_getBlockReceipts-block-with-legacy-transfer-tx.json @@ -1,6 +1,6 @@ [ { - "blockHash": "0xe9bd1d8c303b1af5c704b9d78e62c54a34af47e0db04ac1389a5ef74a619b9da", + "blockHash": "0xedc074cd3d794166c244e6011710381bac11f03abdc5840c5897d4fd1aac87c2", "blockNumber": "0x1", "contractAddress": null, "cumulativeGasUsed": "0x5208", diff --git a/internal/ethapi/testdata/eth_getBlockReceipts-tag-latest.json b/internal/ethapi/testdata/eth_getBlockReceipts-tag-latest.json index f05cdb1cfd..998207f9e0 100644 --- a/internal/ethapi/testdata/eth_getBlockReceipts-tag-latest.json +++ b/internal/ethapi/testdata/eth_getBlockReceipts-tag-latest.json @@ -2,7 +2,7 @@ { "blobGasPrice": "0x1", "blobGasUsed": "0x20000", - "blockHash": "0x5f58514bcb3b216908f0aff6ced44666c3aa250df06093150ac850a7a7850f3c", + "blockHash": "0xe2f3ebf9a6babca5d8765c59467e2e61048b938bef07a137a22c3009ae053563", "blockNumber": "0x6", "contractAddress": null, "cumulativeGasUsed": "0x5208", diff --git a/internal/ethapi/testdata/eth_getBlockReceipts-tag-pending.json b/internal/ethapi/testdata/eth_getBlockReceipts-tag-pending.json index 75f9f3ad99..29fc11fe2f 100644 --- a/internal/ethapi/testdata/eth_getBlockReceipts-tag-pending.json +++ b/internal/ethapi/testdata/eth_getBlockReceipts-tag-pending.json @@ -1,6 +1,6 @@ [ { - "blockHash": "0xc74cf882395ec92eec3673d93a57f9a3bf1a5e696fae3e52f252059af62756c8", + "blockHash": "0xfa6aa66507fe300a6b77de90e7ad3c225ed8cd601931011ffb37f6ab37ca3947", "blockNumber": "0x7", "contractAddress": null, "cumulativeGasUsed": "0x5208", diff --git a/internal/ethapi/testdata/eth_getHeaderByHash-hash-0.json b/internal/ethapi/testdata/eth_getHeaderByHash-hash-0.json index e1e64a3093..64b5e46ea4 100644 --- a/internal/ethapi/testdata/eth_getHeaderByHash-hash-0.json +++ b/internal/ethapi/testdata/eth_getHeaderByHash-hash-0.json @@ -4,7 +4,7 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x0", - "hash": "0x98e056de84de969782b238b4509b32814627ba443ea622054a79c2bc7e4d92c7", + "hash": "0x876370be1a166be5dc6f0daf18b737a78f1145053529b57ee5269c05e34a5fc6", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -13,7 +13,7 @@ "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "stateRoot": "0xd883f48b83cc9c1e8389453beb4ad4e572462eec049ca4fffbe16ecefb3fe937", + "stateRoot": "0x08c0a4621b80820d1ff6a202cd06d5743da1d7d2cd446c9eb0055d83952a0deb", "timestamp": "0x0", "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" } \ No newline at end of file diff --git a/internal/ethapi/testdata/eth_getHeaderByHash-hash-1.json b/internal/ethapi/testdata/eth_getHeaderByHash-hash-1.json index adfac5110c..a9822db20c 100644 --- a/internal/ethapi/testdata/eth_getHeaderByHash-hash-1.json +++ b/internal/ethapi/testdata/eth_getHeaderByHash-hash-1.json @@ -4,16 +4,16 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xeeb5c1852740ca4bbe65b0f57baf80634ed12a2b44affe30eec3fb54437c3926", + "hash": "0x905befae7e53cf8e68e667f3b8b43c7baf6785c5df04cc350d919ede888420a3", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0x1", - "parentHash": "0x98e056de84de969782b238b4509b32814627ba443ea622054a79c2bc7e4d92c7", + "parentHash": "0x876370be1a166be5dc6f0daf18b737a78f1145053529b57ee5269c05e34a5fc6", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "stateRoot": "0x4acfcd1a6ab9f5e62411021ecd8a749976ae50b0590e967471264b372d7ac55b", + "stateRoot": "0x49564ccda9b624135d5895ecbf8143b267e2eaac2749ef4ff8647893feabc4aa", "timestamp": "0xa", "transactionsRoot": "0xca0ebcce920d2cdfbf9e1dbe90ed3441a1a576f344bd80e60508da814916f4e7" } \ No newline at end of file diff --git a/internal/ethapi/testdata/eth_getHeaderByHash-hash-latest-1.json b/internal/ethapi/testdata/eth_getHeaderByHash-hash-latest-1.json index 39209a86db..27ec46fece 100644 --- a/internal/ethapi/testdata/eth_getHeaderByHash-hash-latest-1.json +++ b/internal/ethapi/testdata/eth_getHeaderByHash-hash-latest-1.json @@ -4,16 +4,16 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "hash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0x9", - "parentHash": "0xcd7d78eaa8b0ddbd2956fc37e1883c30df27b43e8cc9a982020310656736637c", + "parentHash": "0x3dd2e9ec409275432d322ebdf3b8ef6549373a23d13d8b4237c14fd372465dcc", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "stateRoot": "0x78b2b19ef1a0276dbbc23a875dbf60ae5d10dafa0017098473c4871abd3e7b5c", + "stateRoot": "0xbc2f293d79edc4ee38e8fa8e01ecdeb38a5d07d6cd84394b696eb77b8905d5b5", "timestamp": "0x5a", "transactionsRoot": "0x0767ed8359337dc6a8fdc77fe52db611bed1be87aac73c4556b1bf1dd3d190a5" } \ No newline at end of file diff --git a/internal/ethapi/testdata/eth_getHeaderByHash-hash-latest.json b/internal/ethapi/testdata/eth_getHeaderByHash-hash-latest.json index 5313348a50..8916176179 100644 --- a/internal/ethapi/testdata/eth_getHeaderByHash-hash-latest.json +++ b/internal/ethapi/testdata/eth_getHeaderByHash-hash-latest.json @@ -4,16 +4,16 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xa063415a5020f1569fae73ecb0d37bc5649ebe86d59e764a389eb37814bd42cb", + "hash": "0x4e06dbb49c6882dfcd688155fbe77d53fe28502832b22d3d775ae732de83e630", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0xa", - "parentHash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "parentHash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "stateRoot": "0x118f1433ae23c4d1c12f5bd652baddb72611c55ac1cd6af6620d209db222f9e6", + "stateRoot": "0x113f4408a512695349093f9325c26229c5baf240fd61441c8ee1b38371526188", "timestamp": "0x64", "transactionsRoot": "0xb0893d21a4a44dc26a962a6e91abae66df87fb61ac9c60e936aee89c76331445" } \ No newline at end of file diff --git a/internal/ethapi/testdata/eth_getHeaderByNumber-number-0.json b/internal/ethapi/testdata/eth_getHeaderByNumber-number-0.json index e1e64a3093..64b5e46ea4 100644 --- a/internal/ethapi/testdata/eth_getHeaderByNumber-number-0.json +++ b/internal/ethapi/testdata/eth_getHeaderByNumber-number-0.json @@ -4,7 +4,7 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x0", - "hash": "0x98e056de84de969782b238b4509b32814627ba443ea622054a79c2bc7e4d92c7", + "hash": "0x876370be1a166be5dc6f0daf18b737a78f1145053529b57ee5269c05e34a5fc6", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -13,7 +13,7 @@ "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "stateRoot": "0xd883f48b83cc9c1e8389453beb4ad4e572462eec049ca4fffbe16ecefb3fe937", + "stateRoot": "0x08c0a4621b80820d1ff6a202cd06d5743da1d7d2cd446c9eb0055d83952a0deb", "timestamp": "0x0", "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" } \ No newline at end of file diff --git a/internal/ethapi/testdata/eth_getHeaderByNumber-number-1.json b/internal/ethapi/testdata/eth_getHeaderByNumber-number-1.json index adfac5110c..a9822db20c 100644 --- a/internal/ethapi/testdata/eth_getHeaderByNumber-number-1.json +++ b/internal/ethapi/testdata/eth_getHeaderByNumber-number-1.json @@ -4,16 +4,16 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xeeb5c1852740ca4bbe65b0f57baf80634ed12a2b44affe30eec3fb54437c3926", + "hash": "0x905befae7e53cf8e68e667f3b8b43c7baf6785c5df04cc350d919ede888420a3", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0x1", - "parentHash": "0x98e056de84de969782b238b4509b32814627ba443ea622054a79c2bc7e4d92c7", + "parentHash": "0x876370be1a166be5dc6f0daf18b737a78f1145053529b57ee5269c05e34a5fc6", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "stateRoot": "0x4acfcd1a6ab9f5e62411021ecd8a749976ae50b0590e967471264b372d7ac55b", + "stateRoot": "0x49564ccda9b624135d5895ecbf8143b267e2eaac2749ef4ff8647893feabc4aa", "timestamp": "0xa", "transactionsRoot": "0xca0ebcce920d2cdfbf9e1dbe90ed3441a1a576f344bd80e60508da814916f4e7" } \ No newline at end of file diff --git a/internal/ethapi/testdata/eth_getHeaderByNumber-number-latest-1.json b/internal/ethapi/testdata/eth_getHeaderByNumber-number-latest-1.json index 39209a86db..27ec46fece 100644 --- a/internal/ethapi/testdata/eth_getHeaderByNumber-number-latest-1.json +++ b/internal/ethapi/testdata/eth_getHeaderByNumber-number-latest-1.json @@ -4,16 +4,16 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "hash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0x9", - "parentHash": "0xcd7d78eaa8b0ddbd2956fc37e1883c30df27b43e8cc9a982020310656736637c", + "parentHash": "0x3dd2e9ec409275432d322ebdf3b8ef6549373a23d13d8b4237c14fd372465dcc", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "stateRoot": "0x78b2b19ef1a0276dbbc23a875dbf60ae5d10dafa0017098473c4871abd3e7b5c", + "stateRoot": "0xbc2f293d79edc4ee38e8fa8e01ecdeb38a5d07d6cd84394b696eb77b8905d5b5", "timestamp": "0x5a", "transactionsRoot": "0x0767ed8359337dc6a8fdc77fe52db611bed1be87aac73c4556b1bf1dd3d190a5" } \ No newline at end of file diff --git a/internal/ethapi/testdata/eth_getHeaderByNumber-tag-latest.json b/internal/ethapi/testdata/eth_getHeaderByNumber-tag-latest.json index 5313348a50..8916176179 100644 --- a/internal/ethapi/testdata/eth_getHeaderByNumber-tag-latest.json +++ b/internal/ethapi/testdata/eth_getHeaderByNumber-tag-latest.json @@ -4,16 +4,16 @@ "extraData": "0x", "gasLimit": "0x47e7c4", "gasUsed": "0x5208", - "hash": "0xa063415a5020f1569fae73ecb0d37bc5649ebe86d59e764a389eb37814bd42cb", + "hash": "0x4e06dbb49c6882dfcd688155fbe77d53fe28502832b22d3d775ae732de83e630", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0x0000000000000000000000000000000000000000", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0xa", - "parentHash": "0xedb9ccf3a85f67c095ad48abfb0fa09d47179bb0f902078d289042d12428aca5", + "parentHash": "0x705f0d56577cddf961fd6ce3083afcd9789895b920d5f2f37b67972d0cb43d73", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "stateRoot": "0x118f1433ae23c4d1c12f5bd652baddb72611c55ac1cd6af6620d209db222f9e6", + "stateRoot": "0x113f4408a512695349093f9325c26229c5baf240fd61441c8ee1b38371526188", "timestamp": "0x64", "transactionsRoot": "0xb0893d21a4a44dc26a962a6e91abae66df87fb61ac9c60e936aee89c76331445" } \ No newline at end of file diff --git a/internal/ethapi/testdata/eth_getHeaderByNumber-tag-pending.json b/internal/ethapi/testdata/eth_getHeaderByNumber-tag-pending.json index e4121824ef..0b4dfcea1c 100644 --- a/internal/ethapi/testdata/eth_getHeaderByNumber-tag-pending.json +++ b/internal/ethapi/testdata/eth_getHeaderByNumber-tag-pending.json @@ -10,10 +10,10 @@ "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": null, "number": "0xb", - "parentHash": "0xa063415a5020f1569fae73ecb0d37bc5649ebe86d59e764a389eb37814bd42cb", + "parentHash": "0x4e06dbb49c6882dfcd688155fbe77d53fe28502832b22d3d775ae732de83e630", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "stateRoot": "0xce0e05397e548614a5b93254662174329466f8f4b1b391eb36fec9a7a591e58e", + "stateRoot": "0xca16697183bb8f4e0745aab7b1ac80a92bfc91f462459f3576d036696d537340", "timestamp": "0x6e", "transactionsRoot": "0x59abb8ec0655f66e66450d1502618bc64022ae2d2950fa471eec6e8da2846264" } \ No newline at end of file diff --git a/internal/ethapi/testdata/eth_getTransactionReceipt-blob-tx.json b/internal/ethapi/testdata/eth_getTransactionReceipt-blob-tx.json index d450e7c0d9..9be04613c1 100644 --- a/internal/ethapi/testdata/eth_getTransactionReceipt-blob-tx.json +++ b/internal/ethapi/testdata/eth_getTransactionReceipt-blob-tx.json @@ -1,7 +1,7 @@ { "blobGasPrice": "0x1", "blobGasUsed": "0x20000", - "blockHash": "0x5f58514bcb3b216908f0aff6ced44666c3aa250df06093150ac850a7a7850f3c", + "blockHash": "0xe2f3ebf9a6babca5d8765c59467e2e61048b938bef07a137a22c3009ae053563", "blockNumber": "0x6", "contractAddress": null, "cumulativeGasUsed": "0x5208", diff --git a/internal/ethapi/testdata/eth_getTransactionReceipt-create-contract-tx.json b/internal/ethapi/testdata/eth_getTransactionReceipt-create-contract-tx.json index a9391cb578..8e21370a2e 100644 --- a/internal/ethapi/testdata/eth_getTransactionReceipt-create-contract-tx.json +++ b/internal/ethapi/testdata/eth_getTransactionReceipt-create-contract-tx.json @@ -1,5 +1,5 @@ { - "blockHash": "0xb3e447c77374fd285964cba692e96b1673a88a959726826b5b6e2dca15472b0a", + "blockHash": "0x88b8eb895bc8f203b01fb0b6608d375ebd90233d348efde19970f1fc66fac815", "blockNumber": "0x2", "contractAddress": "0xae9bea628c4ce503dcfd7e305cab4e29e7476592", "cumulativeGasUsed": "0xcf50", diff --git a/internal/ethapi/testdata/eth_getTransactionReceipt-create-contract-with-access-list.json b/internal/ethapi/testdata/eth_getTransactionReceipt-create-contract-with-access-list.json index 477c45c274..2e1ab082af 100644 --- a/internal/ethapi/testdata/eth_getTransactionReceipt-create-contract-with-access-list.json +++ b/internal/ethapi/testdata/eth_getTransactionReceipt-create-contract-with-access-list.json @@ -1,5 +1,5 @@ { - "blockHash": "0x5bff93f8f94ba7ee52bef1a80062b9fed22c6d1eebb2b0e87a4a003365a7bd66", + "blockHash": "0x60778f0c1e81efe3d197a8dbe10461f7c82b66d6b5d30c2a39de888d074b4f20", "blockNumber": "0x5", "contractAddress": "0xfdaa97661a584d977b4d3abb5370766ff5b86a18", "cumulativeGasUsed": "0xe01c", diff --git a/internal/ethapi/testdata/eth_getTransactionReceipt-dynamic-tx-with-logs.json b/internal/ethapi/testdata/eth_getTransactionReceipt-dynamic-tx-with-logs.json index a0c93a962f..e14b0badb0 100644 --- a/internal/ethapi/testdata/eth_getTransactionReceipt-dynamic-tx-with-logs.json +++ b/internal/ethapi/testdata/eth_getTransactionReceipt-dynamic-tx-with-logs.json @@ -1,5 +1,5 @@ { - "blockHash": "0x47cd44027bb55856a175e36be0396bad221e52172529d9c1bf12bf5424a041ae", + "blockHash": "0x9f48b38b91aaedc1a4a063221ee19a758a3a942c4a87dbe76e9906c4047b1ad1", "blockNumber": "0x4", "contractAddress": null, "cumulativeGasUsed": "0x5564", diff --git a/internal/ethapi/testdata/eth_getTransactionReceipt-normal-transfer-tx.json b/internal/ethapi/testdata/eth_getTransactionReceipt-normal-transfer-tx.json index 779223af98..5f896d3046 100644 --- a/internal/ethapi/testdata/eth_getTransactionReceipt-normal-transfer-tx.json +++ b/internal/ethapi/testdata/eth_getTransactionReceipt-normal-transfer-tx.json @@ -1,5 +1,5 @@ { - "blockHash": "0xe9bd1d8c303b1af5c704b9d78e62c54a34af47e0db04ac1389a5ef74a619b9da", + "blockHash": "0xedc074cd3d794166c244e6011710381bac11f03abdc5840c5897d4fd1aac87c2", "blockNumber": "0x1", "contractAddress": null, "cumulativeGasUsed": "0x5208", diff --git a/internal/ethapi/testdata/eth_getTransactionReceipt-with-logs.json b/internal/ethapi/testdata/eth_getTransactionReceipt-with-logs.json index 7bd4360666..c5e1dd7978 100644 --- a/internal/ethapi/testdata/eth_getTransactionReceipt-with-logs.json +++ b/internal/ethapi/testdata/eth_getTransactionReceipt-with-logs.json @@ -1,5 +1,5 @@ { - "blockHash": "0xcc6225bf39327429a3d869af71182d619a354155187d0b5a8ecd6a9309cffcaa", + "blockHash": "0x46bce7ad1b4614ad7b452d82c1422e695b048afdbc6d6a3465b15da0bdf06b08", "blockNumber": "0x3", "contractAddress": null, "cumulativeGasUsed": "0x5e28", @@ -18,7 +18,7 @@ "blockNumber": "0x3", "transactionHash": "0xeaf3921cbf03ba45bad4e6ab807b196ce3b2a0b5bacc355b6272fa96b11b4287", "transactionIndex": "0x0", - "blockHash": "0xcc6225bf39327429a3d869af71182d619a354155187d0b5a8ecd6a9309cffcaa", + "blockHash": "0x46bce7ad1b4614ad7b452d82c1422e695b048afdbc6d6a3465b15da0bdf06b08", "blockTimestamp": "0x1e", "logIndex": "0x0", "removed": false diff --git a/tests/testdata b/tests/testdata index 81862e4848..c67e485ff8 160000 --- a/tests/testdata +++ b/tests/testdata @@ -1 +1 @@ -Subproject commit 81862e4848585a438d64f911a19b3825f0f4cd95 +Subproject commit c67e485ff8b5be9abc8ad15345ec21aa22e290d9