Quick Start Guide: OP Succinct Fault Dispute Game
This guide provides the fastest path to try out OP Succinct fault dispute games by deploying contracts and running a proposer to create games.
If your integration involves alternative data availability solutions like
Celestia or EigenDA, you may need to configure additional environment variables.
Refer to the Experimental Features section
for the required setup steps.
Prerequisites
- Foundry
- Rust (latest stable version)
- just
- L1 and L2 archive node RPC endpoints
- L2 node should be configured with SafeDB enabled.
- See SafeDB Configuration for more details.
- ETH on L1 for:
- Contract deployment
- Game bonds (configurable in factory)
- Challenge bonds (proof rewards)
- Transaction fees
On Ubuntu, you'll need some system dependencies to run the service:
sudo apt update && sudo apt install -y \
curl clang pkg-config libssl-dev ca-certificates git libclang-dev jq build-essential
Step 1: Clone and build contracts
Clone the repository and build the contracts:
git clone https://github.com/succinctlabs/op-succinct.git
cd op-succinct/contracts
forge build
cd ..
Step 2: Configure environment
Create a .env file in the project root. See this guide for more details on these environment variables:
# example .env file
L1_RPC=<YOUR_L1_RPC_URL>
L2_RPC=<YOUR_L2_RPC_URL>
L2_NODE_RPC=<YOUR_L2_NODE_RPC_URL>
PRIVATE_KEY=<YOUR_PRIVATE_KEY>
# Required - set these values
GAME_TYPE=42
DISPUTE_GAME_FINALITY_DELAY_SECONDS=604800
MAX_CHALLENGE_DURATION=604800
MAX_PROVE_DURATION=86400
# Optional
# Not needed by default, but could be required for integrations that access consensus-layer data.
L1_BEACON_RPC=<L1_BEACON_RPC_URL>
# Warning: Setting PERMISSIONLESS_MODE=true allows anyone to propose and challenge games. Ensure this behavior is intended for your deployment.
# For a permissioned setup, set this to false and configure PROPOSER_ADDRESSES and CHALLENGER_ADDRESSES.
PERMISSIONLESS_MODE=true
# For testing, use mock verifier
OP_SUCCINCT_MOCK=true
Obtaining a Test Private Key
-
Anvil (local devnet): Run
anviland use one of the pre-funded accounts printed on startup. Copy the Private Key value for any account. Only use these on your local Anvil network. -
Foundry (generate a fresh key): Run
cast wallet newto generate a human-readable output. Save the private key and fund it on your test network.
⚠️ Caution: Never use test keys on mainnet or with real assets.
Step 3: Deploy contracts
-
Deploy an SP1 mock verifier:
just deploy-mock-verifier -
Deploy the core fault dispute game contracts:
just deploy-fdg-contracts
Save the output addresses, particularly ANCHOR_STATE_REGISTRY_ADDRESS as "AnchorStateRegistry: 0x..." and FACTORY_ADDRESS as "Factory Proxy: 0x..."
Step 4: Run the Proposer
-
Create a
.env.proposerfile in the project root directory:# Required Configuration L1_RPC=<YOUR_L1_RPC_URL> L2_RPC=<YOUR_L2_RPC_URL> L2_NODE_RPC=<YOUR_L2_NODE_RPC_URL> ANCHOR_STATE_REGISTRY_ADDRESS=<ANCHOR_STATE_REGISTRY_ADDRESS_FROM_DEPLOYMENT> FACTORY_ADDRESS=<FACTORY_ADDRESS_FROM_DEPLOYMENT> GAME_TYPE=42 PRIVATE_KEY=<YOUR_PRIVATE_KEY> MOCK_MODE=true # Set to true for mock mode -
Run the proposer:
cargo run --bin proposer
(Optional) Run with fast finality mode
-
Configure more environment variables to the
.env.proposerfile in the project root directory:FAST_FINALITY_MODE=true NETWORK_PRIVATE_KEY=0x...For the Succinct Prover Network setup, see the quickstart guide.
-
Run the proposer:
cargo run --bin proposer
Step 5: Run the Challenger
-
Create a
.env.challengerfile in the project root directory:# Required Configuration L1_RPC=<YOUR_L1_RPC_URL> L2_RPC=<YOUR_L2_RPC_URL> ANCHOR_STATE_REGISTRY_ADDRESS=<ANCHOR_STATE_REGISTRY_ADDRESS_FROM_DEPLOYMENT> FACTORY_ADDRESS=<FACTORY_ADDRESS_FROM_DEPLOYMENT> GAME_TYPE=42 PRIVATE_KEY=<YOUR_PRIVATE_KEY> -
Run the challenger:
cargo run --bin challenger
Monitoring
- Games are created every 1800 blocks by default (via
PROPOSAL_INTERVAL_IN_BLOCKSin.env.proposer. See Optional Environment Variables for Proposer) - Track games via block explorer using factory/game addresses and tx hashes from logs
- Both proposer and challenger attempt to resolve eligible games after challenge period
Troubleshooting
Common issues:
- Deployment fails: Check RPC connection and ETH balance
- Proposer won't start: Verify environment variables and addresses
- Games not creating: Check proposer logs for errors and L1,L2 RPC endpoints
For detailed configuration and advanced features, see: