Node Configuration Guide
This guide presents the configuration alternatives available for nodes in the XOS Testnet ecosystem. Proper configuration is crucial for ensuring your node fulfills its intended purpose within the network. In this document, we explore configuration options organized into three main categories: data retention strategies, API availability, and peer networking setups.
Data Retention Configurations
Depending on your node's purpose, you can implement different data retention strategies:
Full Archive Mode
Maintains complete historical data since genesis. Ideal for historical state queries and in-depth chain analytics.
Implementation in app.toml
:
pruning = "nothing"
Standard Pruned Mode
Preserves recent state information while discarding older data to optimize disk utilization.
Implementation in app.toml
:
pruning = "default"
Aggressive Pruning Mode
Retains minimal historical data while keeping sufficient information for block validation.
Implementation in app.toml
:
pruning = "everything"
API Exposure Options
Your node can offer various API interfaces depending on its intended functionality:
Tendermint RPC Interface
Delivers Tendermint-specific endpoints for consensus operations and block information.
Setup in config.toml
:
[rpc]
laddr = "tcp://0.0.0.0:26657"
Cosmos gRPC Service
Establishes gRPC connectivity for Cosmos ecosystem interactions.
Setup in app.toml
:
[grpc]
enable = true
address = "0.0.0.0:9090"
Cosmos REST API
Offers RESTful endpoints for blockchain interaction within the Cosmos ecosystem.
Setup in app.toml
:
[api]
enable = true
address = "tcp://0.0.0.0:1317"
Ethereum Compatibility Layer
Provides Ethereum-compatible JSON-RPC and WebSocket interfaces for EVM interactions.
Setup in app.toml
:
[json-rpc]
enable = true
address = "0.0.0.0:8545"
ws-address = "0.0.0.0:8546"
Network Topology Configurations
Configure your node's role in the peer-to-peer network:
Discovery Node
Maintains an extensive peer directory to facilitate network discovery without participating in consensus.
Setup in config.toml
:
[p2p]
max_num_inbound_peers = 200
max_num_outbound_peers = 500
pex = true
seed_mode = true
Security Gateway Node
Functions as a protective barrier, enhancing validator security by preventing direct network exposure.
Setup in config.toml
:
[p2p]
unconditional_peer_ids = "validator_node_id"
private_peer_ids = "validator_node_id"
addr_book_strict = false
pex = true
Isolated Validator Node
Operates with minimal network exposure, connecting exclusively to designated peers.
Setup in config.toml
:
[p2p]
persistent_peers = "sentry_node_ids"
private_peer_ids = ""
double_sign_check_height = 10
pex = false
Configuration Templates
This reference table demonstrates recommended configurations for common node roles:
Node Purpose | Data Retention | API Services | Network Role |
---|---|---|---|
Validator | Pruned Storage | None | Isolated |
Ethereum Gateway | Pruned Storage | Ethereum JSON RPC and WS | Security Gateway |
Cosmos Gateway | Pruned Storage | Cosmos gRPC and REST API | Security Gateway |
Discovery Node | Aggressive Pruning | None | Discovery |
Archive Service | Complete History | None | Isolated |
For more detailed configuration parameters and advanced settings, please consult the Configuration Reference.