-
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
Sum validator operator's all voting power #5107
Conversation
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.
I believe the changes to the tally logic are correct. I added a comment and I would also request to add a changelog entry. @sunnya97 does this make sense?
Codecov Report
@@ Coverage Diff @@
## master #5107 +/- ##
=========================================
Coverage ? 53.35%
=========================================
Files ? 290
Lines ? 17696
Branches ? 0
=========================================
Hits ? 9441
Misses ? 7518
Partials ? 737 |
bump @Ruihuan on a changelog entry :) |
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.
ACK 🎉
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.
After reviewing with @rigelrozanski, I believe we need to handle a special case for self-delegation -- i..e we don't want double accounting.
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.
Thanks! there is one issue which needs to be addressed per my review comments.
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.
ACK, but we should probably have a test case that checks the self-delegation case.
Good catch on the logic bug. Thanks! |
…g power from validator. (cosmos#5107)
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.
ACK
Mind resolving changelog conflicts @Ruihuan and then we'll get this merged :) |
Sunny approved given the changes requested were made which the were.
If an address is a validator operator and it's delegated to another validator. When the address vote for a proposal, it just sums the voting power about its own validator. Here should sums its voting power under other validators that delegated to.