Skip to content

Avalanche

Avalanche is a high-performance blockchain platform using the novel Avalanche consensus (repeated random subsampling / Snowman for linear chains). A single AvalancheGo process runs all three Primary Network chains (X-Chain, P-Chain, C-Chain) plus any subnets.


FeatureValue
ConsensusAvalanche (Snowman, DAG + linear chains)
Block Time~0.2-2 s (C-Chain ~2 s)
TPS4,500+ (theoretical, depends on deployment)
TokenAVAX
NetworksMainnet, Fuji (testnet), Local network
┌─────────────────────────────────────────────────────────────┐
│ AVALANCHEGO (single binary) │
├─────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ X-Chain │ │ P-Chain │ │ C-Chain │ │
│ │ (DAG, AVAX │ │ (staking, │ │ (EVM, │ │
│ │ transfers)│ │ validators)│ │ smart │ │
│ │ │ │ │ │ contracts) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ (all with Snowman consensus) │
└─────────────────────────────────────────────────────────────┘

TypeDescriptionHow to run
ValidatorParticipates in consensus (Primary Network), earns AVAX rewardsstaking-enabled: true + whitelisted NodeID + stake
API NodeServes RPC to dApps and indexers (does not need stake)staking-enabled: false (default)
Archive / Full indexerKeeps full historical chain statepruning-enabled: false

Terminal window
# Download a release (check the releases page for the current version)
wget https://github.com/ava-labs/avalanchego/releases/download/v1.11.10/avalanchego-linux-amd64-v1.11.10.tar.gz
# Extract
tar -xzf avalanchego-linux-amd64-v1.11.10.tar.gz
# Run (flags first run: connects to mainnet, serves API on 9650)
./avalanchego --public-ip-resolution-service=ifconfigco
Terminal window
# Health check
curl -s http://localhost:9650/ext/health | jq
# Which network am I on?
curl -s -X POST http://localhost:9650/ext/info \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"info.getNetworkName","params":[],"id":1}'
# → {"result":{"networkName":"mainnet"}}

Terminal window
mkdir -p ~/.avalanchego/config
nano ~/.avalanchego/config/config.json
{
"network-id": "mainnet",
"http-host": "0.0.0.0",
"http-port": 9650,
"staking-enabled": false,
"track-rewards": true,
"public-ip-resolution-service": "ifconfigco",
"log-level": "INFO"
}
PortProtocolPurpose
9650TCPHTTP JSON-RPC and WebSocket (path-based, e.g. /ext/bc/C/ws)
9651TCP/UDPP2P / staking (validators must open this; API-only nodes don’t need it)
9650 (ext)TCP/ext/health, /ext/info, /ext/bc/C/rpc, …

⚠️ Common mistake: WebSocket is not on a separate port — AvalancheGo serves WS on 9650 at chain-specific paths (ws://host:9650/ext/bc/C/ws). Port 9651 is P2P/staking.


EndpointPurposeExample path
/ext/infoNode/network infoinfo.getNetworkName, info.peers
/ext/healthLiveness/health(no method params)
/ext/bc/C/rpcC-Chain (Ethereum-style JSON-RPC)eth_blockNumber, eth_getBalance
/ext/bc/XX-Chain APIavm.getBalance, avm.issueTx
/ext/bc/PP-Chain APIplatform.getCurrentValidators
/ext/bc/C/wsC-Chain WebSocket (EVM subscriptions)WS endpoint
Terminal window
# Get the C-Chain's chain ID (Ethereum-style request to /rpc)
curl -s -X POST http://localhost:9650/ext/bc/C/rpc \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
# Latest block number on C-Chain
curl -s -X POST http://localhost:9650/ext/bc/C/rpc \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
# Current validators (P-Chain)
curl -s -X POST http://localhost:9650/ext/bc/P \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"platform.getCurrentValidators","params":{},"id":1}' | jq '.result.validators | length'

  1. Run a node with staking-enabled: true.
  2. Get your NodeID (wallet getNodeID / info.getNodeID).
  3. Add AVAX stake via the P-Chain (platform.addDelegator / the web wallet) — minimums are chain-governed; check current spec.
  4. Wait for the node to be added to the validator set at the next cycle.
{
"staking-enabled": true,
"staking-port": 9651,
"public-ip-resolution-service": "ifconfigco"
}

Firewall: open 9651 TCP+UDP inbound for validators (plus 9650 for API access if desired).


Terminal window
# Health (liveness)
curl -s http://localhost:9650/ext/health | jq .healthy
# Consensus / node ID / versions
curl -s -X POST http://localhost:9650/ext/info -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"info.getNodeVersion","params":[],"id":1}'
# Peers
curl -s -X POST http://localhost:9650/ext/info -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"info.peers","params":{}, "id":1}' | jq '.result.peers | length'

AvalancheGo does not ship a built-in Prometheus endpoint by default; metrics modes (-metrics-enabled) and community exporters exist — prefer health + RPC-derived signals for alerting (same principle as Chapter 36/38).


  • AvalancheGo runs X / P / C chains (and subnets) from one binary
  • HTTP and WebSocket both live on 9650 (path-based); 9651 is the P2P/staking port
  • Validators set staking-enabled: true and need NodeID + stake; API nodes just run the binary
  • Health: /ext/health; chain RPCs are path-based (/ext/bc/C/rpc for EVM calls)
  • Monitor health + peers + tip; configure alerts like any other node (ch38)

In Chapter 52: Polkadot/Substrate Nodes, we’ll explore Polkadot.


Last Updated: 2026-09-28