Skip to content

fix(setup): remove shared validator key copy — prevents double-signing slash#42

Open
amathxbt wants to merge 1 commit into
canopy-network:masterfrom
amathxbt:fix/setup-shared-validator-key
Open

fix(setup): remove shared validator key copy — prevents double-signing slash#42
amathxbt wants to merge 1 commit into
canopy-network:masterfrom
amathxbt:fix/setup-shared-validator-key

Conversation

@amathxbt

Copy link
Copy Markdown

Bug

setup.sh copies node1's validator_key.json and keystore.json directly into canopy_data/node2/:

cp canopy_data/node1/validator_key.json canopy_data/node2/
cp canopy_data/node1/keystore.json canopy_data/node2/

This makes both nodes share an identical validator key. In consensus, both nodes will sign the same block height with the same key from different network identities — this is equivocation (double-signing).

Impact: The protocol treats double-signing as a Byzantine fault. The shared validator is slashed and permanently removed from the active validator set. Any operator who follows the README and runs setup.sh as documented has their validator immediately at risk.

Fix

Remove the copy commands. Replace them with a warning that clearly tells the operator to initialise a separate key for node2 using canopy init, and provide the exact command to do so.

Each node in a multi-validator deployment must hold a unique validator_key.json.

The script was copying node1/validator_key.json and node1/keystore.json
into canopy_data/node2/, making both nodes sign consensus messages with
the identical validator key.

Running two validators with the same key is equivocation (double-signing).
The protocol treats it as a Byzantine fault and slashes the validator.

Remove the copy commands and replace them with a clear warning and the
correct command to initialise a fresh key for node2 via canopy init.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant