Node Base Configuration
Always run pnc--batcher and pnc-geth in a one-to-one configuration. Don't run multiple pnc-geth instances behind one pnc--batcher, or vice versa.
To configure your node, you will need to do the following:
- Configure
pnc--batcherto point to the correct L1,pnc-geth, and L2 network. - Initialize
pnc-gethwith the correct network parameters. - Configure
pnc-gethto properly communicate with the Rollup Node. - Optionally, configure Legacy Geth.
Configuring pnc-geth
Although the Docker image for the Execution Engine is called pnc-geth, the actual binary is still called geth in order to minimize differences between pnc-geth and go-ethereum. You can see the difference here.
pnc-geth stores its state in a database that requires initialization.
Depending on the network you're running, initialization is done one of three ways:
- With Network Flags: This initializes the genesis information and chain configuration from the superchain-registry.
- With a Genesis File: This is for deployments that are not migrated from a legacy network (i.e. Pinnacle Sepolia). In this case, you'll use a genesis file and initialize the data directory via
geth init. - With a Data Directory: This is used for networks that are migrated from a legacy network. This currently only includes PNC 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.
Regardless of how pnc-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 PNC Mainnet data directory is ~1.6TB for a full node and ~5TB for an archival node.
Initialize pnc-geth
Instructions for each initialization method are below. If you're spinning up an PNC Mainnet, use the Initialization via Data Directory path. If you're spinning up an Pinnacle Sepolia node, use the Initialization via Network Flags path.
Initialization via Network Flags
To initialize pnc-geth with the network flags, you simply need to set the
--op-network=<value> and --network=<value> on pnc--batcher. To see the latest
support networks, you can consult the --help output for the op-network
option.
Initialization via Genesis File
pnc-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:
#!/bin/sh
FILE=/$DATADIR/genesis.json
OP_GETH_GENESIS_URL=<<insert pnc-geth url to the genesis file>>
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."
fiInitialization via Data Directory
To initialize pnc-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:
curl -o <path to data directory> -sL <URL to data directory>
tar -xvf <path to data directory>Configuration
Once pnc-geth is initialized, it can be configured via CLI flags. pnc-geth accepts all the standard go-ethereum flags (opens in a new tab) as well as a few extra flags that are specific to Pinnacle Chain. 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.pnc-gethwill routeeth_sendRawTransactioncalls 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 totruesince transaction pool gossip is currently unsupported.
To communicate with pnc--batcher 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:
openssl rand -hex 32 > jwt.txtThen, specify the following flags:
--authrpc.addr: Sets the addresspnc-geth's authenticated RPC should listen on.--authrpc.port: Sets the portpnc-geth's authenticated RPC should listen on. The default value is8551.--authrpc.jwtsecret: Sets the path to a JWT secret file you generated above.
Recommended Flags for pnc-geth Configuration
You may also want to specify the following flags based on your configuration:
--authrpc.vhosts: Whitelists which hosts (as defined in theHostheader) are allowed to access the authenticated RPC endpoint. This is useful if you're runningpnc-gethon containerized infrastructure. The default value islocalhost.--http.vhosts: Whitelists which hosts (as defined in theHostheader) are allowed to access the unauthenticated RPC endpoint. This is useful if you're runningpnc-gethon containerized infrastructure. The default value islocalhost.--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 pnc-geth and enables RPC over HTTP and WebSockets looks like:
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-mainnetConsult Geth's documentation (opens in a new tab) for more information on customizing pnc-geth's behavior.
Configuring pnc--batcher
pnc--batcher 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 Pinnacle Sepolia and PNC Mainnet, the genesis config is hardcoded in the pnc--batcher software and can be specified via a --network flag.
Following the Ecotone upgrade node operators must set an L1 beacon value to retrieve blobs from a Beacon node.
The pnc--batcher 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 pnc--batcher looks like:
pnc--batcher --l1=<ethereum mainnet RPC url> \
--l2=<pnc-geth authenticated RPC url> \
--network=op-mainnet \
--rpc.addr=127.0.0.1 \
--rpc.port=9545 \
--l2.jwt-secret=<path to JWT secret> \
--l1.beacon=<http endpoint address of L1 Beacon-node> \
--syncmode=execution-layerYou 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 pnc--batcher --help to see a list of all available flags and environment variables.
Configuring Peer-to-Peer Networking
Unlike the previous system, the pnc--batcher participates in a peer-to-peer network. This network is used to distribute blocks that have not been submitted to L1 yet. The pnc--batcher 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 pnc--batcher 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 PNC Mainnet (but not Pinnacle 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.
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 <path to data directory>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 pnc-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 pnc-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_calleth_estimateGasdebug_traceBlockByNumberdebug_traceBlockByHashdebug_traceCalldebug_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
- See the pnc--batcher configuration guide for additional configuration options for
pnc--batcherand the Consensus-Layer. - Similarly, visit the pnc-geth configuration guide for additional configuration options for
pnc-gethand Execution-Layer. - If you run into any problems, please reach out to our developer support forum for help.