Requirements

  • Rust 1.76+ (for building from source)
  • Docker + Docker Compose (for the pre-built image path)
  • ~2 GB free disk per node (sled DB)

Path A — Docker

The fastest way to get the full 4-validator testnet topology running locally.
That boots:
  • yc-node validators on isolated networks
  • 1× nginx serving the block explorer / wallet / simulator / dashboard
  • 1× YScan indexer
  • Shared genesis.json
Health check:

Path B — from source

For development / debugging:
Then boot nodes 2–4 on ports 8546/8547/8548 pointing at the same genesis with different validator keys.

Join an existing testnet (observer)

An observer node doesn’t propose blocks — it just syncs state and serves RPC. Useful if you want a local RPC URL without the latency of the public VPS.
The observer will sync from genesis (a few seconds per 1000 blocks) and then track the head in real time.

Logs

Key log events to watch:

Troubleshooting

The node refuses to start if its computed genesis hash differs from what’s already in the DB. Either restore the genesis.json used originally, or wipe the DB (docker volume rm youthchain_chain_data or rm -rf data/node-1).
Rare, but happens after hard kills. Wipe the DB and resync — the chain is deterministic so you’ll get byte-identical state back.
Check that at least ⌊2N/3⌋+1 peers are online and that their registered BLS keys match what they’re actually signing with. A mismatch often means the peer has stale keys from a previous chain.