Commit eac79900 authored by George C. Knee's avatar George C. Knee Committed by GitHub

Remove hardfork activation time overrides (#9642)

* go get github.com/ethereum-optimism/superchain-registry/superchain@1203fe7 && go mod tidy

* update op-geth dependency

* remove hardfork activation time overrides

* remove unused consts

* Revert "remove hardfork activation time overrides"

This reverts commit 34b761f267aa3bbeaaa16f4d328ad91dec20d4e9.

* update superchain

* Revert "remove unused consts"

This reverts commit d1fca170f24f608f75d0d9ca8c12597bffd9df83.

* get Canyon,Delta and EcotoneTime fron superchain chain config

* remove sepolia devnet specialcase (will be moved to superchain registry)

* update op-geth

* add oplabs-devnet-0-sepolia-dev-0 to chains_test

* fix correct DeltaTime for sepoliaDev0Cfg

* go get github.com/ethereum-optimism/superchain-registry/superchain@2dcb036 && go mod tidy

* remove TODO

* go get github.com/ethereum-optimism/superchain-registry/superchain@c2e25cc && go mod tidy

* update dependency on op-geth

* update expected CanyonTime for oplabs-devnet-0-sepolia-dev-0

* update dependency on superchain and op-geth

* make mod-tidy

* go get github.com/ethereum-optimism/superchain-registry/superchain@c557df8 && go mod tidy

* update op-geth to v1.101308.3-rc.1 && go mod tidy

* make mod-tidy
parent 6096d317
...@@ -11,7 +11,7 @@ require ( ...@@ -11,7 +11,7 @@ require (
github.com/crate-crypto/go-kzg-4844 v0.7.0 github.com/crate-crypto/go-kzg-4844 v0.7.0
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3
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/go-ethereum v1.13.8 github.com/ethereum/go-ethereum v1.13.8
github.com/fsnotify/fsnotify v1.7.0 github.com/fsnotify/fsnotify v1.7.0
github.com/go-chi/chi/v5 v5.0.12 github.com/go-chi/chi/v5 v5.0.12
...@@ -217,7 +217,7 @@ require ( ...@@ -217,7 +217,7 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect rsc.io/tmplfunc v0.0.3 // indirect
) )
replace github.com/ethereum/go-ethereum v1.13.8 => github.com/ethereum-optimism/op-geth v1.101308.3-0.20240305151625-7c19ab73a4b3 replace github.com/ethereum/go-ethereum v1.13.8 => github.com/ethereum-optimism/op-geth v1.101308.3-rc.1
// replace github.com/ethereum-optimism/superchain-registry/superchain => ../superchain-registry/superchain // replace github.com/ethereum-optimism/superchain-registry/superchain => ../superchain-registry/superchain
......
...@@ -170,10 +170,10 @@ github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/ ...@@ -170,10 +170,10 @@ github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/
github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc= github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs= github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs=
github.com/ethereum-optimism/op-geth v1.101308.3-0.20240305151625-7c19ab73a4b3 h1:jFLkp8h3cA8w80tCuuAJAS7L4dTT1yD1vYCqeIljGz0= github.com/ethereum-optimism/op-geth v1.101308.3-rc.1 h1:mC8PrDNTZJr7sYcm+FgaWFUy/LOZ0sS8+BxkglUoPkg=
github.com/ethereum-optimism/op-geth v1.101308.3-0.20240305151625-7c19ab73a4b3/go.mod h1:RPqVhnX00rJNys/YRDK4Wl4PvS6dgFrLqhsopIZOhEw= github.com/ethereum-optimism/op-geth v1.101308.3-rc.1/go.mod h1:k0UbrLuOITLD8goCyA2xWebAL03n2BZUCfwos0rxz60=
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-20240306093353-c557df8e6f41 h1:WKJvsRyW/YNgyT0P2x5U530ITOY8Dv9TrZnbliqSXd8=
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/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 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY=
github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
......
...@@ -21,9 +21,10 @@ import ( ...@@ -21,9 +21,10 @@ import (
// the superchain-registry is no longer deemed experimental. // the superchain-registry is no longer deemed experimental.
func TestGetRollupConfig(t *testing.T) { func TestGetRollupConfig(t *testing.T) {
configsByName := map[string]rollup.Config{ configsByName := map[string]rollup.Config{
"goerli": goerliCfg, "goerli": goerliCfg,
"mainnet": mainnetCfg, "mainnet": mainnetCfg,
"sepolia": sepoliaCfg, "sepolia": sepoliaCfg,
"oplabs-devnet-0-sepolia-dev-0": sepoliaDev0Cfg,
} }
for name, expectedCfg := range configsByName { for name, expectedCfg := range configsByName {
...@@ -136,6 +137,40 @@ var sepoliaCfg = rollup.Config{ ...@@ -136,6 +137,40 @@ var sepoliaCfg = rollup.Config{
ProtocolVersionsAddress: common.HexToAddress("0x79ADD5713B383DAa0a138d3C4780C7A1804a8090"), ProtocolVersionsAddress: common.HexToAddress("0x79ADD5713B383DAa0a138d3C4780C7A1804a8090"),
} }
var sepoliaDev0Cfg = rollup.Config{
Genesis: rollup.Genesis{
L1: eth.BlockID{
Hash: common.HexToHash("0x5639be97000fec7131a880b19b664cae43f975c773f628a08a9bb658c2a68df0"),
Number: 5173577,
},
L2: eth.BlockID{
Hash: common.HexToHash("0x027ae1f4f9a441f9c8a01828f3b6d05803a0f524c07e09263264a38b755f804b"),
Number: 0,
},
L2Time: 1706484048,
SystemConfig: eth.SystemConfig{
BatcherAddr: common.HexToAddress("0x19cc7073150d9f5888f09e0e9016d2a39667df14"),
Overhead: eth.Bytes32(common.HexToHash("0x00000000000000000000000000000000000000000000000000000000000000bc")),
Scalar: eth.Bytes32(common.HexToHash("0x00000000000000000000000000000000000000000000000000000000000a6fe0")),
GasLimit: 30000000,
},
},
BlockTime: 2,
MaxSequencerDrift: 600,
SeqWindowSize: 3600,
ChannelTimeout: 300,
L1ChainID: big.NewInt(11155111),
L2ChainID: big.NewInt(11155421),
BatchInboxAddress: common.HexToAddress("0xff00000000000000000000000000000011155421"),
DepositContractAddress: common.HexToAddress("0x76114bd29dFcC7a9892240D317E6c7C2A281Ffc6"),
L1SystemConfigAddress: common.HexToAddress("0xa6b72407e2dc9EBF84b839B69A24C88929cf20F7"),
RegolithTime: u64Ptr(0),
CanyonTime: u64Ptr(0),
DeltaTime: u64Ptr(0),
EcotoneTime: u64Ptr(1706634000),
ProtocolVersionsAddress: common.HexToAddress("0x252CbE9517F731C618961D890D534183822dcC8d"),
}
func u64Ptr(v uint64) *uint64 { func u64Ptr(v uint64) *uint64 {
return &v return &v
} }
...@@ -74,14 +74,6 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) { ...@@ -74,14 +74,6 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) {
regolithTime = 1692156862 regolithTime = 1692156862
} }
deltaTime := superChain.Config.DeltaTime
// OP Labs Sepolia devnet 0 activated delta at genesis, slightly earlier than
// Base Sepolia devnet 0 on the same superchain.
switch chainID {
case labsSepoliaDevnet0:
deltaTime = new(uint64)
}
cfg := &Config{ cfg := &Config{
Genesis: Genesis{ Genesis: Genesis{
L1: eth.BlockID{ L1: eth.BlockID{
...@@ -106,10 +98,10 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) { ...@@ -106,10 +98,10 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) {
L1ChainID: new(big.Int).SetUint64(superChain.Config.L1.ChainID), L1ChainID: new(big.Int).SetUint64(superChain.Config.L1.ChainID),
L2ChainID: new(big.Int).SetUint64(chConfig.ChainID), L2ChainID: new(big.Int).SetUint64(chConfig.ChainID),
RegolithTime: &regolithTime, RegolithTime: &regolithTime,
CanyonTime: superChain.Config.CanyonTime, CanyonTime: chConfig.CanyonTime,
DeltaTime: deltaTime, DeltaTime: chConfig.DeltaTime,
EcotoneTime: superChain.Config.EcotoneTime, EcotoneTime: chConfig.EcotoneTime,
FjordTime: superChain.Config.FjordTime, FjordTime: chConfig.FjordTime,
BatchInboxAddress: common.Address(chConfig.BatchInboxAddr), BatchInboxAddress: common.Address(chConfig.BatchInboxAddr),
DepositContractAddress: common.Address(addrs.OptimismPortalProxy), DepositContractAddress: common.Address(addrs.OptimismPortalProxy),
L1SystemConfigAddress: common.Address(addrs.SystemConfigProxy), L1SystemConfigAddress: common.Address(addrs.SystemConfigProxy),
......
...@@ -39,7 +39,7 @@ require ( ...@@ -39,7 +39,7 @@ require (
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240222155908-ab073f6aa74f // indirect github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240306093353-c557df8e6f41 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
......
...@@ -86,8 +86,8 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. ...@@ -86,8 +86,8 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum-optimism/op-geth v1.101308.2-rc.2 h1:Tjm2n7/actyINbRIbqeDS+SyWAcIl+pRfOHODwW7lpQ= github.com/ethereum-optimism/op-geth v1.101308.2-rc.2 h1:Tjm2n7/actyINbRIbqeDS+SyWAcIl+pRfOHODwW7lpQ=
github.com/ethereum-optimism/op-geth v1.101308.2-rc.2/go.mod h1:RPqVhnX00rJNys/YRDK4Wl4PvS6dgFrLqhsopIZOhEw= github.com/ethereum-optimism/op-geth v1.101308.2-rc.2/go.mod h1:RPqVhnX00rJNys/YRDK4Wl4PvS6dgFrLqhsopIZOhEw=
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-20240306093353-c557df8e6f41 h1:WKJvsRyW/YNgyT0P2x5U530ITOY8Dv9TrZnbliqSXd8=
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/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 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY=
github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
github.com/fjl/memsize v0.0.1 h1:+zhkb+dhUgx0/e+M8sF0QqiouvMQUiKR+QYvdxIOKcQ= github.com/fjl/memsize v0.0.1 h1:+zhkb+dhUgx0/e+M8sF0QqiouvMQUiKR+QYvdxIOKcQ=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment