From 9907b4b3c658fca705ff20ff6ca7af7648d70970 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Thu, 9 May 2024 09:55:17 -0700 Subject: [PATCH 1/8] 2 new node pages part 1 of node revision: - new base config page - new node architecture page --- .../builders/node-operators/architecture.mdx | 41 ++++ .../node-operators/management/_meta.json | 3 +- .../node-operators/management/base-config.mdx | 219 ++++++++++++++++++ pages/builders/node-operators/overview.mdx | 32 --- 4 files changed, 262 insertions(+), 33 deletions(-) create mode 100644 pages/builders/node-operators/architecture.mdx create mode 100644 pages/builders/node-operators/management/base-config.mdx diff --git a/pages/builders/node-operators/architecture.mdx b/pages/builders/node-operators/architecture.mdx new file mode 100644 index 000000000..f8a987dfe --- /dev/null +++ b/pages/builders/node-operators/architecture.mdx @@ -0,0 +1,41 @@ +--- +title: Node Architecture +lang: en-US +description: Learn about node architecture. +--- + +# Node Architecture + +This page reviews node architecture for all nodes running on the Superchain network. All OP Mainnet nodes are composed of two core software services, the Rollup Node and the Execution Client. +OP Mainnet also optionally supports a third component, Legacy Geth, that can serve stateful queries for blocks and transactions created before the [Bedrock Upgrade](https://web.archive.org/web/20230608050602/https://blog.oplabs.co/introducing-optimism-bedrock/). + +The following diagram shows how the Rollup Node, Execution Client, and Legacy Geth components work together to form a complete node running on the Superchain network. +This diagram uses the `op-node` and `op-geth` implementations of the Rollup Node and Execution Client respectively, but the same architecture generally applies to other implementations as well. + +![OP Mainnet node architecture diagram.](/img/guides/node-operators/node-arch.svg) + +## Rollup Node + +The Rollup Node is responsible for deriving L2 block payloads from L1 data and passing those payloads to the Execution Client. The Rollup Node can also optionally participate in a peer-to-peer network to receive blocks directly from the Sequencer before those blocks are submitted to L1. The Rollup Node is largely analogous to a [consensus client](https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients) in Ethereum. + +## Execution Client + +The Execution Client is responsible for executing the block payloads it receives from the Rollup Node over JSON-RPC via the standard [Ethereum Engine API](https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md#engine-api----common-definitions). +The Execution Client exposes the standard JSON-RPC API that Ethereum developers are familiar with, and can be used to query blockchain data and submit transactions to the network. +The Execution Client is largely analogous to an [execution client](https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients) in Ethereum. + +## Legacy Geth + +OP Mainnet underwent a large database migration as part of the [Bedrock Upgrade](https://web.archive.org/web/20230608050602/https://blog.oplabs.co/introducing-optimism-bedrock/) in 2023. +Blocks and transactions included in OP Mainnet prior to the Bedrock Upgrade are served by current execution engines but cannot be executed without the help of a special component called Legacy Geth. +This means that you will need to run Legacy Geth if you want to be able to run RPC calls such as `eth_call` on blocks before the Bedrock Upgrade. + +Legacy Geth is the software that was used to run OP Mainnet nodes prior to the Bedrock Upgrade. +If you run an instance of Legacy Geth alongside your OP Mainnet node, your node will be able to forward requests against historical transactions to the Legacy Geth instance. +Legacy Geth is **not** required and is typically only necessary if you want to maintain a complete archive node for OP Mainnet. + +## Next Steps + +* To get your node up and running, start with the [run a node from docker](/builders/node-operators/tutorials/node-from-docker) or [build a node from source](/builders/node-operators/tutorials/node-from-source) tutorial. +* If you've already got your node up and running, check out the [Node Metrics and Monitoring Guide](./management/metrics) to learn how to keep tabs on your node and make sure it keeps running smoothly. +* If you run into any problems, please visit the [Node Troubleshooting Guide](./management/troubleshooting) for help. \ No newline at end of file diff --git a/pages/builders/node-operators/management/_meta.json b/pages/builders/node-operators/management/_meta.json index 527da1c16..507a28527 100644 --- a/pages/builders/node-operators/management/_meta.json +++ b/pages/builders/node-operators/management/_meta.json @@ -1,6 +1,7 @@ { "snapshots": "Snapshot Downloads", - "configuration": "Configuration", + "base-config": "Base Configuration", + "configuration": "Custom Configuration", "blobs": "Using Blobs", "snap-sync": "Using Snap Sync", "metrics": "Monitoring", diff --git a/pages/builders/node-operators/management/base-config.mdx b/pages/builders/node-operators/management/base-config.mdx new file mode 100644 index 000000000..70e765ea9 --- /dev/null +++ b/pages/builders/node-operators/management/base-config.mdx @@ -0,0 +1,219 @@ +--- +title: Node Base Configuration +lang: en-US +description: Learn the node base configuration and recommended flags for op-node, op-geth, and legacy geth. +--- + +import { Callout } from 'nextra/components' + +# Node Base Configuration + + + Always run `op-node` and `op-geth` in a one-to-one configuration. Don't run multiple `op-geth` instances behind one `op-node`, or vice versa. + + +This page provides information on basic node configuration and recommended flags for op-node, op-geth, and legacy geth (optional). To configure your node to run on a Superchain network, you will need to do the following: + +1. Configure `op-node` to point to the correct L1, `op-geth`, and L2 network. +2. Initialize `op-geth` with the correct network parameters. +3. Configure `op-geth` to properly communicate with the Rollup Node. +4. Optionally, configure Legacy Geth. + +## Configuring `op-geth` + + + Although the Docker image for the Execution Engine is called `op-geth`, the actual binary is still called `geth` in order to minimize differences between `op-geth` and `go-ethereum`. You can see the difference [here](https://op-geth.optimism.io/). + + +`op-geth` stores its state in a database that requires initialization. +Depending on the network you're running, initialization is done one of three ways: + +1. **With a Genesis File:** This is for deployments that are not migrated from a legacy network (i.e. OP Sepolia). In this case, you'll use a genesis file and initialize the data directory via `geth init`. +2. **With a Data Directory:** This is used for networks that are migrated from a legacy network. This currently **only** includes OP Mainnet. In this case, you'll download a preconfigured data directory and extract it. No further initialization is necessary in this case, because the data directory contains the network's genesis information. This method can be bypassed if you utilize [snap sync](/builders/node-operators/management/snap-sync). +3. **With network flags:** This initializes the genesis information and chain configuration from the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry). + +Regardless of how `op-geth` is initialized, you'll need to ensure that you have sufficient disk space available to store the network's data. As of this writing, the OP Mainnet data directory is \~1.6TB for a full node and \~5TB for an archival node. + +Instructions for each initialization method are below. OP Mainnet nodes should use the [Initialization via Data Directory](#initialization-via-data-directory) path, and OP Sepolia nodes should use the [Initialization via Genesis File](#initialization-via-genesis-file) path. + +### Initialization via Genesis File (OP Sepolia nodes) + +`op-geth` uses JSON files to encode a network's genesis information. For +networks that are initialized in this way, you'll receive a URL to the genesis +JSON. You'll need to download the genesis JSON, then run the following command +to initialize the data directory: + +```bash +#!/bin/sh +FILE=/$DATADIR/genesis.json +OP_GETH_GENESIS_URL=<> + +if [ ! -s $FILE ]; then + apk add curl + curl $OP_GETH_GENESIS_URL -o $FILE + geth init --datadir /db $FILE +else + echo "Genesis file already exists. Skipping initialization." +fi +``` + +### Initialization via Data Directory (OP Mainnet nodes) + +To initialize `op-geth` with a preconfigured data directory, simply download and extract the data directory to a place of your choosing. The data directory is exported as a tar file. An example command to do this is below: + +```bash +curl -o -sL +tar -xvf +``` + +### Initialization via Network Flags + +To initialize `op-geth` with the network flags, you simply need to set the +`--op-network=` and `--network=` on `op-node`. To see the latest +support networks, you can consult the `--help` output for the `op-network` +option. + +### Configuration + +Once `op-geth` is initialized, it can be configured via CLI flags. `op-geth` accepts all the [standard `go-ethereum` flags](https://geth.ethereum.org/docs/interface/command-line-options) as well as a few extra flags that are specific to Optimism. These flags are: + +* `--rollup.historicalrpc`: Enables the historical RPC endpoint. This endpoint is used to fetch historical execution data from Legacy Geth. This flag is only necessary for upgraded networks. +* `--rollup.sequencerhttp`: HTTP endpoint of the sequencer. `op-geth` will route `eth_sendRawTransaction` calls to this URL. Bedrock does not currently have a public mempool, so this is required if you want your node to support transaction submission. Consult the documentation for the network you are participating in to get the correct URL. +* `--rollup.disabletxpoolgossip`: Disables transaction pool gossiping. While not required, it's useful to set this to `true` since transaction pool gossip is currently unsupported. + +To communicate with `op-node` and enable the Engine API, you'll also need to generate a JWT secret file and enable Geth's authenticated RPC endpoint. + +To generate the JWT secret, run the following: + +```bash +openssl rand -hex 32 > jwt.txt +``` + +Then, specify the following flags: + +* `--authrpc.addr`: Sets the address `op-geth`'s authenticated RPC should listen on. +* `--authrpc.port`: Sets the port `op-geth`'s authenticated RPC should listen on. The default value is `8551`. +* `--authrpc.jwtsecret`: Sets the path to a JWT secret file you generated above. + +### Optional op-geth Configuration + +You may also want to specify the following flags based on your configuration: + +* `--authrpc.vhosts`: Whitelists which hosts (as defined in the `Host` header) are allowed to access the authenticated RPC endpoint. This is useful if you're running `op-geth` on containerized infrastructure. The default value is `localhost`. +* `--http.vhosts`: Whitelists which hosts (as defined in the `Host` header) are allowed to access the unauthenticated RPC endpoint. This is useful if you're running `op-geth` on containerized infrastructure. The default value is `localhost`. +* `--http`, `--http.addr`, and `--http.port`: Enables the unauthenticated RPC endpoint, configures its address, and configures its port. You'll almost certainly want to specify these, since they will enable Geth's JSON-RPC endpoint. +* `--ws`, `--ws.addr`, and `--ws.port`: Enables the WebSocket API. +* `--verbosity`: Configures Geth's log level. This is a number between 0 and 5, with 5 being the most verbose. Defaults to 3. + +### Working Base Configuration + +A valid command that runs `op-geth` and enables RPC over HTTP and WebSockets looks like: + +```bash +geth \ + --ws \ + --ws.port=8546 \ + --ws.addr=localhost \ + --ws.origins="*" \ + --http \ + --http.port=8545 \ + --http.addr=localhost \ + --http.vhosts="*" \ + --http.corsdomain="*" \ + --authrpc.addr=localhost \ + --authrpc.jwtsecret=/var/secrets/jwt.txt \ + --authrpc.port=8551 \ + --authrpc.vhosts="*" \ + --datadir=/data \ + --verbosity=3 \ + --rollup.disabletxpoolgossip=true \ + --rollup.sequencerhttp=https://mainnet-sequencer.optimism.io/ \ + --op-network=op-mainnet +``` + +Consult [Geth's documentation](https://geth.ethereum.org/docs/) for more information on customizing `op-geth`'s behavior. + +## Configuring `op-node` + +`op-node` is a standalone, statically linked binary. It stores no state, and requires no initialization. It consumes configuration parameters either via the command line or environment variables. For some networks, the Rollup Node also requires a configuration file (called `rollup.json` or the "rollup config") that configures network-specific genesis parameters. For official networks like OP Sepolia and OP Mainnet, the genesis config is hardcoded in the `op-node` software and can be specified via a `--network` flag. + +Following the [Ecotone upgrade](/builders/node-operators/network-upgrades#ecotone) +node operators must set an L1 beacon value to retrieve [blobs](/builders/node-operators/management/blobs) +from a Beacon node. + + + The `op-node` RPC should not be exposed publicly. If left exposed, it could + accidentally expose admin controls to the public internet. + + +### Working Base Configuration + +A minimal valid configuration that runs `op-node` looks like: + +```bash +op-node --l1= \ + --l2= \ + --network=op-mainnet \ + --rpc.addr=127.0.0.1 \ + --rpc.port=9545 \ + --l2.jwt-secret= \ + --l1.beacon= \ + --syncmode=execution-layer +``` + +You can manually specify a path to a rollup config with the `--rollup.config` flag. This is used for testnets or internal deployments that are not migrated from a legacy network. + +Each of the above flags can also be defined via an environment variable. Run `op-node --help` to see a list of all available flags and environment variables. + +### Configuring Peer-to-Peer Networking + +Unlike the previous system, the `op-node` participates in a peer-to-peer network. This network is used to distribute blocks that have not been submitted to L1 yet. The `op-node` will automatically discover and connect to peers using a hardcoded set of bootnodes. You can also manually specify peers to connect to via the `--p2p.static` flag. + +For best results, run `op-node` with a static IP address that is accessible from the public Internet. For Kubernetes deployments, this can be achieved by configuring a dedicated `Ingress` with an external IP, and using the `--p2p.advertise.ip` flag to specify the IP address of the load balancer when advertising IP addresses to peers. + +The default port for the peer-to-peer network is `9003`. You will need to open this port on your firewall to receive unsubmitted blocks. For your node to be discoverable, this port must be accessible via both TCP and UDP protocols. + +## Configuring Legacy Geth + +If you are running a node for an upgraded network like OP Mainnet (but not OP Sepolia), you will also need to run Legacy Geth in order to serve historical execution traces. Fundamentally, Legacy Geth is our old `l2geth` binary running against a preconfigured data directory. To configure Legacy Geth, follow the instructions above for using a preconfigured data directory, then execute the following command: + + + It is imperative that you specify the `USING_OVM=true` environment variable in the command below. Failing to specify this will cause `l2geth` to return invalid execution traces, or panic at startup. + + +```bash +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 +``` + +This command is the minimum required to run Legacy Geth and expose a functioning RPC endpoint. As before, `l2geth` takes all standard `go-ethereum` flags so you can customize the configuration as needed. + +As mentioned above, don't forget to specify `--rollup.historicalrpc` on `op-geth` to properly route requests for historical execution to Legacy Geth. + +Since Legacy Geth is read-only, it is safe to run multiple Legacy Geth nodes behind a load balancer. + +### Historical Execution vs. Historical Data Routing + +Only requests for historical execution will be routed to Legacy Geth. +Everything else will be served by `op-geth` directly. +The term *historical execution* refers to RPC methods that need to execute transactions prior to bedrock (not just read data from the database): + +* `eth_call` +* `eth_estimateGas` +* `debug_traceBlockByNumber` +* `debug_traceBlockByHash` +* `debug_traceCall` +* `debug_traceTransaction` + +If you do not need these RPC methods for historical data, then you do not need to run Legacy Geth at all. + +## Next Steps +* TBD +* TBD diff --git a/pages/builders/node-operators/overview.mdx b/pages/builders/node-operators/overview.mdx index 591bde449..1e21ad741 100644 --- a/pages/builders/node-operators/overview.mdx +++ b/pages/builders/node-operators/overview.mdx @@ -12,38 +12,6 @@ The Node Operator section of the Optimism Docs is a collection of guides and tut If you'd like to learn more about how OP Mainnet works under the hood, refer to the [OP Mainnet Getting Started Guide](/chain/getting-started) or the [OP Stack Getting Started Guide](/stack/getting-started). If you want to get right into running a node, feel free to skip ahead to the [Node Operator Tutorials](#node-operator-tutorials) section. -## Node Architecture - -All OP Mainnet nodes are composed of two core software services, the Rollup Node and the Execution Client. -OP Mainnet also optionally supports a third component, Legacy Geth, that can serve stateful queries for blocks and transactions created before the [Bedrock Upgrade](https://web.archive.org/web/20230608050602/https://blog.oplabs.co/introducing-optimism-bedrock/). - -### Rollup Node - -The Rollup Node is responsible for deriving L2 block payloads from L1 data and passing those payloads to the Execution Client. The Rollup Node can also optionally participate in a peer-to-peer network to receive blocks directly from the Sequencer before those blocks are submitted to L1. The Rollup Node is largely analogous to a [consensus client](https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients) in Ethereum. - -### Execution Client - -The Execution Client is responsible for executing the block payloads it receives from the Rollup Node over JSON-RPC via the standard [Ethereum Engine API](https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md#engine-api----common-definitions). -The Execution Client exposes the standard JSON-RPC API that Ethereum developers are familiar with, and can be used to query blockchain data and submit transactions to the network. -The Execution Client is largely analogous to an [execution client](https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients) in Ethereum. - -### Legacy Geth - -OP Mainnet underwent a large database migration as part of the [Bedrock Upgrade](https://web.archive.org/web/20230608050602/https://blog.oplabs.co/introducing-optimism-bedrock/) in 2023. -Blocks and transactions included in OP Mainnet prior to the Bedrock Upgrade are served by current execution engines but cannot be executed without the help of a special component called Legacy Geth. -This means that you will need to run Legacy Geth if you want to be able to run RPC calls such as `eth_call` on blocks before the Bedrock Upgrade. - -Legacy Geth is the software that was used to run OP Mainnet nodes prior to the Bedrock Upgrade. -If you run an instance of Legacy Geth alongside your OP Mainnet node, your node will be able to forward requests against historical transactions to the Legacy Geth instance. -Legacy Geth is **not** required and is typically only necessary if you want to maintain a complete archive node for OP Mainnet. - -### Diagram - -The following diagram shows how the Rollup Node, Execution Client, and Legacy Geth components work together to form a complete OP Mainnet node. -This diagram uses the `op-node` and `op-geth` implementations of the Rollup Node and Execution Client respectively, but the same architecture generally applies to other implementations as well. - -![OP Mainnet node architecture diagram.](/img/guides/node-operators/node-arch.svg) - ## Software Releases It's important to keep your node software up to date to ensure that you won't fall out of sync with other OP Mainnet nodes when there's an upgrade. From 0bec1017ce49af20eb1a8aa928aec72247b0b765 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Thu, 9 May 2024 10:00:01 -0700 Subject: [PATCH 2/8] lint fixes --- pages/builders/node-operators/architecture.mdx | 2 +- words.txt | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/pages/builders/node-operators/architecture.mdx b/pages/builders/node-operators/architecture.mdx index f8a987dfe..16464cd6a 100644 --- a/pages/builders/node-operators/architecture.mdx +++ b/pages/builders/node-operators/architecture.mdx @@ -38,4 +38,4 @@ Legacy Geth is **not** required and is typically only necessary if you want to m * To get your node up and running, start with the [run a node from docker](/builders/node-operators/tutorials/node-from-docker) or [build a node from source](/builders/node-operators/tutorials/node-from-source) tutorial. * If you've already got your node up and running, check out the [Node Metrics and Monitoring Guide](./management/metrics) to learn how to keep tabs on your node and make sure it keeps running smoothly. -* If you run into any problems, please visit the [Node Troubleshooting Guide](./management/troubleshooting) for help. \ No newline at end of file +* If you run into any problems, please visit the [Node Troubleshooting Guide](./management/troubleshooting) for help. diff --git a/words.txt b/words.txt index 262292b92..d044c69b1 100644 --- a/words.txt +++ b/words.txt @@ -7,7 +7,6 @@ ADDIU ADDU allocs ANDI -Ankr Apeworx Arweave authrpc @@ -118,7 +117,6 @@ Holesky holesky IGNOREPRICE ignoreprice -Immunefi implicity Inator inator @@ -166,7 +164,6 @@ minsuggestedpriorityfee Mintable Mintplex MIPSEVM -Mitigations Moralis Mordor MOVN @@ -245,8 +242,6 @@ productionized Protip proxyd pseudorandomly -Pyth -Pyth's Quicknode quicknode quickstarts @@ -266,9 +261,6 @@ RPCPREFIX rpcprefix RPGF SELFDESTRUCT -SEPOLIA -Sepolia -sepolia seqnr SEQUENCERHTTP sequencerhttp @@ -324,7 +316,6 @@ VMDEBUG vmdebug VMODULE vmodule -voxel wagmi XORI xtensibility From c8046dc9212c8fc437d4da85ed805ddda902d6c8 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Mon, 13 May 2024 11:51:27 -0700 Subject: [PATCH 3/8] new page, new folder in side nav - split config page into 2 pages (op-node config + op-geth config) - update redirects file - update links pointing to old config page - update side-nav, new config folder in side nav --- .../chain-operators/management/operations.mdx | 2 +- .../chain-operators/management/snap-sync.mdx | 8 +- .../tutorials/create-l2-rollup.mdx | 2 +- pages/builders/node-operators/_meta.json | 2 + .../builders/node-operators/architecture.mdx | 1 + .../node-operators/configuration/_meta.json | 5 + .../base-config.mdx | 19 +- .../geth-config.mdx} | 1365 +++-------------- .../configuration/node-config.mdx | 784 ++++++++++ .../node-operators/management/_meta.json | 4 +- .../node-operators/management/snap-sync.mdx | 6 +- public/_redirects | 1 + 12 files changed, 1006 insertions(+), 1193 deletions(-) create mode 100644 pages/builders/node-operators/configuration/_meta.json rename pages/builders/node-operators/{management => configuration}/base-config.mdx (94%) rename pages/builders/node-operators/{management/configuration.mdx => configuration/geth-config.mdx} (54%) create mode 100644 pages/builders/node-operators/configuration/node-config.mdx diff --git a/pages/builders/chain-operators/management/operations.mdx b/pages/builders/chain-operators/management/operations.mdx index cd59575b8..d8c670124 100644 --- a/pages/builders/chain-operators/management/operations.mdx +++ b/pages/builders/chain-operators/management/operations.mdx @@ -161,5 +161,5 @@ If you do it this way, you won't have to wait until the transactions are written ## Next Steps -* See the [Node Configuration](/builders/node-operators/management/configuration#configuration) guide for additional explanation or customization. +* See the [Node Configuration](/builders/node-operators/configuration/base-config#configuration) guide for additional explanation or customization. * If you experience difficulty at any stage of this process, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions). diff --git a/pages/builders/chain-operators/management/snap-sync.mdx b/pages/builders/chain-operators/management/snap-sync.mdx index 637af3b01..87e1c83cb 100644 --- a/pages/builders/chain-operators/management/snap-sync.mdx +++ b/pages/builders/chain-operators/management/snap-sync.mdx @@ -23,8 +23,8 @@ To enable snap sync, chain operators need to spin up a node which is exposed to For snap sync, all `op-geth` nodes should expose port `30303` TCP and `30303` UDP to easily find other op-geth nodes to sync from. - * If you set the port with [`--discovery.port`](/builders/node-operators/management/configuration#discoveryport), then you must open the port specified for UDP. - * If you set [`--port`](/builders/node-operators/management/configuration#port), then you must open the port specified for TCP. + * If you set the port with [`--discovery.port`](/builders/node-operators/configuration/geth-config#discoveryport), then you must open the port specified for UDP. + * If you set [`--port`](/builders/node-operators/configuration/geth-config#port), then you must open the port specified for TCP. * The only exception is for sequencers and transaction ingress nodes. @@ -32,7 +32,7 @@ For snap sync, all `op-geth` nodes should expose port `30303` TCP and `30303` UD ### Setup a Snap Sync Node * Expose port `30303` (`op-geth`'s default discovery port) to the internet on TCP and UDP. - * Disable transaction gossip with the [`--rollup.disabletxpoolgossip`](/builders/node-operators/management/configuration#rollupdisabletxpoolgossip) flag + * Disable transaction gossip with the [`--rollup.disabletxpoolgossip`](/builders/node-operators/configuration/geth-config#rollupdisabletxpoolgossip) flag ### Enable Snap Sync on Your Network @@ -41,5 +41,5 @@ For snap sync, all `op-geth` nodes should expose port `30303` TCP and `30303` UD ## Next Steps -* See the [Node Configuration](/builders/node-operators/management/configuration#configuration) guide for additional explanation or customization. +* See the [Node Configuration](/builders/node-operators/configuration/base-config#configuration) guide for additional explanation or customization. * If you experience difficulty at any stage of this process, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions). diff --git a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx index bb92b469b..0ba5ab485 100644 --- a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx +++ b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx @@ -677,7 +677,7 @@ You can add the following options to the `op-node` command to enable peer-to-pee --p2p.listen.udp=9003 \ ``` -You can alternatively also remove the [--p2p.static](/builders/node-operators/management/configuration#p2pstatic) option, but you may see failed requests from other chains using the same chain ID. +You can alternatively also remove the [--p2p.static](/builders/node-operators/configuration/node-config#p2pstatic) option, but you may see failed requests from other chains using the same chain ID. diff --git a/pages/builders/node-operators/_meta.json b/pages/builders/node-operators/_meta.json index c41387773..97aa74336 100644 --- a/pages/builders/node-operators/_meta.json +++ b/pages/builders/node-operators/_meta.json @@ -1,6 +1,8 @@ { "overview": "Overview", + "architecture": "Architecture", "tutorials": "Tutorials", + "configuration": "Configuration", "management": "Node Management", "network-upgrades": "Network Upgrades", "json-rpc": "JSON-RPC API", diff --git a/pages/builders/node-operators/architecture.mdx b/pages/builders/node-operators/architecture.mdx index 16464cd6a..5ba68808a 100644 --- a/pages/builders/node-operators/architecture.mdx +++ b/pages/builders/node-operators/architecture.mdx @@ -9,6 +9,7 @@ description: Learn about node architecture. This page reviews node architecture for all nodes running on the Superchain network. All OP Mainnet nodes are composed of two core software services, the Rollup Node and the Execution Client. OP Mainnet also optionally supports a third component, Legacy Geth, that can serve stateful queries for blocks and transactions created before the [Bedrock Upgrade](https://web.archive.org/web/20230608050602/https://blog.oplabs.co/introducing-optimism-bedrock/). +## Node Flow Diagram The following diagram shows how the Rollup Node, Execution Client, and Legacy Geth components work together to form a complete node running on the Superchain network. This diagram uses the `op-node` and `op-geth` implementations of the Rollup Node and Execution Client respectively, but the same architecture generally applies to other implementations as well. diff --git a/pages/builders/node-operators/configuration/_meta.json b/pages/builders/node-operators/configuration/_meta.json new file mode 100644 index 000000000..304a4b9e1 --- /dev/null +++ b/pages/builders/node-operators/configuration/_meta.json @@ -0,0 +1,5 @@ +{ + "base-config": "Base Configuration", + "node-config": "op-node Config Options", + "geth-config": "op-geth Config Options" + } \ No newline at end of file diff --git a/pages/builders/node-operators/management/base-config.mdx b/pages/builders/node-operators/configuration/base-config.mdx similarity index 94% rename from pages/builders/node-operators/management/base-config.mdx rename to pages/builders/node-operators/configuration/base-config.mdx index 70e765ea9..ab93a997d 100644 --- a/pages/builders/node-operators/management/base-config.mdx +++ b/pages/builders/node-operators/configuration/base-config.mdx @@ -8,17 +8,17 @@ import { Callout } from 'nextra/components' # Node Base Configuration - - Always run `op-node` and `op-geth` in a one-to-one configuration. Don't run multiple `op-geth` instances behind one `op-node`, or vice versa. - - -This page provides information on basic node configuration and recommended flags for op-node, op-geth, and legacy geth (optional). To configure your node to run on a Superchain network, you will need to do the following: +This page provides information on basic node configuration and recommended flags for `op-node`, `op-geth`, and legacy geth (optional). To configure your node to run on a Superchain network, you will need to do the following: 1. Configure `op-node` to point to the correct L1, `op-geth`, and L2 network. 2. Initialize `op-geth` with the correct network parameters. 3. Configure `op-geth` to properly communicate with the Rollup Node. 4. Optionally, configure Legacy Geth. + + Always run `op-node` and `op-geth` in a one-to-one configuration. Don't run multiple `op-geth` instances behind one `op-node`, or vice versa. + + ## Configuring `op-geth` @@ -95,7 +95,7 @@ Then, specify the following flags: * `--authrpc.port`: Sets the port `op-geth`'s authenticated RPC should listen on. The default value is `8551`. * `--authrpc.jwtsecret`: Sets the path to a JWT secret file you generated above. -### Optional op-geth Configuration +### Recommended Flags for `op-geth` Configuration You may also want to specify the following flags based on your configuration: @@ -177,7 +177,7 @@ The default port for the peer-to-peer network is `9003`. You will need to open t If you are running a node for an upgraded network like OP Mainnet (but not OP Sepolia), you will also need to run Legacy Geth in order to serve historical execution traces. Fundamentally, Legacy Geth is our old `l2geth` binary running against a preconfigured data directory. To configure Legacy Geth, follow the instructions above for using a preconfigured data directory, then execute the following command: - + It is imperative that you specify the `USING_OVM=true` environment variable in the command below. Failing to specify this will cause `l2geth` to return invalid execution traces, or panic at startup. @@ -215,5 +215,6 @@ The term *historical execution* refers to RPC methods that need to execute trans If you do not need these RPC methods for historical data, then you do not need to run Legacy Geth at all. ## Next Steps -* TBD -* TBD +* See the [op-node configuration](/builders/node-operators/configuration/node-config) guide for additional configuration options for `op-node` and the Consensus-Layer. +* Similarly, visit the [op-geth configuration](/builders/node-operators/configuration/geth-config) guide for additional configuration options for `op-geth` and Execution-Layer. +* If you run into any problems, please reach out to our [developer support forum](https://github.com/ethereum-optimism/developers/discussions) for help. diff --git a/pages/builders/node-operators/management/configuration.mdx b/pages/builders/node-operators/configuration/geth-config.mdx similarity index 54% rename from pages/builders/node-operators/management/configuration.mdx rename to pages/builders/node-operators/configuration/geth-config.mdx index a41ba6e37..7b5b1bc42 100644 --- a/pages/builders/node-operators/management/configuration.mdx +++ b/pages/builders/node-operators/configuration/geth-config.mdx @@ -1,1008 +1,29 @@ --- -title: Node Configuration +title: Additional Configuration for op-geth lang: en-US -description: How to configure node and all the command line options. +description: Learn additional configuration and command line options for op-geth and the Execution-Layer. --- import { Callout } from 'nextra/components' import { Tabs } from 'nextra/components' -# Node Configuration - - - Always run `op-node` and `op-geth` in a one-to-one configuration. Don't run multiple `op-geth` instances behind one `op-node`, or vice versa. - - -To configure your node, you will need to do the following: - -1. Configure `op-node` to point to the correct L1, `op-geth`, and L2 network. -2. Initialize `op-geth` with the correct network parameters. -3. Configure `op-geth` to properly communicate with the Rollup Node. -4. Optionally, configure Legacy Geth. - -### Configuring op-geth +# Additional Configuration for `op-geth` (Execution-Layer) - Although the Docker image for the Execution Engine is called `op-geth`, the actual binary is still called `geth` in order to minimize differences between `op-geth` and `go-ethereum`. You can see the difference [here](https://op-geth.optimism.io/). - - -`op-geth` stores its state in a database that requires initialization. -Depending on the network you're running, initialization is done one of three ways: - -1. **With a Genesis File:** This is for deployments that are not migrated from a legacy network (i.e. OP Sepolia). In this case, you'll use a genesis file and initialize the data directory via `geth init`. -2. **With a Data Directory:** This is used for networks that are migrated from a legacy network. This currently **only** includes OP Mainnet. In this case, you'll download a preconfigured data directory and extract it. No further initialization is necessary in this case, because the data directory contains the network's genesis information. This method can be bypassed if you utilize [snap sync](/builders/node-operators/management/snap-sync). -3. **With network flags:** This initializes the genesis information and chain configuration from the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry). - -Regardless of how `op-geth` is initialized, you'll need to ensure that you have sufficient disk space available to store the network's data. As of this writing, the OP Mainnet data directory is \~1.6TB for a full node and \~5TB for an archival node. - -Instructions for each initialization method are below. If you're spinning up an OP Mainnet, use the [Initialization via Data Directory](#initialization-via-data-directory) path. If you're spinning up an OP Sepolia node, use the [Initialization via Genesis File](#initialization-via-genesis-file) path. - -#### Initialization via Genesis File - -`op-geth` uses JSON files to encode a network's genesis information. For -networks that are initialized in this way, you'll receive a URL to the genesis -JSON. You'll need to download the genesis JSON, then run the following command -to initialize the data directory: - -```bash -#!/bin/sh -FILE=/$DATADIR/genesis.json -OP_GETH_GENESIS_URL=<> - -if [ ! -s $FILE ]; then - apk add curl - curl $OP_GETH_GENESIS_URL -o $FILE - geth init --datadir /db $FILE -else - echo "Genesis file already exists. Skipping initialization." -fi -``` - -#### Initialization via Data Directory - -To initialize `op-geth` with a preconfigured data directory, simply download and extract the data directory to a place of your choosing. The data directory is exported as a tar file. An example command to do this is below: - -```bash -curl -o -sL -tar -xvf -``` - -#### Initialization via Network Flags - -To initialize `op-geth` with the network flags, you simply need to set the -`--op-network=` and `--network=` on `op-node`. To see the latest -support networks, you can consult the `--help` output for the `op-network` -option. - -#### Configuration - -Once `op-geth` is initialized, it can be configured via CLI flags. `op-geth` accepts all the [standard `go-ethereum` flags](https://geth.ethereum.org/docs/interface/command-line-options) as well as a few extra flags that are specific to Optimism. These flags are: - -* `--rollup.historicalrpc`: Enables the historical RPC endpoint. This endpoint is used to fetch historical execution data from Legacy Geth. This flag is only necessary for upgraded networks. -* `--rollup.sequencerhttp`: HTTP endpoint of the sequencer. `op-geth` will route `eth_sendRawTransaction` calls to this URL. Bedrock does not currently have a public mempool, so this is required if you want your node to support transaction submission. Consult the documentation for the network you are participating in to get the correct URL. -* `--rollup.disabletxpoolgossip`: Disables transaction pool gossiping. While not required, it's useful to set this to `true` since transaction pool gossip is currently unsupported. - -To communicate with `op-node` and enable the Engine API, you'll also need to generate a JWT secret file and enable Geth's authenticated RPC endpoint. - -To generate the JWT secret, run the following: - -```bash -openssl rand -hex 32 > jwt.txt -``` - -Then, specify the following flags: - -* `--authrpc.addr`: Sets the address `op-geth`'s authenticated RPC should listen on. -* `--authrpc.port`: Sets the port `op-geth`'s authenticated RPC should listen on. The default value is `8551`. -* `--authrpc.jwtsecret`: Sets the path to a JWT secret file you generated above. - -#### Optional op-geth Configuration - -You may also want to specify the following flags based on your configuration: - -* `--authrpc.vhosts`: Whitelists which hosts (as defined in the `Host` header) are allowed to access the authenticated RPC endpoint. This is useful if you're running `op-geth` on containerized infrastructure. The default value is `localhost`. -* `--http.vhosts`: Whitelists which hosts (as defined in the `Host` header) are allowed to access the unauthenticated RPC endpoint. This is useful if you're running `op-geth` on containerized infrastructure. The default value is `localhost`. -* `--http`, `--http.addr`, and `--http.port`: Enables the unauthenticated RPC endpoint, configures its address, and configures its port. You'll almost certainly want to specify these, since they will enable Geth's JSON-RPC endpoint. -* `--ws`, `--ws.addr`, and `--ws.port`: Enables the WebSocket API. -* `--verbosity`: Configures Geth's log level. This is a number between 0 and 5, with 5 being the most verbose. Defaults to 3. - -#### Working Base Configuration - -A valid command that runs `op-geth` and enables RPC over HTTP and WebSockets looks like: - -```bash -geth \ - --ws \ - --ws.port=8546 \ - --ws.addr=localhost \ - --ws.origins="*" \ - --http \ - --http.port=8545 \ - --http.addr=localhost \ - --http.vhosts="*" \ - --http.corsdomain="*" \ - --authrpc.addr=localhost \ - --authrpc.jwtsecret=/var/secrets/jwt.txt \ - --authrpc.port=8551 \ - --authrpc.vhosts="*" \ - --datadir=/data \ - --verbosity=3 \ - --rollup.disabletxpoolgossip=true \ - --rollup.sequencerhttp=https://mainnet-sequencer.optimism.io/ \ - --op-network=op-mainnet -``` - -Consult [Geth's documentation](https://geth.ethereum.org/docs/) for more information on customizing `op-geth`'s behavior. - -### Configuring op-node - -`op-node` is a standalone, statically linked binary. It stores no state, and requires no initialization. It consumes configuration parameters either via the command line or environment variables. For some networks, the Rollup Node also requires a configuration file (called `rollup.json` or the "rollup config") that configures network-specific genesis parameters. For official networks like OP Sepolia and OP Mainnet, the genesis config is hardcoded in the `op-node` software and can be specified via a `--network` flag. - -Following the [Ecotone upgrade](/builders/node-operators/network-upgrades#ecotone) -node operators must set an L1 beacon value to retrieve [blobs](/builders/node-operators/management/blobs) -from a Beacon node. - - - The `op-node` RPC should not be exposed publicly. If left exposed, it could - accidentally expose admin controls to the public internet. +You can configure your node using the command line options below (also called flags). +There are also sub-commands, which can be used to invoke functionality such as the console or blockchain import/export. -#### Working Base Configuration - -A minimal valid configuration that runs `op-node` looks like: - -```bash -op-node --l1= \ - --l2= \ - --network=op-mainnet \ - --rpc.addr=127.0.0.1 \ - --rpc.port=9545 \ - --l2.jwt-secret= \ - --l1.beacon= \ - --syncmode=execution-layer -``` - -You can manually specify a path to a rollup config with the `--rollup.config` flag. This is used for testnets or internal deployments that are not migrated from a legacy network. - -Each of the above flags can also be defined via an environment variable. Run `op-node --help` to see a list of all available flags and environment variables. - -#### Configuring Peer-to-Peer Networking - -Unlike the previous system, the `op-node` participates in a peer-to-peer network. This network is used to distribute blocks that have not been submitted to L1 yet. The `op-node` will automatically discover and connect to peers using a hardcoded set of bootnodes. You can also manually specify peers to connect to via the `--p2p.static` flag. - -For best results, run `op-node` with a static IP address that is accessible from the public Internet. For Kubernetes deployments, this can be achieved by configuring a dedicated `Ingress` with an external IP, and using the `--p2p.advertise.ip` flag to specify the IP address of the load balancer when advertising IP addresses to peers. - -The default port for the peer-to-peer network is `9003`. You will need to open this port on your firewall to receive unsubmitted blocks. For your node to be discoverable, this port must be accessible via both TCP and UDP protocols. - -### Legacy Geth - -If you are running a node for an upgraded network like OP Mainnet (but not OP Sepolia), you will also need to run Legacy Geth in order to serve historical execution traces. Fundamentally, Legacy Geth is our old `l2geth` binary running against a preconfigured data directory. To configure Legacy Geth, follow the instructions above for using a preconfigured data directory, then execute the following command: - - - It is imperative that you specify the `USING_OVM=true` environment variable in the command below. Failing to specify this will cause `l2geth` to return invalid execution traces, or panic at startup. - - -```bash -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 -``` - -This command is the minimum required to run Legacy Geth and expose a functioning RPC endpoint. As before, `l2geth` takes all standard `go-ethereum` flags so you can customize the configuration as needed. - -As mentioned above, don't forget to specify `--rollup.historicalrpc` on `op-geth` to properly route requests for historical execution to Legacy Geth. - -Since Legacy Geth is read-only, it is safe to run multiple Legacy Geth nodes behind a load balancer. - -#### Historical Execution vs. Historical Data Routing - -Only requests for historical execution will be routed to Legacy Geth. -Everything else will be served by `op-geth` directly. -The term *historical execution* refers to RPC methods that need to execute transactions prior to bedrock (not just read data from the database): - -* `eth_call` -* `eth_estimateGas` -* `debug_traceBlockByNumber` -* `debug_traceBlockByHash` -* `debug_traceCall` -* `debug_traceTransaction` - -If you do not need these RPC methods for historical data, then you do not need to run Legacy Geth at all. - -## Command line options - -You can configure your node using command line options (also called flags). There are also sub-commands, which can be used to invoke functionality such as the console or blockchain import/export. - -The command line help listing is reproduced below for your convenience. - -### op-node - -`op-node` implements most rollup-specific functionality as Consensus-Layer, similar to a L1 beacon-node. -The following options are from the `--help` in [v1.5.1](https://github.com/ethereum-optimism/optimism/releases/tag/v1.5.1). - -#### GLOBAL OPTIONS - -###### conductor.enabled - -Enable the conductor service. The default value is `false`. - - - `--conductor.enabled=` - `--conductor.enabled=false` - `OP_NODE_CONDUCTOR_ENABLED=false` - - -###### conductor.rpc - -Conductor service rpc endpoint. The default value is `http://127.0.0.1:8547`. - - - `--conductor.rpc=` - `--conductor.rpc=http://127.0.0.1:8547` - `OP_NODE_CONDUCTOR_RPC=http://127.0.0.1:8547` - - -###### conductor.rpc-timeout value - -Conductor service rpc timeout. The default value is `1s`. - - - `--conductor.rpc-timeout value=` - `--conductor.rpc-timeout value=1s` - `OP_NODE_CONDUCTOR_RPC_TIMEOUT=1s` - - -###### heartbeat.enabled - -Enables or disables heartbeating. The default value is `false`. - - - `--heartbeat.enabled=` - `--heartbeat.enabled=false` - `OP_NODE_HEARTBEAT_ENABLED=false` - - -###### heartbeat.moniker - -Sets a moniker for this node. - - - `--heartbeat.moniker=` - `--heartbeat.moniker=soyboy` - `OP_NODE_HEARTBEAT_MONIKER=soyboy` - - -###### heartbeat.url - -Sets the URL to heartbeat to. The default value is `"https://heartbeat.optimism.io"`. - - - `--heartbeat.url=` - `--heartbeat.url="https://heartbeat.optimism.io"` - `OP_NODE_HEARTBEAT_URL="https://heartbeat.optimism.io"` - - -###### l1 - -Address of L1 User JSON-RPC endpoint to use (eth namespace required). The default value is `"http://127.0.0.1:8545"`. - - - `--l1=` - `--l1="http://127.0.0.1:8545"` - `OP_NODE_L1_ETH_RPC="http://127.0.0.1:8545"` - - -###### l1.beacon - -Address of L1 Beacon-node HTTP endpoint to use. - - - `--l1.beacon=` - `--l1.beacon="127.0.0.1:3500"` - `OP_NODE_L1_BEACON="127.0.0.1:3500"` - - -###### l1.beacon.fetch-all-sidecars - -If true, all sidecars are fetched and filtered locally. Workaround for buggy Beacon nodes. The default value is `false`. - - - `--l1.beacon.fetch-all-sidecars=` - `--l1.beacon.fetch-all-sidecars=false` - `OP_NODE_L1_BEACON=false` - - -###### l1.beacon.ignore - -When false, halts op-node startup if the healthcheck to the Beacon-node endpoint fails. The default value is `false`. - - - `--l1.beacon.ignore=` - `--l1.beacon.ignore=false` - `OP_NODE_L1_BEACON=false` - - -###### l1.epoch-poll-interval - -Poll interval for retrieving new L1 epoch updates such as safe and finalized block changes. Disabled if 0 or negative. The default value is `6m24s`. - - - `--l1.epoch-poll-interval=` - `--l1.epoch-poll-interval=6m24s` - `OP_NODE_L1_EPOCH_POLL_INTERVAL=6m24s` - - -###### l1.http-poll-interval - -Polling interval for latest-block subscription when using an HTTP RPC provider. Ignored for other types of RPC endpoints. The default value is `12s`. - - - `--l1.http-poll-interval=` - `--l1.http-poll-interval=12s` - `OP_NODE_L1_HTTP_POLL_INTERVAL=12s` - - -###### l1.max-concurrency - -Maximum number of concurrent RPC requests to make to the L1 RPC provider. The default value is `10`. - - - `--l1.max-concurrency=` - `--l1.max-concurrency=10` - `OP_NODE_L1_MAX_CONCURRENCY=10` - - -###### l1.rpc-max-batch-size - -Maximum number of RPC requests to bundle, e.g., during L1 blocks receipt fetching. The L1 RPC rate limit counts this as N items, but allows it to burst at once. The default value is `20`. - - - `--l1.rpc-max-batch-size=` - `--l1.rpc-max-batch-size=20` - `OP_NODE_L1_RPC_MAX_BATCH_SIZE=20` - - -###### l1.rpc-rate-limit - -Optional self-imposed global rate-limit on L1 RPC requests, specified in requests / second. Disabled if set to 0. The default value is `0`. - - - `--l1.rpc-rate-limit=` - `--l1.rpc-rate-limit=0` - `OP_NODE_L1_RPC_RATE_LIMIT=0` - - -###### l1.rpckind - -The kind of RPC provider, used to inform optimal transactions receipts fetching, and thus reduce costs. Valid options: alchemy, quicknode, infura, parity, nethermind, debug\_geth, erigon, basic, any, standard. The default value is `standard`. - - - `--l1.rpckind=` - `--l1.rpckind=standard` - `OP_NODE_L1_RPC_KIND=standard` - - - -For details on additional values, see [RPC Receipts](https://github.com/ethereum-optimism/optimism/blob/844cc20084a2e9716631b4092ce7eca4804a8e0a/op-service/sources/receipts_rpc.go#L239-L322). - - -###### l1.runtime-config-reload-interval - -Poll interval for reloading the runtime config, useful when config events are not being picked up. Disabled if 0 or negative. The default value is `10m0s`. - - - `--l1.runtime-config-reload-interval=` - `--l1.runtime-config-reload-interval=10m0s` - `OP_NODE_L1_RUNTIME_CONFIG_RELOAD_INTERVAL=10m0s` - - -###### l1.trustrpc - -Trust the L1 RPC, sync faster at risk of malicious/buggy RPC providing bad or inconsistent L1 data. The default value is `false`. - - - If you're running an Erigon Ethereum execution client for your L1 provider you will need to include `--l1.trustrpc`. At the time of writing, - Erigon doesn't support the `eth_getProof` that we prefer to use to load L1 data for some processing in `op-node`. The trustrpc flag makes it - use something else that erigon supports, but the `op-node` can't verify for correctness. - - - - `--l1.trustrpc=` - `--l1.trustrpc=false` - `OP_NODE_L1_TRUST_RPC=false` - - -###### l2 - -Address of L2 Engine JSON-RPC endpoints to use (engine and eth namespace required). - - - `--l2=` - `--l2=http://127.0.0.1:8751` - `OP_NODE_L2_ENGINE_RPC=http://127.0.0.1:8751` - - -###### l2.jwt-secret - -Path to JWT secret key. Keys are 32 bytes, hex encoded in a file. A new key will be generated if left empty. - - - `--l2.jwt-secret=` - `--l2.jwt-secret=/path/to/jwt/secret` - `OP_NODE_L2_ENGINE_AUTH=/path/to/jwt/secret` - - -###### log.color - -Color the log output if in terminal mode. The default value is `false`. - - - `--log.color=` - `--log.color=false` - `OP_NODE_LOG_COLOR=false` - - -###### log.format - -Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', 'json-pretty'. The default value is `text`. - - - `--log.format=` - `--log.format=text` - `OP_NODE_LOG_FORMAT=text` - - -###### log.level - -The lowest log level that will be output. The default value is `info`. - - - `--log.level=` - `--log.level=info` - `OP_NODE_LOG_LEVEL=info` - - -###### metrics.addr - -Metrics listening address. The default value is `"0.0.0.0"`. - - - `--metrics.addr=` - `--metrics.addr="0.0.0.0"` - `OP_NODE_METRICS_ADDR="0.0.0.0"` - - -###### metrics.enabled - -Enable the metrics server. The default value is `false`. - - - `--metrics.enabled=` - `--metrics.enabled=false` - `OP_NODE_METRICS_ENABLED=false` - - -###### metrics.port - -Metrics listening port. The default value is `7300`. - - - `--metrics.port=` - `--metrics.port=7300` - `OP_NODE_METRICS_PORT=7300` - - -###### network - -Predefined network selection. Available networks: oplabs-devnet-0-sepolia-dev-0, -op-labs-chaosnet-0-goerli-dev-0, zora-mainnet, base-sepolia, pgn-sepolia, -zora-sepolia, base-devnet-0-sepolia-dev-0, base-goerli, -base-devnet-0-goerli-dev-0, conduit-devnet-0-goerli-dev-0, base-mainnet, -pgn-mainnet, op-sepolia, lyra-mainnet, mode-mainnet, op-mainnet, op-goerli, -op-labs-devnet-0-goerli-dev-0, orderly-mainnet. - - - `--network=` - `--network=op-mainnet` - `OP_NODE_NETWORK=op-mainnet` - - -###### override.canyon - -Manually specify the Canyon fork timestamp, overriding the bundled setting. The default value is `0`. - - - `--override.canyon=` - `--override.canyon=0` - `OP_NODE_OVERRIDE_CANYON=0` - - -###### override.delta - -Manually specify the Delta fork timestamp, overriding the bundled setting. The default value is `0`. - - - `--override.delta=` - `--override.delta=0` - `OP_NODE_OVERRIDE_DELTA=0` - - -###### override.ecotone - -Manually specify the ecotone fork timestamp, overriding the bundled setting. The default value is `0`. - - - `--override.ecotone=` - `--override.ecotone=0` - `OP_NODE_OVERRIDE_ECOTONE=0` - - -###### p2p.advertise.ip - -The IP address to advertise in Discv5, put into the ENR of the node. This may also be a hostname/domain name to resolve to an IP. - - - `--p2p.advertise.ip=` - `--p2p.advertise.ip=YourIPAddressOrHostnameHere` - `OP_NODE_P2P_ADVERTISE_IP=YourIPAddressOrHostnameHere` - - -###### p2p.advertise.tcp - -The TCP port to advertise in Discv5, put into the ENR of the node. Set to p2p.listen.tcp value if 0. The default value is `0`. - - - `--p2p.advertise.tcp=` - `--p2p.advertise.tcp=3456` - `OP_NODE_P2P_ADVERTISE_TCP=3456` - - -###### p2p.advertise.udp - -The UDP port to advertise in Discv5 as a fallback if not determined by Discv5, put into the ENR of the node. Set to p2p.listen.udp value if 0. The default value is `0`. - - - `--p2p.advertise.udp=` - `--p2p.advertise.udp=3457` - `OP_NODE_P2P_ADVERTISE_UDP=3457` - - -###### p2p.ban.duration - -The duration that peers are banned for. The default value is `1h0m0s`. - - - `--p2p.ban.duration=` - `--p2p.ban.duration=1h0m0s` - `OP_NODE_P2P_PEER_BANNING_DURATION=1h0m0s` - - -###### p2p.ban.peers - -Enables peer banning. The default value is `true`. - - - `--p2p.ban.peers=` - `--p2p.ban.peers=true` - `OP_NODE_P2P_PEER_BANNING=true` - - -###### p2p.ban.threshold - -The minimum score below which peers are disconnected and banned. The default value is `-100`. - - - `--p2p.ban.threshold=` - `--p2p.ban.threshold=-100` - `OP_NODE_P2P_PEER_BANNING_THRESHOLD=-100` - - -###### p2p.bootnodes - -Comma-separated base64-format ENR list. Bootnodes to start discovering other node records from. - - - `--p2p.bootnodes=` - `--p2p.bootnodes=YourBootnodesListHere` - `OP_NODE_P2P_BOOTNODES=YourBootnodesListHere` - - -###### p2p.disable - -Completely disable the P2P stack. The default value is `false`. - - - `--p2p.disable=` - `--p2p.disable=false` - `OP_NODE_P2P_DISABLE=false` - - -###### p2p.discovery.path - -Enables persistent storage of discovered ENRs in a database to recover from a restart without bootstrapping the discovery process again. Set to 'memory' to never persist the peerstore. The default value is `opnode_discovery_db`. - - - `--p2p.discovery.path=` - `--p2p.discovery.path=opnode_discovery_db` - `OP_NODE_P2P_DISCOVERY_PATH=opnode_discovery_db` - - -###### p2p.listen.ip - -Specifies the IP to bind LibP2P and Discv5 to. The default value is `0.0.0.0`. - - - `--p2p.listen.ip=` - `--p2p.listen.ip=0.0.0.0` - `OP_NODE_P2P_LISTEN_IP=0.0.0.0` - - -###### p2p.listen.tcp - -Defines the TCP port to bind LibP2P to. Any available system port if set to 0. The default value is `9222`. - - - `--p2p.listen.tcp=` - `--p2p.listen.tcp=9222` - `OP_NODE_P2P_LISTEN_TCP_PORT=9222` - - -###### p2p.listen.udp - -Sets the UDP port to bind Discv5 to. It will be the same as the TCP port if left at 0. The default value is `0`. - - - `--p2p.listen.udp=` - `--p2p.listen.udp=0` - `OP_NODE_P2P_LISTEN_UDP_PORT=0` - - -###### p2p.nat - -Enables NAT traversal with PMP/UPNP devices to learn external IP. The default value is `false`. - - - `--p2p.nat=` - `--p2p.nat=false` - `OP_NODE_P2P_NAT=false` - - -###### p2p.netrestrict - -Specifies a comma-separated list of CIDR masks. P2P will only try to connect on these networks. - - - `--p2p.netrestrict=` - `--p2p.netrestrict=` - `OP_NODE_P2P_NETRESTRICT=` - - -###### p2p.no-discovery - -Disables Discv5 (node discovery). The default value is `false`. - - - `--p2p.no-discovery=` - `--p2p.no-discovery=false` - `OP_NODE_P2P_NO_DISCOVERY=false` - - -###### p2p.peers.grace - -Determines the grace period to keep a newly connected peer around, if it is not misbehaving. The default value is `30s`. - - - `--p2p.peers.grace=` - `--p2p.peers.grace=30s` - `OP_NODE_P2P_PEERS_GRACE=30s` - - -###### p2p.peers.hi - -Sets the high-tide peer count. The node starts pruning peer connections slowly after reaching this number. The default value is `30`. - - - `--p2p.peers.hi=` - `--p2p.peers.hi=30` - `OP_NODE_P2P_PEERS_HI=30` - - -###### p2p.peers.lo - -Determines the low-tide peer count. The node actively searches for new peer connections if below this amount. The default value is `20`. - - - `--p2p.peers.lo=` - `--p2p.peers.lo=20` - `OP_NODE_P2P_PEERS_LO=20` - - -###### p2p.peerstore.path - -Specifies the Peerstore database location. Persisted peerstores help recover peers after restarts. Set to 'memory' to never persist the peerstore. Warning: a copy of the priv network key of the local peer will be persisted here. The default value is `"opnode_peerstore_db"`. - - - `--p2p.peerstore.path=` - `--p2p.peerstore.path=opnode_peerstore_db` - `OP_NODE_P2P_PEERSTORE_PATH=opnode_peerstore_db` - - -###### p2p.priv.path - -Defines the file path for reading the hex-encoded 32-byte private key for the peer ID. Created if not already exists. Important for maintaining the same network identity after restarting. The default value is `"opnode_p2p_priv.txt"`. - - - `--p2p.priv.path=` - `--p2p.priv.path=opnode_p2p_priv.txt` - `OP_NODE_P2P_PRIV_PATH=opnode_p2p_priv.txt` - - -###### p2p.scoring - -Sets the peer scoring strategy for the P2P stack. Options include 'none' or 'light'. The default value is `"light"`. - - - `--p2p.scoring=` - `--p2p.scoring=light` - `OP_NODE_P2P_PEER_SCORING=light` - - -###### p2p.sequencer.key - -Hex-encoded private key for signing off on p2p application messages as sequencer. - - - `--p2p.sequencer.key=` - `--p2p.sequencer.key=[YourKeyHere]` - `OP_NODE_P2P_SEQUENCER_KEY=[YourKeyHere]` - - -###### p2p.static - -Comma-separated multiaddr-format(an unsigned address, containing: IP, TCP port, [PeerID](/builders/node-operators/json-rpc#opp2p_self)) peer list. Static connections to make and -maintain, these peers will be regarded as trusted. Addresses of the local peer -are ignored. Duplicate/Alternative addresses for the same peer all apply, but -only a single connection per peer is maintained. - - - `--p2p.static=` - `--p2p.static=/ip4/127.0.0.1/tcp/9222/p2p/16Uiu2HAm2y6DXp6THWHCyquczNUh8gVAm4spo6hjP3Ns1dGRiAdE` - `OP_NODE_P2P_STATIC=/ip4/127.0.0.1/tcp/9222/p2p/16Uiu2HAm2y6DXp6THWHCyquczNUh8gVAm4spo6hjP3Ns1dGRiAdE` - - -###### p2p.sync.req-resp - -Enables P2P req-resp alternative sync method, on both server and client side. Default is `true`. - - - `--p2p.sync.req-resp=[true|false]` - `--p2p.sync.req-resp=true` - `OP_NODE_P2P_SYNC_REQ_RESP=true` - - -###### pprof.addr - -pprof listening address. Default is `"0.0.0.0"`. - - - `--pprof.addr=` - `--pprof.addr=0.0.0.0` - `OP_NODE_PPROF_ADDR=0.0.0.0` - - -###### pprof.enabled - -Enable the pprof server. Default is `false`. - - - `--pprof.enabled=[true|false]` - `--pprof.enabled=false` - `OP_NODE_PPROF_ENABLED=false` - - -###### pprof.path - -pprof file path. If it is a directory, the path is \{dir\}/\{profileType\}.prof - - - `--pprof.path=` - `--pprof.path={dir}/{profileType}.prof` - `OP_NODE_PPROF_PATH={dir}/{profileType}.prof` - - -###### pprof.port - -pprof listening port. Default is `6060`. - - - `--pprof.port=` - `--pprof.port=6060` - `OP_NODE_PPROF_PORT=6060` - - -###### pprof.type - -pprof profile type. One of cpu, heap, goroutine, threadcreate, block, mutex, allocs - - - `--pprof.type=` - `--pprof.type=cpu` - `OP_NODE_PPROF_TYPE=cpu` - - -###### rollup.config - -Rollup chain parameters. - - - `--rollup.config=` - `--rollup.config=[ConfigValueHere]` - `OP_NODE_ROLLUP_CONFIG=[ConfigValueHere]` - - -###### rollup.halt - -Opt-in option to halt on incompatible protocol version requirements of the given level (major/minor/patch/none), as signaled onchain in L1. - - - `--rollup.halt=` - `--rollup.halt=[HaltOptionHere]` - `OP_NODE_ROLLUP_HALT=[HaltOptionHere]` - - -###### rollup.load-protocol-versions - -Load protocol versions from the superchain L1 ProtocolVersions contract (if available), and report in logs and metrics. Default is `false`. - - - `--rollup.load-protocol-versions=[true|false]` - `--rollup.load-protocol-versions=false` - `OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=false` - - -###### rpc.addr - -RPC listening address. Default is `"127.0.0.1"`. - - - `--rpc.addr=` - `--rpc.addr=127.0.0.1` - `OP_NODE_RPC_ADDR=127.0.0.1` - - -###### rpc.admin-state - -File path used to persist state changes made via the admin API so they persist across restarts. Disabled if not set. - - - `--rpc.admin-state=` - `--rpc.admin-state=[FilePathHere]` - `OP_NODE_RPC_ADMIN_STATE=[FilePathHere]` - - -###### rpc.enable-admin - -Enable the admin API (experimental). Default is `false`. - - - `--rpc.enable-admin=[true|false]` - `--rpc.enable-admin=false` - `OP_NODE_RPC_ENABLE_ADMIN=false` - - -###### rpc.port - -RPC listening port. Default is `9545`. - - - `--rpc.port=` - `--rpc.port=9545` - `OP_NODE_RPC_PORT=9545` - - -###### sequencer.enabled - -Enable sequencing of new L2 blocks. A separate batch submitter has to be deployed to publish the data for verifiers. Default is `false`. - - - `--sequencer.enabled=[true|false]` - `--sequencer.enabled=false` - `OP_NODE_SEQUENCER_ENABLED=false` - - -###### sequencer.l1-confs - -Number of L1 blocks to keep distance from the L1 head as a sequencer for picking an L1 origin. Default is `4`. - - - `--sequencer.l1-confs=` - `--sequencer.l1-confs=4` - `OP_NODE_SEQUENCER_L1_CONFS=4` - - -###### sequencer.max-safe-lag - -Maximum number of L2 blocks for restricting the distance between L2 safe and unsafe. Disabled if 0. Default is `0`. - - - `--sequencer.max-safe-lag=` - `--sequencer.max-safe-lag=0` - `OP_NODE_SEQUENCER_MAX_SAFE_LAG=0` - - -###### sequencer.stopped - -Initialize the sequencer in a stopped state. The sequencer can be started using the admin\_startSequencer RPC. Default is `false`. - - - `--sequencer.stopped=[true|false]` - `--sequencer.stopped=false` - `OP_NODE_SEQUENCER_STOPPED=false` - - -###### snapshotlog.file - -Path to the snapshot log file. - - - `--snapshotlog.file=` - `--snapshotlog.file=[FilePathHere]` - `OP_NODE_SNAPSHOT_LOG=[FilePathHere]` - - -###### verifier.l1-confs - -Number of L1 blocks to keep distance from the L1 head before deriving L2 data from. Reorgs are supported, but may be slow to perform. Default is `0`. - - - `--verifier.l1-confs=` - `--verifier.l1-confs=0` - `OP_NODE_VERIFIER_L1_CONFS=0` - - -#### MISC - -###### --help, -h - -Show help. The default value is `false`. - - - `--help` OR `-h` - `--help` - - -###### --version, -v - - - Nodes built from source do not output the correct version numbers that are reported on - the GitHub release page. - - -Print the version. The default value is `false`. - - - `--version` OR `-v` - `--version` - - -### `op-geth` - -`op-geth` implements the Execution-Layer, with minimal changes for a secure Ethereum-equivalent application environment. +This page list additional configuration options for `op-geth`. `op-geth` implements the Execution-Layer, with minimal changes for a secure Ethereum-equivalent application environment. The following are options from [v1.101308.0](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101308.0) Please note that the executable is still named `geth` to maintain a [minimal diff](https://op-geth.optimism.io/). -#### GLOBAL OPTIONS +## Global Options -##### ACCOUNT +### Account -###### allow-insecure-unlock +#### allow-insecure-unlock Allows insecure account unlocking when account-related RPCs are exposed by HTTP. The default value is `false`. @@ -1012,7 +33,7 @@ Allows insecure account unlocking when account-related RPCs are exposed by HTTP. `GETH_ALLOW_INSECURE_UNLOCK=false` -###### keystore +#### keystore Directory for the keystore. The default is inside the data directory. @@ -1022,7 +43,7 @@ Directory for the keystore. The default is inside the data directory. `GETH_KEYSTORE=/path/to/keystore` -###### lightkdf +#### lightkdf Reduce key-derivation RAM & CPU usage at some expense of KDF strength. The default value is `false`. @@ -1032,7 +53,7 @@ Reduce key-derivation RAM & CPU usage at some expense of KDF strength. The defau `GETH_LIGHTKDF=false` -###### password +#### password Password file to use for non-interactive password input. @@ -1042,7 +63,7 @@ Password file to use for non-interactive password input. `GETH_PASSWORD=/path/to/passwordfile` -###### pcscdpath +#### pcscdpath Path to the smartcard daemon (pcscd) socket file. The default value is `"/run/pcscd/pcscd.comm"`. @@ -1052,7 +73,7 @@ Path to the smartcard daemon (pcscd) socket file. The default value is `"/run/pc `GETH_PCSCDPATH=/custom/path/to/pcscd.comm` -###### signer +#### signer External signer (url or path to ipc file). @@ -1062,7 +83,7 @@ External signer (url or path to ipc file). `GETH_SIGNER=/path/to/ipcfile` -###### unlock +#### unlock Comma separated list of accounts to unlock. @@ -1072,7 +93,7 @@ Comma separated list of accounts to unlock. `GETH_UNLOCK=0x1234,0x5678` -###### usb +#### usb Enable monitoring and management of USB hardware wallets. The default value is `false`. @@ -1082,9 +103,9 @@ Enable monitoring and management of USB hardware wallets. The default value is ` `GETH_USB=false` -##### API AND CONSOLE +### API and Console -###### authrpc.addr +#### authrpc.addr Listening address for authenticated APIs. The default value is `"localhost"`. @@ -1094,7 +115,7 @@ Listening address for authenticated APIs. The default value is `"localhost"`. `GETH_AUTHRPC_ADDR="localhost"` -###### authrpc.jwtsecret +#### authrpc.jwtsecret Path to a JWT secret to use for authenticated RPC endpoints. @@ -1104,7 +125,7 @@ Path to a JWT secret to use for authenticated RPC endpoints. `GETH_AUTHRPC_JWTSECRET=/path/to/jwtsecret` -###### authrpc.port +#### authrpc.port Listening port for authenticated APIs. The default value is `8551`. @@ -1114,7 +135,7 @@ Listening port for authenticated APIs. The default value is `8551`. `GETH_AUTHRPC_PORT=8551` -###### authrpc.vhosts +#### authrpc.vhosts Comma separated list of virtual hostnames from which to accept requests (server enforced). The default value is `"localhost"`. Accepts '\*' wildcard. @@ -1125,7 +146,7 @@ The default value is `"localhost"`. Accepts '\*' wildcard. `GETH_AUTHRPC_VHOSTS="localhost"` -###### exec +#### exec Execute JavaScript statement. @@ -1135,7 +156,7 @@ Execute JavaScript statement. `GETH_EXEC="console.log('Hello, World!')"` -###### graphql +#### graphql Enable GraphQL on the HTTP-RPC server. Note that GraphQL can only be started if an HTTP server is started as well. The default value is `false`. @@ -1146,7 +167,7 @@ is started as well. The default value is `false`. `GETH_GRAPHQL=false` -###### graphql.corsdomain +#### graphql.corsdomain Comma separated list of domains from which to accept cross origin requests (browser enforced). @@ -1156,7 +177,7 @@ Comma separated list of domains from which to accept cross origin requests (brow `GETH_GRAPHQL_CORSDOMAIN="http://example.com"` -###### graphql.vhosts +#### graphql.vhosts Comma separated list of virtual hostnames from which to accept requests (server enforced). The default value is `"localhost"`. Accepts '\*' wildcard. @@ -1166,7 +187,7 @@ Comma separated list of virtual hostnames from which to accept requests (server `GETH_GRAPHQL_VHOSTS="localhost"` -###### header +#### header Pass custom headers to the RPC server when using `--remotedb` or the geth attach console. This flag can be given multiple times. @@ -1176,7 +197,7 @@ Pass custom headers to the RPC server when using `--remotedb` or the geth attach Not applicable for environment variables -###### http +#### http Enable the HTTP-RPC server. The default value is `false`. @@ -1186,7 +207,7 @@ Enable the HTTP-RPC server. The default value is `false`. `GETH_HTTP=false` -###### http.addr +#### http.addr HTTP-RPC server listening interface. The default value is `"localhost"`. @@ -1196,7 +217,7 @@ HTTP-RPC server listening interface. The default value is `"localhost"`. `GETH_HTTP_ADDR="localhost"` -###### http.api +#### http.api API's offered over the HTTP-RPC interface. @@ -1206,7 +227,7 @@ API's offered over the HTTP-RPC interface. `GETH_HTTP_API="eth,web3"` -###### http.corsdomain +#### http.corsdomain Comma separated list of domains from which to accept cross origin requests (browser enforced). @@ -1216,7 +237,7 @@ Comma separated list of domains from which to accept cross origin requests (brow `GETH_HTTP_CORSDOMAIN="http://example.com"` -###### http.port +#### http.port HTTP-RPC server listening port. The default value is `8545`. @@ -1226,7 +247,7 @@ HTTP-RPC server listening port. The default value is `8545`. `GETH_HTTP_PORT=8545` -###### http.rpcprefix`\ +#### http.rpcprefix`\ HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths. @@ -1236,7 +257,7 @@ HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths. `GETH_HTTP_RPCPREFIX="/"` -###### http.vhosts +#### http.vhosts Comma separated list of virtual hostnames from which to accept requests (server enforced). The default value is `"localhost"`. Accepts '\*' wildcard. @@ -1246,7 +267,7 @@ Comma separated list of virtual hostnames from which to accept requests (server `GETH_HTTP_VHOSTS=localhost` -###### ipcdisable +#### ipcdisable Disable the IPC-RPC server. The default value is `false`. @@ -1256,7 +277,7 @@ Disable the IPC-RPC server. The default value is `false`. `GETH_IPCDISABLE=false` -###### ipcpath +#### ipcpath Filename for IPC socket/pipe within the datadir (explicit paths escape it). @@ -1266,7 +287,7 @@ Filename for IPC socket/pipe within the datadir (explicit paths escape it). `GETH_IPCPATH=/path/to/ipcfile` -###### jspath +#### jspath JavaScript root path for `loadScript`. The default value is `.` (current directory). @@ -1276,7 +297,7 @@ JavaScript root path for `loadScript`. The default value is `.` (current directo `GETH_JSPATH=/path/to/scripts` -###### preload +#### preload Comma separated list of JavaScript files to preload into the console. @@ -1286,7 +307,7 @@ Comma separated list of JavaScript files to preload into the console. `GETH_PRELOAD="file1.js,file2.js"` -###### rpc.allow-unprotected-txs +#### rpc.allow-unprotected-txs Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC. The default value is `false`. @@ -1296,7 +317,7 @@ Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC. `GETH_RPC_ALLOW_UNPROTECTED_TXS=false` -###### rpc.batch-request-limit +#### rpc.batch-request-limit Maximum number of requests in a batch. The default value is `1000`. @@ -1306,7 +327,7 @@ Maximum number of requests in a batch. The default value is `1000`. `GETH_RPC_BATCH_REQUEST_LIMIT=1000` -###### rpc.batch-response-max-size +#### rpc.batch-response-max-size Maximum number of bytes returned from a batched call. The default value is `25000000`. @@ -1316,7 +337,7 @@ Maximum number of bytes returned from a batched call. The default value is `2500 `GETH_RPC_BATCH_RESPONSE_MAX_SIZE=25000000` -###### rpc.enabledeprecatedpersonal +#### rpc.enabledeprecatedpersonal Enables the (deprecated) personal namespace. The default value is `false`. @@ -1326,7 +347,7 @@ Enables the (deprecated) personal namespace. The default value is `false`. `GETH_RPC_ENABLEDEPRECATEDPERSONAL=false` -###### rpc.evmtimeout +#### rpc.evmtimeout Sets a timeout used for eth\_call (0=infinite). The default value is `5s`. @@ -1336,7 +357,7 @@ Sets a timeout used for eth\_call (0=infinite). The default value is `5s`. `GETH_RPC_EVMTIMEOUT=5s` -###### rpc.gascap +#### rpc.gascap Sets a cap on gas that can be used in eth\_call/estimateGas (0=infinite). The default value is `50000000`. @@ -1346,7 +367,7 @@ Sets a cap on gas that can be used in eth\_call/estimateGas (0=infinite). The de `GETH_RPC_GASCAP=50000000` -###### rpc.txfeecap +#### rpc.txfeecap Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap). The default value is `1`. @@ -1356,7 +377,7 @@ Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = Not directly applicable for environment variables -###### ws +#### ws Enable the WS-RPC server. The default value is `false`. @@ -1366,7 +387,7 @@ Enable the WS-RPC server. The default value is `false`. `GETH_WS=false` -###### ws.addr +#### ws.addr WS-RPC server listening interface. The default value is `"localhost"`. @@ -1376,7 +397,7 @@ WS-RPC server listening interface. The default value is `"localhost"`. `GETH_WS_ADDR=localhost` -###### ws.api +#### ws.api API's offered over the WS-RPC interface. @@ -1386,7 +407,7 @@ API's offered over the WS-RPC interface. `GETH_WS_API="eth,web3"` -###### ws.origins +#### ws.origins Origins from which to accept websockets requests. @@ -1396,7 +417,7 @@ Origins from which to accept websockets requests. `GETH_WS_ORIGINS="http://example.com"` -###### ws.port +#### ws.port WS-RPC server listening port. The default value is `8546`. @@ -1406,7 +427,7 @@ WS-RPC server listening port. The default value is `8546`. `GETH_WS_PORT=8546` -###### ws.rpcprefix +#### ws.rpcprefix HTTP path prefix on which JSON-RPC is served over WS. Use '/' to serve on all paths. @@ -1416,9 +437,9 @@ HTTP path prefix on which JSON-RPC is served over WS. Use '/' to serve on all pa `GETH_WS_RPCPREFIX="/"` -##### DEVELOPER CHAIN +### Developer Chain -###### dev +#### dev Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled. The default value is `false`. @@ -1429,7 +450,7 @@ The default value is `false`. `GETH_DEV=false` -###### dev.gaslimit +#### dev.gaslimit Initial block gas limit. The default value is `11500000`. @@ -1439,7 +460,7 @@ Initial block gas limit. The default value is `11500000`. `GETH_DEV_GASLIMIT=11500000` -###### dev.period +#### dev.period Block period to use in developer mode (0 = mine only if transaction pending). The default value is `0`. @@ -1449,9 +470,9 @@ Block period to use in developer mode (0 = mine only if transaction pending). Th `GETH_DEV_PERIOD=0` -##### ETHEREUM +### Ethereum -###### bloomfilter.size +#### bloomfilter.size Megabytes of memory allocated to bloom-filter for pruning. The default value is `2048`. @@ -1461,7 +482,7 @@ Megabytes of memory allocated to bloom-filter for pruning. The default value is `GETH_BLOOMFILTER_SIZE=2048` -###### config +#### config TOML configuration file. @@ -1471,7 +492,7 @@ TOML configuration file. `GETH_CONFIG=/path/to/config.toml` -###### datadir +#### datadir Data directory for the databases and keystore. The default value is `/home//.ethereum`. @@ -1481,7 +502,7 @@ Data directory for the databases and keystore. The default value is `/home/`GETH_DATADIR=/home/soyboy/.ethereum` -###### datadir.ancient +#### datadir.ancient Root directory for ancient data (default = inside chaindata). @@ -1491,7 +512,7 @@ Root directory for ancient data (default = inside chaindata). `GETH_DATADIR_ANCIENT=` -###### datadir.minfreedisk +#### datadir.minfreedisk Minimum free disk space in MB, once reached triggers auto shut down (default = --cache.gc converted to MB, 0 = disabled). @@ -1501,7 +522,7 @@ Minimum free disk space in MB, once reached triggers auto shut down (default = - `GETH_DATADIR_MINFREEDISK=0` -###### db.engine +#### db.engine Backing database implementation to use ('pebble' or 'leveldb'). @@ -1511,7 +532,7 @@ Backing database implementation to use ('pebble' or 'leveldb'). `GETH_DB_ENGINE=leveldb` -###### eth.requiredblocks +#### eth.requiredblocks Comma separated block number-to-hash mappings to require for peering (`=`). @@ -1521,7 +542,7 @@ Comma separated block number-to-hash mappings to require for peering (`= `GETH_ETH_REQUIREDBLOCKS="12345=0xabcde12345..."` -###### exitwhensynced +#### exitwhensynced Exits after block synchronization completes. The default value is `false`. @@ -1531,7 +552,7 @@ Exits after block synchronization completes. The default value is `false`. `GETH_EXITWHENSYNCED=false` -###### goerli +#### goerli Görli network: pre-configured proof-of-authority test network. The default value is `false`. @@ -1541,7 +562,7 @@ Görli network: pre-configured proof-of-authority test network. The default valu `GETH_GOERLI=false` -###### holesky +#### holesky Holesky network: pre-configured proof-of-stake test network. The default value is `false`. @@ -1551,7 +572,7 @@ Holesky network: pre-configured proof-of-stake test network. The default value i `GETH_HOLESKY=false` -###### mainnet +#### mainnet Ethereum mainnet. The default value is `false`. @@ -1561,7 +582,7 @@ Ethereum mainnet. The default value is `false`. `GETH_MAINNET=false` -###### networkid +#### networkid Explicitly set network id (integer). The default value is `1`. For testnets: use --goerli, --sepolia, --holesky instead. @@ -1571,7 +592,7 @@ Explicitly set network id (integer). The default value is `1`. For testnets: use `GETH_NETWORKID=1` -###### op-network, beta.op-network +#### op-network, beta.op-network Select a pre-configured OP-Stack network (warning: op-mainnet and op-goerli require special sync, datadir is recommended), options: @@ -1588,7 +609,7 @@ zora-mainnet, zora-sepolia `GETH_OP_NETWORK=base-mainnet` -###### override.cancun +#### override.cancun Manually specify the Cancun fork timestamp, overriding the bundled setting. The default value is `0`. @@ -1598,7 +619,7 @@ Manually specify the Cancun fork timestamp, overriding the bundled setting. The `GETH_OVERRIDE_CANCUN=0` -###### override.canyon +#### override.canyon Manually specify the Optimism Canyon fork timestamp, overriding the bundled setting. The default value is `0`. @@ -1608,7 +629,7 @@ Manually specify the Optimism Canyon fork timestamp, overriding the bundled sett `GETH_OVERRIDE_CANYON=0` -###### override.ecotone +#### override.ecotone Manually specify the Optimism Ecotone fork timestamp, overriding the bundled setting. The default value is `0`. @@ -1618,7 +639,7 @@ Manually specify the Optimism Ecotone fork timestamp, overriding the bundled set `GETH_OVERRIDE_ECOTONE=0` -###### `override.interop` +#### `override.interop` Manually specify the Optimism Interop feature-set fork timestamp, overriding the bundled setting. The default value is `0`. @@ -1629,7 +650,7 @@ The default value is `0`. `GETH_OVERRIDE_INTEROP=0` -###### override.verkle +#### override.verkle Manually specify the Verkle fork timestamp, overriding the bundled setting. The default value is `0`. @@ -1639,7 +660,7 @@ Manually specify the Verkle fork timestamp, overriding the bundled setting. The `GETH_OVERRIDE_VERKLE=0` -###### sepolia +#### sepolia Sepolia network: pre-configured proof-of-work test network. The default value is `false`. @@ -1649,7 +670,7 @@ Sepolia network: pre-configured proof-of-work test network. The default value is `GETH_SEPOLIA=false` -###### `snapshot` +#### `snapshot` Enables snapshot-database mode. The default value is `true`. @@ -1659,9 +680,9 @@ Enables snapshot-database mode. The default value is `true`. `GETH_SNAPSHOT=true` -##### GAS PRICE ORACLE +### Gas Price Oracle -###### gpo.blocks +#### gpo.blocks Number of recent blocks to check for gas prices. The default value is `20`. @@ -1671,7 +692,7 @@ Number of recent blocks to check for gas prices. The default value is `20`. `GETH_GPO_BLOCKS=20` -###### gpo.ignoreprice +#### gpo.ignoreprice Gas price below which GPO will ignore transactions. The default value is `2`. @@ -1681,7 +702,7 @@ Gas price below which GPO will ignore transactions. The default value is `2`. `GETH_GPO_IGNOREPRICE=2` -###### gpo.maxprice +#### gpo.maxprice Maximum transaction priority fee (or gasprice before London fork) to be recommended by GPO. The default value is `500000000000`. @@ -1692,7 +713,7 @@ The default value is `500000000000`. `GETH_GPO_MAXPRICE=500000000000` -###### gpo.minsuggestedpriorityfee +#### gpo.minsuggestedpriorityfee Minimum transaction priority fee to suggest. Used on OP chains when blocks are not full. The default value is `1000000`. @@ -1703,7 +724,7 @@ The default value is `1000000`. `GETH_GPO_MINSUGGESTEDPRIORITYFEE=1000000` -###### gpo.percentile +#### gpo.percentile Suggested gas price is the given percentile of a set of recent transaction gas prices. The default value is `60`. @@ -1713,9 +734,9 @@ Suggested gas price is the given percentile of a set of recent transaction gas p `GETH_GPO_PERCENTILE=60` -##### LIGHT CLIENT +### Light Client -###### light.egress +#### light.egress Outgoing bandwidth limit for serving light clients (deprecated). The default value is `0`. @@ -1725,7 +746,7 @@ Outgoing bandwidth limit for serving light clients (deprecated). The default val `GETH_LIGHT_EGRESS=0` -###### light.ingress +#### light.ingress Incoming bandwidth limit for serving light clients (deprecated). The default value is `0`. @@ -1735,7 +756,7 @@ Incoming bandwidth limit for serving light clients (deprecated). The default val `GETH_LIGHT_INGRESS=0` -###### light.maxpeers +#### light.maxpeers Maximum number of light clients to serve, or light servers to attach to (deprecated). The default value is `100`. @@ -1746,7 +767,7 @@ The default value is `100`. `GETH_LIGHT_MAXPEERS=100` -###### light.nopruning +#### light.nopruning Disable ancient light chain data pruning (deprecated). The default value is `false`. @@ -1756,7 +777,7 @@ Disable ancient light chain data pruning (deprecated). The default value is `fal `GETH_LIGHT_NOPRUNING=false` -###### light.nosyncserve +#### light.nosyncserve Enables serving light clients before syncing (deprecated) The default value is `false`. @@ -1766,7 +787,7 @@ Enables serving light clients before syncing (deprecated) The default value is ` `GETH_LIGHT_NOSYNCSERVE=false` -###### light.serve +#### light.serve Maximum percentage of time allowed for serving LES requests (deprecated). The default value is `0`. @@ -1777,9 +798,9 @@ The default value is `0`. `GETH_LIGHT_SERVE=0` -##### LOGGING AND DEBUGGING +### Logging and Debugging -###### log.compress +#### log.compress Compress the log files. The default value is `false`. @@ -1789,7 +810,7 @@ Compress the log files. The default value is `false`. `GETH_LOG_COMPRESS=false` -###### log.file +#### log.file Write logs to a file. @@ -1799,7 +820,7 @@ Write logs to a file. `GETH_LOG_FILE=/path/to/logfile` -###### log.format +#### log.format Log format to use (json|logfmt|terminal). @@ -1809,7 +830,7 @@ Log format to use (json|logfmt|terminal). `GETH_LOG_FORMAT=logfmt` -###### log.maxage +#### log.maxage Maximum number of days to retain a log file. The default value is `30`. @@ -1819,7 +840,7 @@ Maximum number of days to retain a log file. The default value is `30`. `GETH_LOG_MAXAGE=30` -###### log.maxbackups +#### log.maxbackups Maximum number of log files to retain. The default value is `10`. @@ -1829,7 +850,7 @@ Maximum number of log files to retain. The default value is `10`. `GETH_LOG_MAXBACKUPS=10` -###### log.maxsize +#### log.maxsize Maximum size in MBs of a single log file. The default value is `100`. @@ -1839,7 +860,7 @@ Maximum size in MBs of a single log file. The default value is `100`. `GETH_LOG_MAXSIZE=100` -###### `log.rotate` +#### `log.rotate` Enables log file rotation. The default value is `false`. @@ -1849,7 +870,7 @@ Enables log file rotation. The default value is `false`. `GETH_LOG_ROTATE=false` -###### log.vmodule +#### log.vmodule Per-module verbosity: comma-separated list of `=` (e.g. eth/\*=5,p2p=4). @@ -1859,7 +880,7 @@ Per-module verbosity: comma-separated list of `=` (e.g. eth/\*=5 `GETH_LOG_VMODULE="eth/*=5,p2p=4"` -###### nocompaction +#### nocompaction Disables database compaction after import. The default value is `false`. @@ -1869,7 +890,7 @@ Disables database compaction after import. The default value is `false`. `GETH_NOCOMPACTION=false` -###### pprof +#### pprof Enable the pprof HTTP server. The default value is `false`. @@ -1879,7 +900,7 @@ Enable the pprof HTTP server. The default value is `false`. `GETH_PPROF=false` -###### pprof.addr +#### pprof.addr pprof HTTP server listening interface. The default value is `"127.0.0.1"`. @@ -1889,7 +910,7 @@ pprof HTTP server listening interface. The default value is `"127.0.0.1"`. `GETH_PPROF_ADDR="127.0.0.1"` -###### pprof.blockprofilerate +#### pprof.blockprofilerate Turn on block profiling with the given rate. The default value is `0`. @@ -1899,7 +920,7 @@ Turn on block profiling with the given rate. The default value is `0`. `GETH_PPROF_BLOCKPROFILERATE=0` -###### pprof.cpuprofile +#### pprof.cpuprofile Write CPU profile to the given file. @@ -1908,7 +929,7 @@ Write CPU profile to the given file. `--pprof.cpuprofile=/path/to/cpu.profile` -###### pprof.memprofilerate +#### pprof.memprofilerate Turn on memory profiling with the given rate. The default value is `524288`. @@ -1918,7 +939,7 @@ Turn on memory profiling with the given rate. The default value is `524288`. `GETH_PPROF_MEMPROFILERATE=524288` -###### pprof.port +#### pprof.port pprof HTTP server listening port. The default value is `6060`. @@ -1928,7 +949,7 @@ pprof HTTP server listening port. The default value is `6060`. `GETH_PPROF_PORT=6060` -###### remotedb +#### remotedb URL for remote database. @@ -1938,7 +959,7 @@ URL for remote database. `GETH_REMOTEDB=http://example.com/db` -###### trace +#### trace Write execution trace to the given file. @@ -1948,7 +969,7 @@ Write execution trace to the given file. `GETH_TRACE=/path/to/trace.file` -###### verbosity +#### verbosity Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail. The default value is `3`. @@ -1958,9 +979,9 @@ Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail. The def `GETH_VERBOSITY=3` -##### METRICS AND STATS +### Metrics and Stats -###### ethstats +#### ethstats Reporting URL of an ethstats service (nodename:secret\@host:port). @@ -1970,7 +991,7 @@ Reporting URL of an ethstats service (nodename:secret\@host:port). `GETH_ETHSTATS="nodename:secret@host:port"` -###### metrics +#### metrics Enable metrics collection and reporting. The default value is `false`. @@ -1980,7 +1001,7 @@ Enable metrics collection and reporting. The default value is `false`. `GETH_METRICS=false` -###### metrics.addr +#### metrics.addr Enable stand-alone metrics HTTP server listening interface. @@ -1990,7 +1011,7 @@ Enable stand-alone metrics HTTP server listening interface. `GETH_METRICS_ADDR="127.0.0.1:9090"` -###### metrics.expensive +#### metrics.expensive Enable expensive metrics collection and reporting. The default value is `false`. @@ -2000,7 +1021,7 @@ Enable expensive metrics collection and reporting. The default value is `false`. `GETH_METRICS_EXPENSIVE=false` -###### metrics.influxdb +#### metrics.influxdb Enable metrics export/push to an external InfluxDB database. The default value is `false`. @@ -2010,7 +1031,7 @@ Enable metrics export/push to an external InfluxDB database. The default value i `GETH_METRICS_INFLUXDB=false` -###### metrics.influxdb.bucket +#### metrics.influxdb.bucket InfluxDB bucket name to push reported metrics to (v2 only). The default value is `"geth"`. @@ -2020,7 +1041,7 @@ InfluxDB bucket name to push reported metrics to (v2 only). The default value is `GETH_METRICS_INFLUXDB_BUCKET="geth"` -###### metrics.influxdb.database +#### metrics.influxdb.database InfluxDB database name to push reported metrics to. The default value is `"geth"`. @@ -2030,7 +1051,7 @@ InfluxDB database name to push reported metrics to. The default value is `"geth" `GETH_METRICS_INFLUXDB_DATABASE="geth"` -###### metrics.influxdb.endpoint +#### metrics.influxdb.endpoint InfluxDB API endpoint to report metrics to. The default value is `"http://localhost:8086"`. @@ -2040,7 +1061,7 @@ InfluxDB API endpoint to report metrics to. The default value is `"http://localh `GETH_METRICS_INFLUXDB_ENDPOINT="http://localhost:8086"` -###### metrics.influxdb.organization +#### metrics.influxdb.organization InfluxDB organization name (v2 only). The default value is `"geth"`. @@ -2050,7 +1071,7 @@ InfluxDB organization name (v2 only). The default value is `"geth"`. `GETH_METRICS_INFLUXDB_ORGANIZATION="geth"` -###### metrics.influxdb.password +#### metrics.influxdb.password Password to authorize access to the database. The default value is `"test"`. @@ -2060,7 +1081,7 @@ Password to authorize access to the database. The default value is `"test"`. `GETH_METRICS_INFLUXDB_PASSWORD="test"` -###### metrics.influxdb.tags +#### metrics.influxdb.tags Comma-separated InfluxDB tags (key/values) attached to all measurements. The default value is `"host=localhost"`. @@ -2070,7 +1091,7 @@ Comma-separated InfluxDB tags (key/values) attached to all measurements. The def `GETH_METRICS_INFLUXDB_TAGS="host=localhost"` -###### metrics.influxdb.token +#### metrics.influxdb.token Token to authorize access to the database (v2 only). The default value is `"test"`. @@ -2080,7 +1101,7 @@ Token to authorize access to the database (v2 only). The default value is `"test `GETH_METRICS_INFLUXDB_TOKEN="test"` -###### metrics.influxdb.username +#### metrics.influxdb.username Username to authorize access to the database. The default value is `"test"`. @@ -2090,7 +1111,7 @@ Username to authorize access to the database. The default value is `"test"`. `GETH_METRICS_INFLUXDB_USERNAME="test"` -###### metrics.influxdbv2 +#### metrics.influxdbv2 Enable metrics export/push to an external InfluxDB v2 database. The default value is `false`. @@ -2100,7 +1121,7 @@ Enable metrics export/push to an external InfluxDB v2 database. The default valu `GETH_METRICS_INFLUXDBV2=false` -###### metrics.port +#### metrics.port Metrics HTTP server listening port. The default value is `6060`. Please note that `--metrics.addr` must be set to start the server. @@ -2111,9 +1132,9 @@ Please note that `--metrics.addr` must be set to start the server. `GETH_METRICS_PORT=6060` -##### MINER +### Miner -###### mine +#### mine Enable mining. The default value is `false`. @@ -2123,7 +1144,7 @@ Enable mining. The default value is `false`. `GETH_MINE=false` -###### miner.etherbase +#### miner.etherbase 0x prefixed public address for block mining rewards. @@ -2133,7 +1154,7 @@ Enable mining. The default value is `false`. `GETH_MINER_ETHERBASE=0x123...` -###### miner.extradata +#### miner.extradata Block extra data set by the miner (default = client version). @@ -2143,7 +1164,7 @@ Block extra data set by the miner (default = client version). `GETH_MINER_EXTRADATA="Some extra data"` -###### miner.gaslimit +#### miner.gaslimit Target gas ceiling for mined blocks. The default value is `30000000`. @@ -2153,7 +1174,7 @@ Target gas ceiling for mined blocks. The default value is `30000000`. `GETH_MINER_GASLIMIT=30000000` -###### miner.gasprice +#### miner.gasprice Minimum gas price for mining a transaction. The default value is `0`. @@ -2163,7 +1184,7 @@ Minimum gas price for mining a transaction. The default value is `0`. `GETH_MINER_GASPRICE=0` -###### miner.newpayload-timeout +#### miner.newpayload-timeout Specify the maximum time allowance for creating a new payload. The default value is `2s`. @@ -2173,7 +1194,7 @@ Specify the maximum time allowance for creating a new payload. The default value `GETH_MINER_NEWPAYLOAD_TIMEOUT=2s` -###### miner.recommit +#### miner.recommit Time interval to recreate the block being mined. The default value is `2s`. @@ -2183,9 +1204,9 @@ Time interval to recreate the block being mined. The default value is `2s`. `GETH_MINER_RECOMMIT=2s` -##### MISC +### Miscellaneous -###### help +#### help Show help. This is typically used to display command-line options and usage information. @@ -2194,7 +1215,7 @@ Show help. This is typically used to display command-line options and usage info `--help` -###### synctarget +#### synctarget Hash of the block to full sync to (dev testing feature). @@ -2204,7 +1225,7 @@ Hash of the block to full sync to (dev testing feature). `GETH_SYNCTARGET="0x123...456"` -###### version +#### version Nodes built from source do not output the correct version numbers that are reported on @@ -2218,9 +1239,9 @@ Print the version. This option is typically used to display the version of the s `--version` -##### NETWORKING +### Networking -###### bootnodes +#### bootnodes Comma separated enode URLs for P2P discovery bootstrap. @@ -2230,7 +1251,7 @@ Comma separated enode URLs for P2P discovery bootstrap. `GETH_BOOTNODES=` -###### discovery.dns +#### discovery.dns Sets DNS discovery entry points (use "" to disable DNS). @@ -2240,7 +1261,7 @@ Sets DNS discovery entry points (use "" to disable DNS). `GETH_DISCOVERY_DNS=""` -###### discovery.port +#### discovery.port Use a custom UDP port for P2P discovery. The default value is `30303`. @@ -2250,7 +1271,7 @@ Use a custom UDP port for P2P discovery. The default value is `30303`. `GETH_DISCOVERY_PORT=30303` -###### discovery.v4 +#### discovery.v4 Enables the V4 discovery mechanism. The default value is `true`. @@ -2260,7 +1281,7 @@ Enables the V4 discovery mechanism. The default value is `true`. `GETH_DISCOVERY_V4=true` -###### discovery.v5 +#### discovery.v5 Enables the experimental RLPx V5 (Topic Discovery) mechanism. The default value is `false`. @@ -2270,7 +1291,7 @@ Enables the experimental RLPx V5 (Topic Discovery) mechanism. The default value `GETH_DISCOVERY_V5=false` -###### identity +#### identity Custom node name. @@ -2280,7 +1301,7 @@ Custom node name. `GETH_IDENTITY="MyNode"` -###### maxpeers +#### maxpeers Maximum number of network peers (network disabled if set to 0). The default value is `50`. @@ -2290,7 +1311,7 @@ Maximum number of network peers (network disabled if set to 0). The default valu `GETH_MAXPEERS=50` -###### maxpendpeers +#### maxpendpeers Maximum number of pending connection attempts (defaults used if set to 0). The default value is `0`. @@ -2300,7 +1321,7 @@ Maximum number of pending connection attempts (defaults used if set to 0). The d `GETH_MAXPENDPEERS=0` -###### nat +#### nat NAT port mapping mechanism (any|none|upnp|pmp|pmp:`|extip:`). The default value is `"any"`. @@ -2310,7 +1331,7 @@ NAT port mapping mechanism (any|none|upnp|pmp|pmp:`|extip:`). The defaul `GETH_NAT="any"` -###### netrestrict +#### netrestrict Restricts network communication to the given IP networks (CIDR masks). @@ -2320,7 +1341,7 @@ Restricts network communication to the given IP networks (CIDR masks). `GETH_NETRESTRICT="192.168.0.0/24"` -###### nodekey +#### nodekey P2P node key file. @@ -2330,7 +1351,7 @@ P2P node key file. `GETH_NODEKEY=/path/to/nodekey` -###### nodekeyhex +#### nodekeyhex P2P node key as hex (for testing). @@ -2340,7 +1361,7 @@ P2P node key as hex (for testing). `GETH_NODEKEYHEX="abcdef..."` -###### nodiscover +#### nodiscover Disables the peer discovery mechanism (manual peer addition). The default value is `false`. @@ -2350,7 +1371,7 @@ Disables the peer discovery mechanism (manual peer addition). The default value `GETH_NODISCOVER=false` -###### port +#### port Network listening port. The default value is `30303`. @@ -2360,9 +1381,9 @@ Network listening port. The default value is `30303`. `GETH_PORT=30303` -##### PERFORMANCE TUNING +### Performance Tuning -###### `cache` +#### `cache` Megabytes of memory allocated to internal caching. The default is `4096` MB for mainnet full node and `128` MB for light mode. @@ -2373,7 +1394,7 @@ The default is `4096` MB for mainnet full node and `128` MB for light mode. `GETH_CACHE=1024` -###### cache.blocklogs +#### cache.blocklogs Size (in number of blocks) of the log cache for filtering. The default value is `32`. @@ -2383,7 +1404,7 @@ Size (in number of blocks) of the log cache for filtering. The default value is `GETH_CACHE_BLOCKLOGS=32` -###### cache.database +#### cache.database Percentage of cache memory allowance to use for database I/O. The default value is `50`. @@ -2393,7 +1414,7 @@ Percentage of cache memory allowance to use for database I/O. The default value `GETH_CACHE_DATABASE=50` -###### cache.gc +#### cache.gc Percentage of cache memory allowance to use for trie pruning. The default is `25%` for full mode and `0%` for archive mode. @@ -2404,7 +1425,7 @@ and `0%` for archive mode. `GETH_CACHE_GC=25` -###### cache.noprefetch +#### cache.noprefetch Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data). The default value is `false`. @@ -2415,7 +1436,7 @@ time waiting for data). The default value is `false`. `GETH_CACHE_NOPREFETCH=false` -###### cache.preimages +#### cache.preimages Enable recording the SHA3/keccak preimages of trie keys. The default value is `false`. @@ -2425,7 +1446,7 @@ Enable recording the SHA3/keccak preimages of trie keys. The default value is `f `GETH_CACHE_PREIMAGES=false` -###### cache.snapshot +#### cache.snapshot Percentage of cache memory allowance to use for snapshot caching. The default is `10%` for full mode and `20%` for archive mode. @@ -2436,7 +1457,7 @@ The default is `10%` for full mode and `20%` for archive mode. `GETH_CACHE_SNAPSHOT=10` -###### cache.trie +#### cache.trie Percentage of cache memory allowance to use for trie caching. The default is `15%` for full mode and `30%` for archive mode. @@ -2447,7 +1468,7 @@ The default is `15%` for full mode and `30%` for archive mode. `GETH_CACHE_TRIE=15%` -###### crypto.kzg +#### crypto.kzg KZG library implementation to use; gokzg (recommended) or ckzg. The default value is `"gokzg"`. @@ -2458,7 +1479,7 @@ The default value is `"gokzg"`. `GETH_CRYPTO_KZG=gokzg` -###### fdlimit +#### fdlimit Raise the open file descriptor resource limit. The default is the system fd limit. @@ -2468,9 +1489,9 @@ Raise the open file descriptor resource limit. The default is the system fd limi `GETH_FDLIMIT=0` -##### ROLLUP NODE +### Rollup Node -###### rollup.computependingblock +#### rollup.computependingblock By default, the pending block equals the latest block to save resources and not leak transactions from the tx-pool. This flag enables computing of the pending block from @@ -2482,7 +1503,7 @@ the tx-pool instead. The default value is `false`. `GETH_ROLLUP_COMPUTEPENDINGBLOCK=false` -###### rollup.disabletxpoolgossip +#### rollup.disabletxpoolgossip Disable transaction pool gossip. The default value is `false`. @@ -2492,7 +1513,7 @@ Disable transaction pool gossip. The default value is `false`. `GETH_ROLLUP_DISABLETXPOOLGOSSIP=false` -###### rollup.halt +#### rollup.halt Opt-in option to halt on incompatible protocol version requirements of the given level (major/minor/patch/none), as signaled through the Engine API @@ -2504,7 +1525,7 @@ by the rollup node. `GETH_ROLLUP_HALT="major"` -###### rollup.historicalrpc +#### rollup.historicalrpc RPC endpoint for historical data. @@ -2514,7 +1535,7 @@ RPC endpoint for historical data. `GETH_ROLLUP_HISTORICALRPC="http://example.com"` -###### rollup.historicalrpctimeout +#### rollup.historicalrpctimeout Timeout for historical RPC requests. The default value is `5s`. @@ -2524,7 +1545,7 @@ Timeout for historical RPC requests. The default value is `5s`. `GETH_ROLLUP_HISTORICALRPCTIMEOUT=5s` -###### rollup.sequencerhttp +#### rollup.sequencerhttp HTTP endpoint for the sequencer mempool. @@ -2534,7 +1555,7 @@ HTTP endpoint for the sequencer mempool. `GETH_ROLLUP_SEQUENCERHTTP="http://example.com"` -###### rollup.superchain-upgrades +#### rollup.superchain-upgrades Apply superchain-registry config changes to the local chain-configuration. The default value is `true`. @@ -2545,9 +1566,9 @@ The default value is `true`. `GETH_ROLLUP_SUPERCHAIN_UPGRADES=true` -##### STATE HISTORY MANAGEMENT +### State History Management -###### gcmode +#### gcmode Blockchain garbage collection mode, only relevant in `state.scheme=hash`. Options are "full" and "archive". The default value is `"full"`. @@ -2558,7 +1579,7 @@ Options are "full" and "archive". The default value is `"full"`. `GETH_GCMODE="full"` -##### history.state +#### history.state Number of recent blocks to retain state history for. The default is `90000` blocks, with `0` representing the entire chain. @@ -2569,7 +1590,7 @@ blocks, with `0` representing the entire chain. `GETH_HISTORY_STATE=90000` -##### history.transactions +#### history.transactions Number of recent blocks to maintain transactions index for. The default is about one year (`2350000` blocks), with `0` representing the entire chain. @@ -2580,7 +1601,7 @@ The default is about one year (`2350000` blocks), with `0` representing the enti `GETH_HISTORY_TRANSACTIONS=2350000` -##### state.scheme +#### state.scheme Scheme to use for storing Ethereum state. Options are 'hash' or 'path'. @@ -2590,7 +1611,7 @@ Scheme to use for storing Ethereum state. Options are 'hash' or 'path'. `GETH_STATE_SCHEME="hash"` -##### syncmode +#### syncmode Blockchain sync mode. Options are "snap", or "full". The default value is `"snap"`. @@ -2600,9 +1621,9 @@ Blockchain sync mode. Options are "snap", or "full". The default value is `"snap `GETH_SYNCMODE="full"` -##### TRANSACTION POOL (BLOB) +### Transaction Pool (Blob) -###### blobpool.datacap +#### blobpool.datacap Disk space to allocate for pending blob transactions (soft limit). The default value is `10737418240`. @@ -2613,7 +1634,7 @@ The default value is `10737418240`. `GETH_BLOBPOOL_DATACAP=10737418240` -###### blobpool.pricebump +#### blobpool.pricebump Price bump percentage to replace an already existing blob transaction. The default value is `100`. @@ -2624,9 +1645,9 @@ The default value is `100`. `GETH_BLOBPOOL_PRICEBUMP=100` -##### TRANSACTION POOL (EVM) +### Transaction Pool (EVM) -###### txpool.accountqueue +#### txpool.accountqueue Maximum number of non-executable transaction slots permitted per account. The default value is `64`. @@ -2637,7 +1658,7 @@ The default value is `64`. `GETH_TXPOOL_ACCOUNTQUEUE=64` -###### txpool.accountslots +#### txpool.accountslots Minimum number of executable transaction slots guaranteed per account. The default value is `16`. @@ -2648,7 +1669,7 @@ The default value is `16`. `GETH_TXPOOL_ACCOUNTSLOTS=16` -###### txpool.globalqueue +#### txpool.globalqueue Maximum number of non-executable transaction slots for all accounts. The default value is `1024`. @@ -2659,7 +1680,7 @@ The default value is `1024`. `GETH_TXPOOL_GLOBALQUEUE=1024` -###### txpool.globalslots +#### txpool.globalslots Maximum number of executable transaction slots for all accounts. The default value is `5120`. @@ -2670,7 +1691,7 @@ The default value is `5120`. `GETH_TXPOOL_GLOBALSLOTS=5120` -###### txpool.journal +#### txpool.journal Disk journal for local transactions to survive node restarts. The default value is `"transactions.rlp"`. @@ -2681,7 +1702,7 @@ The default value is `"transactions.rlp"`. `GETH_TXPOOL_JOURNAL="transactions.rlp"` -###### txpool.journalremotes +#### txpool.journalremotes Includes remote transactions in the journal. The default value is `false`. @@ -2691,7 +1712,7 @@ Includes remote transactions in the journal. The default value is `false`. `GETH_TXPOOL_JOURNALREMOTES=false` -###### txpool.lifetime +#### txpool.lifetime Maximum amount of time non-executable transactions are queued. The default value is `3h0m0s`. @@ -2702,7 +1723,7 @@ The default value is `3h0m0s`. `GETH_TXPOOL_LIFETIME=3h0m0s` -###### txpool.locals +#### txpool.locals Comma-separated accounts to treat as locals (no flush, priority inclusion). @@ -2712,7 +1733,7 @@ Comma-separated accounts to treat as locals (no flush, priority inclusion). `GETH_TXPOOL_LOCALS="0x123...,0x456..."` -###### txpool.nolocals +#### txpool.nolocals Disables price exemptions for locally submitted transactions. The default value is `false`. @@ -2722,7 +1743,7 @@ Disables price exemptions for locally submitted transactions. The default value `GETH_TXPOOL_NOLOCALS=false` -###### txpool.pricebump +#### txpool.pricebump Price bump percentage to replace an already existing transaction. The default value is `10`. @@ -2732,7 +1753,7 @@ Price bump percentage to replace an already existing transaction. The default va `GETH_TXPOOL_PRICEBUMP=10` -###### txpool.pricelimit +#### txpool.pricelimit Minimum gas price tip to enforce for acceptance into the pool. The default value is `1`. @@ -2742,7 +1763,7 @@ Minimum gas price tip to enforce for acceptance into the pool. The default value `GETH_TXPOOL_PRICELIMIT=1` -###### txpool.rejournal +#### txpool.rejournal Time interval to regenerate the local transaction journal. The default value is `1h0m0s`. @@ -2752,9 +1773,9 @@ Time interval to regenerate the local transaction journal. The default value is `GETH_TXPOOL_REJOURNAL=1h0m0s` -##### VIRTUAL MACHINE +### Virtual Machine -###### vmdebug +#### vmdebug Record information useful for VM and contract debugging. The default value is `false`. diff --git a/pages/builders/node-operators/configuration/node-config.mdx b/pages/builders/node-operators/configuration/node-config.mdx new file mode 100644 index 000000000..8532e4d0e --- /dev/null +++ b/pages/builders/node-operators/configuration/node-config.mdx @@ -0,0 +1,784 @@ +--- +title: Additional Configuration for op-node +lang: en-US +description: Learn additional configuration and command line options for op-node and the Consensus-Layer. +--- + +import { Callout } from 'nextra/components' +import { Tabs } from 'nextra/components' + +# Additional Configuration for `op-node` (Consensus-Layer) + + +You can configure your node using the command line options below (also called flags). +There are also sub-commands, which can be used to invoke functionality such as the console or blockchain import/export. + + +This page list additional configuration options for `op-node`. `op-node` implements most rollup-specific functionality as Consensus-Layer, similar to a L1 beacon-node. +The following options are from the `--help` in [v1.5.1](https://github.com/ethereum-optimism/optimism/releases/tag/v1.5.1). + +## Global Options + +### conductor.enabled + +Enable the conductor service. The default value is `false`. + + + `--conductor.enabled=` + `--conductor.enabled=false` + `OP_NODE_CONDUCTOR_ENABLED=false` + + +### conductor.rpc + +Conductor service rpc endpoint. The default value is `http://127.0.0.1:8547`. + + + `--conductor.rpc=` + `--conductor.rpc=http://127.0.0.1:8547` + `OP_NODE_CONDUCTOR_RPC=http://127.0.0.1:8547` + + +### conductor.rpc-timeout value + +Conductor service rpc timeout. The default value is `1s`. + + + `--conductor.rpc-timeout value=` + `--conductor.rpc-timeout value=1s` + `OP_NODE_CONDUCTOR_RPC_TIMEOUT=1s` + + +### heartbeat.enabled + +Enables or disables heartbeating. The default value is `false`. + + + `--heartbeat.enabled=` + `--heartbeat.enabled=false` + `OP_NODE_HEARTBEAT_ENABLED=false` + + +### heartbeat.moniker + +Sets a moniker for this node. + + + `--heartbeat.moniker=` + `--heartbeat.moniker=soyboy` + `OP_NODE_HEARTBEAT_MONIKER=soyboy` + + +### heartbeat.url + +Sets the URL to heartbeat to. The default value is `"https://heartbeat.optimism.io"`. + + + `--heartbeat.url=` + `--heartbeat.url="https://heartbeat.optimism.io"` + `OP_NODE_HEARTBEAT_URL="https://heartbeat.optimism.io"` + + +### l1 + +Address of L1 User JSON-RPC endpoint to use (eth namespace required). The default value is `"http://127.0.0.1:8545"`. + + + `--l1=` + `--l1="http://127.0.0.1:8545"` + `OP_NODE_L1_ETH_RPC="http://127.0.0.1:8545"` + + +### l1.beacon + +Address of L1 Beacon-node HTTP endpoint to use. + + + `--l1.beacon=` + `--l1.beacon="127.0.0.1:3500"` + `OP_NODE_L1_BEACON="127.0.0.1:3500"` + + +### l1.beacon.fetch-all-sidecars + +If true, all sidecars are fetched and filtered locally. Workaround for buggy Beacon nodes. The default value is `false`. + + + `--l1.beacon.fetch-all-sidecars=` + `--l1.beacon.fetch-all-sidecars=false` + `OP_NODE_L1_BEACON=false` + + +### l1.beacon.ignore + +When false, halts op-node startup if the healthcheck to the Beacon-node endpoint fails. The default value is `false`. + + + `--l1.beacon.ignore=` + `--l1.beacon.ignore=false` + `OP_NODE_L1_BEACON=false` + + +### l1.epoch-poll-interval + +Poll interval for retrieving new L1 epoch updates such as safe and finalized block changes. Disabled if 0 or negative. The default value is `6m24s`. + + + `--l1.epoch-poll-interval=` + `--l1.epoch-poll-interval=6m24s` + `OP_NODE_L1_EPOCH_POLL_INTERVAL=6m24s` + + +### l1.http-poll-interval + +Polling interval for latest-block subscription when using an HTTP RPC provider. Ignored for other types of RPC endpoints. The default value is `12s`. + + + `--l1.http-poll-interval=` + `--l1.http-poll-interval=12s` + `OP_NODE_L1_HTTP_POLL_INTERVAL=12s` + + +### l1.max-concurrency + +Maximum number of concurrent RPC requests to make to the L1 RPC provider. The default value is `10`. + + + `--l1.max-concurrency=` + `--l1.max-concurrency=10` + `OP_NODE_L1_MAX_CONCURRENCY=10` + + +### l1.rpc-max-batch-size + +Maximum number of RPC requests to bundle, e.g., during L1 blocks receipt fetching. The L1 RPC rate limit counts this as N items, but allows it to burst at once. The default value is `20`. + + + `--l1.rpc-max-batch-size=` + `--l1.rpc-max-batch-size=20` + `OP_NODE_L1_RPC_MAX_BATCH_SIZE=20` + + +### l1.rpc-rate-limit + +Optional self-imposed global rate-limit on L1 RPC requests, specified in requests / second. Disabled if set to 0. The default value is `0`. + + + `--l1.rpc-rate-limit=` + `--l1.rpc-rate-limit=0` + `OP_NODE_L1_RPC_RATE_LIMIT=0` + + +### l1.rpckind + +The kind of RPC provider, used to inform optimal transactions receipts fetching, and thus reduce costs. Valid options: alchemy, quicknode, infura, parity, nethermind, debug\_geth, erigon, basic, any, standard. The default value is `standard`. + + + `--l1.rpckind=` + `--l1.rpckind=standard` + `OP_NODE_L1_RPC_KIND=standard` + + + +For details on additional values, see [RPC Receipts](https://github.com/ethereum-optimism/optimism/blob/844cc20084a2e9716631b4092ce7eca4804a8e0a/op-service/sources/receipts_rpc.go#L239-L322). + + +### l1.runtime-config-reload-interval + +Poll interval for reloading the runtime config, useful when config events are not being picked up. Disabled if 0 or negative. The default value is `10m0s`. + + + `--l1.runtime-config-reload-interval=` + `--l1.runtime-config-reload-interval=10m0s` + `OP_NODE_L1_RUNTIME_CONFIG_RELOAD_INTERVAL=10m0s` + + +### l1.trustrpc + +Trust the L1 RPC, sync faster at risk of malicious/buggy RPC providing bad or inconsistent L1 data. The default value is `false`. + + + If you're running an Erigon Ethereum execution client for your L1 provider you will need to include `--l1.trustrpc`. At the time of writing, + Erigon doesn't support the `eth_getProof` that we prefer to use to load L1 data for some processing in `op-node`. The trustrpc flag makes it + use something else that erigon supports, but the `op-node` can't verify for correctness. + + + + `--l1.trustrpc=` + `--l1.trustrpc=false` + `OP_NODE_L1_TRUST_RPC=false` + + +### l2 + +Address of L2 Engine JSON-RPC endpoints to use (engine and eth namespace required). + + + `--l2=` + `--l2=http://127.0.0.1:8751` + `OP_NODE_L2_ENGINE_RPC=http://127.0.0.1:8751` + + +### l2.jwt-secret + +Path to JWT secret key. Keys are 32 bytes, hex encoded in a file. A new key will be generated if left empty. + + + `--l2.jwt-secret=` + `--l2.jwt-secret=/path/to/jwt/secret` + `OP_NODE_L2_ENGINE_AUTH=/path/to/jwt/secret` + + +### log.color + +Color the log output if in terminal mode. The default value is `false`. + + + `--log.color=` + `--log.color=false` + `OP_NODE_LOG_COLOR=false` + + +### log.format + +Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', 'json-pretty'. The default value is `text`. + + + `--log.format=` + `--log.format=text` + `OP_NODE_LOG_FORMAT=text` + + +### log.level + +The lowest log level that will be output. The default value is `info`. + + + `--log.level=` + `--log.level=info` + `OP_NODE_LOG_LEVEL=info` + + +### metrics.addr + +Metrics listening address. The default value is `"0.0.0.0"`. + + + `--metrics.addr=` + `--metrics.addr="0.0.0.0"` + `OP_NODE_METRICS_ADDR="0.0.0.0"` + + +### metrics.enabled + +Enable the metrics server. The default value is `false`. + + + `--metrics.enabled=` + `--metrics.enabled=false` + `OP_NODE_METRICS_ENABLED=false` + + +### metrics.port + +Metrics listening port. The default value is `7300`. + + + `--metrics.port=` + `--metrics.port=7300` + `OP_NODE_METRICS_PORT=7300` + + +### network + +Predefined network selection. Available networks: oplabs-devnet-0-sepolia-dev-0, +op-labs-chaosnet-0-goerli-dev-0, zora-mainnet, base-sepolia, pgn-sepolia, +zora-sepolia, base-devnet-0-sepolia-dev-0, base-goerli, +base-devnet-0-goerli-dev-0, conduit-devnet-0-goerli-dev-0, base-mainnet, +pgn-mainnet, op-sepolia, lyra-mainnet, mode-mainnet, op-mainnet, op-goerli, +op-labs-devnet-0-goerli-dev-0, orderly-mainnet. + + + `--network=` + `--network=op-mainnet` + `OP_NODE_NETWORK=op-mainnet` + + +### override.canyon + +Manually specify the Canyon fork timestamp, overriding the bundled setting. The default value is `0`. + + + `--override.canyon=` + `--override.canyon=0` + `OP_NODE_OVERRIDE_CANYON=0` + + +### override.delta + +Manually specify the Delta fork timestamp, overriding the bundled setting. The default value is `0`. + + + `--override.delta=` + `--override.delta=0` + `OP_NODE_OVERRIDE_DELTA=0` + + +### override.ecotone + +Manually specify the ecotone fork timestamp, overriding the bundled setting. The default value is `0`. + + + `--override.ecotone=` + `--override.ecotone=0` + `OP_NODE_OVERRIDE_ECOTONE=0` + + +### p2p.advertise.ip + +The IP address to advertise in Discv5, put into the ENR of the node. This may also be a hostname/domain name to resolve to an IP. + + + `--p2p.advertise.ip=` + `--p2p.advertise.ip=YourIPAddressOrHostnameHere` + `OP_NODE_P2P_ADVERTISE_IP=YourIPAddressOrHostnameHere` + + +### p2p.advertise.tcp + +The TCP port to advertise in Discv5, put into the ENR of the node. Set to p2p.listen.tcp value if 0. The default value is `0`. + + + `--p2p.advertise.tcp=` + `--p2p.advertise.tcp=3456` + `OP_NODE_P2P_ADVERTISE_TCP=3456` + + +### p2p.advertise.udp + +The UDP port to advertise in Discv5 as a fallback if not determined by Discv5, put into the ENR of the node. Set to p2p.listen.udp value if 0. The default value is `0`. + + + `--p2p.advertise.udp=` + `--p2p.advertise.udp=3457` + `OP_NODE_P2P_ADVERTISE_UDP=3457` + + +### p2p.ban.duration + +The duration that peers are banned for. The default value is `1h0m0s`. + + + `--p2p.ban.duration=` + `--p2p.ban.duration=1h0m0s` + `OP_NODE_P2P_PEER_BANNING_DURATION=1h0m0s` + + +### p2p.ban.peers + +Enables peer banning. The default value is `true`. + + + `--p2p.ban.peers=` + `--p2p.ban.peers=true` + `OP_NODE_P2P_PEER_BANNING=true` + + +### p2p.ban.threshold + +The minimum score below which peers are disconnected and banned. The default value is `-100`. + + + `--p2p.ban.threshold=` + `--p2p.ban.threshold=-100` + `OP_NODE_P2P_PEER_BANNING_THRESHOLD=-100` + + +### p2p.bootnodes + +Comma-separated base64-format ENR list. Bootnodes to start discovering other node records from. + + + `--p2p.bootnodes=` + `--p2p.bootnodes=YourBootnodesListHere` + `OP_NODE_P2P_BOOTNODES=YourBootnodesListHere` + + +### p2p.disable + +Completely disable the P2P stack. The default value is `false`. + + + `--p2p.disable=` + `--p2p.disable=false` + `OP_NODE_P2P_DISABLE=false` + + +### p2p.discovery.path + +Enables persistent storage of discovered ENRs in a database to recover from a restart without bootstrapping the discovery process again. Set to 'memory' to never persist the peerstore. The default value is `opnode_discovery_db`. + + + `--p2p.discovery.path=` + `--p2p.discovery.path=opnode_discovery_db` + `OP_NODE_P2P_DISCOVERY_PATH=opnode_discovery_db` + + +### p2p.listen.ip + +Specifies the IP to bind LibP2P and Discv5 to. The default value is `0.0.0.0`. + + + `--p2p.listen.ip=` + `--p2p.listen.ip=0.0.0.0` + `OP_NODE_P2P_LISTEN_IP=0.0.0.0` + + +### p2p.listen.tcp + +Defines the TCP port to bind LibP2P to. Any available system port if set to 0. The default value is `9222`. + + + `--p2p.listen.tcp=` + `--p2p.listen.tcp=9222` + `OP_NODE_P2P_LISTEN_TCP_PORT=9222` + + +### p2p.listen.udp + +Sets the UDP port to bind Discv5 to. It will be the same as the TCP port if left at 0. The default value is `0`. + + + `--p2p.listen.udp=` + `--p2p.listen.udp=0` + `OP_NODE_P2P_LISTEN_UDP_PORT=0` + + +### p2p.nat + +Enables NAT traversal with PMP/UPNP devices to learn external IP. The default value is `false`. + + + `--p2p.nat=` + `--p2p.nat=false` + `OP_NODE_P2P_NAT=false` + + +### p2p.netrestrict + +Specifies a comma-separated list of CIDR masks. P2P will only try to connect on these networks. + + + `--p2p.netrestrict=` + `--p2p.netrestrict=` + `OP_NODE_P2P_NETRESTRICT=` + + +### p2p.no-discovery + +Disables Discv5 (node discovery). The default value is `false`. + + + `--p2p.no-discovery=` + `--p2p.no-discovery=false` + `OP_NODE_P2P_NO_DISCOVERY=false` + + +### p2p.peers.grace + +Determines the grace period to keep a newly connected peer around, if it is not misbehaving. The default value is `30s`. + + + `--p2p.peers.grace=` + `--p2p.peers.grace=30s` + `OP_NODE_P2P_PEERS_GRACE=30s` + + +### p2p.peers.hi + +Sets the high-tide peer count. The node starts pruning peer connections slowly after reaching this number. The default value is `30`. + + + `--p2p.peers.hi=` + `--p2p.peers.hi=30` + `OP_NODE_P2P_PEERS_HI=30` + + +### p2p.peers.lo + +Determines the low-tide peer count. The node actively searches for new peer connections if below this amount. The default value is `20`. + + + `--p2p.peers.lo=` + `--p2p.peers.lo=20` + `OP_NODE_P2P_PEERS_LO=20` + + +### p2p.peerstore.path + +Specifies the Peerstore database location. Persisted peerstores help recover peers after restarts. Set to 'memory' to never persist the peerstore. Warning: a copy of the priv network key of the local peer will be persisted here. The default value is `"opnode_peerstore_db"`. + + + `--p2p.peerstore.path=` + `--p2p.peerstore.path=opnode_peerstore_db` + `OP_NODE_P2P_PEERSTORE_PATH=opnode_peerstore_db` + + +### p2p.priv.path + +Defines the file path for reading the hex-encoded 32-byte private key for the peer ID. Created if not already exists. Important for maintaining the same network identity after restarting. The default value is `"opnode_p2p_priv.txt"`. + + + `--p2p.priv.path=` + `--p2p.priv.path=opnode_p2p_priv.txt` + `OP_NODE_P2P_PRIV_PATH=opnode_p2p_priv.txt` + + +### p2p.scoring + +Sets the peer scoring strategy for the P2P stack. Options include 'none' or 'light'. The default value is `"light"`. + + + `--p2p.scoring=` + `--p2p.scoring=light` + `OP_NODE_P2P_PEER_SCORING=light` + + +### p2p.sequencer.key + +Hex-encoded private key for signing off on p2p application messages as sequencer. + + + `--p2p.sequencer.key=` + `--p2p.sequencer.key=[YourKeyHere]` + `OP_NODE_P2P_SEQUENCER_KEY=[YourKeyHere]` + + +### p2p.static + +Comma-separated multiaddr-format(an unsigned address, containing: IP, TCP port, [PeerID](/builders/node-operators/json-rpc#opp2p_self)) peer list. Static connections to make and +maintain, these peers will be regarded as trusted. Addresses of the local peer +are ignored. Duplicate/Alternative addresses for the same peer all apply, but +only a single connection per peer is maintained. + + + `--p2p.static=` + `--p2p.static=/ip4/127.0.0.1/tcp/9222/p2p/16Uiu2HAm2y6DXp6THWHCyquczNUh8gVAm4spo6hjP3Ns1dGRiAdE` + `OP_NODE_P2P_STATIC=/ip4/127.0.0.1/tcp/9222/p2p/16Uiu2HAm2y6DXp6THWHCyquczNUh8gVAm4spo6hjP3Ns1dGRiAdE` + + +### p2p.sync.req-resp + +Enables P2P req-resp alternative sync method, on both server and client side. Default is `true`. + + + `--p2p.sync.req-resp=[true|false]` + `--p2p.sync.req-resp=true` + `OP_NODE_P2P_SYNC_REQ_RESP=true` + + +### pprof.addr + +pprof listening address. Default is `"0.0.0.0"`. + + + `--pprof.addr=` + `--pprof.addr=0.0.0.0` + `OP_NODE_PPROF_ADDR=0.0.0.0` + + +### pprof.enabled + +Enable the pprof server. Default is `false`. + + + `--pprof.enabled=[true|false]` + `--pprof.enabled=false` + `OP_NODE_PPROF_ENABLED=false` + + +### pprof.path + +pprof file path. If it is a directory, the path is \{dir\}/\{profileType\}.prof + + + `--pprof.path=` + `--pprof.path={dir}/{profileType}.prof` + `OP_NODE_PPROF_PATH={dir}/{profileType}.prof` + + +### pprof.port + +pprof listening port. Default is `6060`. + + + `--pprof.port=` + `--pprof.port=6060` + `OP_NODE_PPROF_PORT=6060` + + +### pprof.type + +pprof profile type. One of cpu, heap, goroutine, threadcreate, block, mutex, allocs + + + `--pprof.type=` + `--pprof.type=cpu` + `OP_NODE_PPROF_TYPE=cpu` + + +### rollup.config + +Rollup chain parameters. + + + `--rollup.config=` + `--rollup.config=[ConfigValueHere]` + `OP_NODE_ROLLUP_CONFIG=[ConfigValueHere]` + + +### rollup.halt + +Opt-in option to halt on incompatible protocol version requirements of the given level (major/minor/patch/none), as signaled onchain in L1. + + + `--rollup.halt=` + `--rollup.halt=[HaltOptionHere]` + `OP_NODE_ROLLUP_HALT=[HaltOptionHere]` + + +### rollup.load-protocol-versions + +Load protocol versions from the superchain L1 ProtocolVersions contract (if available), and report in logs and metrics. Default is `false`. + + + `--rollup.load-protocol-versions=[true|false]` + `--rollup.load-protocol-versions=false` + `OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=false` + + +### rpc.addr + +RPC listening address. Default is `"127.0.0.1"`. + + + `--rpc.addr=` + `--rpc.addr=127.0.0.1` + `OP_NODE_RPC_ADDR=127.0.0.1` + + +### rpc.admin-state + +File path used to persist state changes made via the admin API so they persist across restarts. Disabled if not set. + + + `--rpc.admin-state=` + `--rpc.admin-state=[FilePathHere]` + `OP_NODE_RPC_ADMIN_STATE=[FilePathHere]` + + +### rpc.enable-admin + +Enable the admin API (experimental). Default is `false`. + + + `--rpc.enable-admin=[true|false]` + `--rpc.enable-admin=false` + `OP_NODE_RPC_ENABLE_ADMIN=false` + + +### rpc.port + +RPC listening port. Default is `9545`. + + + `--rpc.port=` + `--rpc.port=9545` + `OP_NODE_RPC_PORT=9545` + + +### sequencer.enabled + +Enable sequencing of new L2 blocks. A separate batch submitter has to be deployed to publish the data for verifiers. Default is `false`. + + + `--sequencer.enabled=[true|false]` + `--sequencer.enabled=false` + `OP_NODE_SEQUENCER_ENABLED=false` + + +### sequencer.l1-confs + +Number of L1 blocks to keep distance from the L1 head as a sequencer for picking an L1 origin. Default is `4`. + + + `--sequencer.l1-confs=` + `--sequencer.l1-confs=4` + `OP_NODE_SEQUENCER_L1_CONFS=4` + + +### sequencer.max-safe-lag + +Maximum number of L2 blocks for restricting the distance between L2 safe and unsafe. Disabled if 0. Default is `0`. + + + `--sequencer.max-safe-lag=` + `--sequencer.max-safe-lag=0` + `OP_NODE_SEQUENCER_MAX_SAFE_LAG=0` + + +### sequencer.stopped + +Initialize the sequencer in a stopped state. The sequencer can be started using the admin\_startSequencer RPC. Default is `false`. + + + `--sequencer.stopped=[true|false]` + `--sequencer.stopped=false` + `OP_NODE_SEQUENCER_STOPPED=false` + + +### snapshotlog.file + +Path to the snapshot log file. + + + `--snapshotlog.file=` + `--snapshotlog.file=[FilePathHere]` + `OP_NODE_SNAPSHOT_LOG=[FilePathHere]` + + +### verifier.l1-confs + +Number of L1 blocks to keep distance from the L1 head before deriving L2 data from. Reorgs are supported, but may be slow to perform. Default is `0`. + + + `--verifier.l1-confs=` + `--verifier.l1-confs=0` + `OP_NODE_VERIFIER_L1_CONFS=0` + + +## Miscellaneous + +### --help, -h + +Show help. The default value is `false`. + + + `--help` OR `-h` + `--help` + + +### --version, -v + + + Nodes built from source do not output the correct version numbers that are reported on + the GitHub release page. + + +Print the version. The default value is `false`. + + + `--version` OR `-v` + `--version` + + diff --git a/pages/builders/node-operators/management/_meta.json b/pages/builders/node-operators/management/_meta.json index 507a28527..f6278a6d8 100644 --- a/pages/builders/node-operators/management/_meta.json +++ b/pages/builders/node-operators/management/_meta.json @@ -1,9 +1,7 @@ { - "snapshots": "Snapshot Downloads", - "base-config": "Base Configuration", - "configuration": "Custom Configuration", "blobs": "Using Blobs", "snap-sync": "Using Snap Sync", + "snapshots": "Snapshot Downloads", "metrics": "Monitoring", "troubleshooting": "Troubleshooting" } diff --git a/pages/builders/node-operators/management/snap-sync.mdx b/pages/builders/node-operators/management/snap-sync.mdx index 302aaded4..7201ed0d8 100644 --- a/pages/builders/node-operators/management/snap-sync.mdx +++ b/pages/builders/node-operators/management/snap-sync.mdx @@ -23,8 +23,8 @@ This means that performing a Snap Sync is significantly faster than performing a For snap sync, all `op-geth` nodes should expose port `30303` TCP and `30303` UDP to easily find other op-geth nodes to sync from. - * If you set the port with [`--discovery.port`](/builders/node-operators/management/configuration#discoveryport), then you must open the port specified for UDP. - * If you set [`--port`](/builders/node-operators/management/configuration#port), then you must open the port specified for TCP. + * If you set the port with [`--discovery.port`](/builders/node-operators/configuration/geth-config#discoveryport), then you must open the port specified for UDP. + * If you set [`--port`](/builders/node-operators/configuration/geth-config#port), then you must open the port specified for TCP. * The only exception is for sequencers and transaction ingress nodes. @@ -83,6 +83,6 @@ Choose one of the following options to enable snap sync: ## Next Steps -* See the [Node Configuration](/builders/node-operators/management/configuration#configuration) guide for additional explanation or customization. +* See the [Node Configuration](/builders/node-operators/configuration/base-config#configuration) guide for additional explanation or customization. * To enable snap sync for your chain, see [Using Snap Sync for Chain Operators](/builders/chain-operators/management/snap-sync). * If you experience difficulty at any stage of this process, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions). diff --git a/public/_redirects b/public/_redirects index 34d962a95..7cfa5f131 100644 --- a/public/_redirects +++ b/public/_redirects @@ -66,3 +66,4 @@ /stack /stack/getting-started /chain/sec /chain/security/faq /builders/chain-operators/management/tools/explorer /builders/chain-operators/tools/explorer +/builders/node-operators/management/configuration /builders/node-operators/configuration/base-config From aa611158fb157799733cce3416149b63487744c9 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Mon, 13 May 2024 12:05:14 -0700 Subject: [PATCH 4/8] fix broken links per linter --- pages/builders/node-operators/network-upgrades.mdx | 2 +- pages/builders/node-operators/tutorials/mainnet.mdx | 4 ++-- pages/builders/node-operators/tutorials/testnet.mdx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/builders/node-operators/network-upgrades.mdx b/pages/builders/node-operators/network-upgrades.mdx index f09bbb4e0..c1d05397a 100644 --- a/pages/builders/node-operators/network-upgrades.mdx +++ b/pages/builders/node-operators/network-upgrades.mdx @@ -73,7 +73,7 @@ Data Availability (DA) upgrade: ### [Delta](https://specs.optimism.io/protocol/superchain-upgrades.html#delta) -The Delta upgrade consists of a single consensus-layer feature: [Span Batches](https://specs.optimism.io/protocol/span-batches.html). +The Delta upgrade consists of a single consensus-layer feature: [Span Batches](https://specs.optimism.io/protocol/delta/span-batches.html). The Delta upgrade uses a *L2 block-timestamp* activation-rule, and is specified only in the rollup-node (`delta_time`). diff --git a/pages/builders/node-operators/tutorials/mainnet.mdx b/pages/builders/node-operators/tutorials/mainnet.mdx index c47cd116d..dca505c33 100644 --- a/pages/builders/node-operators/tutorials/mainnet.mdx +++ b/pages/builders/node-operators/tutorials/mainnet.mdx @@ -85,7 +85,7 @@ You can still start `op-geth` without yet running `op-node`, but the `op-geth` i Use the following command to start `op-geth` in a default configuration. The JSON-RPC API will become available on port 8545. - Refer to the `op-geth` [configuration documentation](../management/configuration#op-geth) for more detailed information about available options. + Refer to the `op-geth` [configuration documentation](/builders/node-operators/configuration/geth-config) for more detailed information about available options. ```bash ./build/bin/geth \ @@ -134,7 +134,7 @@ Once you've started `op-geth`, you can start `op-node`. {

