Skip to content

Commit 696e64d

Browse files
committed
updated the prestate config
1 parent e60f450 commit 696e64d

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

Diff for: pages/operators/chain-operators/tutorials/migrating-permissionless.mdx

+16-9
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,26 @@ You'll need at least two prestates:
113113
For chains not in the Superchain Registry, you need to build custom prestates with your chain's configuration:
114114

115115
```bash
116+
# 1. Clone the repository
116117
git clone https://github.com/ethereum-optimism/optimism --recurse-submodules
117118
cd optimism
118119

119-
# To build a specific prestate (e.g., for op-program/v1.5.0)
120-
git checkout op-program/v1.5.0
121-
make reproducible-prestate
120+
# 2. Create a branch from the latest op-program release
121+
git checkout -b op-program/chainconfig op-program/v1.5.0
122+
123+
# 3. Add your chain configuration to the op-program chainconfig directory
124+
# Your rollup config must be named <chain-id>-rollup.json
125+
# Your L2 genesis must be named <chain-id>-genesis-l2.json
126+
mkdir -p op-program/chainconfig/configs
127+
cp /path/to/your/rollup-config.json op-program/chainconfig/configs/<YOUR_L2_CHAIN_ID>-rollup.json
128+
cp /path/to/your/l2-genesis.json op-program/chainconfig/configs/<YOUR_L2_CHAIN_ID>-genesis-l2.json
122129

123-
# Generate the prestate with your chain's specific configuration
124-
./op-program/bin/op-program \
125-
--l2.genesis /path/to/your/l2-genesis.json \
126-
--rollup.config /path/to/your/rollup-config.json \
127-
--network.l2chainid <YOUR_L2_CHAIN_ID> \
128-
--exec.prestate
130+
# 4. Commit your changes
131+
git add op-program/chainconfig/configs/
132+
git commit -m "Add chain configuration for <YOUR_CHAIN_NAME>"
133+
134+
# 5. Build the reproducible prestate
135+
make reproducible-prestate
129136
```
130137

131138
The prestate will typically be generated at:

0 commit comments

Comments
 (0)