You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* remove reference to op-chain-ops
and point out how to run op-geth and op-node
* be more consistent with identifying chains
* fix formatting
* add step to fork repo
* readme states that standard chains are stage 1
Copy file name to clipboardExpand all lines: README.md
+24-29Lines changed: 24 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,51 +14,50 @@ Other configuration, such as contract-permissions and `SystemConfig` parameters
14
14
15
15
A list of chains in the registry can be seen in the top level [`chainList.toml`](./chainList.toml) and [`chainList.json`](./chainList.json) files.
16
16
17
-
## Downstream packages
18
-
The superchain configs are stored in a minimal form, and are embedded in downstream OP-Stack software ([`op-node`](https://github.com/ethereum-optimism/optimism) and [`op-geth`](https://github.com/ethereum-optimism/op-geth)).
17
+
## Superchain Level and Rollup Stage
18
+
Chains in the superchain-registry are assigned a `superchain_level` (shown in individual config files as well as the `chainList.tom/json` summaries), depending on the set of validation checks that they pass.
19
+
20
+
**Frontier** chains have `superchain_level = 1`.
19
21
20
-
Full deployment artifacts and genesis-states can be derived from the minimal form
21
-
using the reference [`op-chain-ops`] tooling.
22
+
**Standard** chains have `superchain_level = 2`. Because they satisfy a much stricter set of validation checks (see the [Standard Rollup Blockspace Charter](https://gov.optimism.io/t/season-6-draft-standard-rollup-charter/8135)), they also qualify as [Stage 1](https://ethereum-magicians.org/t/proposed-milestones-for-rollups-taking-off-training-wheels/11571) rollups chains.
The superchain configs are stored in a minimal form, and are embedded in downstream OP-Stack software ([`op-node`](https://github.com/ethereum-optimism/optimism) and [`op-geth`](https://github.com/ethereum-optimism/op-geth)). This means that, after a chain has been added to the registry, and the dependency on the registry updates in the downstream software, it is possible to start an `op-node` instance [using the `--network` flag](https://docs.optimism.io/builders/node-operators/configuration/consensus-config#network) (and also an `op-geth` instance [using the `--op-network` tag](https://docs.optimism.io/builders/node-operators/configuration/execution-config#op-network-betaop-network)) which will successfully sync with other nodes on that network.
24
27
25
28
## Adding a Chain
26
29
27
30
The following are the steps you need to take to add a chain to the registry:
31
+
### 0. Fork this repository
32
+
You will be raising a Pull Request from your fork to the upstream repo.
28
33
29
-
### 0. Ensure your chain is listed at ethereum-lists/chains
34
+
### 1. Ensure your chain is listed at ethereum-lists/chains
30
35
This is to ensure your chain has a unique chain ID. Our validation suite will check your chain against https://github.com/ethereum-lists/chains.
31
36
32
37
33
-
### 1. Install dependencies
38
+
### 2. Install dependencies
34
39
You will need [`jq`](https://jqlang.github.io/jq/download/) and [`foundry`](https://book.getfoundry.sh/getting-started/installation) installed, as well as Go and [`just`](https://just.systems/man/en/).
35
40
36
-
### 2. Set env vars
41
+
### 3. Set env vars
37
42
38
43
To contribute a standard OP-Stack chain configuration, in addition to user-supplied metadata (chain name) the following data is required: contracts deployment, rollup config, L2 genesis. We provide a tool to scrape this information from your local [monorepo](https://github.com/ethereum-optimism/optimism) folder.
39
44
40
45
First, make a copy of `.env.example` named `.env`, and alter the variables to appropriate values.
41
46
#### Frontier chains
42
-
43
-
Frontier chains are chains with customizations beyond the standard OP
44
-
Stack configuration. To contribute a frontier OP-Stack chain
45
-
configuration, you set the `SCR_CHAIN_TYPE=frontier` in the `.env` file.
46
-
47
+
To contribute a frontier OP-Stack chain configuration, you set the `SCR_CHAIN_TYPE=frontier` in the `.env` file. This will set `superchain_level = 1` in the registry's config file for this chain.
47
48
48
49
#### Standard chains
49
-
A chain may meet the definition of a **standard** chain. Adding a standard chain is a two-step process.
50
-
51
-
First, the chain should be added as a frontier chain as above, but with `SCR_STANDARD_CHAIN_CANDIDATE=true` in the `.env` file.
50
+
Adding a standard chain is a two-step process. First, the chain should be added as a frontier chain as above, but with `SCR_STANDARD_CHAIN_CANDIDATE=true` in the `.env` file.
52
51
53
-
### 3. Run script
52
+
### 4. Run script
54
53
55
54
```shell
56
55
just add-chain
57
56
```
58
57
59
58
The remaining steps should then be followed to merge the config data into the registry -- a prerequisite for [promoting the chain](#promote-a-chain-to-standard) to a standard chain.
60
59
61
-
### 4. Understand output
60
+
### 5. Understand output
62
61
The tool will write the following data:
63
62
- The main configuration source, with genesis data, and address of onchain system configuration. These are written to `superchain/configs/superchain_target/chain_short_name.yaml`.
64
63
> **Note**
@@ -78,15 +77,11 @@ The format is a gzipped JSON `genesis.json` file, with either:
78
77
- a `stateHash` attribute: to omit a large state (e.g. for networks with a re-genesis or migration history).
79
78
Nodes can load the genesis block header, and state-sync to complete the node initialization.
80
79
81
-
### 5. Run tests locally
80
+
### 6. Run tests locally
82
81
83
-
Run the following command to run the Go validation checks, for only the chain you added (replace the chain name or ID accordingly):
84
-
```
85
-
just validate OP_Sepolia
86
-
```
87
-
or
82
+
Run the following command to run the Go validation checks, for only the chain you added (replace the `<chain-id>` accordingly):
88
83
```
89
-
just validate 11155420
84
+
just validate <chain-id>
90
85
```
91
86
92
87
> [!NOTE]
@@ -96,7 +91,7 @@ just validate 11155420
96
91
97
92
The [`validation_test.go`](./validation/validation_test.go) test declaration file defines which checks run on each class of chain. The parameters referenced in each check are recorded in [TOML files in the `standard` directory](./validation/standard).
98
93
99
-
### 6. Run codegen and check output
94
+
### 7. Run codegen and check output
100
95
This is a tool which will rewrite certain summary files of all the chains in the registry, including the one you are adding. The output will be checked in a continuous integration checks (it is required to pass):
101
96
102
97
```
@@ -106,18 +101,18 @@ just codegen
106
101
> [!NOTE]
107
102
> Please double check the diff to this file. This data may be consumed by external services, e.g. wallets. If anything looks incorrect, please get in touch.
108
103
109
-
### 7. Open Your Pull Request
104
+
### 8. Open Your Pull Request
110
105
When opening a PR:
111
106
- Open it from a non-protected branch in your fork (e.g. avoid the `main` branch). This allows maintainers to push to your branch if needed, which streamlines the review and merge process.
112
107
- Open one PR per chain you would like to add. This ensures the merge of one chain is not blocked by unexpected issues.
113
108
114
109
Once the PR is opened, the same automated checks from Step 4 will then run on your PR, and your PR will be reviewed in due course. Once these checks pass the PR will be merged.
115
110
116
111
117
-
##Promote a chain to standard
112
+
##Promote a chain to standard
118
113
This process is only possible for chains already in the registry.
119
114
120
-
Run this command:
115
+
Run this command (replace the `<chain-id>` accordingly):
0 commit comments