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.
| Flag | Effect |
|---|---|
--doppelganger-epochs N | watch N full epochs instead of 2 (N ≥ 1; 0 refuses to start, exit 1) |
--doppelganger-opt-out | turn 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 #
- It only notices a duplicate that is already signing and visible on the network during the watched epochs. Two instances started at the same time both wait, then both sign.
- It watches attestations only. A second client that only proposes is not detected.
- It does not replace slashing protection, which is still required for every slashable signature (Slashing protection).
Evidence #
- PROVED: the shipped doppelganger state is the reference specification's (
docs/pieces/vduty.md§16.2,Doppelganger.*). - TESTED (live): in the D-25 campaign's high-blob Fulu run, the doppelganger step passed: an instance exited with code 3, and no slashable message was found (
docs/pieces/d25.md, blobs-r1). Earlier, on a local devnet, a second instance with the same keys exited with code 3 having signed nothing (docs/pieces/vduty.md§19.5, §19.5b). That run used an earlier binary of the duty piece; the record states no change to doppelganger protection since. The devnet tooling has a doppelganger harness (scripts/devnet/doppelganger.sh, piece valnet).