Node Operations
Last updated
Last updated
This section provides a low-level explanation of how the services work, which is essential for debugging, even if the infrastructure is built using Kubernetes (K8s). Kubernetes also utilizes these methods under the hood.
For deployment and management using Kubernetes (K8s), refer to this link
To ensure proper operation, the nodes must be started in the order specified in this document and shut down in the reverse order:
Start up the node
Archive Mode: It is crucial to run the op-geth node in archive mode using the -gcmode
flag. Archive mode enables recording all historical data at any block number, which is particularly useful for recovery in case of issues.
WebSocket Support: Use the —ws
flag to enable WebSocket. This allows DApps to listen for events on the L2 network.
Shut down the node
Using archive mode can help reduce data loss in case shutting down unexpectedly. However, the op-geth needs to be stopped gracefully by sending a SIGINT
signal to the op-geth process.
The archive mode cannot address all scenarios, so it is beneficial to have another replica of op-geth and op-node running in sync with each other. This redundancy ensures that if one node goes down unexpectedly, the other can continue providing data and minimize downtime.
Some command examples for shutting down the op-geth node (all commands must to send SIGINT
signals).
Start up the node
op-node processes L1’s data, communicates with op-geth and instructs op-geth on how to build L2.
Example command and result:
Shut down the node
The op-node process is stateless, allowing it to be terminated using any method without risk of data loss.
Start up the node
To activate the Fault Proof System, provide the contract address of the Fault Dispute Game Factory.
Ensure the --allow-non-finalized
flag remains set to false
on the mainnet (default value is false
).
Enable admin option.
Shut down the node
The node process can be terminated using any method, as it does not require a specific shutdown procedure.
Start up the node
Example command and result:
Shut down the node
We need to send this command first to the op-batcher process to stop the process gracefully.
Wait until the Batcher service stops then terminate the process:
Start up the node
Shut down the node
The op-challenger service is stateful, so to safely stop the process, you must send a SIGINT signal to the op-challenger process.
Check service configuration: Thanos stack’s services run by executing the binary file with configurable parameters or environment variables. So to understand the configuration, we need to check.
The parameters
The environment variables