Start op-node

} Use the following command to start `op-node` in a default configuration. - Refer to the `op-node` [configuration documentation](../management/configuration#op-node) for more detailed information about available options. + Refer to the `op-node` [configuration documentation](/builders/node-operators/configuration/node-config) for more detailed information about available options. The `op-node` RPC should not be exposed publicly. If left exposed, it could diff --git a/pages/builders/node-operators/tutorials/testnet.mdx b/pages/builders/node-operators/tutorials/testnet.mdx index cf7cc3c02..35a38218d 100644 --- a/pages/builders/node-operators/tutorials/testnet.mdx +++ b/pages/builders/node-operators/tutorials/testnet.mdx @@ -75,7 +75,7 @@ export DATADIR_PATH=... # Path to the folder where geth data will be stored Use the following command to start `op-geth` in a default configuration. The JSON-RPC API will become available on port 8545. -Refer to the `op-geth` [configuration documentation](../management/configuration#op-geth) for more detailed information about available options. +Refer to the `op-geth` [configuration documentation](/builders/node-operators/configuration/geth-config) for more detailed information about available options. * Set `--syncmode=execution-layer` on `op-node` if you don't set `--syncmode=full` here on op-geth. @@ -132,7 +132,7 @@ export L1_BEACON_URL=... # URL address for the L1 Beacon-node HTTP endpoint to u {

Start op-node

} Use the following command to start `op-node` in a default configuration. -Refer to the `op-node` [configuration documentation](../management/configuration#op-node) for more detailed information about available options. +Refer to the `op-node` [configuration documentation](/builders/node-operators/configuration/node-config) for more detailed information about available options. The `op-node` RPC should not be exposed publicly. If left exposed, it could From caab29a09a44d2e018857b5c80d5876a521e9e04 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Tue, 14 May 2024 11:41:11 -0700 Subject: [PATCH 5/8] Update base-config.mdx --- .../configuration/base-config.mdx | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pages/builders/node-operators/configuration/base-config.mdx b/pages/builders/node-operators/configuration/base-config.mdx index ab93a997d..3a67d18ec 100644 --- a/pages/builders/node-operators/configuration/base-config.mdx +++ b/pages/builders/node-operators/configuration/base-config.mdx @@ -8,17 +8,17 @@ import { Callout } from 'nextra/components' # Node Base Configuration -This page provides information on basic node configuration and recommended flags for `op-node`, `op-geth`, and legacy geth (optional). To configure your node to run on a Superchain network, you will need to do the following: + + Always run `op-node` and `op-geth` in a one-to-one configuration. Don't run multiple `op-geth` instances behind one `op-node`, or vice versa. + + +To configure your node, you will need to do the following: 1. Configure `op-node` to point to the correct L1, `op-geth`, and L2 network. 2. Initialize `op-geth` with the correct network parameters. 3. Configure `op-geth` to properly communicate with the Rollup Node. 4. Optionally, configure Legacy Geth. - - Always run `op-node` and `op-geth` in a one-to-one configuration. Don't run multiple `op-geth` instances behind one `op-node`, or vice versa. - - ## Configuring `op-geth` @@ -34,9 +34,10 @@ Depending on the network you're running, initialization is done one of three way Regardless of how `op-geth` is initialized, you'll need to ensure that you have sufficient disk space available to store the network's data. As of this writing, the OP Mainnet data directory is \~1.6TB for a full node and \~5TB for an archival node. -Instructions for each initialization method are below. OP Mainnet nodes should use the [Initialization via Data Directory](#initialization-via-data-directory) path, and OP Sepolia nodes should use the [Initialization via Genesis File](#initialization-via-genesis-file) path. +### Initialize `op-geth` +Instructions for each initialization method are below. If you're spinning up an OP Mainnet, use the [Initialization via Data Directory](#initialization-via-data-directory) path. If you're spinning up an OP Sepolia node, use the [Initialization via Genesis File](#initialization-via-genesis-file) path. -### Initialization via Genesis File (OP Sepolia nodes) +#### Initialization via Genesis File `op-geth` uses JSON files to encode a network's genesis information. For networks that are initialized in this way, you'll receive a URL to the genesis @@ -57,7 +58,7 @@ else fi ``` -### Initialization via Data Directory (OP Mainnet nodes) +#### Initialization via Data Directory To initialize `op-geth` with a preconfigured data directory, simply download and extract the data directory to a place of your choosing. The data directory is exported as a tar file. An example command to do this is below: @@ -66,7 +67,7 @@ curl -o -sL tar -xvf ``` -### Initialization via Network Flags +#### Initialization via Network Flags To initialize `op-geth` with the network flags, you simply need to set the `--op-network=` and `--network=` on `op-node`. To see the latest @@ -173,11 +174,11 @@ For best results, run `op-node` with a static IP address that is accessible from The default port for the peer-to-peer network is `9003`. You will need to open this port on your firewall to receive unsubmitted blocks. For your node to be discoverable, this port must be accessible via both TCP and UDP protocols. -## Configuring Legacy Geth +## Legacy Geth If you are running a node for an upgraded network like OP Mainnet (but not OP Sepolia), you will also need to run Legacy Geth in order to serve historical execution traces. Fundamentally, Legacy Geth is our old `l2geth` binary running against a preconfigured data directory. To configure Legacy Geth, follow the instructions above for using a preconfigured data directory, then execute the following command: - + It is imperative that you specify the `USING_OVM=true` environment variable in the command below. Failing to specify this will cause `l2geth` to return invalid execution traces, or panic at startup. From 0fa4ecd3be9be9c6079cf4e4e39802f3c5c2bc79 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Wed, 15 May 2024 11:35:03 -0700 Subject: [PATCH 6/8] review fixes --- .../chain-operators/management/operations.mdx | 2 +- .../chain-operators/management/snap-sync.mdx | 6 ++--- .../tutorials/create-l2-rollup.mdx | 2 +- .../node-operators/configuration/_meta.json | 4 ++-- .../configuration/base-config.mdx | 24 +++++++++---------- .../{node-config.mdx => consensus-config.mdx} | 8 +++---- .../{geth-config.mdx => execution-config.mdx} | 6 ++--- .../node-operators/management/snap-sync.mdx | 4 ++-- .../node-operators/tutorials/mainnet.mdx | 4 ++-- .../node-operators/tutorials/testnet.mdx | 4 ++-- 10 files changed, 32 insertions(+), 32 deletions(-) rename pages/builders/node-operators/configuration/{node-config.mdx => consensus-config.mdx} (98%) rename pages/builders/node-operators/configuration/{geth-config.mdx => execution-config.mdx} (99%) diff --git a/pages/builders/chain-operators/management/operations.mdx b/pages/builders/chain-operators/management/operations.mdx index d8c670124..40f4fd935 100644 --- a/pages/builders/chain-operators/management/operations.mdx +++ b/pages/builders/chain-operators/management/operations.mdx @@ -161,5 +161,5 @@ If you do it this way, you won't have to wait until the transactions are written ## Next Steps -* See the [Node Configuration](/builders/node-operators/configuration/base-config#configuration) guide for additional explanation or customization. +* See the [Node Configuration](/builders/node-operators/configuration/base-config) guide for additional explanation or customization. * If you experience difficulty at any stage of this process, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions). diff --git a/pages/builders/chain-operators/management/snap-sync.mdx b/pages/builders/chain-operators/management/snap-sync.mdx index 87e1c83cb..07baefa52 100644 --- a/pages/builders/chain-operators/management/snap-sync.mdx +++ b/pages/builders/chain-operators/management/snap-sync.mdx @@ -23,8 +23,8 @@ To enable snap sync, chain operators need to spin up a node which is exposed to For snap sync, all `op-geth` nodes should expose port `30303` TCP and `30303` UDP to easily find other op-geth nodes to sync from. - * If you set the port with [`--discovery.port`](/builders/node-operators/configuration/geth-config#discoveryport), then you must open the port specified for UDP. - * If you set [`--port`](/builders/node-operators/configuration/geth-config#port), then you must open the port specified for TCP. + * If you set the port with [`--discovery.port`](/builders/node-operators/configuration/execution-config#discoveryport), then you must open the port specified for UDP. + * If you set [`--port`](/builders/node-operators/configuration/execution-config#port), then you must open the port specified for TCP. * The only exception is for sequencers and transaction ingress nodes. @@ -32,7 +32,7 @@ For snap sync, all `op-geth` nodes should expose port `30303` TCP and `30303` UD ### Setup a Snap Sync Node * Expose port `30303` (`op-geth`'s default discovery port) to the internet on TCP and UDP. - * Disable transaction gossip with the [`--rollup.disabletxpoolgossip`](/builders/node-operators/configuration/geth-config#rollupdisabletxpoolgossip) flag + * Disable transaction gossip with the [`--rollup.disabletxpoolgossip`](/builders/node-operators/configuration/execution-config#rollupdisabletxpoolgossip) flag ### Enable Snap Sync on Your Network diff --git a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx index 0ba5ab485..3b194b668 100644 --- a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx +++ b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx @@ -677,7 +677,7 @@ You can add the following options to the `op-node` command to enable peer-to-pee --p2p.listen.udp=9003 \ ``` -You can alternatively also remove the [--p2p.static](/builders/node-operators/configuration/node-config#p2pstatic) option, but you may see failed requests from other chains using the same chain ID. +You can alternatively also remove the [--p2p.static](/builders/node-operators/configuration/consensus-config#p2pstatic) option, but you may see failed requests from other chains using the same chain ID. diff --git a/pages/builders/node-operators/configuration/_meta.json b/pages/builders/node-operators/configuration/_meta.json index 304a4b9e1..d2269762f 100644 --- a/pages/builders/node-operators/configuration/_meta.json +++ b/pages/builders/node-operators/configuration/_meta.json @@ -1,5 +1,5 @@ { "base-config": "Base Configuration", - "node-config": "op-node Config Options", - "geth-config": "op-geth Config Options" + "consensus-config": "Consensus Layer Config", + "execution-config": "Exeuction Layer Config" } \ No newline at end of file diff --git a/pages/builders/node-operators/configuration/base-config.mdx b/pages/builders/node-operators/configuration/base-config.mdx index 3a67d18ec..0ac0c58f2 100644 --- a/pages/builders/node-operators/configuration/base-config.mdx +++ b/pages/builders/node-operators/configuration/base-config.mdx @@ -28,15 +28,22 @@ To configure your node, you will need to do the following: `op-geth` stores its state in a database that requires initialization. Depending on the network you're running, initialization is done one of three ways: -1. **With a Genesis File:** This is for deployments that are not migrated from a legacy network (i.e. OP Sepolia). In this case, you'll use a genesis file and initialize the data directory via `geth init`. -2. **With a Data Directory:** This is used for networks that are migrated from a legacy network. This currently **only** includes OP Mainnet. In this case, you'll download a preconfigured data directory and extract it. No further initialization is necessary in this case, because the data directory contains the network's genesis information. This method can be bypassed if you utilize [snap sync](/builders/node-operators/management/snap-sync). -3. **With network flags:** This initializes the genesis information and chain configuration from the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry). +1. **With Network Flags:** This initializes the genesis information and chain configuration from the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry). +2. **With a Genesis File:** This is for deployments that are not migrated from a legacy network (i.e. OP Sepolia). In this case, you'll use a genesis file and initialize the data directory via `geth init`. +3. **With a Data Directory:** This is used for networks that are migrated from a legacy network. This currently **only** includes OP Mainnet. In this case, you'll download a preconfigured data directory and extract it. No further initialization is necessary in this case, because the data directory contains the network's genesis information. This method can be bypassed if you utilize [snap sync](/builders/node-operators/management/snap-sync). Regardless of how `op-geth` is initialized, you'll need to ensure that you have sufficient disk space available to store the network's data. As of this writing, the OP Mainnet data directory is \~1.6TB for a full node and \~5TB for an archival node. ### Initialize `op-geth` Instructions for each initialization method are below. If you're spinning up an OP Mainnet, use the [Initialization via Data Directory](#initialization-via-data-directory) path. If you're spinning up an OP Sepolia node, use the [Initialization via Genesis File](#initialization-via-genesis-file) path. +#### Initialization via Network Flags + +To initialize `op-geth` with the network flags, you simply need to set the +`--op-network=` and `--network=` on `op-node`. To see the latest +support networks, you can consult the `--help` output for the `op-network` +option. + #### Initialization via Genesis File `op-geth` uses JSON files to encode a network's genesis information. For @@ -67,13 +74,6 @@ curl -o -sL tar -xvf ``` -#### Initialization via Network Flags - -To initialize `op-geth` with the network flags, you simply need to set the -`--op-network=` and `--network=` on `op-node`. To see the latest -support networks, you can consult the `--help` output for the `op-network` -option. - ### Configuration Once `op-geth` is initialized, it can be configured via CLI flags. `op-geth` accepts all the [standard `go-ethereum` flags](https://geth.ethereum.org/docs/interface/command-line-options) as well as a few extra flags that are specific to Optimism. These flags are: @@ -216,6 +216,6 @@ The term *historical execution* refers to RPC methods that need to execute trans If you do not need these RPC methods for historical data, then you do not need to run Legacy Geth at all. ## Next Steps -* See the [op-node configuration](/builders/node-operators/configuration/node-config) guide for additional configuration options for `op-node` and the Consensus-Layer. -* Similarly, visit the [op-geth configuration](/builders/node-operators/configuration/geth-config) guide for additional configuration options for `op-geth` and Execution-Layer. +* See the [op-node configuration](/builders/node-operators/configuration/consensus-config) guide for additional configuration options for `op-node` and the Consensus-Layer. +* Similarly, visit the [op-geth configuration](/builders/node-operators/configuration/execution-config) guide for additional configuration options for `op-geth` and Execution-Layer. * If you run into any problems, please reach out to our [developer support forum](https://github.com/ethereum-optimism/developers/discussions) for help. diff --git a/pages/builders/node-operators/configuration/node-config.mdx b/pages/builders/node-operators/configuration/consensus-config.mdx similarity index 98% rename from pages/builders/node-operators/configuration/node-config.mdx rename to pages/builders/node-operators/configuration/consensus-config.mdx index 8532e4d0e..7482d682f 100644 --- a/pages/builders/node-operators/configuration/node-config.mdx +++ b/pages/builders/node-operators/configuration/consensus-config.mdx @@ -1,5 +1,5 @@ --- -title: Additional Configuration for op-node +title: Consensus Layer Configuration Options (op-node) lang: en-US description: Learn additional configuration and command line options for op-node and the Consensus-Layer. --- @@ -7,15 +7,15 @@ description: Learn additional configuration and command line options for op-node import { Callout } from 'nextra/components' import { Tabs } from 'nextra/components' -# Additional Configuration for `op-node` (Consensus-Layer) +# Consensus Layer Configuration Options (op-node) You can configure your node using the command line options below (also called flags). There are also sub-commands, which can be used to invoke functionality such as the console or blockchain import/export. -This page list additional configuration options for `op-node`. `op-node` implements most rollup-specific functionality as Consensus-Layer, similar to a L1 beacon-node. -The following options are from the `--help` in [v1.5.1](https://github.com/ethereum-optimism/optimism/releases/tag/v1.5.1). +This page list all configuration options for `op-node`. `op-node` implements most rollup-specific functionality as Consensus-Layer, similar to a L1 beacon-node. +The following options are from the `--help` in [v1.7.5](https://github.com/ethereum-optimism/optimism/releases/tag/op-node/v1.7.5). ## Global Options diff --git a/pages/builders/node-operators/configuration/geth-config.mdx b/pages/builders/node-operators/configuration/execution-config.mdx similarity index 99% rename from pages/builders/node-operators/configuration/geth-config.mdx rename to pages/builders/node-operators/configuration/execution-config.mdx index 7b5b1bc42..0895cee56 100644 --- a/pages/builders/node-operators/configuration/geth-config.mdx +++ b/pages/builders/node-operators/configuration/execution-config.mdx @@ -1,5 +1,5 @@ --- -title: Additional Configuration for op-geth +title: Execution Layer Configuration Options (op-geth) lang: en-US description: Learn additional configuration and command line options for op-geth and the Execution-Layer. --- @@ -7,14 +7,14 @@ description: Learn additional configuration and command line options for op-geth import { Callout } from 'nextra/components' import { Tabs } from 'nextra/components' -# Additional Configuration for `op-geth` (Execution-Layer) +# Execution Layer Configuration Options (op-geth) You can configure your node using the command line options below (also called flags). There are also sub-commands, which can be used to invoke functionality such as the console or blockchain import/export. -This page list additional configuration options for `op-geth`. `op-geth` implements the Execution-Layer, with minimal changes for a secure Ethereum-equivalent application environment. +This page list all configuration options for `op-geth`. `op-geth` implements the Execution-Layer, with minimal changes for a secure Ethereum-equivalent application environment. The following are options from [v1.101308.0](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101308.0) Please note that the executable is still named `geth` to maintain a [minimal diff](https://op-geth.optimism.io/). diff --git a/pages/builders/node-operators/management/snap-sync.mdx b/pages/builders/node-operators/management/snap-sync.mdx index 7201ed0d8..a8764041b 100644 --- a/pages/builders/node-operators/management/snap-sync.mdx +++ b/pages/builders/node-operators/management/snap-sync.mdx @@ -23,8 +23,8 @@ This means that performing a Snap Sync is significantly faster than performing a For snap sync, all `op-geth` nodes should expose port `30303` TCP and `30303` UDP to easily find other op-geth nodes to sync from. - * If you set the port with [`--discovery.port`](/builders/node-operators/configuration/geth-config#discoveryport), then you must open the port specified for UDP. - * If you set [`--port`](/builders/node-operators/configuration/geth-config#port), then you must open the port specified for TCP. + * If you set the port with [`--discovery.port`](/builders/node-operators/configuration/execution-config#discoveryport), then you must open the port specified for UDP. + * If you set [`--port`](/builders/node-operators/configuration/execution-config#port), then you must open the port specified for TCP. * The only exception is for sequencers and transaction ingress nodes. diff --git a/pages/builders/node-operators/tutorials/mainnet.mdx b/pages/builders/node-operators/tutorials/mainnet.mdx index dca505c33..820edbb08 100644 --- a/pages/builders/node-operators/tutorials/mainnet.mdx +++ b/pages/builders/node-operators/tutorials/mainnet.mdx @@ -85,7 +85,7 @@ You can still start `op-geth` without yet running `op-node`, but the `op-geth` i Use the following command to start `op-geth` in a default configuration. The JSON-RPC API will become available on port 8545. - Refer to the `op-geth` [configuration documentation](/builders/node-operators/configuration/geth-config) for more detailed information about available options. + Refer to the `op-geth` [configuration documentation](/builders/node-operators/configuration/execution-config) for more detailed information about available options. ```bash ./build/bin/geth \ @@ -134,7 +134,7 @@ Once you've started `op-geth`, you can start `op-node`. {

Start op-node

} Use the following command to start `op-node` in a default configuration. - Refer to the `op-node` [configuration documentation](/builders/node-operators/configuration/node-config) for more detailed information about available options. + Refer to the `op-node` [configuration documentation](/builders/node-operators/configuration/consensus-config) for more detailed information about available options. The `op-node` RPC should not be exposed publicly. If left exposed, it could diff --git a/pages/builders/node-operators/tutorials/testnet.mdx b/pages/builders/node-operators/tutorials/testnet.mdx index 35a38218d..ba4dcf45a 100644 --- a/pages/builders/node-operators/tutorials/testnet.mdx +++ b/pages/builders/node-operators/tutorials/testnet.mdx @@ -75,7 +75,7 @@ export DATADIR_PATH=... # Path to the folder where geth data will be stored Use the following command to start `op-geth` in a default configuration. The JSON-RPC API will become available on port 8545. -Refer to the `op-geth` [configuration documentation](/builders/node-operators/configuration/geth-config) for more detailed information about available options. +Refer to the `op-geth` [configuration documentation](/builders/node-operators/configuration/execution-config) for more detailed information about available options. * Set `--syncmode=execution-layer` on `op-node` if you don't set `--syncmode=full` here on op-geth. @@ -132,7 +132,7 @@ export L1_BEACON_URL=... # URL address for the L1 Beacon-node HTTP endpoint to u {

