Interacting with a node through CLI
This guide provides a concise, technical overview of interacting with a validator node through its Command Line Interface (CLI). Commands are presented generically; replace <client>
with your specific client binary (e.g., Lighthouse
, Reth
).
CLI Basics
Installation and Setup
Installation typically involves downloading a pre-compiled binary from the client's official GitHub releases page or building from source. Always verify the binary's checksum.
Setup requires both an Execution Client (e.g., Reth
) and a Consensus Client. They communicate via a JWT secret.
Basic Commands
Interaction follows a standard structure: <client> <subcommand> [flags]
.
Beacon Node: The core consensus component:
Validator Client: Manages your validator keys and duties:
Configuration Management
Configuration is managed through command-line flags or a configuration file (e.g., config.toml
). Flags always override
settings in the configuration file.
Flag Example:
Configuration File; Using a file is recommended for managing numerous settings:
Help and Documentation
Access built-in help for any command or subcommand using the --help
flag.
Note
For comprehensive details, always refer to the client's official online documentation.
Node Management
Starting and Stopping the Node
Starting: Execute the command to run the beacon node and validator client processes. For production environments, it is
standard practice to run these as systemd
services for automatic startup and management.
Stopping: If running directly in the terminal, press Ctrl+C
. If running as a service, use systemctl
.
Status Checking and Monitoring
Clients expose a REST API for status checks. Ensure the API is enabled (--http
flag) and secured.
Log Management
Logs provide critical insight into node operations. By default, logs are sent to standard output (stdout
).
Log Level: Control verbosity with the --log-level
flag (e.g., info
, debug
, warn
, error
). The debug
level is
useful for troubleshooting but is very verbose.
Service Logs: When running as a systemd
service, use journalctl
to view and manage logs.
Troubleshooting Common Issues
Peering Issues: If your peer count is low or zero, check:
- Firewall rules are correctly configured to allow the client's P2P port (e.g.,
9000/tcp
). - The client is fully synced.
- Your
--p2p-port
flag is correctly set.
Time Sync Errors: The Nexera network is highly sensitive to time. Errors related to "slot in the future" or "invalid
timestamp" indicate your system clock is out of sync. Install and enable a time synchronization service like chrony
.
JWT Authentication Errors: If the execution and consensus clients cannot communicate, verify that both are configured
to use the exact same JWT secret file (--jwt-secret
flag).
Performance Optimization Commands
Performance can be tuned with specific flags, which vary by client.
Peer Management: Adjust the number of peers to balance network connectivity with resource usage.
Database Cache: Allocate more RAM to the database cache to improve read/write performance, which is especially important during initial sync.
Resource Limiting: Some clients offer flags to limit CPU usage to prevent the node from consuming all available system resources.