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 Staking ValidatorPowerRank to use "Potential Consensus Power" #4524

Merged
merged 11 commits into from
Jun 12, 2019

Conversation

rigelrozanski
Copy link
Contributor

@rigelrozanski rigelrozanski commented Jun 10, 2019

replaces #4031

gaia ref: cosmos/gaia#41

closes #3985

  • 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 a relevant changelog entry: clog add [section] [stanza] [message]

  • 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)

@rigelrozanski rigelrozanski force-pushed the rigel/3985-powerrank-use-tmint-power branch from 7a34022 to 4e3c261 Compare June 10, 2019 16:11
@codecov
Copy link

codecov bot commented Jun 10, 2019

Codecov Report

Merging #4524 into master will decrease coverage by 0.02%.
The diff coverage is 33.83%.

@@            Coverage Diff             @@
##           master    #4524      +/-   ##
==========================================
- Coverage   53.51%   53.48%   -0.03%     
==========================================
  Files         256      257       +1     
  Lines       16165    16164       -1     
==========================================
- Hits         8650     8645       -5     
- Misses       6868     6873       +5     
+ Partials      647      646       -1

@rigelrozanski rigelrozanski marked this pull request as ready for review June 10, 2019 16:59
@rigelrozanski rigelrozanski changed the title WIP Staking ValidatorPowerRank to use "Potential Consensus Power" R4R Staking ValidatorPowerRank to use "Potential Consensus Power" Jun 10, 2019
@rigelrozanski rigelrozanski added ready-for-review T: State Machine Breaking State machine breaking changes (impacts consensus). C:x/staking labels Jun 10, 2019
consensusPowerBytes := make([]byte, 8)
binary.BigEndian.PutUint64(consensusPowerBytes[:], uint64(consensusPower))

powerBytes := consensusPowerBytes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consolidated keys.go with key.go - but these previous 5 lines are the only code changes in this file

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 1 minor change only

.pending/breaking/sdk/3985-ValidatorPowerR Outdated Show resolved Hide resolved
types/staking.go Outdated Show resolved Hide resolved
Co-Authored-By: Alessio Treglia <[email protected]>
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small nits, but otherwise LGTM.

x/staking/types/keys.go Outdated Show resolved Hide resolved
x/staking/types/keys.go Outdated Show resolved Hide resolved
Co-Authored-By: Alexander Bezobchuk <[email protected]>
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@alexanderbez alexanderbez merged commit 8c89023 into master Jun 12, 2019
@alexanderbez alexanderbez deleted the rigel/3985-powerrank-use-tmint-power branch June 12, 2019 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/staking T: State Machine Breaking State machine breaking changes (impacts consensus).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Staking ValidatorPowerRank should use "Potential Consensus Power"
4 participants