Optimism 백서

Optimism

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 57쪽

ly on OP Stack chains. Two matter to most operators: * `--rollup.sequencer <uri>` (shown above) is the sequencer endpoint that transactions submitted to this node are forwarded to, since the sequencer is what builds blocks. Aliases: `--rollup.sequencer-http`, `--rollup.sequencer-ws`. * `--rollup.disable-tx-pool-gossip` stops the node from gossiping its transaction pool to peers. Omit it on a personal node; set it on a replica you operate as a provider. The rest of the group covers the interop filter, subblocks, and historical RPC. For the full list with the binary's own descriptions, see the [`op-reth node` flag listing](/node-operators/op-reth/cli/op-reth/node), and [Understanding the op-reth CLI](/node-operators/op-reth/cli/overview) for how the flag groups fit together. ### Subblocks To serve pre-confirmed state from a chain that streams [Subblocks](/op-stack/features/subblocks), point op-reth at the chain's WebSocket stream: ```bash theme={null} op-reth node \ --chain optimism \ --rollup.sequencer https://mainnet-sequencer.optimism.io \ --flashblocks-url wss://op-mainnet-fb-ws-pub.optimism.io/ws \ --http \ --ws \ --authrpc.port 9551 \ --authrpc.jwtsecret /path/to/jwt.hex ``` The node then answers requests carrying the `pending` block tag from subblock state, executing each subblock's transactions against its own view of the chain. It does not need the stream's `state_root`, which subblocks leave zeroed. The flag keeps its `flashblocks` spelling; `--websocket-url` is an accepted alias. `--flashblocks-url` on its own is what an ordinary node wants. Leave `--flashblock-consensus` unset: it drives the chain forward from the stream by submitting completed sequences through `engine_newPayload`, which is a specialized topology, not an addition to a normal node following op-node. Enabling it also turns on local state-root computation for the last subblock in each sequence, which an ordinary node has no use for. ### Historical proofs Permissionless chains need \~28 days of historical state for withdrawal proving. Follow the [Running op-reth with Historical Proofs](/node-operators/tutorials/reth-historical-proofs) tutorial to set up the `--proofs-history` (v2) store on op-reth v2.2.3 or later. ### Pruning op-reth defaults to an archive node. To reclaim disk, prune the state and receipt segments and keep block bodies. Body pruning is unsupported: op-reth rejects `--minimal` at startup, and `--prune.bodies.distance` is advised against. See [Pruning op-reth](/node-operators/guides/management/archive-node#pruning-op-reth). ### Complete reference * [op-reth configuration reference](/node-operators/reference/op-reth-config) * [op-reth historical proof configuration](/node-operators/reference/op-reth-historical-proof-config) * [reth.rs documentation](https://reth.rs/run/opstack) </Tab> <Tab title="Nethermind"> [Nethermind](https://github.com/NethermindEth/nethermind) is a .NET-based alternative execution client. ### Minimal configuration ```bash theme={null} nethermind \ -c op-mainnet \ --data-dir path/to/data/dir \ --jsonrpc-jwtsecretfile path/to/jwt.hex ``` ### Additional resources * [Nethermind OP Stack documentation](https://docs.nethermind.io/get-started/running-node/l2-networks) * [Nethermind configuration reference](https://docs.nethermind.io/fundamentals/configuration) </Tab> </Tabs> ## JWT secret The execution client and consensus client communicate over the Engine API using a shared JWT secret: ```bash theme={null} openssl rand -hex 32 > jwt-secret.txt ``` This file must be identical for both your execution client and your consensus client. ## op-geth (legacy, end of support 2026-05-31) <Warning> **op-geth has reached end-of-support (2026-05-31) and does not support the now-active Karst hardfork, so op-geth nodes can no longer follow the canonical chain.** Migrate to op-reth, the primary supported execution client. See the [op-geth deprecation notice](/notices/archive/op-geth-deprecation) for the full migration plan. </Warning> <Accordion title="op-geth configuration (legacy)"> [op-geth](https://github.com/ethereum-optimism/op-geth) is a minimal fork of go-ethereum optimized for the OP Stack. <Info> Although the Docker image is called `op-geth`, the actual binary is still named `geth` to minimize differences from go-ethereum. See the [op-geth diff viewer](https://op-geth.optimism.io/?utm_source=op-docs\&utm_medium=docs) for details. </Info> ### Minimal configuration ```bash theme={null} geth \ --datadir=/data/optimism \ --http \ --http.addr=0.0.0.0 \ --http.port=8545 \ --http.api=eth,net,web3 \ --authrpc.jwtsecret=/path/to/jwt-secret.txt \ --op-network=op-mainnet \ --rollup.sequencerhttp=https://mainnet-sequencer.optimism.io/ \ --rollup.disabletxpoolgossip ``` Defaults: snap sync mode, no WebSocket server, no metrics. ### OP Stack specific flags * `--rollup.sequencerhttp`: HTTP endpoint of the sequencer for transaction submission * `--rollup.disabletxpoolgossip`: Disables transaction pool gossip (for replica nodes) * `--rollup.historicalrpc`: Enables historical RPC endpoint for upgraded networks (OP Mainnet pre-bedrock archive nodes) ### Complete reference The op-geth configuration reference has been retired; see the [op-reth configuration reference](/node-operators/reference/op-reth-config) for the equivalent op-reth flags. </Accordion> # Legacy Geth configuration Source: https://docs.optimism.io/node-operators/guides/configuration/legacy-geth Learn how to configure Legacy Geth for serving historical execution traces on upgraded OP Stack networks. Legacy Geth (`l2geth`) is the old pre-Bedrock OVM client running against a preconfigured data directory. It is required only for upgraded networks like OP Mainnet to serve execution traces and chain data from before the Bedrock upgrade. If you're running a node that had a chain genesis after the Bedrock upgrade, you do not need Legacy Geth. <Info> Legacy Geth (`l2geth`) is the pre-Bedrock OVM client and is unrelated to op-geth's deprecation. l2geth is required on OP Mainnet archive nodes regardless of which post-Bedrock execution client you run (op-reth or op-geth). </Info> <Info> If you need state proofs for post-Bedrock blocks (for example, for withdrawal proving), see the [historical proofs config](/node-operators/reference/op-reth-historical-proof-config) — that's a different feature. </Info> ## Do you need Legacy Geth? op-reth routes RPC requests that target pre-Bedrock blocks to Legacy Geth. This includes *historical execution* — methods that need to execute pre-Bedrock transactions, such as `eth_call` and the `debug_trace*` methods — as well as reads of pre-Bedrock block and transaction data, such as `eth_getBlockByNumber` and `eth_getTransactionReceipt`. op-reth serves everything post-Bedrock directly. If you do not need any RPC access to pre-Bedrock blocks, then you do not need to run Legacy Geth at all. For the exact list of RPC methods routed to Legacy Geth, see the [Legacy Geth configuration reference](/node-operators/reference/legacy-geth-config#rpc-methods-routed-to-legacy-geth). ## Setup ### 1. Download the preconfigured data directory Download and extract the Legacy Geth data directory, which is available at [datadirs.optimism.io](https://datadirs.optimism.io). ```bash theme={null} # Download the data directory curl -o legacy-geth-datadir.tar -sL <URL-to-legacy-datadir> # Extract it tar -xvf legacy-geth-datadir.tar -C /data/legacy-geth ``` ### 2. Configure Legacy Geth Run Legacy Geth with the minimum required configuration: ```bash theme={null} USING_OVM=true \ ETH1_SYNC_SERVICE_ENABLE=false \ RPC_API=eth,rollup,net,web3,debug \ RPC_ADDR=0.0.0.0 \ RPC_CORS_DOMAIN=* \ RPC_ENABLE=true \ RPC_PORT=8545 \ RPC_VHOSTS=* \ geth --datadir /data/legacy-geth ``` <Warning> It is imperative that you specify the `USING_OVM=true` environment variable. Failing to specify this will cause `l2geth` to return invalid execution traces or panic at startup. </Warning> The full set of environment variables Legacy Geth accepts, with defaults, is catalogued in the [Legacy Geth configuration reference](/node-operators/reference/legacy-geth-config#environment-variables). ### 3. Configure your execution client to route to Legacy Geth Point your execution client at Legacy Geth with the `--rollup.historicalrpc` flag; op-reth and op-geth accept the same flag (see the [routing-flag reference](/node-operators/reference/legacy-geth-config#execution-client-routing-flag)). <Tabs> <Tab title="op-reth"> ```bash theme={null} op-reth node \ --datadir=/data/optimism \ --rollup.historicalrpc=http://localhost:8545 \ # ... other flags ``` </Tab> <Tab title="op-geth"> <Warning> **op-geth has reached end-of-support (2026-05-31) and does not support the now-active Karst hardfork, so op-geth nodes can no longer follow the canonical chain.** Migrate to op-reth, the primary supported execution client. See the [op-geth deprecation notice](/notices/archive/op-geth-deprecation) for the full migration plan. </Warning> ```bash theme={null} geth \ --datadir=/data/optimism \ --rollup.historicalrpc=http://localhost:8545 \ # ... other flags ``` </Tab> </Tabs> ## Troubleshooting <Warning> `l2geth` is based on an old version of geth where trace functionality is unstable. It is no longer maintained and will not be updated. </Warning> ### Legacy Geth won't start **Problem**: `l2geth` panics or returns errors on startup **Solution**: Ensure `USING_OVM=true` is set in your environment variables ### Invalid execution traces **Problem**: Legacy Geth returns invalid or incorrect trace data **Solution**: Verify that `USING_OVM=true` is set and the data directory is complete and uncorrupted ### Execution client not routing to Legacy Geth **Problem**: Historical execution requests are not being routed to Legacy Geth **Solution**: Check that `--rollup.historicalrpc` is set on your execution client (op-reth or op-geth) with the correct URL to Legacy Geth # Supernode configuration Source: https://docs.optimism.io/node-operators/guides/configuration/supernode Learn how to configure op-supernode to run every chain in an interop dependency set in one process. <Info> op-supernode is in active development. This page tracks the [op-supernode/v0.2.2-rc.8](https://github.com/ethereum-optimism/optimism/releases/tag/op-supernode%2Fv0.2.2-rc.8) release candidate and the recommendations may evolve before the stable release. For background on what op-supernode is and why it exists, see the [supernode explainer](/op-stack/interop/supernode). </Info> This guide covers the recommended settings and a starter configuration for op-supernode. op-supernode runs every chain in an interop dependency set together as virtual nodes inside one process, sharing the L1 client and beacon-chain plumbing across them. For the end-to-end procedure to stand up a supernode from scratch (build, engine-API wiring, start, verify), see the [supernode setup guide](/node-operators/guides/configuration/supernode-setup). For the complete per-flag catalogue, see the [op-supernode configuration reference](/node-operators/reference/op-supernode-config). ## Recommendations ### Share the JWT secret across virtual nodes with `--vn.all.l2.jwt-secret` <Info> Each chain's virtual node needs the JWT secret to authenticate with its execution client over the Engine API. When every chain in the dependency set uses the same secret, set it once at the supernode level and let every virtual node inherit it. </Info> To share a single JWT secret across every virtual node, set `--vn.all.l2.jwt-secret=<path>` (or `OP_SUPERNODE_VN_ALL_L2_ENGINE_AUTH`) at the supernode level. This avoids repeating the per-chain `--vn.<chainID>.l2.jwt-secret` line for every chain in `--chains`. Reserve the per-chain form for the case where one chain's execution client needs a different secret; the [configuration reference](/node-operators/reference/op-supernode-config) documents both forms. ### Configure a beacon archiver fallback with `--l1.beacon-fallbacks` <Warning> Ethereum beacon nodes prune blob sidecars after roughly 18 days. Without an archive fallback configured, a supernode that has been offline past the prune window cannot fetch the blobs it needs to derive missed L1 blocks, and chain containers will stall at the gap. </Warning> Configure `--l1.beacon-fallbacks` (or `OP_SUPERNODE_L1_BEACON_FALLBACKS`) with one or more beacon-API-compatible archive endpoints. Set them up from the start — once a primary beacon prunes a blob the supernode needs, only an archiver can recover it. The shared beacon client uses the fallbacks transparently when the primary beacon node returns 404 for an expired blob. For options on what to point `--l1.beacon-fallbacks` at — running your own non-pruning beacon, running `blob-archiver`, or using a third-party service — see the [blob archiver guide](/node-operators/guides/management/blobs#configure-a-blob-archiver). ### Configure EL retention for supernode backfill <Info> The supernode reads historical block and receipt data from each chain's execution client to backfill initiating-message logs after restarts or extended downtime. ELs that aggressively prune receipts will break the backfill path. </Info> Configure each EL to retain at least 7 days of block and receipt history. A full archive is not required — see the [op-reth configuration reference](/node-operators/reference/op-reth-config) for the granular `--prune.*` flags that let you keep block and receipt history without enabling transaction indexing or world-state history. If you also run op-challenger for permissionless fault proofs, the same ELs additionally need historical proofs enabled — see [Running op-reth with Historical Proofs](/node-operators/tutorials/reth-historical-proofs). ### Pair op-supernode with a Light CL fleet For operators running more than a handful of nodes, the deployable pattern is to concentrate the expensive multi-chain derivation work on supernodes and run the rest of the fleet as op-node or kona-node instances in Light CL mode. Each supernode (or HA pool of supernodes) acts as the safe source for a fleet of Light CLs. The fleet points at the supernode's `optimism_syncStatus` RPC over the `--l2.follow.source` flag and inherits its safe and finalized view, while keeping its own unsafe-head progression over P2P. Larger operators often run several such supernode-plus-fleet groups for blast-radius isolation, regional placement, or staged rollouts. See the [specialized op-node topology notice](/notices/specialized-node-topology) for the fleet side of this pattern, and the [supernode explainer](/op-stack/interop/supernode#op-supernode-and-light-cl) for the architecture overview. Set `--disable-p2p=true` on the supernode when the fleet handles unsafe-head P2P gossip on its own. Leave P2P enabled (the default) when the supernode is the only node in the topology. ### Run an HA pool of supernodes behind a consensus-aware proxyd For production reliability, OP Labs recommends running an **HA pool of at least three op-supernode instances** and fronting them with a [consensus-aware `proxyd`](/chain-operators/tools/proxyd#consensus-awareness) configured with the `consensus_aware_consensus_layer` routing strategy. Point the Light CL fleet's `--l2.follow.source` at the proxyd endpoint rather than at a single supernode. This hides individual supernode failures or reorgs from the Light CL fleet and lets the supernode tier roll between releases without downtime. An individual supernode going down inside the HA pool is masked by `proxyd` — Light CLs continue following the surviving instances. If the entire supernode tier becomes unreachable, Light CLs keep advancing the unsafe chain over P2P gossip and resume safe-head tracking automatically once the tier is restored. A single op-supernode is acceptable for evaluation, but treat it as a single point of failure for safe-head progression on every chain it hosts. ## Example configuration This is a minimum viable configuration for an op-supernode acting as a verifier across OP Sepolia and Unichain Sepolia. The example uses environment variables; pass the equivalent `--flag` arguments instead if that fits your deployment better. Fill in the placeholders before starting the binary. <Info> The example below assumes a two-chain dependency set of OP Sepolia (chain ID `11155420`) and Unichain Sepolia (chain ID `1301`). For a different dependency set, replace the chain IDs in `OP_SUPERNODE_CHAINS` and add or remove the matching `OP_SUPERNODE_VN_<CHAINID>_NETWORK` and `OP_SUPERNODE_VN_<CHAINID>_L2_ENGINE_RPC` pairs for each chain. </Info> ```yaml theme={null} # Dependency set and storage OP_SUPERNODE_CHAINS: "11155420,1301" # OP Sepolia + Unichain Sepolia OP_SUPERNODE_DATA_DIR: /var/lib/op-supernode # default is ./datadir # Shared L1 access OP_SUPERNODE_L1_ETH_RPC: <your-l1-eth-rpc> OP_SUPERNODE_L1_BEACON: <your-l1-beacon-rpc> OP_SUPERNODE_L1_BEACON_FALLBACKS: <your-l1-beacon-archiver-rpc> # Shared JWT secret for every virtual node's engine connection OP_SUPERNODE_VN_ALL_L2_ENGINE_AUTH: /etc/op/jwt-secret.txt # Per-chain: chain identity, engine RPC, and engine kind (reth when the chain's EL is op-reth) OP_SUPERNODE_VN_11155420_NETWORK: op-sepolia OP_SUPERNODE_VN_11155420_L2_ENGINE_RPC: <op-sepolia-engine-rpc> OP_SUPERNODE_VN_11155420_L2_ENGINE_KIND: reth OP_SUPERNODE_VN_1301_NETWORK: unichain-sepolia OP_SUPERNODE_VN_1301_L2_ENGINE_RPC: <unichain-sepolia-engine-rpc> OP_SUPERNODE_VN_1301_L2_ENGINE_KIND: reth # Top-level JSON-RPC server (per-chain namespaces under /<chainID>/) OP_SUPERNODE_RPC_ADDR: 0.0.0.0 OP_SUPERNODE_RPC_PORT: "8545" # Observability OP_SUPERNODE_LOG_LEVEL: info OP_SUPERNODE_METRICS_ENABLED: "true" OP_SUPERNODE_METRICS_ADDR: 0.0.0.0 OP_SUPERNODE_METRICS_PORT: "7300" ``` For chains that are not in op-node's built-in network registry, replace `--vn.<chainID>.network` with `--vn.<chainID>.rollup.config=<path-to-rollup-config.json>`. Every flag in the example — and everything else the binary accepts, including P2P, interop verification, JSON-RPC, logging, and metrics options — is catalogued with syntax, examples, and environment-variable names in the [op-supernode configuration reference](/node-operators/reference/op-supernode-config). ## Where to go next * Follow the [supernode setup guide](/node-operators/guides/configuration/supernode-setup) to stand up a supernode from scratch. * Read the [op-supernode configuration reference](/node-operators/reference/op-supernode-config) for the complete flag and environment-variable catalogue. * Read the [interop prep notice](/notices/interop-prep) for the node-operator action checklist for the OP Sepolia and Unichain Sepolia activation. * Read the [supernode explainer](/op-stack/interop/supernode) for what op-supernode is and why it exists. * Read the [specialized op-node topology notice](/notices/specialized-node-topology) for the operator-facing pattern of running Light CL fleets that follow a supernode safe source. * Read the [interop explainer](/op-stack/interop/explainer) for how cross-chain messaging works at the protocol level. * Read the [op-node configuration reference](/node-operators/reference/op-node-config) for the full set of flags available under the `--vn.*` namespace. * See the [op-supernode source](https://github.com/ethereum-optimism/optimism/tree/develop/op-supernode) in the monorepo for implementation detail. # Supernode setup Source: https://docs.optimism.io/node-operators/guides/configuration/supernode-setup Stand up op-supernode end to end - build the binary, wire each chain's engine API, start the process, and verify every chain is syncing. <Info> op-supernode is in active development. This page tracks the [op-supernode/v0.2.2-rc.8](https://github.com/ethereum-optimism/optimism/releases/
프로젝트로 돌아가기