Skip to content
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

Merged
merged 5 commits into from
Oct 3, 2018

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Oct 2, 2018

  • Refactored InitializeTestLCD to properly include proposing validator in genesis state.
  • Don't use consensus pubkey for operator address, but instead generate a unique one.

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 explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Oct 2, 2018

Codecov Report

Merging #2429 into develop will increase coverage by 0.02%.
The diff coverage is 78.57%.

@@             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

Copy link
Contributor

@rigelrozanski rigelrozanski left a 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 Show resolved Hide resolved
client/lcd/test_helpers.go Show resolved Hide resolved
client/lcd/test_helpers.go Outdated Show resolved Hide resolved
// append initial (proposing) validator
genDoc.Validators[0] = tmtypes.GenesisValidator{
PubKey: privVal.GetPubKey(),
Power: 1,
Copy link
Contributor

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?

Copy link
Contributor Author

@alexanderbez alexanderbez Oct 2, 2018

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.

Copy link
Contributor

@rigelrozanski rigelrozanski left a 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
Copy link
Contributor

@bez - looks like this issue which is already existing - we could merge this PR and then address this issue separately? #2339

@alexanderbez alexanderbez changed the title LCD: Properly Init Proposing Validator in Tests R4R: LCD: Properly Init Proposing Validator in Tests Oct 3, 2018
@alexanderbez
Copy link
Contributor Author

@rigelrozanski indeed -- I addressed all your comments. I think this can be merged and I can handle #2339 separately.

@rigelrozanski rigelrozanski merged commit 89d13d1 into develop Oct 3, 2018
@rigelrozanski rigelrozanski deleted the bez/2416-init-proposer-lcd-tests branch October 3, 2018 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Properly init proposer for LCD tests LCD staking - don't use pubkey operators
2 participants