Sitelet https://github.com/ethereum-optimism/optimism/commit/a0343895acaf0d098216358cb3c4faac48792d2c
Skip to content

Commit a034389

Browse files
authored
acceptance: support newer L1 forks (#21920)
1 parent f08ac67 commit a034389

22 files changed

Lines changed: 471 additions & 54 deletions

File tree

‎.circleci/continue/main.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,7 +2068,7 @@ jobs:
20682068
l1_fork:
20692069
description: "L1 fork active at genesis"
20702070
type: string
2071-
default: "prague"
2071+
default: "fusaka"
20722072
l2_cl_kind:
20732073
description: "L2 consensus layer client (op-node or kona-node)"
20742074
type: string
@@ -2775,7 +2775,7 @@ workflows:
27752775
matrix:
27762776
parameters:
27772777
l1_fork: &acceptance_l1_forks
2778-
- prague
2778+
- fusaka
27792779
l2_el_kind: op-reth
27802780
parallelism: 8
27812781
acceptance_test_jobs: "8"
@@ -2827,8 +2827,8 @@ workflows:
28272827
- semgrep-scan-local: terminal
28282828
- semgrep-test: terminal
28292829
- go-tests: terminal
2830-
- memory-all-opn-op-reth-prague: terminal
2831-
- memory-all-kona-op-reth-prague: terminal
2830+
- memory-all-opn-op-reth-fusaka: terminal
2831+
- memory-all-kona-op-reth-fusaka: terminal
28322832
- kona-build-sp1-elfs: terminal
28332833
# Go test/lint jobs previously fanned in via the bedrock-go-tests helper.
28342834
- cannon-go-lint-and-test: terminal

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ require (
244244
lukechampine.com/blake3 v1.4.1 // indirect
245245
)
246246

247-
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101702.3-rc.5
247+
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101702.3-rc.6
248248

249249
// replace github.com/ethereum/go-ethereum => ../op-geth
250250

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A=
171171
github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s=
172172
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.4-0.20251001155152-4eb15ccedf7e h1:iy1vBIzACYUyOVyoADUwvAiq2eOPC0yVsDUdolPwQjk=
173173
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.4-0.20251001155152-4eb15ccedf7e/go.mod h1:DYj7+vYJ4cIB7zera9mv4LcAynCL5u4YVfoeUu6Wa+w=
174-
github.com/ethereum-optimism/op-geth v1.101702.3-rc.5 h1:Fxs5iYFDinl1V1zpPtLOK+q/6sdpMvuvdGsQOuCborQ=
175-
github.com/ethereum-optimism/op-geth v1.101702.3-rc.5/go.mod h1:HzvOtk7c9KwFaSxRvUBPFHGSjIjomWtw4iSXX6vruQE=
174+
github.com/ethereum-optimism/op-geth v1.101702.3-rc.6 h1:Ky9Tu5U2OjJyUF411zODyjF/oldxjAs04XDCaXxBHps=
175+
github.com/ethereum-optimism/op-geth v1.101702.3-rc.6/go.mod h1:HzvOtk7c9KwFaSxRvUBPFHGSjIjomWtw4iSXX6vruQE=
176176
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20260611202829-ac4e48516794 h1:pZtEiAqYCO5MzgPmoNOv/b/Wy8oDRC4xlNcZB0CEY7U=
177177
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20260611202829-ac4e48516794/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y=
178178
github.com/ethereum/c-kzg-4844/v2 v2.1.6 h1:xQymkKCT5E2Jiaoqf3v4wsNgjZLY0lRSkZn27fRjSls=

‎op-acceptance-tests/tests/fusaka/setup_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func newMinimalFusaka(t devtest.T) *presets.Minimal {
1616
sysgo.WithDefaultBPOBlobSchedule,
1717
// Make the BPO fork happen after Osaka so we can easily use geth's eip4844.CalcBlobFee
1818
// to calculate the blob base fee using the Osaka parameters.
19-
sysgo.WithForkAtL1Offset(forks.Osaka, 0),
19+
sysgo.WithForkAtL1Genesis(forks.Osaka),
2020
sysgo.WithForkAtL1Offset(forks.BPO1, 1),
2121
),
2222
presets.WithBatcherOption(func(_ sysgo.ComponentTarget, cfg *batcher.CLIConfig) {

‎op-chain-ops/genesis/genesis.go‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ type DevL1DeployConfigMinimal struct {
168168
L1BPO3TimeOffset *uint64
169169
// When BPO4 activates. Relative to L1 genesis.
170170
L1BPO4TimeOffset *uint64
171+
// When BPO5 activates. Relative to L1 genesis.
172+
L1BPO5TimeOffset *uint64
173+
// When Amsterdam activates. Relative to L1 genesis.
174+
L1AmsterdamTimeOffset *uint64
171175
// Blob schedule config.
172176
BlobScheduleConfig *params.BlobScheduleConfig
173177
}
@@ -245,6 +249,14 @@ func NewL1GenesisMinimal(config *DevL1DeployConfigMinimal) (*core.Genesis, error
245249
bpo4Time := uint64(timestamp) + uint64(*config.L1BPO4TimeOffset)
246250
chainConfig.BPO4Time = &bpo4Time
247251
}
252+
if config.L1BPO5TimeOffset != nil {
253+
bpo5Time := uint64(timestamp) + uint64(*config.L1BPO5TimeOffset)
254+
chainConfig.BPO5Time = &bpo5Time
255+
}
256+
if config.L1AmsterdamTimeOffset != nil {
257+
amsterdamTime := uint64(timestamp) + uint64(*config.L1AmsterdamTimeOffset)
258+
chainConfig.AmsterdamTime = &amsterdamTime
259+
}
248260
if config.BlobScheduleConfig != nil {
249261
chainConfig.BlobScheduleConfig = config.BlobScheduleConfig
250262
}

‎op-deployer/pkg/deployer/pipeline/seal_l1_dev_genesis.go‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,16 @@ func SealL1DevGenesis(env *Env, intent *state.Intent, st *state.State) error {
4646
L1GenesisBlockExcessBlobGas: (*hexutil.Uint64)(&excessBlobGas),
4747
// The rest is left to defaults
4848
},
49-
L1ChainID: eth.ChainIDFromUInt64(intent.L1ChainID),
50-
L1PragueTimeOffset: l1DevParams.PragueTimeOffset,
51-
L1OsakaTimeOffset: l1DevParams.OsakaTimeOffset,
52-
L1BPO1TimeOffset: l1DevParams.BPO1TimeOffset,
53-
BlobScheduleConfig: l1DevParams.BlobSchedule,
49+
L1ChainID: eth.ChainIDFromUInt64(intent.L1ChainID),
50+
L1PragueTimeOffset: l1DevParams.PragueTimeOffset,
51+
L1OsakaTimeOffset: l1DevParams.OsakaTimeOffset,
52+
L1BPO1TimeOffset: l1DevParams.BPO1TimeOffset,
53+
L1BPO2TimeOffset: l1DevParams.BPO2TimeOffset,
54+
L1BPO3TimeOffset: l1DevParams.BPO3TimeOffset,
55+
L1BPO4TimeOffset: l1DevParams.BPO4TimeOffset,
56+
L1BPO5TimeOffset: l1DevParams.BPO5TimeOffset,
57+
L1AmsterdamTimeOffset: l1DevParams.AmsterdamTimeOffset,
58+
BlobScheduleConfig: l1DevParams.BlobSchedule,
5459
})
5560
if err != nil {
5661
return fmt.Errorf("failed to create dev L1 genesis template: %w", err)

‎op-deployer/pkg/deployer/state/intent.go‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,22 @@ type L1DevGenesisParams struct {
7676
// genesis time.
7777
BPO2TimeOffset *uint64 `json:"bpo2TimeOffset" toml:"bpo2TimeOffset"`
7878

79+
// BPO3TimeOffset configures the BPO3 fork to be activated at the given time after L1 dev
80+
// genesis time.
81+
BPO3TimeOffset *uint64 `json:"bpo3TimeOffset" toml:"bpo3TimeOffset"`
82+
83+
// BPO4TimeOffset configures the BPO4 fork to be activated at the given time after L1 dev
84+
// genesis time.
85+
BPO4TimeOffset *uint64 `json:"bpo4TimeOffset" toml:"bpo4TimeOffset"`
86+
87+
// BPO5TimeOffset configures the BPO5 fork to be activated at the given time after L1 dev
88+
// genesis time.
89+
BPO5TimeOffset *uint64 `json:"bpo5TimeOffset" toml:"bpo5TimeOffset"`
90+
91+
// AmsterdamTimeOffset configures Amsterdam (the EL changes in the Glamsterdam Ethereum
92+
// fork) to be activated at the given time after L1 dev genesis time.
93+
AmsterdamTimeOffset *uint64 `json:"amsterdamTimeOffset" toml:"amsterdamTimeOffset"`
94+
7995
BlobSchedule *params.BlobScheduleConfig `json:"blobSchedule"`
8096

8197
// Prefund is a map of addresses to balances (in wei), to prefund in the L1 dev genesis state.

‎op-devstack/README.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ and returns a typed output that the test then may use.
101101

102102
- `DEVSTACK_KEYS_SALT`: Seeds the keys generated with `NewHDWallet`. This is useful for "isolating" test runs, and might be needed to reproduce CI and/or acceptance test runs. It can be any string, including the empty one to use the "usual" devkeys.
103103
- `DEVNET_EXPECT_PRECONDITIONS_MET`: This can be set of force test failures when their pre-conditions are not met, which would otherwise result in them being skipped. This is helpful in particular for runs that do intend to run specific tests (as opposed to whatever is available). `op-acceptor` does set that variable, for example.
104-
- `DEVSTACK_L1_FORK=prague` selects the L1 fork active at genesis. Ethereum upgrade names (`pectra`, `fusaka`) and geth execution-fork names (`prague`, `osaka`) are accepted. If unset, Prague remains the default.
104+
- `DEVSTACK_L1_FORK=fusaka` selects the L1 fork active at genesis. Ethereum upgrade
105+
names (`pectra`, `fusaka`, `glamsterdam`) and geth execution-fork names
106+
(`prague`, `osaka`, `amsterdam`) are accepted. BPO selectors are not accepted until the
107+
bundled op-geth supports `engine_newPayloadV4` at those forks. Amsterdam inherits BPO4
108+
blob parameters until upstream defaults are available. If unset, Prague remains the
109+
devstack default.
105110
- `DEVSTACK_MONOREPO_ROOT`: Absolute path to a monorepo checkout. Used by out-of-tree acceptance suites (which depend on this module by git rev) so contract-artifact resolution can find `packages/contracts-bedrock` outside the cwd-relative walk. In-tree runs don't need it.
106111

107112
### Rust stack env vars:

‎op-devstack/dsl/proofs/dispute_game_factory.go‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,20 @@ func (f *DisputeGameFactory) createNewGame(eoa *dsl.EOA, gameType gameTypes.Game
609609
receipt := contract.Write(eoa, f.dgf.Create(uint32(gameType), claim, extraData), txplan.WithValue(requiredBonds), txplan.WithGasRatio(2))
610610
f.require.Equal(types.ReceiptStatusSuccessful, receipt.Status)
611611

612-
// Extract logs from receipt
613-
f.require.Equal(2, len(receipt.Logs))
614-
createdLog, err := f.dgf.ParseDisputeGameCreated(receipt.Logs[1])
615-
f.require.NoError(err)
612+
var createdLog *bindings.DisputeGameCreated
613+
for _, eventLog := range receipt.Logs {
614+
if len(eventLog.Topics) == 0 {
615+
continue
616+
}
617+
parsed, err := f.dgf.ParseDisputeGameCreated(eventLog)
618+
if err == bindings.InvalidLogSignature {
619+
continue
620+
}
621+
f.require.NoError(err)
622+
f.require.Nil(createdLog, "Multiple DisputeGameCreated events in receipt")
623+
createdLog = parsed
624+
}
625+
f.require.NotNil(createdLog, "DisputeGameCreated event not found in receipt")
616626

617627
gameAddr := createdLog.DisputeProxy
618628
log.Info("Dispute game created", "address", gameAddr.Hex())

‎op-devstack/sysgo/deployer.go‎

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,27 +69,35 @@ func WithForkAtL1Offset(fork forks.Fork, offset uint64) DeployerOption {
6969
}
7070
}
7171

72-
func WithDefaultBPOBlobSchedule(_ devtest.T, _ devkeys.Keys, builder intentbuilder.Builder) {
73-
// Once we get the latest changes from op-geth we can change this to
74-
// params.DefaultBlobSchedule.
75-
builder.L1().WithL1BlobSchedule(&params.BlobScheduleConfig{
72+
func defaultL1BlobSchedule() *params.BlobScheduleConfig {
73+
return &params.BlobScheduleConfig{
7674
Cancun: params.DefaultCancunBlobConfig,
7775
Osaka: params.DefaultOsakaBlobConfig,
7876
Prague: params.DefaultPragueBlobConfig,
7977
BPO1: params.DefaultBPO1BlobConfig,
8078
BPO2: params.DefaultBPO2BlobConfig,
8179
BPO3: params.DefaultBPO3BlobConfig,
8280
BPO4: params.DefaultBPO4BlobConfig,
83-
})
81+
// Upstream defaults are not available yet, so keep the latest parameters.
82+
BPO5: params.DefaultBPO4BlobConfig,
83+
Amsterdam: params.DefaultBPO4BlobConfig,
84+
}
85+
}
86+
87+
func WithDefaultBPOBlobSchedule(_ devtest.T, _ devkeys.Keys, builder intentbuilder.Builder) {
88+
builder.L1().WithL1BlobSchedule(defaultL1BlobSchedule())
8489
}
8590

86-
// parseL1Fork accepts Ethereum upgrade names and their geth execution-layer names.
91+
// parseL1Fork accepts both Ethereum upgrade names and their geth execution-layer names.
92+
// BPO selectors are intentionally excluded while the bundled op-geth rejects newPayloadV4 for them.
8793
func parseL1Fork(value string) (forks.Fork, error) {
8894
fork, ok := map[string]forks.Fork{
89-
"pectra": forks.Prague,
90-
"prague": forks.Prague,
91-
"fusaka": forks.Osaka,
92-
"osaka": forks.Osaka,
95+
"pectra": forks.Prague,
96+
"prague": forks.Prague,
97+
"fusaka": forks.Osaka,
98+
"osaka": forks.Osaka,
99+
"glamsterdam": forks.Amsterdam,
100+
"amsterdam": forks.Amsterdam,
93101
}[value]
94102
if ok {
95103
return fork, nil
@@ -283,6 +291,7 @@ func WithCommons(l1ChainID eth.ChainID) DeployerOption {
283291
l1Fork, err = parseL1Fork(value)
284292
p.Require().NoError(err, "invalid %s", DevstackL1ForkEnvVar)
285293
}
294+
l1Config.WithL1BlobSchedule(defaultL1BlobSchedule())
286295
l1Config.WithL1ForkAtGenesis(l1Fork)
287296

288297
funderAddr, err := keys.Address(devkeys.UserKey(funderMnemonicIndex))

0 commit comments

Comments
 (0)