Repository navigation
Running a private network
Adam Waldenberg edited this page Oct 23, 2026
·
3 revisions
A private network is a set of nodes that dial only each other and trust board keys of their own. Use it to try the ledger, the sporks and the commands before they are used on the real network.
Never give a private network the real board keys. A spork is signed over its content and nothing names the network, so a spork made on a private network with the real keys would be accepted on the real one.
| What | How |
|---|---|
| No dialling of the seed nodes | --no-seeds |
| Board keys of your own |
--network-keys <public>,<public>, on every node and on every signing command, two or more keys made with hedgehog util key-generate; --retired-network-keys names older keys that count in a spork's history |
| Ports that do not collide |
-p for the peer-to-peer port and -r for the REST port, different for each node on a machine |
| A data directory of its own | On Linux, XDG_DATA_HOME, see Running Hedgehog
|
The nodes find each other only when told: start one with --no-seeds, then give each of the others the address
of a node already running, hedgehog cli --restport <r> node-add <ip>:<p>.
- Make a key for each validator,
hedgehog util ledger-key-generate <file>, and keep the public keys it prints. - Put a snapshot in the data directory of every node as
bootstrap.dat. A snapshot that is there is not downloaded again. A node uses it only if one of its own board keys signed it, so the published snapshot, signed by the real keys, does not do: cut its signature off a copy and sign the copy withhedgehog bootstrap sign. The genesis commits to the content, which stays the same. - Make the genesis from the snapshot and the public keys with
hedgehog util ledger-genesis, see Running a ledger node, and give the same file to every node. - Start each node with
--ledger --ledger-genesis <file> --ledger-key <file>. - Propose the mint supply, mint storage, fee and blacklist sporks with
gridspork-setandgridspork-grow, and co-sign them with the second board key. The signing commands take the same--network-keysand--retired-network-keysas the nodes, and the board key from-k,--key-fileor$HEDGEHOG_BOARD_KEY; it never leaves the machine. See Ledger sporks and Grid sporks. Until thenhedgehog cli ledger infolists them as unset. - Check that every node shows the same chain id, that it is running and that the validators sign.
rehearsal/ledger-rehearsal.sh in the source does all of this for four nodes on one machine, and sends a mint
and a transfer through them.