specborn documentation contents ↓

Doppelganger protection #

Never run the same validator keys in two clients at the same time. Two clients signing for one key will sooner or later sign two conflicting messages, which is slashable. Doppelganger protection is a last line of defence, not a guarantee.

What it does #

With --validator-keys, the node signs nothing during the first 2 full epochs after it starts (it prints duties: doppelganger protection: watching epochs X..Y; no duty is signed before epoch Z): no attestation, aggregate, sync-committee message, PTC vote or block. Meanwhile it watches the attestations in blocks and in verified gossip for messages by its keys. If it sees one in the watched epochs, another instance is signing with the same key: the node prints

duties: DOPPELGANGER DETECTED in epoch E: a verified message of validator V for the protection window was signed by another instance (…); stopping all duties and exiting (code 3)

stops all duties and exits with exit code 3. Find and stop the other instance before you start again. A service manager that restarts the node on every exit should not restart it on code 3.

FlagEffect
--doppelganger-epochs Nwatch N full epochs instead of 2 (N ≥ 1; 0 refuses to start, exit 1)
--doppelganger-opt-outturn the protection off; a warning is printed at start; excludes --doppelganger-epochs (exit 2)

Both need --validator-keys (exit 2 otherwise). The full flag text is in the CLI reference.

The cost and when to opt out #

Every start costs at least 2 epochs (about 13 minutes with 12-second slots and 32-slot epochs) of missed duties, including any proposal in that time. Opt out only when you know no other instance can be running, for example when you restart the same node a few seconds after stopping it, and its keys exist nowhere else.

What it cannot do #

Evidence #