Skip to content

Commit d2ec7b2

Browse files
authored
Bump devnet chains down to Frontier, prevent exclusions for Standard chains. (#385)
* relegate devnet chains to frontier, clear up exclusions prevent any standard chain from having exclusions * just codegen * Tweak exclusion reason * remove devnet standard config files * remove reference to devnets * move exclusion for op mainnet genesis hash check
1 parent 5bf0ca8 commit d2ec7b2

File tree

10 files changed

+49
-89
lines changed

10 files changed

+49
-89
lines changed

chainList.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,25 +208,25 @@
208208
}
209209
},
210210
{
211-
"name": "OP Labs Sepolia devnet 0",
212-
"identifier": "sepolia-dev-0/oplabs-devnet-0",
213-
"chainId": 11155421,
211+
"name": "Base devnet 0",
212+
"identifier": "sepolia-dev-0/base-devnet-0",
213+
"chainId": 11763072,
214214
"rpc": [
215215
""
216216
],
217217
"explorers": [
218218
""
219219
],
220-
"superchainLevel": 2,
220+
"superchainLevel": 1,
221221
"parent": {
222222
"type": "L2",
223223
"chain": "sepolia-dev-0"
224224
}
225225
},
226226
{
227-
"name": "Base devnet 0",
228-
"identifier": "sepolia-dev-0/base-devnet-0",
229-
"chainId": 11763072,
227+
"name": "OP Labs Sepolia devnet 0",
228+
"identifier": "sepolia-dev-0/oplabs-devnet-0",
229+
"chainId": 11155421,
230230
"rpc": [
231231
""
232232
],

chainList.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,20 @@
142142
chain = "sepolia"
143143

144144
[[chains]]
145-
name = "OP Labs Sepolia devnet 0"
146-
identifier = "sepolia-dev-0/oplabs-devnet-0"
147-
chain_id = 11155421
145+
name = "Base devnet 0"
146+
identifier = "sepolia-dev-0/base-devnet-0"
147+
chain_id = 11763072
148148
rpc = [""]
149149
explorers = [""]
150-
superchain_level = 2
150+
superchain_level = 1
151151
[chains.parent]
152152
type = "L2"
153153
chain = "sepolia-dev-0"
154154

155155
[[chains]]
156-
name = "Base devnet 0"
157-
identifier = "sepolia-dev-0/base-devnet-0"
158-
chain_id = 11763072
156+
name = "OP Labs Sepolia devnet 0"
157+
identifier = "sepolia-dev-0/oplabs-devnet-0"
158+
chain_id = 11155421
159159
rpc = [""]
160160
explorers = [""]
161161
superchain_level = 1

superchain/configs/sepolia-dev-0/base-devnet-0.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ sequencer_rpc: ""
55
explorer: ""
66

77
superchain_level: 1
8-
standard_chain_candidate: true # This is a temporary field which causes most of the standard validation checks to run on this chain
9-
108
superchain_time: 1706634000 # joined from Ecotone
119

1210
system_config_addr: "0x7F67DC4959cb3E532B10A99F41bDD906C46FdFdE"

superchain/configs/sepolia-dev-0/oplabs-devnet-0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public_rpc: ""
44
sequencer_rpc: ""
55
explorer: ""
66

7-
superchain_level: 2
7+
superchain_level: 1
88
superchain_time: 0 # Missing hardfork times are inherited from superchain.yaml
99

1010
system_config_addr: "0xa6b72407e2dc9EBF84b839B69A24C88929cf20F7"

validation/exclusions_test.go

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ package validation
33
import (
44
"regexp"
55
"testing"
6+
7+
"github.com/ethereum-optimism/superchain-registry/superchain"
8+
"github.com/stretchr/testify/require"
69
)
710

811
func skipIfExcluded(t *testing.T, chainID uint64) {
@@ -18,49 +21,51 @@ func skipIfExcluded(t *testing.T, chainID uint64) {
1821
}
1922

2023
var exclusions = map[string]map[uint64]bool{
24+
// Universal Checks
25+
"Genesis_Hash_Check": {
26+
// OP Mainnet has a pre-bedrock genesis (with an empty allocs object stored in the registry), so we exclude it from this check.")
27+
10: true,
28+
},
2129
"ChainID_RPC_Check": {
2230
11155421: true, // sepolia-dev-0/oplabs-devnet-0 No Public RPC declared
2331
11763072: true, // sepolia-dev-0/base-devnet-0 No Public RPC declared
2432
},
25-
"GPO_Params": {
26-
11155421: true, // sepolia-dev-0/oplabs-devnet-0 (no public endpoint)
27-
11763072: true, // sepolia-dev-0/base-devnet-0 (no public endpoint)
28-
},
29-
"Superchain_Config": {
30-
11763072: true, // sepolia-dev-0/base-devnet-0 (old version of OptimismPortal)
33+
"Genesis_RPC_Check": {
34+
11155421: true, // sepolia-dev-0/oplabs-devnet-0 No Public RPC declared
35+
11763072: true, // sepolia-dev-0/base-devnet-0 No Public RPC declared
3136
},
32-
"L2OO_Params": {
33-
11155421: true, // sepolia-dev-0/oplabs-devnet-0 (does not yet declare a contract versions tag)
34-
11763072: true, // sepolia-dev-0/base-devnet-0 (does not yet declare a contract versions tag)
37+
"Uniqueness_Check": {
38+
11155421: true, // oplabs devnet 0, not in upstream repo
39+
11763072: true, // base devnet 0, not in upstream repo}
3540
},
41+
42+
// Standard Checks
3643
"L1_Security_Config": {
3744
8453: true, // base (incorrect challenger, incorrect guardian)
38-
11763072: true, // base-devnet-0 (incorrect challenger, incorrect guardian)
39-
90001: true, // race (incorrect challenger, incorrect guardian)
4045
84532: true, // base-sepolia (incorrect challenger)
4146
7777777: true, // zora (incorrect challenger)
4247
1750: true, // metal (incorrect challenger)
4348
919: true, // mode sepolia (incorrect challenger)
4449
999999999: true, // zora sepolia (incorrect challenger)
4550
34443: true, // mode (incorrect challenger)
4651
},
47-
"L2_Security_Config": {
48-
11155421: true, // sepolia-dev-0/oplabs-devnet-0 No Public RPC declared
49-
11763072: true, // sepolia-dev-0/base-devnet-0 No Public RPC declared
50-
},
51-
"Genesis_Hash_Check": {
52-
10: true, // OP Mainnet
53-
},
54-
"Genesis_RPC_Check": {
55-
11155421: true, // sepolia-dev-0/oplabs-devnet-0 No Public RPC declared
56-
11763072: true, // sepolia-dev-0/base-devnet-0 No Public RPC declared
57-
},
5852
"Standard_Contract_Versions": {
5953
11155421: true, // sepolia-dev-0/oplabs-devnet-0
6054
11763072: true, // sepolia-dev-0/base-devnet-0
6155
},
62-
"Uniqueness_Check": {
63-
11155421: true, // oplabs devnet 0, not in upstream repo
64-
11763072: true, // base devnet 0, not in upstream repo}
65-
},
56+
}
57+
58+
func TestExclusions(t *testing.T) {
59+
for name, v := range exclusions {
60+
for k := range v {
61+
if k == 10 && name == "Genesis_Hash_Check" {
62+
// This is the sole standard chain validation check exclusion
63+
continue
64+
}
65+
if v[k] {
66+
require.NotNil(t, superchain.OPChains[k], k)
67+
require.False(t, superchain.OPChains[k].SuperchainLevel == superchain.Standard, "Standard Chain %d may not be excluded from any check", k)
68+
}
69+
}
70+
}
6671
}

validation/standard/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func init() {
1919

2020
decodeTOMLFileIntoConfig("standard-config-roles-universal.toml", Config.Roles)
2121

22-
networks := []string{"mainnet", "sepolia", "sepolia-dev-0"}
22+
networks := []string{"mainnet", "sepolia"}
2323
for _, network := range networks {
2424
Config.MultisigRoles[network] = new(MultisigRoles)
2525
decodeTOMLFileIntoConfig("standard-config-roles-"+network+".toml", Config.MultisigRoles[network])

validation/standard/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Standard Rollup Blockspace Charter definition files
22
This directory contains a number of TOML files which declare various parameters, addresses, contract versions and other data which define a **standard chain** in the sense of the [Standard Rollup Charter](https://gov.optimism.io/t/season-6-draft-standard-rollup-charter/8135).
33

4-
Distinct, named declaration files have been added (where necessary) to allow testnets and devnets to have greater flexibility in their configurations.
4+
Distinct, named declaration files have been added (where necessary) to allow testnets to have greater flexibility in their configurations.
55

66
Parameters may be declared to be equal to a pair of values, meaning that the parameter must be within the bounds defined by those values.
77

validation/standard/standard-config-params-sepolia-dev-0.toml

Lines changed: 0 additions & 26 deletions
This file was deleted.

validation/standard/standard-config-roles-sepolia-dev-0.toml

Lines changed: 0 additions & 16 deletions
This file was deleted.

validation/superchain-genesis_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616

1717
func testGenesisHash(t *testing.T, chainID uint64) {
1818
skipIfExcluded(t, chainID)
19+
1920
chainConfig, ok := OPChains[chainID]
2021
if !ok {
2122
t.Fatalf("no chain with ID %d found", chainID)
@@ -27,8 +28,6 @@ func testGenesisHash(t *testing.T, chainID uint64) {
2728
// superchain.OPChains, superchain.LoadGenesis, superchain.LoadContractBytecode
2829
// to reconstruct a core.Genesis and compute its block hash.
2930
// We can then compare that against the declared genesis block hash.
30-
// TODO core.LoadOPStackGenesis actually already performs the check we are about to do
31-
// TODO core.LoadOPStackGenesis could be moved to superchain
3231
computedGenesis, err := core.LoadOPStackGenesis(chainID)
3332
require.NoError(t, err)
3433

0 commit comments

Comments
 (0)