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: Validator Power Dec-> Int #2958

Merged
merged 20 commits into from
Jan 2, 2019
Merged

R4R: Validator Power Dec-> Int #2958

merged 20 commits into from
Jan 2, 2019

Conversation

rigelrozanski
Copy link
Contributor

@rigelrozanski rigelrozanski commented Nov 30, 2018

Ref #2513
Closes #2327

  • 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 Nov 30, 2018

Codecov Report

Merging #2958 into develop will decrease coverage by 0.02%.
The diff coverage is 82%.

@@            Coverage Diff             @@
##           develop   #2958      +/-   ##
==========================================
- Coverage    54.82%   54.8%   -0.03%     
==========================================
  Files          133     133              
  Lines         9552    9545       -7     
==========================================
- Hits          5237    5231       -6     
+ Misses        3994    3993       -1     
  Partials       321     321

@rigelrozanski rigelrozanski changed the title WIP: Validator Power Dec-> Int R4R: Validator Power Dec-> Int Nov 30, 2018
@rigelrozanski rigelrozanski added ready-for-review T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). and removed wip labels Nov 30, 2018
Copy link
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.

Hmm, as far as I can see this doesn't address the key point in #2513, which is dealing with the case when power (as a big.Int) exceeds int64 bounds. Is it intended to?

types/int.go Outdated Show resolved Hide resolved
@rigelrozanski
Copy link
Contributor Author

rigelrozanski commented Dec 4, 2018

@cwgoes - thanks for explaining #2513, yeah this PR doesn't resolve that issue, but I reckon will make solving this issue a bit smoother. I've changed the description header to REF for #2513, and added closes to #2327 (which was the intended issue)

@rigelrozanski
Copy link
Contributor Author

Remaining task before merge:

  • all places where fractional atoms are burned or moved should be outlined in the docs!

@cwgoes
Copy link
Contributor

cwgoes commented Dec 6, 2018

All the tests seem to fail, is there a known issue or an unknown issue?

types/int.go Outdated Show resolved Hide resolved
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.

Left two minor comments, but otherwise the changes LGTM.

x/stake/types/validator.go Outdated Show resolved Hide resolved
@rigelrozanski
Copy link
Contributor Author

@cwgoes I made a small oopsie - all fixed

@rigelrozanski rigelrozanski mentioned this pull request Dec 6, 2018
4 tasks
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.

LGTM ☕️

Copy link
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.

Tested ACK - although @rigelrozanski did you get to make the docs updates you wanted to?

@cwgoes
Copy link
Contributor

cwgoes commented Dec 8, 2018

Also needs a rebase since the changes for the gaia-9002 fix PR.

@cwgoes
Copy link
Contributor

cwgoes commented Dec 11, 2018

@rigelrozanski If you have a chance to rebase this I think we can merge it - pending my question about docs updates.

@rigelrozanski
Copy link
Contributor Author

K yeah I will rebase soon probably this weekend - may add a doc section describing the nuances involved with distribution shares - however no trimmings are actually burned anymore, just shifted to the last delegator within a validator.

@alexanderbez
Copy link
Contributor

@rigelrozanski any updates here? Looks like this is ready to be merged pending a rebase?

@rigelrozanski
Copy link
Contributor Author

ready to be merged! so long as no CI fails unexpectedly here

Copy link
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.

IMO we need better justification for the defensive mins / maxes - I'd rather figure out what specific sort of rounding or truncation is leading to their requirement, then fix that.

x/stake/types/validator.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/staking T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants