Avalanche
Chapter 51: Avalanche Nodes
Section titled “Chapter 51: Avalanche Nodes”Overview
Section titled “Overview”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.
51.1 Avalanche Basics
Section titled “51.1 Avalanche Basics”| Feature | Value |
|---|---|
| Consensus | Avalanche (Snowman, DAG + linear chains) |
| Block Time | ~0.2-2 s (C-Chain ~2 s) |
| TPS | 4,500+ (theoretical, depends on deployment) |
| Token | AVAX |
| Networks | Mainnet, Fuji (testnet), Local network |
Key Components
Section titled “Key Components”┌─────────────────────────────────────────────────────────────┐│ AVALANCHEGO (single binary) │├─────────────────────────────────────────────────────────────┤│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ││ │ X-Chain │ │ P-Chain │ │ C-Chain │ ││ │ (DAG, AVAX │ │ (staking, │ │ (EVM, │ ││ │ transfers)│ │ validators)│ │ smart │ ││ │ │ │ │ │ contracts) │ ││ └─────────────┘ └─────────────┘ └─────────────┘ ││ (all with Snowman consensus) │└─────────────────────────────────────────────────────────────┘51.2 Node Types
Section titled “51.2 Node Types”| Type | Description | How to run |
|---|---|---|
| Validator | Participates in consensus (Primary Network), earns AVAX rewards | staking-enabled: true + whitelisted NodeID + stake |
| API Node | Serves RPC to dApps and indexers (does not need stake) | staking-enabled: false (default) |
| Archive / Full indexer | Keeps full historical chain state | pruning-enabled: false |
51.3 Install AvalancheGo
Section titled “51.3 Install AvalancheGo”Install
Section titled “Install”# 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
# Extracttar -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=ifconfigcoVerify It’s Working
Section titled “Verify It’s Working”# Health checkcurl -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"}}51.4 Configuration
Section titled “51.4 Configuration”Create Config
Section titled “Create Config”mkdir -p ~/.avalanchego/confignano ~/.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"}| Port | Protocol | Purpose |
|---|---|---|
| 9650 | TCP | HTTP JSON-RPC and WebSocket (path-based, e.g. /ext/bc/C/ws) |
| 9651 | TCP/UDP | P2P / 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.
51.5 RPC API
Section titled “51.5 RPC API”Endpoints
Section titled “Endpoints”| Endpoint | Purpose | Example path |
|---|---|---|
/ext/info | Node/network info | info.getNetworkName, info.peers |
/ext/health | Liveness/health | (no method params) |
/ext/bc/C/rpc | C-Chain (Ethereum-style JSON-RPC) | eth_blockNumber, eth_getBalance |
/ext/bc/X | X-Chain API | avm.getBalance, avm.issueTx |
/ext/bc/P | P-Chain API | platform.getCurrentValidators |
/ext/bc/C/ws | C-Chain WebSocket (EVM subscriptions) | WS endpoint |
Example
Section titled “Example”# 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-Chaincurl -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'51.6 Becoming a Validator (Summary)
Section titled “51.6 Becoming a Validator (Summary)”- Run a node with
staking-enabled: true. - Get your NodeID (
wallet getNodeID/info.getNodeID). - Add AVAX stake via the P-Chain (
platform.addDelegator/ the web wallet) — minimums are chain-governed; check current spec. - 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).
51.7 Monitoring
Section titled “51.7 Monitoring”# Health (liveness)curl -s http://localhost:9650/ext/health | jq .healthy
# Consensus / node ID / versionscurl -s -X POST http://localhost:9650/ext/info -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","method":"info.getNodeVersion","params":[],"id":1}'
# Peerscurl -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).
Summary
Section titled “Summary”- 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: trueand need NodeID + stake; API nodes just run the binary - Health:
/ext/health; chain RPCs are path-based (/ext/bc/C/rpcfor EVM calls) - Monitor health + peers + tip; configure alerts like any other node (ch38)
Next Chapter
Section titled “Next Chapter”In Chapter 52: Polkadot/Substrate Nodes, we’ll explore Polkadot.
Last Updated: 2026-09-28