Keys and the never-double-sign rule
The two validator keys, the one rule that must never be broken, and how the software protects you.
Two keys#
| Key | Where it lives | What it does | If it leaks |
|---|---|---|---|
| Consensus key (hot) | On the validator host, in a file readable only by the node (--validator-key) | Signs proposals, votes and the network-layer binding to your node | A thief can sign two conflicting messages in your name. The evidence names you. They cannot change the validator set. |
| Governance key (cold) | Offline, never on the validator host | Approves changes to the validator set. A quorum of governance keys controls the set completely. | They contribute to a quorum that can change the set |
There is no hardware-backed signer. Process memory on a general-purpose host is the real exposure of the hot key.
The never-double-sign rule#
A validator must sign at most one proposal, one prevote and one precommit for each height and round. Signing two different messages for the same step is the offence that breaks agreement and gets a validator named in evidence.
In plain language: never let two programs use the same key at once, and never let a copy of the key forget what it already signed.
How the software helps:
- Every signature is written to a log and flushed to disk before it is sent. If the write fails, the node stops.
- After a restart the node reads the log, restores what it signed and re-sends the same messages instead of making new ones.
- The node refuses to start as a validator if its signing state is missing, unreadable, or belongs to another chain or key. It never re-initialises state over existing logs.
- If the ledger is restored from an older copy, the node follows the chain without voting until the chain is past the highest height the key ever signed at.
What you must do#
- One key, one machine, one signing state. Never run two nodes with the same consensus key. Never copy the key to another machine without its
signing-statefolder, and never run both copies. - Never restore
signing-statefrom a backup, and never delete it to "fix" a start-up refusal. Either can produce a double signature. --init-signing-stateis only for the first start of a key that has never signed on this chain. If a validator refuses to start because the state is missing or corrupt, run the node without the key (as a follower) and have governance replace the consensus key.- Keep clocks disciplined. A validator whose clock is behind refuses honest proposals as "from the future", which costs liveness only.
- Give new nodes a recent
--checkpoint height:commitmentobtained out of band.