Start op-node

} Use the following command to start `op-node` in a default configuration. -Refer to the `op-node` [configuration documentation](/builders/node-operators/configuration/node-config) for more detailed information about available options. +Refer to the `op-node` [configuration documentation](/builders/node-operators/configuration/consensus-config) for more detailed information about available options. The `op-node` RPC should not be exposed publicly. If left exposed, it could From 481409f2f12726769ca02e69a1db1073d8be0b05 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Wed, 15 May 2024 11:45:14 -0700 Subject: [PATCH 7/8] address josh comment --- pages/builders/node-operators/configuration/base-config.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/builders/node-operators/configuration/base-config.mdx b/pages/builders/node-operators/configuration/base-config.mdx index 0ac0c58f2..f4a8f5183 100644 --- a/pages/builders/node-operators/configuration/base-config.mdx +++ b/pages/builders/node-operators/configuration/base-config.mdx @@ -35,7 +35,7 @@ Depending on the network you're running, initialization is done one of three way Regardless of how `op-geth` is initialized, you'll need to ensure that you have sufficient disk space available to store the network's data. As of this writing, the OP Mainnet data directory is \~1.6TB for a full node and \~5TB for an archival node. ### Initialize `op-geth` -Instructions for each initialization method are below. If you're spinning up an OP Mainnet, use the [Initialization via Data Directory](#initialization-via-data-directory) path. If you're spinning up an OP Sepolia node, use the [Initialization via Genesis File](#initialization-via-genesis-file) path. +Instructions for each initialization method are below. If you're spinning up an OP Mainnet, use the [Initialization via Data Directory](#initialization-via-data-directory) path. If you're spinning up an OP Sepolia node, use the [Initialization via Network Flags](#initialization-via-network-flags) path. #### Initialization via Network Flags From 784596b5413f3eee0a80b596622d13435e2b9ca2 Mon Sep 17 00:00:00 2001 From: cpengilly <29023967+cpengilly@users.noreply.github.com> Date: Wed, 15 May 2024 12:01:51 -0700 Subject: [PATCH 8/8] remove medium article links --- pages/chain/security/privileged-roles.mdx | 4 ++-- pages/chain/testing/testing-apps.mdx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/chain/security/privileged-roles.mdx b/pages/chain/security/privileged-roles.mdx index 4c096d912..f3ad2b0f6 100644 --- a/pages/chain/security/privileged-roles.mdx +++ b/pages/chain/security/privileged-roles.mdx @@ -6,8 +6,8 @@ description: Learn about the privileged roles in OP Mainnet. # Privileged Roles in OP Mainnet -OP Mainnet is on a [Pragmatic Path to Decentralization](https://medium.com/ethereum-optimism/our-pragmatic-path-to-decentralization-cb5805ca43c1). -In its current state, the network still includes some "privileged" roles that give certain addresses the ability to carry out specific actions. +OP Mainnet is on a [Pragmatic Path to Decentralization](https://blog.oplabs.co/decentralization-roadmap/). +In its current state, OP Mainnet still includes some "privileged" roles that give certain addresses the ability to carry out specific actions. Read this page to understand these roles, why they exist, and what risks they pose. ## L1 Proxy Admin diff --git a/pages/chain/testing/testing-apps.mdx b/pages/chain/testing/testing-apps.mdx index 1572d7098..86e9cd3e0 100644 --- a/pages/chain/testing/testing-apps.mdx +++ b/pages/chain/testing/testing-apps.mdx @@ -28,7 +28,7 @@ For example, if your decentralized application relies on [inter-domain communica ## Integration with other products In many cases a decentralized application requires the services of other contracts. -For example, [Perpetual v. 2](https://medium.com/p/88a7b231eb94) cannot function without [Uniswap v. 3](https://uniswap.org/blog/uniswap-v3). +For example, [Perpetual v. 2](https://docs.perp.com/docs/guides/integration-guide) cannot function without [Uniswap v. 3](https://uniswap.org/blog/uniswap-v3). If that is the case you can use [mainnet forking](https://hardhat.org/hardhat-network/guides/mainnet-forking.html). It works with OP Mainnet.