From 92df61edae3be9437bbe1b77a24a5e2e42d4e12c Mon Sep 17 00:00:00 2001 From: krofax Date: Thu, 15 May 2025 15:48:36 +0100 Subject: [PATCH 01/12] Updated the absolute prestate docs --- pages/operators/chain-operators/tutorials.mdx | 6 +- .../chain-operators/tutorials/_meta.json | 2 + .../tutorials/absolute-prestate.mdx | 209 ++++++++++++++++++ 3 files changed, 215 insertions(+), 2 deletions(-) create mode 100644 pages/operators/chain-operators/tutorials/absolute-prestate.mdx diff --git a/pages/operators/chain-operators/tutorials.mdx b/pages/operators/chain-operators/tutorials.mdx index 2e31df92a..e18dc82c9 100644 --- a/pages/operators/chain-operators/tutorials.mdx +++ b/pages/operators/chain-operators/tutorials.mdx @@ -36,12 +36,14 @@ This section provides information on adding attributes to the derivation functio - - + + + + diff --git a/pages/operators/chain-operators/tutorials/_meta.json b/pages/operators/chain-operators/tutorials/_meta.json index 807ecbed1..9168131fe 100644 --- a/pages/operators/chain-operators/tutorials/_meta.json +++ b/pages/operators/chain-operators/tutorials/_meta.json @@ -5,5 +5,7 @@ "modifying-predeploys": "Modifying predeployed contracts", "integrating-da-layer": "Integrating a new DA layer", "migrating-permissionless": "Migrating to permissionless fault proofs on OP Stack", + "dispute-games":"Deploying new dispute games with OPCM", + "absolute-prestate":"Generating absolute prestate and preimage files", "chain-dev-net": "Running a local network environment" } \ No newline at end of file diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx new file mode 100644 index 000000000..b70bfffa2 --- /dev/null +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -0,0 +1,209 @@ +--- +title: Generating absolute prestate and preimage files +description: A guide for chain operators on how to generate the absolute prestate and preimage files necessary for running cannon/permissionless proofs. +lang: en-US +content_type: tutorial +topic: generating absolute prestate files +personas: +- chain-operator +categories: +- fault proofs +- cannon +- permissionless proofs +- proof system +is_imported_content: 'false' +--- + +import { Callout, Steps } from 'nextra/components' + +# Overview + +This guide will show chain operators how to generate the absolute prestate and preimage files necessary for running cannon/permissionless proofs. + +Permissionless fault proofs are a critical component of the OP Stack's security model. They allow anyone to challenge invalid state proposals, ensuring the correctness of L2 to L1 withdrawals without relying on trusted third parties. +To enable this functionality, chain operators must generate and maintain the necessary absolute prestate and preimage files. +The absolute prestate is a commitment to the initial state of the fault proof program, and the preimage is the serialized binary representation of this program state. +These files are essential for the op-challenger tool to participate in dispute games when challenging invalid claims. + +## Prerequisites + +Before starting, ensure you have: + +* Run `op-contracts/v2.0.0` or higher on your chain +* You have sufficient system resources (memory and disk space) + +## Using the latest AP and multi-threaded Cannon + +As of the latest releases, OP Stack chains should utilize the `64-bit` MIPS multi-threaded version of Cannon. +This upgrade offers several advantages: + +* Improved performance through parallelized execution +* Enhanced fault proof VM capabilities +* Support for the latest network upgrades + + + Beginning with [Upgrade 14](/notices/upgrade-14), all chains should use the `64-bit` multi-threaded version of Cannon. + The absolute prestate files for this version typically have the format `prestate-mt64.bin.gz`. + + +## Generating the absolute prestate + + + ### Clone and checkout the tagged version + + First, clone the Optimism monorepo and check out the appropriate release tag for op-program: + + ```bash + git clone https://github.com/ethereum-optimism/optimism.git + cd optimism + git checkout op-program/v1.6.0-rc.2 # Use the latest tagged version + + ``` + + + 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. + + + ### Initialize the repository + + Initialize the repository with all necessary dependencies: + + ```bash + make devnet-genesis + ``` + + Generate the absolute prestate by running: + + ```bash + cd op-program + make cannon-prestate + ``` + + This command will: + + 1. Compile the op-program + 2. Generate the absolute prestate hash + 3. Create the preimage file + + ### Verify the generated prestate + + Verify the absolute prestate by checking the hash: + + ```bash + cd ..# Return to monorepo root + ./op-program/bin/op-program --version + ``` + + The output should display three prestate hashes: + + * Cannon absolute prestate hash (legacy) + * Cannon64 absolute prestate hash (64-bit version) + * CannonInterop absolute prestate hash (for interoperability) + + For permissionless fault proofs, you'll primarily use the Cannon64 absolute prestate hash. + + ### Prepare the preimage file + + The preimage file is located at `op-program/bin/prestate-mt64.bin.gz`. Rename it to match the prestate hash: + + ```bash + cd op-program/bin + mv prestate-mt64.bin.gz 0x[CANNON64_PRESTATE_HASH].bin.gz + ``` + + Replace `[CANNON64_PRESTATE_HASH]` with the actual `Cannon64` absolute prestate hash value from the output. + + +## Official prestate hashes for Superchain registry chains + +The Superchain registry maintains official absolute prestate hashes for chains that are part of the registry. +These prestates include the configurations of all chains in the Superchain registry. + + + For chains listed in the Superchain registry, you should use the official prestate hashes rather than generating your own. + + +You can find the latest prestate tags in the [Superchain registry](https://github.com/ethereum-optimism/superchain-registry/blob/main/validation/standard/standard-prestates.toml). + +Current official prestate hashes for Isthmus hardfork (as of writing): + +* Sepolia chains: `0x03682932cec7ce0a3874b19675a6bbc923054a7b321efc7d3835187b172494b6` (using op-program/v1.6.0-rc.2) + +## Handling unannounced chain configurations + +If your chain is not included in the Superchain registry, you'll need to generate a custom prestate with your specific chain configuration. This applies to: + +* New chains +* Chains with custom configurations +* "Stealth launches" or other unannounced chains + +For these cases, follow these additional steps: + +### For chains not in the Superchain registry + + + ### Prepare configuration files + + Ensure your chain's rollup configuration and L2 genesis file are accessible + + ### Generate custom prestate + Generate the absolute prestate using your specific configuration: + + ```bash + cd op-program + make cannon-prestate ROLLUP_CONFIG=/path/to/your/rollup.json L2_GENESIS=/path/to/your/genesis-l2.json + ``` + + ### Process and verify + + Verify and prepare the preimage file as described in Steps 4-5 above + + + + The initial prestate used for permissioned games doesn't include the necessary chain configuration for the Fault proof system. + The assumption is that the chain operator, the single permissioned actor, will not challenge their own games. + So the absolute prestate on the initial `PermissionedDisputeGame` will never be used. + + When deploying a new chain, you must first deploy the L1 contracts and then retrieve the artifacts. + 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. + + +## Deploying and configuring with the absolute prestate + +After generating the absolute prestate and preimage files, you'll need to: + + + ### Upload preimage file + + Upload the preimage file to a location accessible by your op-challenger instances + + ### Configure op-challenger + + Configure the op-challenger to use this prestate: + + ```bash + op-challenger \ + --trace-type permissioned,cannon \ + --prestates-url \ + --l1-eth-rpc \ + --game-factory-address \ + --network + ``` + + Replace `` with the URL where you've stored your prestate files. + + + +## Next Steps + +After successfully generating and deploying the absolute prestate: + +1. Monitor your op-challenger service to ensure it can properly participate in dispute games +2. Consider setting up redundant challenger instances for enhanced reliability +3. Keep track of future upgrades that may require new absolute prestates + +For more information, refer to the following resources: + +* [Migrating to Permissionless Fault Proofs Guide](/operators/chain-operators/tutorials/migrating-permissionless) +* [Deploying New Dispute Games with OPCM](/operators/chain-operators/tutorials/dispute-games) +* [Fault Proofs Explainer](/stack/fault-proofs/explainer) From e89951422a1b93c6dd01ddd5ac662ba5f790dca8 Mon Sep 17 00:00:00 2001 From: krofax Date: Thu, 15 May 2025 15:55:12 +0100 Subject: [PATCH 02/12] updated title --- .../operators/chain-operators/tutorials/absolute-prestate.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index b70bfffa2..31aba8f6e 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -1,6 +1,6 @@ --- title: Generating absolute prestate and preimage files -description: A guide for chain operators on how to generate the absolute prestate and preimage files necessary for running cannon/permissionless proofs. +description: A high-level guide on how to generate the absolute prestate and preimage necessary for running cannon/permissionless proofs. lang: en-US content_type: tutorial topic: generating absolute prestate files @@ -18,8 +18,6 @@ import { Callout, Steps } from 'nextra/components' # Overview -This guide will show chain operators how to generate the absolute prestate and preimage files necessary for running cannon/permissionless proofs. - Permissionless fault proofs are a critical component of the OP Stack's security model. They allow anyone to challenge invalid state proposals, ensuring the correctness of L2 to L1 withdrawals without relying on trusted third parties. To enable this functionality, chain operators must generate and maintain the necessary absolute prestate and preimage files. The absolute prestate is a commitment to the initial state of the fault proof program, and the preimage is the serialized binary representation of this program state. From 9bcd1d6dd73a1aed417fe69a51815cf02fd2f40e Mon Sep 17 00:00:00 2001 From: krofax Date: Thu, 15 May 2025 16:03:01 +0100 Subject: [PATCH 03/12] update the release --- pages/operators/chain-operators/tutorials/absolute-prestate.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index 31aba8f6e..a1963dbcd 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -54,7 +54,7 @@ This upgrade offers several advantages: ```bash git clone https://github.com/ethereum-optimism/optimism.git cd optimism - git checkout op-program/v1.6.0-rc.2 # Use the latest tagged version + git checkout op-program/v1.6.0-rc.1 # Use the latest tagged version ``` From 465691218d6ce9eaebbc1cfea84b7790464539e2 Mon Sep 17 00:00:00 2001 From: krofax Date: Thu, 15 May 2025 16:03:30 +0100 Subject: [PATCH 04/12] fix release tag --- pages/operators/chain-operators/tutorials/absolute-prestate.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index a1963dbcd..39488ff5f 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -54,7 +54,7 @@ This upgrade offers several advantages: ```bash git clone https://github.com/ethereum-optimism/optimism.git cd optimism - git checkout op-program/v1.6.0-rc.1 # Use the latest tagged version + git checkout op-program/v1.6.1-rc.1 # Use the latest tagged version ``` From 757c2badbf5f9ce566bac3fa4db856472ff07ddc Mon Sep 17 00:00:00 2001 From: krofax Date: Thu, 15 May 2025 16:03:56 +0100 Subject: [PATCH 05/12] add link to release tags --- pages/operators/chain-operators/tutorials/absolute-prestate.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index 39488ff5f..d8da563f5 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -49,7 +49,7 @@ This upgrade offers several advantages: ### Clone and checkout the tagged version - First, clone the Optimism monorepo and check out the appropriate release tag for op-program: + First, clone the Optimism monorepo and check out the appropriate [release tag](https://github.com/ethereum-optimism/optimism/tags) for op-program: ```bash git clone https://github.com/ethereum-optimism/optimism.git From 6a0c94f9e96c9f4ef36a38c527f874fc188486cf Mon Sep 17 00:00:00 2001 From: krofax Date: Thu, 15 May 2025 16:29:11 +0100 Subject: [PATCH 06/12] updated the steps --- .../tutorials/absolute-prestate.mdx | 56 +++++++++++-------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index d8da563f5..b20faa939 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -55,42 +55,54 @@ This upgrade offers several advantages: git clone https://github.com/ethereum-optimism/optimism.git cd optimism git checkout op-program/v1.6.1-rc.1 # Use the latest tagged version + git submodule update --init --recursive - ``` +``` - + 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. - ### Initialize the repository +### Build the op-program - Initialize the repository with all necessary dependencies: +Build the op-program binary: - ```bash - make devnet-genesis - ``` +```bash +make op-program +``` - Generate the absolute prestate by running: +### Generate the absolute prestate - ```bash - cd op-program - make cannon-prestate - ``` +Generate the prestate by running the op-program binary directly: - This command will: +```bash - 1. Compile the op-program - 2. Generate the absolute prestate hash - 3. Create the preimage file +bash +./op-program/bin/op-program prestate - ### Verify the generated prestate +``` - Verify the absolute prestate by checking the hash: +For older versions (prior to Upgrade 14), you might use: - ```bash - cd ..# Return to monorepo root - ./op-program/bin/op-program --version - ``` +```bash +cd op-program +make reproducible-prestate +cd .. + +``` + + + The exact command may vary based on the specific version you're using. Check the available commands with `./op-program/bin/op-program --help` or `make -C op-program help`. + + +### Verify the generated prestate + +Verify the absolute prestate by checking the hash: + +```bash +./op-program/bin/op-program --version + +``` The output should display three prestate hashes: From 507563ff78d14bd17cd419c88e458afd9f14977b Mon Sep 17 00:00:00 2001 From: krofax Date: Fri, 16 May 2025 14:51:00 +0100 Subject: [PATCH 07/12] updated docs --- .../operators/chain-operators/tutorials/absolute-prestate.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index b20faa939..76b9e9b30 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -28,6 +28,7 @@ These files are essential for the op-challenger tool to participate in dispute g Before starting, ensure you have: * Run `op-contracts/v2.0.0` or higher on your chain +* Have [docker](https://docs.docker.com/engine/install/) running * You have sufficient system resources (memory and disk space) ## Using the latest AP and multi-threaded Cannon @@ -76,8 +77,6 @@ make op-program Generate the prestate by running the op-program binary directly: ```bash - -bash ./op-program/bin/op-program prestate ``` From e85b2245b2f2f78136f0cefc5a3b2df09e075a37 Mon Sep 17 00:00:00 2001 From: krofax Date: Fri, 16 May 2025 18:31:11 +0100 Subject: [PATCH 08/12] updated the instruction --- .../tutorials/absolute-prestate.mdx | 47 +++++++------------ 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index 76b9e9b30..412644e21 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -77,37 +77,35 @@ make op-program Generate the prestate by running the op-program binary directly: ```bash -./op-program/bin/op-program prestate - +cd op-program +make reproducible-prestate +cd .. ``` -For older versions (prior to Upgrade 14), you might use: +The output should look like this: ```bash -cd op-program -make reproducible-prestate -cd .. -``` +-------------------- Production Prestates -------------------- - - The exact command may vary based on the specific version you're using. Check the available commands with `./op-program/bin/op-program --help` or `make -C op-program help`. - +Cannon64 Absolute prestate hash: +0x03eb07101fbdeaf3f04d9fb76526362c1eea2824e4c6e970bdb19675b72e4fc8 -### Verify the generated prestate +-------------------- Experimental Prestates -------------------- -Verify the absolute prestate by checking the hash: +CannonInterop Absolute prestate hash: +0x03fc3b4d091527d53f1ff369ea8ed65e5e17cc7fc98ebf75380238151cdc949c -```bash -./op-program/bin/op-program --version +Cannon64Next Absolute prestate hash: +0x03eb07101fbdeaf3f04d9fb76526362c1eea2824e4c6e970bdb19675b72e4fc8 ``` The output should display three prestate hashes: - * Cannon absolute prestate hash (legacy) - * Cannon64 absolute prestate hash (64-bit version) - * CannonInterop absolute prestate hash (for interoperability) + * `Cannon64`: The current production absolute prestate hash for the 64-bit version of Cannon + * `CannonInterop`: The absolute prestate hash used for interoperability + * `Cannon64Next`: The next state version for Cannon with in-progress features (like Go 1.24 support) For permissionless fault proofs, you'll primarily use the Cannon64 absolute prestate hash. @@ -127,24 +125,16 @@ Verify the absolute prestate by checking the hash: The Superchain registry maintains official absolute prestate hashes for chains that are part of the registry. These prestates include the configurations of all chains in the Superchain registry. - - - For chains listed in the Superchain registry, you should use the official prestate hashes rather than generating your own. - +For chains listed in the Superchain registry, you should use the official prestate hashes rather than generating your own. You can find the latest prestate tags in the [Superchain registry](https://github.com/ethereum-optimism/superchain-registry/blob/main/validation/standard/standard-prestates.toml). -Current official prestate hashes for Isthmus hardfork (as of writing): - -* Sepolia chains: `0x03682932cec7ce0a3874b19675a6bbc923054a7b321efc7d3835187b172494b6` (using op-program/v1.6.0-rc.2) - ## Handling unannounced chain configurations If your chain is not included in the Superchain registry, you'll need to generate a custom prestate with your specific chain configuration. This applies to: * New chains * Chains with custom configurations -* "Stealth launches" or other unannounced chains For these cases, follow these additional steps: @@ -163,19 +153,14 @@ For these cases, follow these additional steps: make cannon-prestate ROLLUP_CONFIG=/path/to/your/rollup.json L2_GENESIS=/path/to/your/genesis-l2.json ``` - ### Process and verify - - Verify and prepare the preimage file as described in Steps 4-5 above - The initial prestate used for permissioned games doesn't include the necessary chain configuration for the Fault proof system. The assumption is that the chain operator, the single permissioned actor, will not challenge their own games. So the absolute prestate on the initial `PermissionedDisputeGame` will never be used. When deploying a new chain, you must first deploy the L1 contracts and then retrieve the artifacts. 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. - ## Deploying and configuring with the absolute prestate From 6825305016f87530a637ec93b2ecc1cead552683 Mon Sep 17 00:00:00 2001 From: krofax Date: Mon, 19 May 2025 18:24:28 +0100 Subject: [PATCH 09/12] updated the docs content --- .../tutorials/absolute-prestate.mdx | 118 ++++++++++++------ 1 file changed, 82 insertions(+), 36 deletions(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index 412644e21..08a8fd400 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -27,9 +27,8 @@ These files are essential for the op-challenger tool to participate in dispute g Before starting, ensure you have: -* Run `op-contracts/v2.0.0` or higher on your chain -* Have [docker](https://docs.docker.com/engine/install/) running -* You have sufficient system resources (memory and disk space) +* [Docker](https://docs.docker.com/engine/install/) running +* Have sufficient disk space and memory ## Using the latest AP and multi-threaded Cannon @@ -56,14 +55,10 @@ This upgrade offers several advantages: git clone https://github.com/ethereum-optimism/optimism.git cd optimism git checkout op-program/v1.6.1-rc.1 # Use the latest tagged version - git submodule update --init --recursive + git submodule update --init --recursive # Initialize submodules ``` - - 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. - - ### Build the op-program Build the op-program binary: @@ -111,6 +106,9 @@ Cannon64Next Absolute prestate hash: ### Prepare the preimage file + After generating the prestate, find the preimage file. + You should see a file named `prestate-mt64.bin.gz` or similar (the exact name might vary based on the version). + Rename this file to include the prestate hash: The preimage file is located at `op-program/bin/prestate-mt64.bin.gz`. Rename it to match the prestate hash: ```bash @@ -119,6 +117,7 @@ Cannon64Next Absolute prestate hash: ``` Replace `[CANNON64_PRESTATE_HASH]` with the actual `Cannon64` absolute prestate hash value from the output. + This file needs to be uploaded to a location that's accessible by your op-challenger instances. ## 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 For these cases, follow these additional steps: -### For chains not in the Superchain registry - - ### Prepare configuration files - Ensure your chain's rollup configuration and L2 genesis file are accessible +### Create a directory for your custom chain configuration +```bash +mkdir -p op-program/chainconfig/configs +``` - ### Generate custom prestate - Generate the absolute prestate using your specific configuration: +### Copy your chain configuration files to this directory - ```bash - cd op-program - make cannon-prestate ROLLUP_CONFIG=/path/to/your/rollup.json L2_GENESIS=/path/to/your/genesis-l2.json - ``` +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: - +* ***rollup.json**: The rollup configuration file +* **genesis.json**: The L2 genesis file + +Name them according to the required format: + +```bash +# Replace 67865 with your actual chain ID +cp /path/to/rollup.json op-program/chainconfig/configs/67865-rollup.json +cp /path/to/genesis.json op-program/chainconfig/configs/67865-genesis-l2.json +``` +Note: The naming format is critical - the files must be named as: + +* `-rollup.json` +* `-genesis-l2.json` + +These files are outputs from your L2 chain deployment process using op-deployer. + +### Generate the prestate + +From the root of the monorepo, run: + +```bash +make reproducible-prestate +``` +Alternatively, you can also specify the paths directly: + +```bash +make reproducible-prestate ROLLUP_CONFIG=/path/to/67865-rollup.json L2_GENESIS=/path/to/67865-genesis-l2.json +``` + +This should generate output containing three prestate hashes: + +```bash +-------------------- Production Prestates -------------------- + +Cannon64 Absolute prestate hash: +0x03eb07101fbdeaf3f04d9fb76526362c1eea2824e4c6e970bdb19675b72e4fc8 + +-------------------- Experimental Prestates -------------------- + +CannonInterop Absolute prestate hash: +0x03fc3b4d091527d53f1ff369ea8ed65e5e17cc7fc98ebf75380238151cdc949c + +Cannon64Next Absolute prestate hash: +0x03eb07101fbdeaf3f04d9fb76526362c1eea2824e4c6e970bdb19675b72e4fc8 + +``` - The initial prestate used for permissioned games doesn't include the necessary chain configuration for the Fault proof system. - The assumption is that the chain operator, the single permissioned actor, will not challenge their own games. - So the absolute prestate on the initial `PermissionedDisputeGame` will never be used. +For current production use, you should use the `Cannon64` Absolute prestate hash. - When deploying a new chain, you must first deploy the L1 contracts and then retrieve the artifacts. - 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. +### Locate and prepare the preimage File +Follow this [step](/operators/chain-operators/tutorials/absolute-prestate#prepare-the-preimage-file) + + ## Deploying and configuring with the absolute prestate @@ -180,24 +221,29 @@ After generating the absolute prestate and preimage files, you'll need to: --trace-type permissioned,cannon \ --prestates-url \ --l1-eth-rpc \ + --rollup-rpc \ --game-factory-address \ - --network + --cannon-rollup-config /path/to/your/-rollup.json \ + --cannon-l2-genesis /path/to/your/-genesis-l2.json \ + --network \ + --datadir ``` + Replace `` with the URL where you've stored your prestate files. + The `--prestates-url` should point to the directory where you've uploaded the renamed prestate file from step 3. -## Next Steps - -After successfully generating and deploying the absolute prestate: - -1. Monitor your op-challenger service to ensure it can properly participate in dispute games -2. Consider setting up redundant challenger instances for enhanced reliability -3. Keep track of future upgrades that may require new absolute prestates + +Ensure you're using the latest op-challenger version, see the [release page](https://github.com/ethereum-optimism/optimism/release) +The dispute game factory address must be manually specified via the `--game-factory-address` option. +If your chain uses interoperability features, you'll need to add a `depsets.json` file to the `op-program/chainconfig/configs` directory. +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. + -For more information, refer to the following resources: +## Next Steps -* [Migrating to Permissionless Fault Proofs Guide](/operators/chain-operators/tutorials/migrating-permissionless) -* [Deploying New Dispute Games with OPCM](/operators/chain-operators/tutorials/dispute-games) -* [Fault Proofs Explainer](/stack/fault-proofs/explainer) +* [Deploying new dispute games with OPCM](/operators/chain-operators/tutorials/dispute-games) +* [Migrating to permissionless fault proofs](/operators/chain-operators/tutorials/migrating-permissionless) +* [Fault proofs explainer](/stack/fault-proofs/explainer) From d3fd8a65dea804addb80e6957729f5417d3c5d98 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Mon, 19 May 2025 10:31:34 -0700 Subject: [PATCH 10/12] Update pages/operators/chain-operators/tutorials/absolute-prestate.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- pages/operators/chain-operators/tutorials/absolute-prestate.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index 08a8fd400..4ac30a4fc 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -30,7 +30,7 @@ Before starting, ensure you have: * [Docker](https://docs.docker.com/engine/install/) running * Have sufficient disk space and memory -## Using the latest AP and multi-threaded Cannon +## Using the latest absolute prestate and multi-threaded Cannon As of the latest releases, OP Stack chains should utilize the `64-bit` MIPS multi-threaded version of Cannon. This upgrade offers several advantages: From 33ac6d396f8c8c49504cd8e6d3b4d80fdbcc53e1 Mon Sep 17 00:00:00 2001 From: krofax Date: Tue, 20 May 2025 17:55:36 +0100 Subject: [PATCH 11/12] updated the configs to use op challengers --- .../tutorials/absolute-prestate.mdx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index 4ac30a4fc..493c3cbb9 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -217,16 +217,15 @@ After generating the absolute prestate and preimage files, you'll need to: Configure the op-challenger to use this prestate: ```bash - op-challenger \ - --trace-type permissioned,cannon \ - --prestates-url \ - --l1-eth-rpc \ - --rollup-rpc \ - --game-factory-address \ - --cannon-rollup-config /path/to/your/-rollup.json \ - --cannon-l2-genesis /path/to/your/-genesis-l2.json \ - --network \ - --datadir + docker run -d --name op-challenger \ + -e OP_CHALLENGER_TRACE_TYPE=permissioned,cannon \ + -e OP_CHALLENGER_PRESTATES_URL= \ + -e OP_CHALLENGER_L1_ETH_RPC= \ + -e OP_CHALLENGER_GAME_FACTORY_ADDRESS= \ + -e OP_CHALLENGER_PRIVATE_KEY= \ + -e OP_CHALLENGER_NETWORK= \ + -v /path/to/local/prestates:/prestates \ + us-docker.pkg.dev/oplabs-tools-artifacts/images/op-challenger:latest #use the latest version ``` From 0d6f667bfefa798948e543f53fe4190bcae3476f Mon Sep 17 00:00:00 2001 From: krofax Date: Tue, 20 May 2025 18:56:41 +0100 Subject: [PATCH 12/12] update the command --- pages/operators/chain-operators/tutorials/absolute-prestate.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx index 493c3cbb9..248301f5d 100644 --- a/pages/operators/chain-operators/tutorials/absolute-prestate.mdx +++ b/pages/operators/chain-operators/tutorials/absolute-prestate.mdx @@ -224,6 +224,8 @@ After generating the absolute prestate and preimage files, you'll need to: -e OP_CHALLENGER_GAME_FACTORY_ADDRESS= \ -e OP_CHALLENGER_PRIVATE_KEY= \ -e OP_CHALLENGER_NETWORK= \ + -e OP_CHALLENGER_CANNON_ROLLUP_CONFIG= \ + -e OP_CHALLENGER_CANNON_L2_GENESIS= \ -v /path/to/local/prestates:/prestates \ us-docker.pkg.dev/oplabs-tools-artifacts/images/op-challenger:latest #use the latest version ```