Skip to content

Commit 6825305

Browse files
committed
updated the docs content
1 parent e85b224 commit 6825305

File tree

1 file changed

+82
-36
lines changed

1 file changed

+82
-36
lines changed

pages/operators/chain-operators/tutorials/absolute-prestate.mdx

Lines changed: 82 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ These files are essential for the op-challenger tool to participate in dispute g
2727

2828
Before starting, ensure you have:
2929

30-
* Run `op-contracts/v2.0.0` or higher on your chain
31-
* Have [docker](https://docs.docker.com/engine/install/) running
32-
* You have sufficient system resources (memory and disk space)
30+
* [Docker](https://docs.docker.com/engine/install/) running
31+
* Have sufficient disk space and memory
3332

3433
## Using the latest AP and multi-threaded Cannon
3534

@@ -56,14 +55,10 @@ This upgrade offers several advantages:
5655
git clone https://github.com/ethereum-optimism/optimism.git
5756
cd optimism
5857
git checkout op-program/v1.6.1-rc.1 # Use the latest tagged version
59-
git submodule update --init --recursive
58+
git submodule update --init --recursive # Initialize submodules
6059

6160
```
6261

63-
<Callout type="important">
64-
Always use a specific tagged version of op-program as specified in the Superchain registry or official release notes. Current releases use versions like `op-program/v1.6.0-rc.2` for Isthmus hardfork support.
65-
</Callout>
66-
6762
### Build the op-program
6863

6964
Build the op-program binary:
@@ -111,6 +106,9 @@ Cannon64Next Absolute prestate hash:
111106

112107
### Prepare the preimage file
113108

109+
After generating the prestate, find the preimage file.
110+
You should see a file named `prestate-mt64.bin.gz` or similar (the exact name might vary based on the version).
111+
Rename this file to include the prestate hash:
114112
The preimage file is located at `op-program/bin/prestate-mt64.bin.gz`. Rename it to match the prestate hash:
115113

116114
```bash
@@ -119,6 +117,7 @@ Cannon64Next Absolute prestate hash:
119117
```
120118

121119
Replace `[CANNON64_PRESTATE_HASH]` with the actual `Cannon64` absolute prestate hash value from the output.
120+
This file needs to be uploaded to a location that's accessible by your op-challenger instances.
122121
</Steps>
123122

124123
## Official prestate hashes for Superchain registry chains
@@ -138,29 +137,71 @@ If your chain is not included in the Superchain registry, you'll need to generat
138137

139138
For these cases, follow these additional steps:
140139

141-
### For chains not in the Superchain registry
142-
143140
<Steps>
144-
### Prepare configuration files
145141

146-
Ensure your chain's rollup configuration and L2 genesis file are accessible
142+
### Create a directory for your custom chain configuration
143+
```bash
144+
mkdir -p op-program/chainconfig/configs
145+
```
147146

148-
### Generate custom prestate
149-
Generate the absolute prestate using your specific configuration:
147+
### Copy your chain configuration files to this directory
150148

151-
```bash
152-
cd op-program
153-
make cannon-prestate ROLLUP_CONFIG=/path/to/your/rollup.json L2_GENESIS=/path/to/your/genesis-l2.json
154-
```
149+
First, you need to obtain your chain's configuration files. These are typically generated when you [deploy your L2 chain](/operators/chain-operators/deploy/smart-contracts) with op-deployer:
155150

156-
</Steps>
151+
* ***rollup.json**: The rollup configuration file
152+
* **genesis.json**: The L2 genesis file
153+
154+
Name them according to the required format:
155+
156+
```bash
157+
# Replace 67865 with your actual chain ID
158+
cp /path/to/rollup.json op-program/chainconfig/configs/67865-rollup.json
159+
cp /path/to/genesis.json op-program/chainconfig/configs/67865-genesis-l2.json
160+
```
161+
Note: The naming format is critical - the files must be named as:
162+
163+
* `<L2-chain-id>-rollup.json`
164+
* `<L2-chain-id>-genesis-l2.json`
165+
166+
These files are outputs from your L2 chain deployment process using op-deployer.
167+
168+
### Generate the prestate
169+
170+
From the root of the monorepo, run:
171+
172+
```bash
173+
make reproducible-prestate
174+
```
175+
Alternatively, you can also specify the paths directly:
176+
177+
```bash
178+
make reproducible-prestate ROLLUP_CONFIG=/path/to/67865-rollup.json L2_GENESIS=/path/to/67865-genesis-l2.json
179+
```
180+
181+
This should generate output containing three prestate hashes:
182+
183+
```bash
184+
-------------------- Production Prestates --------------------
185+
186+
Cannon64 Absolute prestate hash:
187+
0x03eb07101fbdeaf3f04d9fb76526362c1eea2824e4c6e970bdb19675b72e4fc8
188+
189+
-------------------- Experimental Prestates --------------------
190+
191+
CannonInterop Absolute prestate hash:
192+
0x03fc3b4d091527d53f1ff369ea8ed65e5e17cc7fc98ebf75380238151cdc949c
193+
194+
Cannon64Next Absolute prestate hash:
195+
0x03eb07101fbdeaf3f04d9fb76526362c1eea2824e4c6e970bdb19675b72e4fc8
196+
197+
```
157198

158-
The initial prestate used for permissioned games doesn't include the necessary chain configuration for the Fault proof system.
159-
The assumption is that the chain operator, the single permissioned actor, will not challenge their own games.
160-
So the absolute prestate on the initial `PermissionedDisputeGame` will never be used.
199+
For current production use, you should use the `Cannon64` Absolute prestate hash.
161200

162-
When deploying a new chain, you must first deploy the L1 contracts and then retrieve the artifacts.
163-
These are inputs to the creation of the absolute prestate and this circular dependency is the reason chains cannot be deployed directly to the permissionless Fault Proof System.
201+
### Locate and prepare the preimage File
202+
Follow this [step](/operators/chain-operators/tutorials/absolute-prestate#prepare-the-preimage-file)
203+
204+
</Steps>
164205

165206
## Deploying and configuring with the absolute prestate
166207

@@ -180,24 +221,29 @@ After generating the absolute prestate and preimage files, you'll need to:
180221
--trace-type permissioned,cannon \
181222
--prestates-url <URL_TO_PRESTATES_DIRECTORY> \
182223
--l1-eth-rpc <YOUR_L1_RPC_URL> \
224+
--rollup-rpc <YOUR_ROLLUP_RPC_URL> \
183225
--game-factory-address <YOUR_DISPUTE_GAME_FACTORY> \
184-
--network <YOUR_NETWORK>
226+
--cannon-rollup-config /path/to/your/<chain-id>-rollup.json \
227+
--cannon-l2-genesis /path/to/your/<chain-id>-genesis-l2.json \
228+
--network <YOUR_NETWORK_NAME> \
229+
--datadir <YOUR_DATA_DIR>
185230
```
186231

232+
187233
Replace `<URL_TO_PRESTATES_DIRECTORY>` with the URL where you've stored your prestate files.
234+
The `--prestates-url` should point to the directory where you've uploaded the renamed prestate file from step 3.
188235

189236
</Steps>
190237

191-
## Next Steps
192-
193-
After successfully generating and deploying the absolute prestate:
194-
195-
1. Monitor your op-challenger service to ensure it can properly participate in dispute games
196-
2. Consider setting up redundant challenger instances for enhanced reliability
197-
3. Keep track of future upgrades that may require new absolute prestates
238+
<Callout type="info">
239+
Ensure you're using the latest op-challenger version, see the [release page](https://github.com/ethereum-optimism/optimism/release)
240+
The dispute game factory address must be manually specified via the `--game-factory-address` option.
241+
If your chain uses interoperability features, you'll need to add a `depsets.json` file to the `op-program/chainconfig/configs` directory.
242+
This file contains dependency set configurations in the same format as the op-supervisor's configs. You can extract this from your existing op-supervisor setup.
243+
</Callout>
198244

199-
For more information, refer to the following resources:
245+
## Next Steps
200246

201-
* [Migrating to Permissionless Fault Proofs Guide](/operators/chain-operators/tutorials/migrating-permissionless)
202-
* [Deploying New Dispute Games with OPCM](/operators/chain-operators/tutorials/dispute-games)
203-
* [Fault Proofs Explainer](/stack/fault-proofs/explainer)
247+
* [Deploying new dispute games with OPCM](/operators/chain-operators/tutorials/dispute-games)
248+
* [Migrating to permissionless fault proofs](/operators/chain-operators/tutorials/migrating-permissionless)
249+
* [Fault proofs explainer](/stack/fault-proofs/explainer)

0 commit comments

Comments
 (0)