Step 5 of 5: This tutorial is designed to be followed step-by-step.
Each step builds on the previous one, and this is the last part of the tutorial.
Automated Setup AvailableFor a complete working setup with all components including automated prestate generation, check out the automated approach in the code directory.
- Monitoring dispute games created by the fault proof system
- Challenging invalid claims in dispute games
- Defending valid state transitions
- Resolving games when possible
Prerequisites
Essential requirements
Complete these prerequisites before wiring up the challenger:1
Deploy OP Stack chain with fault proofs enabled
2
Set up required infrastructure access
Your sequencer stack from the previous steps already provides the L2 endpoints the challenger needs (op-reth and op-node). In addition, the challenger needs:
- An L1 RPC endpoint for your settlement layer (Sepolia in this tutorial)
- An L1 beacon API endpoint, used to fetch blobs
3
Prepare configuration files
0x<PRESTATE_HASH>.bin.gz- The absolute prestate preimage file generated in step 1rollup.json- Rollup configuration file from theop-deployerguide
Software installation
For challenger deployment, we recommend using Docker as it provides a consistent and isolated environment. Building from source is also available for more advanced users.- Use docker
- Build from source
Docker Setup
The Docker setup provides a containerized environment for running the challenger. This method uses the official Docker image that includes the embeddedkona server and Cannon executable.1
Create challenger directory
2
Create environment file
OP Stack Standard VariablesThe challenger uses OP Stack standard environment variables following the OP Stack conventions. These are prefixed with
OP_CHALLENGER_ for challenger-specific settings.YOUR_ACTUAL_* placeholder with the real values from your deployment.3
Set up Docker Compose
Define the challenger service in a
docker-compose.yml. It mounts several important files:prestate-proof.jsonand${PRESTATE_HASH}.bin.gz: Prestate files required for dispute games (the PRESTATE_HASH comes from runningjust reproducible-prestate-kona), replacePRESTATE_HASHwith the actual hash
4
Launch the challenger
Start the challenger service and follow its logs:
Monitoring with op-dispute-mon
Consider runningop-dispute-mon for enhanced security monitoring:
- Provides visibility into all game statuses for the last 28 days
- Essential for production challenger deployments
Congratulations
You’ve successfully completed the entire L2 rollup testnet tutorial! Your rollup is now fully operational with all components running:- op-deployer - L1 contracts deployed
- Sequencer - Processing transactions
- Batcher - Publishing data to L1
- Proposer - Submitting state roots
- Challenger - Monitoring disputes
Connect your wallet to your chain
You now have a fully functioning OP Stack Rollup with a Sequencer node running onhttp://localhost:8545. You can connect your wallet to this chain the same way you’d connect your wallet to any other EVM chain.
Get ETH on your chain
Once you’ve connected your wallet, you’ll probably notice that you don’t have any ETH to pay for gas on your chain. The easiest way to deposit Sepolia ETH into your chain is to send ETH directly to theL1StandardBridge contract.
Get the L1StandardBridge address
TheL1StandardBridge proxy address can be found in your deployment state file. To get it, run:
L1StandardBridge proxy address that you should use for deposits. Make sure to use the proxy address, not the implementation address.
Deposit ETH to your L2
Once you have theL1StandardBridge address, send a small amount of Sepolia ETH (0.1 or less) to that address from the wallet you want to use on L2.
This will trigger a deposit that will mint ETH into your wallet on L2.
It may take up to 5 minutes for the ETH to appear in your wallet on L2.
This delay is due to the time needed for the deposit transaction to be processed and finalized.
See your rollup in action
You can interact with your Rollup the same way you’d interact with any other EVM chain. Send some transactions, deploy some contracts, and see what happens! You now have a working testnet. Here is what the distance to production looks like:Running this in productionA production chain is a 24/7 operation: a high-availability sequencer cluster, a sound withdrawal system, consistent L1 endpoints, secured hot keys, and a standing upgrade calendar. These docs cover all of it. If you’d rather not run it yourself, or want OP Labs engineering behind the parts you do run, OP Enterprise offers fully managed and supported self-managed options.
Need Help?
- OP Challenger Explainer: Fault Proofs Overview
- Technical Specs: Honest Challenger Specification