Skip to content

Commit

Permalink
op-node: remove Goerli references & config overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianst committed Mar 26, 2024
1 parent 327e360 commit 5c7be58
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
2 changes: 0 additions & 2 deletions op-node/chaincfg/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ func AvailableNetworks() []string {

func handleLegacyName(name string) string {
switch name {
case "goerli":
return "op-goerli"
case "mainnet":
return "op-mainnet"
case "sepolia":
Expand Down
22 changes: 1 addition & 21 deletions op-node/rollup/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ var OPStackSupport = params.ProtocolVersionV0{Build: [8]byte{}, Major: 6, Minor:

const (
opMainnet = 10
opGoerli = 420
opSepolia = 11155420

labsGoerliDevnet = 997
labsGoerliChaosnet = 888
labsSepoliaDevnet0 = 11155421

baseGoerli = 84531
baseMainnet = 8453

pgnMainnet = 424
Expand Down Expand Up @@ -61,19 +57,6 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) {
}

regolithTime := uint64(0)
// three goerli testnets test-ran Bedrock and later upgraded to Regolith.
// All other OP-Stack chains have Regolith enabled from the start.
switch chainID {
case baseGoerli:
regolithTime = 1683219600
case opGoerli:
regolithTime = 1679079600
case labsGoerliDevnet:
regolithTime = 1677984480
case labsGoerliChaosnet:
regolithTime = 1692156862
}

cfg := &Config{
Genesis: Genesis{
L1: eth.BlockID{
Expand Down Expand Up @@ -106,13 +89,10 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) {
DepositContractAddress: common.Address(addrs.OptimismPortalProxy),
L1SystemConfigAddress: common.Address(addrs.SystemConfigProxy),
}

if superChain.Config.ProtocolVersionsAddr != nil { // Set optional protocol versions address
cfg.ProtocolVersionsAddress = common.Address(*superChain.Config.ProtocolVersionsAddr)
}
if chainID == labsGoerliDevnet || chainID == labsGoerliChaosnet {
cfg.ChannelTimeout = 120
cfg.MaxSequencerDrift = 1200
}
if chainID == pgnSepolia {
cfg.MaxSequencerDrift = 1000
cfg.SeqWindowSize = 7200
Expand Down
5 changes: 2 additions & 3 deletions op-node/rollup/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ func TestRandomConfigDescription(t *testing.T) {
})
t.Run("named L1", func(t *testing.T) {
config := randConfig()
config.L1ChainID = big.NewInt(5)
config.L1ChainID = big.NewInt(11155111)
out := config.Description(map[string]string{config.L2ChainID.String(): "foobar chain"})
require.Contains(t, out, "goerli")
require.Contains(t, out, "sepolia")
})
t.Run("unnamed", func(t *testing.T) {
config := randConfig()
Expand Down Expand Up @@ -506,7 +506,6 @@ func TestTimestampForBlock(t *testing.T) {
assert.Equal(t, timestamp, test.expectedBlockTime)
})
}

}

func TestForkchoiceUpdatedVersion(t *testing.T) {
Expand Down

0 comments on commit 5c7be58

Please sign in to comment.