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
Copy file name to clipboardExpand all lines: README.md
+12-18Lines changed: 12 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,34 +31,29 @@ This is to ensure your chain has a unique chain ID. Our validation suite will ch
31
31
32
32
33
33
### 1. Install dependencies
34
-
You will need [`jq`](https://jqlang.github.io/jq/download/) and [`foundry`](https://book.getfoundry.sh/getting-started/installation) installed, as well as Go.
34
+
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
35
36
36
### 2. Set env vars
37
37
38
38
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
39
40
40
First, make a copy of `.env.example` named `.env`, and alter the variables to appropriate values.
41
-
42
-
### 3. Run script
43
-
44
41
#### Frontier chains
45
42
46
43
Frontier chains are chains with customizations beyond the standard OP
47
44
Stack configuration. To contribute a frontier OP-Stack chain
48
-
configuration, you can run:
49
-
45
+
configuration, you set the `SCR_CHAIN_TYPE=frontier` in the `.env` file.
50
46
51
-
```shell
52
-
sh scripts/add-chain.sh frontier
53
-
```
54
47
55
48
#### Standard chains
56
49
A chain may meet the definition of a **standard** chain. Adding a standard chain is a two-step process.
57
50
58
-
First, the chain should be added as a frontier chain but with `--standard-chain-candidate` flag set:
51
+
First, the chain should be added as a frontier chain as above, but with `SCR_STANDARD_CHAIN_CANDIDATE=true` in the `.env` file.
52
+
53
+
### 3. Run script
59
54
60
55
```shell
61
-
sh scripts/add-chain.sh frontier --standard-chain-candidate
56
+
just add-chain
62
57
```
63
58
64
59
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.
@@ -85,26 +80,25 @@ The format is a gzipped JSON `genesis.json` file, with either:
85
80
86
81
### 5. Run tests locally
87
82
88
-
Run the following command from the `validation` folder to run the Go validation checks, for only the chain you added (replace the chain name or ID accordingly):
83
+
Run the following command to run the Go validation checks, for only the chain you added (replace the chain name or ID accordingly):
89
84
```
90
-
go test -run=TestValidation/OP_Sepolia
85
+
just validate OP_Sepolia
91
86
```
92
87
or
93
88
```
94
-
go test -run=TestValidation/11155420
89
+
just validate 11155420
95
90
```
96
-
Omit the `-run=` flag to run checks for all chains.
97
91
98
92
> [!NOTE]
99
-
> If you set `--standard-chain-candidate`, your chain will be checked against the majority of the standard configuration requirements. These are defined in the [specs](https://specs.optimism.io/protocol/configurability.html). However, these requirements are currently a draft, pending governance approval.
93
+
> If you set `SCR_STANDARD_CHAIN_CANDIDATE`, your chain will be checked against the majority of the standard configuration requirements. These are defined in the [specs](https://specs.optimism.io/protocol/configurability.html). However, these requirements are currently a draft, pending governance approval.
100
94
>
101
95
> The final requirement to qualify as a standard chain concerns the `ProxyAdminOwner` role. The validation check for this role will not be run until the chain is [promoted](#promote-a-chain-to-standard) to standard.
102
96
103
97
### 6. Run codegen and check output
104
98
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):
105
99
106
100
```
107
-
sh scripts/codegen.sh
101
+
just codegen
108
102
```
109
103
110
104
> [!NOTE]
@@ -123,7 +117,7 @@ This process is only possible for chains already in the registry.
0 commit comments