Skip to content

Commit 2f5a93c

Browse files
docs: add readme for super root checker to link in governance post (#16065)
* docs: add readme for super root check to link in governance post * docs: more correct wording Co-authored-by: Adrian Sutton <[email protected]> * docs: make trust assumptions more clear for the endpoint usage --------- Co-authored-by: Adrian Sutton <[email protected]>
1 parent a2a86b1 commit 2f5a93c

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Overview
2+
3+
Generating the first SuperRoot used for an Interop migration
4+
5+
## Prerequisites:
6+
7+
1. git clone or pull the latest develop branch of the optimism repo
8+
2. Go Installed
9+
- You can follow the instructions in the [CONTRIBUTING.md](http://CONTRIBUTING.md) to install all software dependencies of the repo
10+
3. RPC URLs for the **L2** chains you want to generate a super root for.
11+
- **Important**: These RPC endpoints must be trusted endpoints as they provide the chain state used to compute the SuperRoot.
12+
13+
## Generation:
14+
15+
A SuperRoot with this script can be generated at a provided timestamp or if none is provided then the SuperRoot nearest to the current finalized timestamp will be found.
16+
17+
```bash
18+
go run op-chain-ops/cmd/check-super-root/main.go --rpc-endpoints $RPC_URL_1,$RPC_URL_2
19+
```
20+
21+
Output:
22+
23+
```bash
24+
INFO [05-19|16:24:50.736] Super root calculated successfully superRoot=**0xa47cfdd734e7db568eea0531c5fa6117398a5218d76371a17656e13836a8a44f** timestamp=1,747,682,546 chains=2
25+
```
26+
27+
Record the bytes32 hash of the super root and the timestamp the SuperRoot is valid for
28+
29+
## Environment Variables
30+
31+
Alternatively, you can use environment variables to configure the script:
32+
33+
- `CHECK_SUPER_ROOT_RPC_ENDPOINTS`: Comma-separated list of L2 execution client RPC endpoints.
34+
- `CHECK_SUPER_ROOT_TIMESTAMP`: Target timestamp for super root calculation.
35+
36+
# Validation Checks
37+
38+
A SuperRoot can be validated with the script and providing the timestamp the SuperRoot was created for:
39+
40+
```bash
41+
go run op-chain-ops/cmd/check-super-root/main.go --rpc-endpoints $RPC_URL_1,$RPC_URL_2 --timestamp $SUPER_ROOT_TIMESTAMP
42+
```
43+
44+
The output should match the above
45+
46+
```bash
47+
INFO [05-19|16:24:50.736] Super root calculated successfully superRoot=**0xa47cfdd734e7db568eea0531c5fa6117398a5218d76371a17656e13836a8a44f** timestamp=1,747,682,546 chains=2
48+
```

0 commit comments

Comments
 (0)