Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/celo-org/op-geth v1.101411.1-0.20250522123759-d899ed692354
replace github.com/ethereum/go-ethereum => github.com/celo-org/op-geth v1.101411.1-0.20250604093504-9074dd26d0a8

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

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
github.com/celo-org/op-geth v1.101411.1-0.20250522123759-d899ed692354 h1:9e2RYqDMoE3d124hyEA2c7DfnlZwXytoP9jZ/YQ6Omg=
github.com/celo-org/op-geth v1.101411.1-0.20250522123759-d899ed692354/go.mod h1:Ti5NReEoY9vwgJs47kdWjgQDApGMRLk7bpBSgxKYVlA=
github.com/celo-org/op-geth v1.101411.1-0.20250604093504-9074dd26d0a8 h1:9PKBVXOwJUHJ2M096nVom4rELVaAZZrVhQvl5mwre7Q=
github.com/celo-org/op-geth v1.101411.1-0.20250604093504-9074dd26d0a8/go.mod h1:Ti5NReEoY9vwgJs47kdWjgQDApGMRLk7bpBSgxKYVlA=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=
Expand Down
27 changes: 27 additions & 0 deletions op-node/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"github.com/urfave/cli/v2"

altda "github.com/ethereum-optimism/optimism/op-alt-da"
Expand Down Expand Up @@ -212,6 +213,7 @@ func NewRollupConfigFromCLI(log log.Logger, ctx *cli.Context) (*rollup.Config, e
if err != nil {
return nil, err
}
applyCeloHardforks(rollupConfig)
applyOverrides(ctx, rollupConfig)
return rollupConfig, nil
}
Expand Down Expand Up @@ -285,6 +287,31 @@ func applyOverrides(ctx *cli.Context, rollupConfig *rollup.Config) {
}
}

// applyCeloHardforks modifies the rollupConfig to apply Celo-specific hardforks.
// This code is a shortcut and the proper config should be added to the superchain registry.
// See https://github.com/celo-org/op-geth/issues/389
func applyCeloHardforks(rollupConfig *rollup.Config) {
switch rollupConfig.L2ChainID.Uint64() {
case params.CeloMainnetChainID:
activationTime := params.CeloMainnetIsthmusTimestamp
rollupConfig.HoloceneTime = &activationTime
rollupConfig.IsthmusTime = &activationTime
rollupConfig.PectraBlobScheduleTime = &activationTime
case params.CeloAlfajoresChainID:
activationTime := params.AlfajoresIsthmusTimestamp
rollupConfig.HoloceneTime = &activationTime
rollupConfig.IsthmusTime = &activationTime
rollupConfig.PectraBlobScheduleTime = &activationTime
case params.CeloBaklavaChainID:
activationTime := params.BaklavaIsthmusTimestamp
rollupConfig.HoloceneTime = &activationTime
rollupConfig.IsthmusTime = &activationTime
rollupConfig.PectraBlobScheduleTime = &activationTime
default:
// No Celo hardforks for other chains, do nothing.
}
}

func NewSyncConfig(ctx *cli.Context, log log.Logger) (*sync.Config, error) {
if ctx.IsSet(flags.L2EngineSyncEnabled.Name) && ctx.IsSet(flags.SyncModeFlag.Name) {
return nil, errors.New("cannot set both --l2.engine-sync and --syncmode at the same time")
Expand Down