Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge branch 'optimism' into seb/geth-v1.13.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianst committed Feb 1, 2024
2 parents 74b44a0 + ea3c304 commit 425e757
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 6 deletions.
5 changes: 5 additions & 0 deletions cmd/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
cfg.Eth.OverrideOptimismCanyon = &v
}

if ctx.IsSet(utils.OverrideOptimismEcotone.Name) {
v := ctx.Uint64(utils.OverrideOptimismEcotone.Name)
cfg.Eth.OverrideOptimismEcotone = &v
}

if ctx.IsSet(utils.OverrideOptimismInterop.Name) {
v := ctx.Uint64(utils.OverrideOptimismInterop.Name)
cfg.Eth.OverrideOptimismInterop = &v
Expand Down
1 change: 1 addition & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ var (
utils.OverrideCancun,
utils.OverrideVerkle,
utils.OverrideOptimismCanyon,
utils.OverrideOptimismEcotone,
utils.OverrideOptimismInterop,
utils.EnablePersonal,
utils.TxPoolLocalsFlag,
Expand Down
4 changes: 2 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@ var (
Usage: "Manually specify the Verkle fork timestamp, overriding the bundled setting",
Category: flags.EthCategory,
}
OverrideOptimismCanyon = &flags.BigFlag{
OverrideOptimismCanyon = &cli.Uint64Flag{
Name: "override.canyon",
Usage: "Manually specify the Optimism Canyon fork timestamp, overriding the bundled setting",
Category: flags.EthCategory,
}
OverrideOptimismEcotone = &flags.BigFlag{
OverrideOptimismEcotone = &cli.Uint64Flag{
Name: "override.ecotone",
Usage: "Manually specify the Optimism Ecotone fork timestamp, overriding the bundled setting",
Category: flags.EthCategory,
Expand Down
5 changes: 5 additions & 0 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ type ChainOverrides struct {
OverrideVerkle *uint64
// optimism
OverrideOptimismCanyon *uint64
OverrideOptimismEcotone *uint64
ApplySuperchainUpgrades bool
OverrideOptimismInterop *uint64
}
Expand Down Expand Up @@ -330,6 +331,10 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *trie.Database, gen
config.Optimism.EIP1559DenominatorCanyon = 250
}
}
if overrides != nil && overrides.OverrideOptimismEcotone != nil {
config.EcotoneTime = overrides.OverrideOptimismEcotone
config.CancunTime = overrides.OverrideOptimismEcotone
}
if overrides != nil && overrides.OverrideOptimismInterop != nil {
config.InteropTime = overrides.OverrideOptimismInterop
}
Expand Down
5 changes: 4 additions & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
nodeCloser: stack.Close,
}
bcVersion := rawdb.ReadDatabaseVersion(chainDb)
var dbVer = "<nil>"
dbVer := "<nil>"
if bcVersion != nil {
dbVer = fmt.Sprintf("%d", *bcVersion)
}
Expand Down Expand Up @@ -223,6 +223,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
if config.OverrideOptimismCanyon != nil {
overrides.OverrideOptimismCanyon = config.OverrideOptimismCanyon
}
if config.OverrideOptimismEcotone != nil {
overrides.OverrideOptimismEcotone = config.OverrideOptimismEcotone
}
if config.OverrideOptimismInterop != nil {
overrides.OverrideOptimismInterop = config.OverrideOptimismInterop
}
Expand Down
2 changes: 2 additions & 0 deletions eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ type Config struct {

OverrideOptimismCanyon *uint64 `toml:",omitempty"`

OverrideOptimismEcotone *uint64 `toml:",omitempty"`

OverrideOptimismInterop *uint64 `toml:",omitempty"`

// ApplySuperchainUpgrades requests the node to load chain-configuration from the superchain-registry.
Expand Down
12 changes: 12 additions & 0 deletions eth/ethconfig/gen_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/davecgh/go-spew v1.1.1
github.com/deckarep/golang-set/v2 v2.1.0
github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240129235549-0a582d7654ee
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240131175747-1300b1825140
github.com/ethereum/c-kzg-4844 v0.4.0
github.com/fatih/color v1.13.0
github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240129235549-0a582d7654ee h1:1a7ZvkuPhLJ6uAAsAAfaD7K0wYr45l9eH3TdIMpYl+M=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240129235549-0a582d7654ee/go.mod h1:7xh2awFQqsiZxFrHKTgEd+InVfDRrkKVUIuK8SAFHp0=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240131175747-1300b1825140 h1:F2Q+Gj4+W67CKZpVR+MEDL+EiIpgbx6VtwtdsPR4mbQ=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240131175747-1300b1825140/go.mod h1:7xh2awFQqsiZxFrHKTgEd+InVfDRrkKVUIuK8SAFHp0=
github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY=
github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
Expand Down

0 comments on commit 425e757

Please sign in to comment.