diff --git a/.github/workflows/test-hive-eest.yml b/.github/workflows/test-hive-eest.yml index a53608f3e75..be1213d96ee 100644 --- a/.github/workflows/test-hive-eest.yml +++ b/.github/workflows/test-hive-eest.yml @@ -122,7 +122,7 @@ jobs: extra-hive-flags: "--sim.loglevel=3 --client.checktimelimit=300s" erigon-extra-flags: "--experimental.bal" # TODO: reduce to 0 as tests-glamsterdam-devnet@v7.2.0 support lands. - max-failures: 3532 + max-failures: 597 exec_mode: parallel steps: - name: Clean docker system diff --git a/execution/chain/spec/allocs/dev.json b/execution/chain/spec/allocs/dev.json index 31fcba8c69c..fb4f86c4327 100644 --- a/execution/chain/spec/allocs/dev.json +++ b/execution/chain/spec/allocs/dev.json @@ -95,18 +95,16 @@ "0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B": { "balance": "0x21e19e0c9bab2400000" }, - "0x0000884d2AA32eAa155F59A2f24eFa73D9008282": { + "0x0000BFF46984E3725691FA540A8C7589300D8282": { "balance": "0", "nonce": "1", - "code": "0x3373fffffffffffffffffffffffffffffffffffffffe146101065760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461023457600182026001905f5b5f82111560695781019083028483029004916001019190604e565b90939004925050503660b814608957366102345734610234575f5260205ff35b8034106102345760383567ffffffffffffffff1680633b9aca001161023457633b9aca00029034031061023457600154600101600155600354806006026004015f358155600101602035815560010160403581556001016060358155600101608035815560010160a035905560b85f5f3760b85fa0600101600355005b600354600254808203806101001161011d57506101005b5f5b8181146101c3578281016006026004018160b8028154815260200181600101548152602001816002015480825260401c67ffffffffffffffff16816010018160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360200181600301548152602001816004015481526020019060050154905260010161011f565b91018092146101d557906002556101e0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561020d57505f5b6001546020828201116102225750505f610228565b01602090035b5f555f60015560b8025ff35b5f5ffd", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - } + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1461011c575f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146102705760015460088111605257506058565b60089003015b601190600182026001905f5b5f821115607f57810190830284830290049160010191906064565b90939004925050503660b814609f57366102705734610270575f5260205ff35b8034106102705760383567ffffffffffffffff1680633b9aca001161027057633b9aca00029034031061027057600154600101600155600354806006026004015f358155600101602035815560010160403581556001016060358155600101608035815560010160a035905560b85f5f3760b85fa0600101600355005b60035460025480820380604011610131575060405b5f5b8181146101d7578281016006026004018160b8028154815260200181600101548152602001816002015480825260401c67ffffffffffffffff16816010018160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c816001015353602001816003015481526020018160040154815260200190600501549052600101610133565b91018092146101e957906002556101f4565b90505f6002555f6003555b36610242575f54600154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461023057600882820111610238575b50505f610264565b0160089003610264565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b5f555f60015560b8025ff35b5f5ffd", + "storage": {} }, - "0x000014574A74c805590AFF9499fc7A690f008282": { + "0x000064D678505AD48F8CCB093BC65613800E8282": { "balance": "0", "nonce": "1", - "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461018857600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603014608857366101885734610188575f5260205ff35b341061018857600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260305f60143760445fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101175782810160030260040181604402815460601b8152601401816001015481526020019060020154905260010160e1565b91018092146101295790600255610134565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561016157505f5b6001546002828201116101765750505f61017c565b01600290035b5f555f6001556044025ff35b5f5ffd", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460e1575f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101c65760015460028111605157506057565b60029003015b601190600182026001905f5b5f821115607e57810190830284830290049160010191906063565b909390049250505036603014609e57366101c657346101c6575f5260205ff35b34106101c657600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260305f60143760445fa0600101600355005b6003546002548082038060101160f5575060105b5f5b81811461012d5782810160030260040181604402815460601b8152601401816001015481526020019060020154905260010160f7565b910180921461013f579060025561014a565b90505f6002555f6003555b36610198575f54600154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101865760028282011161018e575b50505f6101ba565b01600290036101ba565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b5f555f6001556044025ff35b5f5ffd", "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" } diff --git a/execution/chain/spec/eip8282_test.go b/execution/chain/spec/eip8282_test.go new file mode 100644 index 00000000000..b754a5000db --- /dev/null +++ b/execution/chain/spec/eip8282_test.go @@ -0,0 +1,66 @@ +// Copyright 2026 The Erigon Authors +// This file is part of Erigon. +// +// Erigon 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. +// +// Erigon 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 Erigon. If not, see . + +package chainspec_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/erigontech/erigon/common" + chainspec "github.com/erigontech/erigon/execution/chain/spec" + "github.com/erigontech/erigon/execution/protocol/misc" +) + +func TestDeveloperGenesisBuilderContracts(t *testing.T) { + genesis := chainspec.DeveloperGenesisBlock() + sentinel := common.HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") + tests := []struct { + name string + address common.Address + code []byte + slot0 common.Hash + hasSlot0 bool + }{ + { + name: "deposit", + address: common.HexToAddress("0x0000BFF46984E3725691FA540A8C7589300D8282"), + code: misc.BuilderDepositRequestCode, + }, + { + name: "exit", + address: common.HexToAddress("0x000064D678505AD48F8CCB093BC65613800E8282"), + code: misc.BuilderExitRequestCode, + slot0: sentinel, + hasSlot0: true, + }, + } + for _, tt := range tests { + t.Run( + tt.name, + func(t *testing.T) { + account, ok := genesis.Alloc[tt.address] + require.True(t, ok) + require.Equal(t, uint64(1), account.Nonce) + require.Equal(t, tt.code, account.Code) + slot0, ok := account.Storage[common.Hash{}] + require.Equal(t, tt.hasSlot0, ok) + require.Equal(t, tt.slot0, slot0) + }, + ) + } +} diff --git a/execution/execmodule/exec_module_test.go b/execution/execmodule/exec_module_test.go index de5567731ad..ed03cf8821b 100644 --- a/execution/execmodule/exec_module_test.go +++ b/execution/execmodule/exec_module_test.go @@ -484,6 +484,7 @@ func TestReorgBackAndForwardIntoCanonicalChain(t *testing.T) { t.Run(mode.name, func(t *testing.T) { ctx := t.Context() m := execmoduletester.New(t, opts...) + m.ExecModule.WaitIdle(ctx) const chainLen = 9 const reorgBackTo = 5 diff --git a/execution/execmodule/execmoduletester/exec_module_tester.go b/execution/execmodule/execmoduletester/exec_module_tester.go index 91f832b766b..b6d57a75102 100644 --- a/execution/execmodule/execmoduletester/exec_module_tester.go +++ b/execution/execmodule/execmoduletester/exec_module_tester.go @@ -59,6 +59,7 @@ import ( "github.com/erigontech/erigon/execution/exec" "github.com/erigontech/erigon/execution/execmodule" "github.com/erigontech/erigon/execution/execmodule/chainreader" + "github.com/erigontech/erigon/execution/protocol/misc" "github.com/erigontech/erigon/execution/protocol/rules" "github.com/erigontech/erigon/execution/protocol/rules/ethash" "github.com/erigontech/erigon/execution/protocol/rules/merge" @@ -337,6 +338,12 @@ func WithChainConfig(cfg *chain.Config) Option { } } +func WithoutAmsterdamBuilderContracts() Option { + return func(opts *options) { + opts.skipAmsterdamBuilderContracts = true + } +} + func WithFcuBackgroundCommit() Option { return func(opts *options) { opts.fcuBackgroundCommit = true @@ -375,20 +382,21 @@ func WithSentryProtocol(protocol uint) Option { } type options struct { - stepSize *uint64 - experimentalBAL bool - genesis *types.Genesis - chainConfig *chain.Config - key *ecdsa.PrivateKey - engine rules.Engine - pruneMode *prune.Mode - withTxPool bool - enableDomains []kv.Domain - fcuBackgroundCommit bool - fcuBackgroundPrune bool - alwaysGenerateChangesets *bool - maxReorgDepth *uint64 - sentryProtocol uint + stepSize *uint64 + experimentalBAL bool + genesis *types.Genesis + chainConfig *chain.Config + key *ecdsa.PrivateKey + engine rules.Engine + pruneMode *prune.Mode + withTxPool bool + enableDomains []kv.Domain + fcuBackgroundCommit bool + fcuBackgroundPrune bool + alwaysGenerateChangesets *bool + maxReorgDepth *uint64 + sentryProtocol uint + skipAmsterdamBuilderContracts bool } func applyOptions(opts []Option) options { @@ -414,6 +422,9 @@ func applyOptions(opts []Option) options { }, } } + if !opt.skipAmsterdamBuilderContracts { + addAmsterdamBuilderContracts(opt.genesis) + } // engine depends on genesis if opt.engine == nil { switch { @@ -428,6 +439,28 @@ func applyOptions(opts []Option) options { return opt } +func addAmsterdamBuilderContracts(genesis *types.Genesis) { + if genesis.Config.AmsterdamTime == nil { + return + } + if genesis.Alloc == nil { + genesis.Alloc = types.GenesisAlloc{} + } + genesis.Alloc[genesis.Config.GetBuilderDepositContract().Value()] = types.GenesisAccount{ + Balance: new(big.Int), + Code: misc.BuilderDepositRequestCode, + Nonce: 1, + } + slot := common.Hash{} + sentinel := common.HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") + genesis.Alloc[genesis.Config.GetBuilderExitContract().Value()] = types.GenesisAccount{ + Balance: new(big.Int), + Code: misc.BuilderExitRequestCode, + Nonce: 1, + Storage: map[common.Hash]common.Hash{slot: sentinel}, + } +} + // New creates an ExecModuleTester. When called with no options, it uses // sensible defaults (TestChainBerlinConfig, 1 Ether alloc, ethash.NewFaker, etc.). // Use With* options to customise. @@ -563,20 +596,6 @@ func New(tb testing.TB, opts ...Option) *ExecModuleTester { } } - // Deploy Amsterdam system contracts (EIP-8282) at genesis whenever Amsterdam is - // scheduled — a later fork transition must still find deployed code. These are - // required for the Merge engine's FinalizeAndAssemble to process builder - // deposit and exit requests. - if gspec.Config.AmsterdamTime != nil { - if err := blockgen.InitAmsterdamPreDeploys(mock.DB, gspec.Config, mock.Log); err != nil { - if tb != nil { - tb.Fatal(err) - } else { - panic(err) - } - } - } - blockWriter := blockio.NewBlockWriter() mock.Address = crypto.PubkeyToAddress(mock.Key.PublicKey) diff --git a/execution/protocol/misc/eip8282.go b/execution/protocol/misc/eip8282.go index d1e7e66c1cf..827739f374a 100644 --- a/execution/protocol/misc/eip8282.go +++ b/execution/protocol/misc/eip8282.go @@ -30,12 +30,16 @@ import ( // geas-compiled derivative of the EIP-7002 withdrawal contract — same dispatch, // fee mechanism, queue, and storage layout with a wider record (184 bytes) and // two additional value checks (amount >= BUILDER_MIN_DEPOSIT, msg.value >= fee + amount*1gwei). -var BuilderDepositRequestCode = common.FromHex("0x3373fffffffffffffffffffffffffffffffffffffffe146101065760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461023457600182026001905f5b5f82111560695781019083028483029004916001019190604e565b90939004925050503660b814608957366102345734610234575f5260205ff35b8034106102345760383567ffffffffffffffff1680633b9aca001161023457633b9aca00029034031061023457600154600101600155600354806006026004015f358155600101602035815560010160403581556001016060358155600101608035815560010160a035905560b85f5f3760b85fa0600101600355005b600354600254808203806101001161011d57506101005b5f5b8181146101c3578281016006026004018160b8028154815260200181600101548152602001816002015480825260401c67ffffffffffffffff16816010018160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360200181600301548152602001816004015481526020019060050154905260010161011f565b91018092146101d557906002556101e0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561020d57505f5b6001546020828201116102225750505f610228565b01602090035b5f555f60015560b8025ff35b5f5ffd") +var BuilderDepositRequestCode = common.FromHex( + "0x3373fffffffffffffffffffffffffffffffffffffffe1461011c575f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146102705760015460088111605257506058565b60089003015b601190600182026001905f5b5f821115607f57810190830284830290049160010191906064565b90939004925050503660b814609f57366102705734610270575f5260205ff35b8034106102705760383567ffffffffffffffff1680633b9aca001161027057633b9aca00029034031061027057600154600101600155600354806006026004015f358155600101602035815560010160403581556001016060358155600101608035815560010160a035905560b85f5f3760b85fa0600101600355005b60035460025480820380604011610131575060405b5f5b8181146101d7578281016006026004018160b8028154815260200181600101548152602001816002015480825260401c67ffffffffffffffff16816010018160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c816001015353602001816003015481526020018160040154815260200190600501549052600101610133565b91018092146101e957906002556101f4565b90505f6002555f6003555b36610242575f54600154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461023057600882820111610238575b50505f610264565b0160089003610264565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b5f555f60015560b8025ff35b5f5ffd", +) // EIP-8282 builder exit contract runtime bytecode. // geas-compiled derivative of the EIP-7002 withdrawal contract — same skeleton // with the amount field removed, producing a 68-byte record (source_address ++ pubkey). -var BuilderExitRequestCode = common.FromHex("0x3373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461018857600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603014608857366101885734610188575f5260205ff35b341061018857600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260305f60143760445fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101175782810160030260040181604402815460601b8152601401816001015481526020019060020154905260010160e1565b91018092146101295790600255610134565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561016157505f5b6001546002828201116101765750505f61017c565b01600290035b5f555f6001556044025ff35b5f5ffd") +var BuilderExitRequestCode = common.FromHex( + "0x3373fffffffffffffffffffffffffffffffffffffffe1460e1575f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101c65760015460028111605157506057565b60029003015b601190600182026001905f5b5f821115607e57810190830284830290049160010191906063565b909390049250505036603014609e57366101c657346101c6575f5260205ff35b34106101c657600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260305f60143760445fa0600101600355005b6003546002548082038060101160f5575060105b5f5b81811461012d5782810160030260040181604402815460601b8152601401816001015481526020019060020154905260010160f7565b910180921461013f579060025561014a565b90505f6002555f6003555b36610198575f54600154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101865760028282011161018e575b50505f6101ba565b01600290036101ba565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b5f555f6001556044025ff35b5f5ffd", +) // https://eips.ethereum.org/EIPS/eip-8282 func DequeueBuilderDepositRequests(syscall rules.SystemCall, state *state.IntraBlockState, builderDepositAddress accounts.Address) (*types.FlatRequest, error) { diff --git a/execution/protocol/misc/eip8282_test.go b/execution/protocol/misc/eip8282_test.go index 6c6e444a90a..66306408f1d 100644 --- a/execution/protocol/misc/eip8282_test.go +++ b/execution/protocol/misc/eip8282_test.go @@ -17,6 +17,7 @@ package misc_test import ( + "crypto/sha256" "testing" "github.com/stretchr/testify/require" @@ -116,23 +117,28 @@ func TestDequeueBuilderExitRequests_EmptyCodeReturnsError(t *testing.T) { "must reject syscall to builder exit contract with empty bytecode") } -// TestBuilderContractAddresses verifies the EIP-8282 predeploy addresses -// match the specification, and that the pre-deployed bytecode variables are populated. -func TestBuilderContractAddresses(t *testing.T) { +func TestBuilderContractArtifacts(t *testing.T) { t.Parallel() - - require.Equal(t, - common.HexToAddress("0x0000884d2AA32eAa155F59A2f24eFa73D9008282"), + require.Equal( + t, + common.HexToAddress("0x0000BFF46984E3725691FA540A8C7589300D8282"), params.BuilderDepositAddress.Value(), - "BuilderDepositAddress must match EIP-8282 spec") - - require.Equal(t, - common.HexToAddress("0x000014574A74c805590AFF9499fc7A690f008282"), + ) + require.Equal( + t, + common.HexToAddress("0x000064D678505AD48F8CCB093BC65613800E8282"), params.BuilderExitAddress.Value(), - "BuilderExitAddress must match EIP-8282 spec") - - require.NotEmpty(t, misc.BuilderDepositRequestCode, - "BuilderDepositRequestCode must be populated with official bytecode") - require.NotEmpty(t, misc.BuilderExitRequestCode, - "BuilderExitRequestCode must be populated with official bytecode") + ) + depositHash := sha256.Sum256(misc.BuilderDepositRequestCode) + require.Equal( + t, + common.HexToHash("0x2c49dcf745b1304f3dac0ea7487eae6d8fd07812ada980d542f79e8e5e53eb8d"), + common.Hash(depositHash), + ) + exitHash := sha256.Sum256(misc.BuilderExitRequestCode) + require.Equal( + t, + common.HexToHash("0xc889ed88730d157d192aae28c2dee61324d0df3bd01ff0078386808b4adb27aa"), + common.Hash(exitHash), + ) } diff --git a/execution/protocol/params/protocol.go b/execution/protocol/params/protocol.go index a702e15dc61..b9e614787c4 100644 --- a/execution/protocol/params/protocol.go +++ b/execution/protocol/params/protocol.go @@ -291,11 +291,15 @@ var ( // EIP-8282 - The Builder Deposit Addresses // Nick's-method derived address from the builder deposit contract deployment transaction. -var BuilderDepositAddress = accounts.InternAddress(common.HexToAddress("0x0000884d2AA32eAa155F59A2f24eFa73D9008282")) +var BuilderDepositAddress = accounts.InternAddress( + common.HexToAddress("0x0000BFF46984E3725691FA540A8C7589300D8282"), +) // EIP-8282 - The Builder Exit Addresses // Nick's-method derived address from the builder exit contract deployment transaction. -var BuilderExitAddress = accounts.InternAddress(common.HexToAddress("0x000014574A74c805590AFF9499fc7A690f008282")) +var BuilderExitAddress = accounts.InternAddress( + common.HexToAddress("0x000064D678505AD48F8CCB093BC65613800E8282"), +) // See EIP-7840: Add blob schedule to EL config files type BlobConfig struct { diff --git a/execution/tests/blockgen/chain_makers.go b/execution/tests/blockgen/chain_makers.go index a871c2218b3..28585397e9f 100644 --- a/execution/tests/blockgen/chain_makers.go +++ b/execution/tests/blockgen/chain_makers.go @@ -363,14 +363,6 @@ var withdrawalRequestCodeHash = accounts.InternCodeHash(crypto.Keccak256Hash(wit var consolidationRequestCode = common.Hex2Bytes("3373fffffffffffffffffffffffffffffffffffffffe1460d35760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461019a57600182026001905f5b5f82111560685781019083028483029004916001019190604d565b9093900492505050366060146088573661019a573461019a575f5260205ff35b341061019a57600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060021160e7575060025b5f5b8181146101295782810160040260040181607402815460601b815260140181600101548152602001816002015481526020019060030154905260010160e9565b910180921461013b5790600255610146565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561017357505f5b6001546001828201116101885750505f61018e565b01600190035b5f555f6001556074025ff35b5f5ffd") var consolidationRequestCodeHash = accounts.InternCodeHash(crypto.Keccak256Hash(consolidationRequestCode)) -// EIP-8282 builder deposit contract runtime bytecode -var builderDepositRequestCode = misc.BuilderDepositRequestCode -var builderDepositRequestCodeHash = accounts.InternCodeHash(crypto.Keccak256Hash(builderDepositRequestCode)) - -// EIP-8282 builder exit contract runtime bytecode -var builderExitRequestCode = misc.BuilderExitRequestCode -var builderExitRequestCodeHash = accounts.InternCodeHash(crypto.Keccak256Hash(builderExitRequestCode)) - func InitPraguePreDeploys(db kv.TemporalRwDB, config *chain.Config, logger log.Logger) error { ctx := context.Background() withdrawalAddr := config.GetWithdrawalRequestContract() @@ -418,55 +410,6 @@ func InitPraguePreDeploys(db kv.TemporalRwDB, config *chain.Config, logger log.L return domains.Commit(ctx, tx) } -// InitAmsterdamPreDeploys deploys the EIP-8282 builder deposit and exit -// system contracts into the state database for test chains with Amsterdam active. -func InitAmsterdamPreDeploys(db kv.TemporalRwDB, config *chain.Config, logger log.Logger) error { - ctx := context.Background() - builderDepositAddr := config.GetBuilderDepositContract() - builderExitAddr := config.GetBuilderExitContract() - tx, err := db.BeginTemporalRw(ctx) - if err != nil { - return err - } - defer tx.Rollback() - - domains, err := execctx.NewSharedDomains(ctx, tx, logger) - if err != nil { - return err - } - defer domains.Close() - latestTxNum, _, err := domains.SeekCommitment(ctx, tx) - if err != nil { - return err - } - stateWriter := state.NewWriter(domains.AsPutDel(tx), nil, latestTxNum) - - err = stateWriter.UpdateAccountData(builderDepositAddr, &accounts.Account{}, &accounts.Account{ - CodeHash: builderDepositRequestCodeHash, - Nonce: 1, - }) - if err != nil { - return err - } - err = stateWriter.UpdateAccountCode(builderDepositAddr, 0, builderDepositRequestCodeHash, builderDepositRequestCode) - if err != nil { - return err - } - err = stateWriter.UpdateAccountData(builderExitAddr, &accounts.Account{}, &accounts.Account{ - CodeHash: builderExitRequestCodeHash, - Nonce: 1, - }) - if err != nil { - return err - } - err = stateWriter.UpdateAccountCode(builderExitAddr, 0, builderExitRequestCodeHash, builderExitRequestCode) - if err != nil { - return err - } - - return domains.Commit(ctx, tx) -} - // GenerateChain creates a chain of n blocks. The first block's // parent will be the provided parent. db is used to store // intermediate states and should contain the parent's state trie. diff --git a/execution/tests/testutil/block_test_util.go b/execution/tests/testutil/block_test_util.go index 16101445573..71cbfe04091 100644 --- a/execution/tests/testutil/block_test_util.go +++ b/execution/tests/testutil/block_test_util.go @@ -228,6 +228,7 @@ func (bt *BlockTest) newTester(tb testing.TB) (*execmoduletester.ExecModuleTeste mOpts := []execmoduletester.Option{ execmoduletester.WithGenesisSpec(bt.genesis(config)), execmoduletester.WithEngine(engine), + execmoduletester.WithoutAmsterdamBuilderContracts(), } if bt.ExperimentalBAL { mOpts = append(mOpts, execmoduletester.WithExperimentalBAL()) diff --git a/tools/eest-spec-shards.yml b/tools/eest-spec-shards.yml index adb11d861cb..24229cf5c70 100644 --- a/tools/eest-spec-shards.yml +++ b/tools/eest-spec-shards.yml @@ -50,7 +50,7 @@ - shard: blocktests-devnet workers: 12 # TODO: reduce to 0 as tests-glamsterdam-devnet@v7.2.0 support lands. - max-allowed-failures: 21877 + max-allowed-failures: 2238 exec3-parallel: true - shard: enginextests-stable-sequential workers: 8 @@ -125,7 +125,7 @@ - shard: zkevm-witness workers: 8 # TODO: reduce to 0 as tests-zkevm@v0.6.2 support lands. - max-allowed-failures: 22031 + max-allowed-failures: 2242 - shard: blocktests-stable-race-pre-cancun-sequential workers: 12 max-allowed-failures: 0 @@ -165,10 +165,10 @@ - shard: blocktests-devnet-race-amsterdam workers: 12 # TODO: reduce to 0 as tests-glamsterdam-devnet@v7.2.0 support lands. - max-allowed-failures: 21789 + max-allowed-failures: 2238 exec3-parallel: true run: 'fork_Amsterdam' - shard: zkevm-witness-race workers: 8 # TODO: reduce to 0 as tests-zkevm@v0.6.2 support lands. - max-allowed-failures: 22031 + max-allowed-failures: 2242