bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 25쪽
llup config.
* For custom networks not in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/chainList.json), the `--game-factory-address` and rollup must be specified, as follows:
```bash theme={null}
--cannon-kona-rollup-config rollup.json \
--cannon-kona-l2-genesis genesis-l2.json \
# use this if running challenger outside of the docker image
--cannon-kona-server ./kona \
# version of kona-client deployed on chain
# if you use the wrong one, you will lose the game
# if you deploy your own contracts, you specify the hash (the .pre field of prestate-proof.json)
# OP Mainnet uses tagged versions of kona-client
# build with: just reproducible-prestate-kona
# challenger verifies that onchain
--cannon-kona-prestate ./<prestate-hash>.bin.gz \
# load the game factory address from system config or superchain registry
# point the game factory address at the dispute game factory proxy
--game-factory-address
```
<Info>
These options vary based on which `--network` is specified. Chain operators always need to specify a way to load prestates and must also specify the `--cannon-kona-server` whenever the docker image isn't being used.
</Info>
</Accordion>
<Accordion title="--datadir">
* This is a directory that `op-challenger` can write to and store whatever data it needs. It will manage this directory to add or remove data as needed under that directory.
* If running in docker, it should point to a docker volume or mount point, so the data isn't lost on every restart. The data can be recreated if needed but particularly if challenger has executed cannon as part of responding to a game it may mean a lot of extra processing.
</Accordion>
<Accordion title="--cannon-kona-prestate / --cannon-kona-prestates-url">
The prestate is effectively the version of `kona-client` that is deployed on chain (run inside the Cannon VM as the `cannon-kona` game type). And chain operators must use the right version. `op-challenger` will refuse to interact with games that have a different absolute prestate hash to avoid making invalid claims. If deploying your own contracts, chain operators must specify an absolute prestate hash taken from the `just reproducible-prestate-kona` command during contract deployment, which will also build the required prestate file.
All governance approved releases use a tagged version of `kona-client`. These can be rebuilt by checking out the version tag and running `just reproducible-prestate-kona`.
* There are two ways to specify the prestate to use:
* `--cannon-kona-prestate`: specifies a path to a single kona-client absolute-prestate file
* `--cannon-kona-prestates-url`: specifies a URL to load prestates from. This enables participating in games that use different prestates, for example due to a network upgrade. The prestates are stored in this directory named by their hash.
* Example final URL for a prestate:
* [https://example.com/prestates/0x031e3b504740d0b1264e8cf72b6dde0d497184cfb3f98e451c6be8b33bd3f808.bin.gz](https://example.com/prestates/0x031e3b504740d0b1264e8cf72b6dde0d497184cfb3f98e451c6be8b33bd3f808.bin.gz)
* This file contains the cannon memory state.
<Info>
Challenger will refuse to interact with any games if it doesn't have the matching prestate.
Check this [guide](/chain-operators/tutorials/absolute-prestate#generating-the-absolute-prestate) on how to generate a absolute prestate.
</Info>
</Accordion>
</Step>
</Steps>
### Create challenger startup script
Create `scripts/start-challenger.sh`:
```bash theme={null}
#!/bin/bash
source .env
# Path to the challenger binary
../optimism/op-challenger/bin/op-challenger \
--trace-type permissioned,cannon-kona \
--l1-eth-rpc=$L1_RPC_URL \
--l2-eth-rpc=$L2_RPC_URL \
--l1-beacon=$L1_BEACON \
--rollup-rpc=$ROLLUP_RPC_URL \
--game-factory-address $GAME_FACTORY_ADDRESS \
--datadir=$DATADIR \
--cannon-bin=$CANNON_BIN \
--cannon-kona-rollup-config=$CANNON_ROLLUP_CONFIG \
--cannon-kona-l2-genesis=$CANNON_L2_GENESIS \
--cannon-kona-server=$CANNON_KONA_SERVER \
--cannon-kona-prestate=$CANNON_KONA_PRESTATE \
--mnemonic "$MNEMONIC" \
--hd-path "$HD_PATH"
```
## Initializing and starting the challenger
### Start the challenger
```bash theme={null}
# Make sure you're in the challenger-node directory
cd challenger-node
# Make script executable
chmod +x scripts/start-challenger.sh
# Start challenger
./scripts/start-challenger.sh
```
### Verify challenger is running
Monitor challenger logs to ensure it's operating correctly:
```bash theme={null}
# Check challenger logs
tail -f challenger-data/challenger.log
# Or if running in foreground, monitor the output
```
The challenger should show logs indicating:
* Successful connection to L1 and L2 nodes
* Loading of prestates and configuration
* Monitoring of dispute games
</Tab>
<Tab title="Use docker">
### Docker setup
The Docker setup provides a containerized environment for running the challenger. This method uses the official Docker image that includes the embedded `kona` server and Cannon executable.
<Steps>
<Step title="Create environment file">
First, create a `.env` file with your configuration values. This file will be used by Docker Compose to set up the environment variables:
```bash theme={null}
# Create .env file with your actual values
cat > .env << 'EOF'
# L1 Configuration - Replace with your actual RPC URLs
L1_RPC_URL=https://sepolia.infura.io/v3/YOUR_ACTUAL_INFURA_KEY
L1_BEACON=http://sepolia-cl-1:5051
# L2 Configuration - Replace with your actual node endpoints
L2_RPC_URL=http://localhost:8545
ROLLUP_RPC_URL=http://localhost:8547
# Wallet configuration - Choose either mnemonic + HD path OR private key
MNEMONIC="test test test test test test test test test test test junk"
HD_PATH="m/44'/60'/0'/0/0"
# Network configuration
NETWORK=op-sepolia
GAME_FACTORY_ADDRESS=0xYOUR_GAME_FACTORY_ADDRESS
EOF
```
**Important:** Replace ALL placeholder values (`YOUR_ACTUAL_*`) with your real configuration values.
</Step>
<Step title="Understanding configuration flags">
Each environment variable maps to a specific challenger configuration flag. Here's what each one does:
<Accordion title="--l1-eth-rpc">
* This is the HTTP provider URL for a standard L1 node, can be a full node. `op-challenger` will be sending many requests, so chain operators need a node that is trusted and can easily handle many transactions.
* Note: Challenger has a lot of money, and it will spend it if it needs to interact with games. That might risk not defending games or challenging games correctly, so chain operators should really trust the nodes being pointed at Challenger.
</Accordion>
<Accordion title="--l1-beacon">
* This is needed just to get blobs from.
* In some instances, chain operators might need a blob archiver or L1 consensus node configured not to prune blobs:
* If the chain is proposing regularly, a blob archiver isn't needed. There's only a small window in the blob retention period that games can be played.
* If the chain doesn't post a valid output root in 18 days, then a blob archiver running a challenge game is needed. If the actor gets pushed to the bottom of the game, it could lose if it's the only one protecting the chain.
</Accordion>
<Accordion title="--l2-eth-rpc">
* This needs to be an `op-reth` archive node, with `debug` enabled.
* Technically doesn't need to go to bedrock, but needs to have access to the start of any game that is still in progress.
* The withdrawal-proof data the challenger reads via `eth_getProof` is served by op-reth's historical-proofs store. Enable it with `--proofs-history`, set a persistent `--proofs-history.storage-path`, and size `--proofs-history.window` to cover the dispute game window (≥ 28 days). On permissioned chains, `--rpc.eth-proof-window` bounds how far back `eth_getProof` will serve. See [Running op-reth with historical proofs](/node-operators/tutorials/reth-historical-proofs).
* **Seed the proofs storage once before starting the node with `--proofs-history`**, or op-reth refuses to start (the `proofs-history` ExEx panics with `Proofs storage not initialized`). With the node stopped, run `op-reth proofs init --chain <chain-or-genesis> --datadir <reth-datadir> --proofs-history.storage-path <proofs-db-path>`. It snapshots the chain's current state to seed the sidecar; the ExEx then indexes forward as the node syncs. Initialize at (or near) genesis so the whole fault-proof window is covered — a node seeded at the current tip only serves proofs for blocks after that point.
* On op-reth v2.6.x and earlier, also pass `--proofs-history.storage-version v2` to both `op-reth node` and `op-reth proofs init`; those releases default to the deprecated v1 format.
</Accordion>
<Accordion title="--rollup-rpc">
* This needs to be an `op-node` archive node because challenger needs access to output roots from back when the games start. See below for important configuration details:
1. Safe Head Database (SafeDB) Configuration for op-node:
* The `op-node` behind the `op-conductor` must have the SafeDB enabled to ensure it is not stateless.
* To enable SafeDB, set the `--safedb.path` value in your configuration. This specifies the file path used to persist safe head update data.
* Example Configuration:
```bash theme={null}
--safedb.path <path-to-safe-head-db> # Replace <path-to-safe-head-db> with your actual path
```
<Info>
If this path is not set, the SafeDB feature will be disabled.
</Info>
<Warning>
**Never restore the SafeDB from a snapshot.** The SafeDB records the safe head as derived from L1, and a snapshot may not reflect the actual on-chain derivation state. If the SafeDB is out of sync with L1, `op-challenger` will act on an incorrect safe head and may incorrectly attack valid outputs. `op-challenger` cannot detect this condition — the data it receives appears normal. If you suspect the SafeDB was restored from a snapshot or is otherwise corrupted, delete it and resync via consensus sync from a snapshot that is at least 30 days old — `op-node` does not backfill the SafeDB, so it will only populate it going forward from that point. A 30-day-old snapshot provides enough history to cover the 28-day dispute game window.
</Warning>
2. Ensuring Historical Data Availability:
* Both `op-node` and `op-reth` must have data from the start of the games to maintain network consistency and allow nodes to reference historical state and transactions.
* For `op-node`: Configure it to maintain a sufficient history of blockchain data locally or use an archive node.
* For `op-reth`: Similarly, configure to store or access historical data.
* Example Configuration:
```bash theme={null}
op-node \
--rollup-rpc <op-node-archive-node-url> \
--safedb.path <path-to-safe-head-db>
```
<Info>
Replace `<op-node-archive-node-url>` with the URL of your archive node and `<path-to-safe-head-db>` with the desired path for storing SafeDB data.
</Info>
</Accordion>
<Accordion title="--private-key">
* Chain operators must specify a private key or use something else (like `op-signer`).
* This uses the same transaction manager arguments as `op-node` , batcher, and proposer, so chain operators can choose one of the following options:
* a mnemonic
* a private key
* `op-signer` endpoints
</Accordion>
<Accordion title="--network">
* This identifies the L2 network `op-challenger` is running for, e.g., `op-sepolia` or `op-mainnet`.
* When using the `--network` flag, the `--game-factory-address` will be automatically pulled from the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/chainList.json).
* When the trace is generated, challenger needs the rollup config and the L2 genesis file. Both files are automatically loaded when a registry `--network` is used, but custom networks must specify both the L2 genesis and rollup config.
* For custom networks not in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/chainList.json), the `--game-factory-address` and rollup must be specified, as follows:
```bash theme={null}
--cannon-kona-rollup-config rollup.json \
--cannon-kona-l2-genesis genesis-l2.json \
# use this if running challenger outside of the docker image
--cannon-kona-server ./kona \
# version of kona-client deployed on chain
# if you use the wrong one, you will lose the game
# if you deploy your own contracts, you specify the hash (the .pre field of prestate-proof.json)
# OP Mainnet uses tagged versions of kona-client
# build with: just reproducible-prestate-kona
# challenger verifies that onchain
--cannon-kona-prestate ./<prestate-hash>.bin.gz \
# load the game factory address from system config or superchain registry
# point the game factory address at the dispute game factory proxy
--game-factory-address
```
<Info>
These options vary based on which `--network` is specified. Chain operators always need to specify a way to load prestates and must also specify the `--cannon-kona-server` whenever the docker image isn't being used.
</Info>
</Accordion>
<Accordion title="--datadir">
* This is a directory that `op-challenger` can write to and store whatever data it needs. It will manage this directory to add or remove data as needed under that directory.
* If running in docker, it should point to a docker volume or mount point, so the data isn't lost on every restart. The data can be recreated if needed but particularly if challenger has executed cannon as part of responding to a game it may mean a lot of extra processing.
</Accordion>
<Accordion title="--cannon-kona-prestate / --cannon-kona-prestates-url">
The prestate is effectively the version of `kona-client` that is deployed on chain (run inside the Cannon VM as the `cannon-kona` game type). And chain operators must use the right version. `op-challenger` will refuse to interact with games that have a different absolute prestate hash to avoid making invalid claims. If deploying your own contracts, chain operators must specify an absolute prestate hash taken from the `just reproducible-prestate-kona` command during contract deployment, which will also build the required prestate file.
All governance approved releases use a tagged version of `kona-client`. These can be rebuilt by checking out the version tag and running `just reproducible-prestate-kona`.
* There are two ways to specify the prestate to use:
* `--cannon-kona-prestate`: specifies a path to a single kona-client absolute-prestate file
* `--cannon-kona-prestates-url`: specifies a URL to load prestates from. This enables participating in games that use different prestates, for example due to a network upgrade. The prestates are stored in this directory named by their hash.
* Example final URL for a prestate:
* [https://example.com/prestates/0x031e3b504740d0b1264e8cf72b6dde0d497184cfb3f98e451c6be8b33bd3f808.bin.gz](https://example.com/prestates/0x031e3b504740d0b1264e8cf72b6dde0d497184cfb3f98e451c6be8b33bd3f808.bin.gz)
* This file contains the cannon memory state.
<Info>
Challenger will refuse to interact with any games if it doesn't have the matching prestate.
Check this [guide](/chain-operators/tutorials/absolute-prestate#generating-the-absolute-prestate) on how to generate a absolute prestate.
</Info>
</Accordion>
</Step>
<Step title="Set up Docker Compose">
Create a `docker-compose.yml` file that defines the challenger service:
```yaml theme={null}
version: '3.8'
services:
challenger:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-challenger:v1.9.4
user: "1000"
volumes:
- ./challenger-data:/data
- ./rollup.json:/workspace/rollup.json:ro
- ./genesis-l2.json:/workspace/genesis-l2.json:ro
- ./<prestate-hash>.bin.gz:/workspace/<prestate-hash>.bin.gz:ro
environment:
- L1_RPC_URL=${L1_RPC_URL}
- L1_BEACON=${L1_BEACON}
- L2_RPC_URL=${L2_RPC_URL}
- ROLLUP_RPC_URL=${ROLLUP_RPC_URL}
- MNEMONIC=${MNEMONIC}
- HD_PATH=${HD_PATH}
- NETWORK=${NETWORK}
- GAME_FACTORY_ADDRESS=${GAME_FACTORY_ADDRESS}
command:
- "op-challenger"
- "--l1-eth-rpc=${L1_RPC_URL}"
- "--l1-beacon=${L1_BEACON}"
- "--l2-eth-rpc=${L2_RPC_URL}"
- "--rollup-rpc=${ROLLUP_RPC_URL}"
- "--selective-claim-resolution"
- "--mnemonic=${MNEMONIC}"
- "--hd-path=${HD_PATH}"
- "--network=${NETWORK}"
- "--game-factory-address=${GAME_FACTORY_ADDRESS}"
- "--datadir=/data"
- "--trace-type=cannon-kona"
- "--cannon-kona-prestate=/workspace/<prestate-hash>.bin.gz"
restart: unless-stopped
ports:
- "8548:8548" # If challenger exposes metrics endpoint
```
</Step>
<Step title="Launch the challenger">
Start the challenger service and monitor its logs:
```bash theme={null}
# Start the challenger service
docker-compose up -d
# View logs
docker-compose logs -f challenger
```
</Step>
</Steps>
</Tab>
</Tabs>
### Monitoring with op-dispute-mon
Consider running [`op-dispute-mon`](/chain-operators/tools/chain-monitoring#dispute-mon) for enhanced security monitoring:
* Provides visibility into all game statuses for the last 28 days
* Essential for production challenger deployments
## Next steps
* Read the [OP-Challenger Explainer](/op-stack/fault-proofs/challenger) for additional context and FAQ
* Review the detailed [challenger specifications](https://specs.optimism.io/fault-proof/stage-one/honest-challenger-fdg.html) for implementation details
* If you experience any problems, reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions)
# Proposer Configuration
Source: https://docs.optimism.io/chain-operators/guides/configuration/proposer
Reference for the op-proposer configuration options and the proposer policy constraints.
This page lists all configuration options for op-proposer. The op-proposer posts
output roots (proposals) to L1, making them available for verifiers. Withdrawals to L1 must reference an output root.
If the chain is running permissioned fault proofs, only the [designated proposer](/op-stack/protocol/privileged-roles) can submit output roots.
With [permissionless fault proofs](/op-stack/fault-proofs/explainer), anyone can make a proposal.
## Proposer policy
The proposer policy defines high-level constraints and responsibilities regarding how L2 output roots are posted to L1. Below are the [standard guidelines](/op-stack/protocol/superchain-registry#what-is-a-standard-chain) for configuring the proposer within the OP Stack.
| Parameter | Description | Administrator | Requirement | Notes |
| - | - | - | - | - |
| Output Frequency | Defines how frequently L2 output roots are submitted to L1 (via the output oracle). | L1 Proxy Admin | **43,200 L2 blocks** (24 hours at 2s block times) or lower | It cannot be set to 0 (there must be some cadence for outputs). |
### Example configuration
```
OP_PROPOSER_L1_ETH_RPC: YOUR_L1_RPC_URL_HERE
OP_PROPOSER_ROLLUP_RPC: YOUR_CHAINS_RPC_URL_HERE
OP_PROPOSER_GAME_FACTORY_ADDRESS: YOUR_CHAINS_GAME_FACTORY_ADDRESS_HERE
OP_PROPOSER_PROPOSAL_INTERVAL: 5h
OP_PROPOSER_WAIT_NODE_SYNC: true
OP_PROPOSER_ALLOW_NON_FINALIZED: "false"
OP_PROPOSER_POLL_INTERVAL: "20s"
OP_PROPOSER_NUM_CONFIRMATIONS: "1"
OP_PROPOSER_SAFE_ABORT_NONCE_TOO_LOW_COUNT: "3"
OP_PROPOSER_RESUBMISSION_TIMEOUT: "30s"
OP_PROPOSER_METRICS_ENABLED: "true"
OP_PROPOSER_METRICS_ADDR: 0.0.0.0
OP_PROPOSER_METRICS_PORT: 7300
```
Higher throughput chains can decrease the `proposal-interval` to allow users submit withdrawals more often.
## Flags
<ConfigReferencePreamble />
Generated from [`op-proposer/v1.16.3`](https://github.com/ethereum-optimism/optimism/releases/tag/op-proposer%2Fv1.16.3)
flag definitions. 54 flags: 1 required, 53 optional.
### Required flags
| Flag | Description | Environment variable |
| - | - | - |
| `--l1-eth-rpc` | HTTP provider URL for L1 | `OP_PROPOSER_L1_ETH_RPC` |
### Optional flags
| Flag프로젝트로 돌아가기