fix(test): gremlin restarts all instances of a node together#2245
Open
beskrovnykh wants to merge 1 commit intoton-blockchain:testnetfrom
Open
fix(test): gremlin restarts all instances of a node together#2245beskrovnykh wants to merge 1 commit intoton-blockchain:testnetfrom
beskrovnykh wants to merge 1 commit intoton-blockchain:testnetfrom
Conversation
Previously gremlin picked a single instance to kill. For double-node validators (two instances sharing the same key), this left the other instance running. The restarted instance would vote differently, triggering CHECK "We produced conflicting votes!" (pool.cpp:532). Now gremlin selects a node and restarts all its instances together, so double-nodes stay in sync after a gremlin cycle.
825110c to
aba49a5
Compare
Collaborator
|
I'm not entirely convinced I want to keep |
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.
Summary
Gremlin previously picked a single instance to kill. For double-node validators (two instances sharing the same key), this left the other instance running. The restarted instance would vote differently, triggering CHECK "We produced conflicting votes!" (pool.cpp:532).
Now gremlin selects a node and restarts all its instances together, so double-nodes stay in sync after a gremlin cycle.
Reproduction (before fix)
./test-consensus -n 8 --n-double-nodes 2 --gremlin-period 0.5:2 \ --gremlin-downtime 0.3:1.0 --gremlin-n 2 --net-ping 0.05:0.2 \ --duration 30 # CHECK crash 3/3 runsTest plan
./test-consensus -n 8 --gremlin-period 5:10 --gremlin-downtime 2:4 --duration 30— gremlin without double-nodes still works./test-consensus -n 8 --n-double-nodes 2 --gremlin-period 0.5:2 --gremlin-downtime 0.3:1.0 --gremlin-n 2 --net-ping 0.05:0.2 --duration 30— no longer crashes