Skip to content

R4R: mint use total supply instead of power#3654

Merged
cwgoes merged 4 commits intodevelopfrom
rigel/mint-supply-fix
Feb 15, 2019
Merged

R4R: mint use total supply instead of power#3654
cwgoes merged 4 commits intodevelopfrom
rigel/mint-supply-fix

Conversation

@rigelrozanski
Copy link
Copy Markdown
Contributor

@rigelrozanski rigelrozanski commented Feb 14, 2019

closes #3646

  • 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
Copy Markdown

codecov bot commented Feb 14, 2019

Codecov Report

Merging #3654 into develop will increase coverage by 0.01%.
The diff coverage is 28.57%.

@@             Coverage Diff             @@
##           develop    #3654      +/-   ##
===========================================
+ Coverage    60.79%   60.81%   +0.01%     
===========================================
  Files          189      189              
  Lines        14170    14173       +3     
===========================================
+ Hits          8615     8619       +4     
+ Misses        5011     5010       -1     
  Partials       544      544

Validator(Context, ValAddress) Validator // get a particular validator by operator address
ValidatorByConsAddr(Context, ConsAddress) Validator // get a particular validator by consensus address
TotalPower(Context) Int // total power of the validator set
TotalBondedTokens(Context) Int // total bonded tokens within the validator set
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

interested in the rationale behind the interface change here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Power refers to Tendermint Power which is intended to be used nearly nowhere besides for Tendermint (and slashing which needs to interface with tendermint responses) - this interface didn't make a difference pre-Tendermint Power Reduction (#3400) but now these two things are intended to mean very different values

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed with @rigelrozanski - this is much clearer, thanks

Copy link
Copy Markdown
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

🍰

Copy link
Copy Markdown
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

ACK; tiny suggested changelog wording alteration

Validator(Context, ValAddress) Validator // get a particular validator by operator address
ValidatorByConsAddr(Context, ConsAddress) Validator // get a particular validator by consensus address
TotalPower(Context) Int // total power of the validator set
TotalBondedTokens(Context) Int // total bonded tokens within the validator set
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed with @rigelrozanski - this is much clearer, thanks

@cwgoes cwgoes merged commit c0eec30 into develop Feb 15, 2019
@cwgoes cwgoes deleted the rigel/mint-supply-fix branch February 15, 2019 15:55
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.

x/mint: Inconsistency between spec and code

5 participants