Skip to content

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:

toml
pruning = "nothing"

Standard Pruned Mode

Preserves recent state information while discarding older data to optimize disk utilization.

Implementation in app.toml:

toml
pruning = "default"

Aggressive Pruning Mode

Retains minimal historical data while keeping sufficient information for block validation.

Implementation in app.toml:

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:

toml
[rpc]
laddr = "tcp://0.0.0.0:26657"

Cosmos gRPC Service

Establishes gRPC connectivity for Cosmos ecosystem interactions.

Setup in app.toml:

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:

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:

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:

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:

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:

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 PurposeData RetentionAPI ServicesNetwork Role
ValidatorPruned StorageNoneIsolated
Ethereum GatewayPruned StorageEthereum JSON RPC and WSSecurity Gateway
Cosmos GatewayPruned StorageCosmos gRPC and REST APISecurity Gateway
Discovery NodeAggressive PruningNoneDiscovery
Archive ServiceComplete HistoryNoneIsolated

For more detailed configuration parameters and advanced settings, please consult the Configuration Reference.