fix(setup): remove shared validator key copy — prevents double-signing slash#42
Open
amathxbt wants to merge 1 commit into
Open
fix(setup): remove shared validator key copy — prevents double-signing slash#42amathxbt wants to merge 1 commit into
amathxbt wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
setup.shcopies node1'svalidator_key.jsonandkeystore.jsondirectly intocanopy_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.shas 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.