-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R4R: LCD: Properly Init Proposing Validator in Tests #2429
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2429 +/- ##
===========================================
+ Coverage 61.52% 61.55% +0.02%
===========================================
Files 122 122
Lines 7486 7491 +5
===========================================
+ Hits 4606 4611 +5
Misses 2561 2561
Partials 319 319 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool - few commments
client/lcd/test_helpers.go
Outdated
// append initial (proposing) validator | ||
genDoc.Validators[0] = tmtypes.GenesisValidator{ | ||
PubKey: privVal.GetPubKey(), | ||
Power: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason this is stalling is because the one validator which is actually online aka "validator-1" only has a fraction of the voting power, the network will not stall if it's power is greater than 2/3, ideally should be 99.9999% of the voting power so it's the only proposer for all blocks, hence no down time... let's switch power to something much larger? maybe 999999
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh yes, good catch. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing: The one test which really gets at the root of what is actually needed in distribution is to test that validator-1 is actually initialized to the staking state (aka can retrieve validator record) - want to investigate if this already exists in one of the lcd tests?
@rigelrozanski indeed -- I addressed all your comments. I think this can be merged and I can handle #2339 separately. |
InitializeTestLCD
to properly include proposing validator in genesis state.closes #2416
closes #2034
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: