Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
eb91018
execution: implement EIP-7928 fixes for tests-glamsterdam-devnet@v6.1.1
taratorio Jul 15, 2026
6a571a5
fix
taratorio Jul 15, 2026
e996d50
Merge branch 'main' of github.com:erigontech/erigon into worktree-gd6…
taratorio Jul 15, 2026
30fe204
execution: update devnet fixtures to v7.2.0
taratorio Jul 16, 2026
5b9ee9e
Merge branch 'main' of github.com:erigontech/erigon into gd7-fixtures
taratorio Jul 16, 2026
bc2e54c
execution: update EIP-8282 contracts for glamsterdam-devnet-7
taratorio Jul 16, 2026
1118d27
fix ci
taratorio Jul 17, 2026
e811940
Merge branch 'gd7-fixtures' of github.com:erigontech/erigon into gd7-…
taratorio Jul 17, 2026
b6fd53b
Merge branch 'main' of github.com:erigontech/erigon into gd7-fixtures
taratorio Jul 17, 2026
3e93e8e
tidy
taratorio Jul 17, 2026
45d518a
Merge branch 'gd7-fixtures' of github.com:erigontech/erigon into gd7-…
taratorio Jul 17, 2026
01fefb7
fix EIP-8282 failing last 4 tests due to unnecessary inits in test runs
taratorio Jul 17, 2026
2bb0726
fix EIP-8282 make test-all
taratorio Jul 17, 2026
6810282
set correct hive eest max failures
taratorio Jul 20, 2026
2a2e586
flip to always add amsterdam contracts in genesis, option to skip
taratorio Jul 20, 2026
cd80771
Merge branch 'gd7-fixtures' of github.com:erigontech/erigon into gd7-…
taratorio Jul 20, 2026
00b240c
fix
taratorio Jul 20, 2026
aaf0243
Merge branch 'main' of github.com:erigontech/erigon into gd7-fixtures
taratorio Jul 22, 2026
6440123
Merge branch 'gd7-fixtures' of github.com:erigontech/erigon into gd7-…
taratorio Jul 22, 2026
b427481
Merge branch 'main' of github.com:erigontech/erigon into gd7-eip-8282
taratorio Jul 27, 2026
acad800
address nit
taratorio Jul 27, 2026
ffab17e
address nit
taratorio Jul 27, 2026
4a6a4d1
Merge branch 'main' of github.com:erigontech/erigon into gd7-eip-8282
taratorio Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-hive-eest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 5 additions & 7 deletions execution/chain/spec/allocs/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
66 changes: 66 additions & 0 deletions execution/chain/spec/eip8282_test.go
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.

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)
},
)
}
}
1 change: 1 addition & 0 deletions execution/execmodule/exec_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
75 changes: 47 additions & 28 deletions execution/execmodule/execmoduletester/exec_module_tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -414,6 +422,9 @@ func applyOptions(opts []Option) options {
},
}
}
if !opt.skipAmsterdamBuilderContracts {
addAmsterdamBuilderContracts(opt.genesis)
}
// engine depends on genesis
if opt.engine == nil {
switch {
Expand All @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 6 additions & 2 deletions execution/protocol/misc/eip8282.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
38 changes: 22 additions & 16 deletions execution/protocol/misc/eip8282_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package misc_test

import (
"crypto/sha256"
"testing"

"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -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),
)
}
8 changes: 6 additions & 2 deletions execution/protocol/params/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading
Loading