Skip to content

Commit

Permalink
Merge pull request ethereum#252 from ethereum-optimism/gk/upgrade-sc-…
Browse files Browse the repository at this point in the history
…registry

Remove hardfork activation time overrides
  • Loading branch information
sebastianst authored Mar 6, 2024
2 parents 7c19ab7 + 0a0c5b7 commit 0ff6f56
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
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-20240222155908-ab073f6aa74f
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240306093353-c557df8e6f41
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-20240222155908-ab073f6aa74f h1:L2ub0d0iW2Nqwh1r9WxMqebgZf7rU+wHuVCv21uAGx8=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240222155908-ab073f6aa74f/go.mod h1:7xh2awFQqsiZxFrHKTgEd+InVfDRrkKVUIuK8SAFHp0=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240306093353-c557df8e6f41 h1:WKJvsRyW/YNgyT0P2x5U530ITOY8Dv9TrZnbliqSXd8=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240306093353-c557df8e6f41/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
16 changes: 4 additions & 12 deletions params/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ func LoadOPStackChainConfig(chainID uint64) (*ChainConfig, error) {
if !ok {
return nil, fmt.Errorf("unknown chain ID: %d", chainID)
}
superchainConfig, ok := superchain.Superchains[chConfig.Superchain]
if !ok {
return nil, fmt.Errorf("unknown superchain %q", chConfig.Superchain)
}

genesisActivation := uint64(0)
out := &ChainConfig{
Expand All @@ -65,13 +61,13 @@ func LoadOPStackChainConfig(chainID uint64) (*ChainConfig, error) {
ArrowGlacierBlock: common.Big0,
GrayGlacierBlock: common.Big0,
MergeNetsplitBlock: common.Big0,
ShanghaiTime: superchainConfig.Config.CanyonTime, // Shanghai activates with Canyon
CancunTime: superchainConfig.Config.EcotoneTime, // Cancun activates with Ecotone
ShanghaiTime: chConfig.CanyonTime, // Shanghai activates with Canyon
CancunTime: chConfig.EcotoneTime, // Cancun activates with Ecotone
PragueTime: nil,
BedrockBlock: common.Big0,
RegolithTime: &genesisActivation,
CanyonTime: superchainConfig.Config.CanyonTime,
EcotoneTime: superchainConfig.Config.EcotoneTime,
CanyonTime: chConfig.CanyonTime,
EcotoneTime: chConfig.EcotoneTime,
TerminalTotalDifficulty: common.Big0,
TerminalTotalDifficultyPassed: true,
Ethash: nil,
Expand All @@ -83,10 +79,6 @@ func LoadOPStackChainConfig(chainID uint64) (*ChainConfig, error) {
},
}

// note: no actual parameters are being loaded, yet.
// Future superchain upgrades are loaded from the superchain chConfig and applied to the geth ChainConfig here.
_ = superchainConfig.Config

// special overrides for OP-Stack chains with pre-Regolith upgrade history
switch chainID {
case OPGoerliChainID:
Expand Down

0 comments on commit 0ff6f56

Please sign in to comment.