How to build, run, and connect a validator to the Vela testnet.
Check your Rust version:
$ rustc --version
rustc 1.86.0 (05f9846f8 2025-03-31)
$ git clone https://github.com/OrDex78/vela-network $ cd vela-network $ cargo build --release --bin vela-node
The binary will be at ./target/release/vela-node.
$ ./target/release/vela-node --port 8001 --validator-index 0
This starts a node listening on port 8001 for P2P and port 9001 for the HTTP API and explorer. Open http://localhost:9001 to see the explorer.
--validator-index flag selects which keypair the node uses (0, 1, or 2). Each index maps to a different Ed25519 key in the hardcoded validator set.Open three terminals:
# Terminal 1: Validator 0 $ ./target/release/vela-node --port 8001 --validator-index 0 # Terminal 2: Validator 1 $ ./target/release/vela-node --port 8002 --validator-index 1 \ --bootstrap /ip4/127.0.0.1/tcp/8001 # Terminal 3: Validator 2 $ ./target/release/vela-node --port 8003 --validator-index 2 \ --bootstrap /ip4/127.0.0.1/tcp/8001
On the same machine, nodes also find each other through mDNS, so the --bootstrap flag is optional locally. It's required when connecting across machines.
Each node takes turns as leader in a round-robin schedule. You should see blocks being produced and finalized across all three terminals.
To sync with the live testnet running on Railway, bootstrap against the public node:
$ ./target/release/vela-node --port 8001 --validator-index 0 \
--bootstrap /dns4/vela-network-production.up.railway.app/tcp/8001
On startup, your node will connect to the public peer, send a sync request, and download all blocks it missed. After syncing, it participates in consensus normally.
| Flag | Default | Description |
|---|---|---|
--port | 8001 | P2P listen port (HTTP API runs on port + 1000) |
--validator-index | 0 | Which validator keypair to use (0, 1, or 2) |
--bootstrap | none | Comma-separated multiaddrs of peers to connect to |
The HTTP API runs on the P2P port + 1000 (default: 9001).
| Method | Endpoint | Description |
|---|---|---|
| GET | /status | Block height, peer count, mempool size, version |
| GET | /block/{height} | Block details by height |
| GET | /balance/{address} | Balance and nonce for an address |
| GET | /transactions/{address} | Transaction history for an address |
| GET | /validators | Validator set and current leader |
| POST | /send_tx | Submit a signed transaction (JSON body) |
| POST | /faucet/{address} | Request testnet tokens (24h cooldown) |
$ curl http://localhost:9001/status | jq
{
"block_height": 142,
"peer_count": 2,
"mempool_size": 0,
"current_leader": 1,
"version": "0.1.0"
}