For DevelopersNodesNodes

Running Nodes

GX Chain supports running external nodes that replicate the full chain state. Nodes enable direct access to block data, independent verification, and local API access without rate limits.

Node Types

TypeDescriptionUse Case
Non-validating nodeReplicates state, does not participate in consensusData indexing, local API access, block exploration
Validator nodeParticipates in consensus and block productionNetwork security (requires staking)

Most developers and integrators should run a non-validating node. Validator nodes require staking and are covered in the validator documentation.

Why Run a Node

BenefitDescription
No rate limitsAccess the full API locally without public endpoint rate limits
Lower latencyEliminate network round-trip to the public API
Data independenceVerify chain state independently without trusting a third party
Custom indexingBuild custom indexes over historical block data
Archival accessQuery any historical block without restrictions

System Requirements

Non-Validating Node

ResourceMinimumRecommended
CPU4 cores8 cores
RAM16 GB32 GB
Storage500 GB SSD1 TB NVMe SSD
Network100 Mbps1 Gbps
OSLinux (Ubuntu 22.04+)Linux (Ubuntu 22.04+)

Storage requirements grow over time as the chain accumulates blocks. Plan for approximately 1 GB per day of additional storage.

Quick Start

1. Download the Binary

# Download the latest gx-node release
curl -L https://releases.gx.exchange/gx-node/latest/gx-node-linux-amd64 -o gx-node
chmod +x gx-node

2. Initialize Configuration

./gx-node init --network mainnet --data-dir /data/gx-node

This creates the data directory and downloads the genesis configuration.

3. Start the Node

./gx-node start \
  --network mainnet \
  --data-dir /data/gx-node \
  --rpc-addr 0.0.0.0:3001 \
  --api-addr 0.0.0.0:4001 \
  --ws-addr 0.0.0.0:4000

4. Verify Sync Status

curl http://localhost:4001/v1/height

The node is fully synced when the reported height matches the public API:

curl https://api.gx.exchange/v1/height

Configuration

Configuration File

Located at {data-dir}/config.toml:

[network]
chain_id = 42069
seeds = ["seed1.gx.exchange:26656", "seed2.gx.exchange:26656"]
 
[rpc]
listen_addr = "0.0.0.0:3001"
max_connections = 100
 
[api]
listen_addr = "0.0.0.0:4001"
cors_allowed_origins = ["*"]
 
[websocket]
listen_addr = "0.0.0.0:4000"
max_connections = 1000
 
[storage]
data_dir = "/data/gx-node"
pruning = "none"  # "none" for archive, "default" for pruned
 
[logging]
level = "info"
format = "json"

Pruning Options

ModeDescriptionStorage Impact
noneKeep all historical blocks (archive node)Grows indefinitely
defaultKeep last 100,000 blocksBounded storage
aggressiveKeep last 10,000 blocksMinimal storage

Ports

PortProtocolService
3001HTTPEVM JSON-RPC
4001HTTPREST API
4000WebSocketReal-time data
26656TCPP2P (peer discovery)
26657HTTPTendermint RPC

Monitoring

The node exposes Prometheus metrics at /metrics on the API port:

curl http://localhost:4001/metrics

Key metrics:

MetricDescription
gx_node_block_heightCurrent synced block height
gx_node_peer_countNumber of connected peers
gx_node_sync_lag_secondsSeconds behind the chain tip
gx_node_rpc_requests_totalTotal RPC requests served
gx_node_evm_gas_usedCumulative EVM gas processed

Sections