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.

On this page
  1. Two keys
  2. The never-double-sign rule
  3. What you must do

Two keys#

KeyWhere it livesWhat it doesIf 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 nodeA 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 hostApproves 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-state folder, and never run both copies.
  • Never restore signing-state from a backup, and never delete it to "fix" a start-up refusal. Either can produce a double signature.
  • --init-signing-state is 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:commitment obtained out of band.
Lathen documentation.