-
Notifications
You must be signed in to change notification settings - Fork 617
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
Finish ValSet Pref Unbonding #6630
Finish ValSet Pref Unbonding #6630
Conversation
@@ -195,7 +193,6 @@ func (k Keeper) UndelegateFromValidatorSet(ctx sdk.Context, delegatorAddr string | |||
|
|||
// Step 6 |
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.
Can we give a synopsis of Step 6 and Step 7 in the comments like the others? Was nice/helpful
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 mentioned this on slack, but I personally don't understand if this part of the algorithm is even reachable, thus should be deleted. Will hold this comment for now and either add more comment or delete this once I gain context
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.
Going to approve since this is just merging into another branch, but would like to review the branch being merged into main with more scrutiny.
Merging this, but going to transfer the comments about not reaching steps 5-7 / not testing them either, and will be a blocker for final merge. Thanks for getting this done! |
* Add helper to get existing delegations along with valset pref * Lay out more of the logic nuance * Add pseudo-code needed * algorithm v1 * added algorithm docs * fixed all test * removed unwanted files * remove more code * added more tests * update changelog * added test and addressed feedback * Update x/valset-pref/validator_set.go * Update x/valset-pref/validator_set.go * Update x/valset-pref/README.md * Minor cleanup * re-use validator gets * Refactor * Highlight bug * fixed the issue * added comments * update changelog * fixed the issue * fixed go test * fixed test * lint * Finish ValSet Pref Unbonding (#6630) * Add Test cases and fix * Update x/valset-pref/keeper.go * Adams comment * add error types and tidy test --------- Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> * feat: unbond with rebalanced val set weights (#6685) * initial push * add todo * msg server test * add godoc * custom error * update godoc * update proto and remove duplication * add more TODOs * use min when calculating amt to withdraw from last val * Update x/valset-pref/validator_set.go --------- Co-authored-by: stackman27 <sis1001@berkeley.edu> Co-authored-by: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: roman <roman@osmosis.team> Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com> Co-authored-by: Adam Tucker <adamleetucker@outlook.com>
* Add helper to get existing delegations along with valset pref * Lay out more of the logic nuance * Add pseudo-code needed * algorithm v1 * added algorithm docs * fixed all test * removed unwanted files * remove more code * added more tests * update changelog * added test and addressed feedback * Update x/valset-pref/validator_set.go * Update x/valset-pref/validator_set.go * Update x/valset-pref/README.md * Minor cleanup * re-use validator gets * Refactor * Highlight bug * fixed the issue * added comments * update changelog * fixed the issue * fixed go test * fixed test * lint * Finish ValSet Pref Unbonding (#6630) * Add Test cases and fix * Update x/valset-pref/keeper.go * Adams comment * add error types and tidy test --------- Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> * feat: unbond with rebalanced val set weights (#6685) * initial push * add todo * msg server test * add godoc * custom error * update godoc * update proto and remove duplication * add more TODOs * use min when calculating amt to withdraw from last val * Update x/valset-pref/validator_set.go --------- Co-authored-by: stackman27 <sis1001@berkeley.edu> Co-authored-by: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: roman <roman@osmosis.team> Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> (cherry picked from commit e12011b)
* Add helper to get existing delegations along with valset pref * Lay out more of the logic nuance * Add pseudo-code needed * algorithm v1 * added algorithm docs * fixed all test * removed unwanted files * remove more code * added more tests * update changelog * added test and addressed feedback * Update x/valset-pref/validator_set.go * Update x/valset-pref/validator_set.go * Update x/valset-pref/README.md * Minor cleanup * re-use validator gets * Refactor * Highlight bug * fixed the issue * added comments * update changelog * fixed the issue * fixed go test * fixed test * lint * Finish ValSet Pref Unbonding (#6630) * Add Test cases and fix * Update x/valset-pref/keeper.go * Adams comment * add error types and tidy test --------- Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> * feat: unbond with rebalanced val set weights (#6685) * initial push * add todo * msg server test * add godoc * custom error * update godoc * update proto and remove duplication * add more TODOs * use min when calculating amt to withdraw from last val * Update x/valset-pref/validator_set.go --------- Co-authored-by: stackman27 <sis1001@berkeley.edu> Co-authored-by: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: roman <roman@osmosis.team> Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> (cherry picked from commit e12011b) Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
* Add helper to get existing delegations along with valset pref * Lay out more of the logic nuance * Add pseudo-code needed * algorithm v1 * added algorithm docs * fixed all test * removed unwanted files * remove more code * added more tests * update changelog * added test and addressed feedback * Update x/valset-pref/validator_set.go * Update x/valset-pref/validator_set.go * Update x/valset-pref/README.md * Minor cleanup * re-use validator gets * Refactor * Highlight bug * fixed the issue * added comments * update changelog * fixed the issue * fixed go test * fixed test * lint * Finish ValSet Pref Unbonding (#6630) * Add Test cases and fix * Update x/valset-pref/keeper.go * Adams comment * add error types and tidy test --------- Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> * feat: unbond with rebalanced val set weights (#6685) * initial push * add todo * msg server test * add godoc * custom error * update godoc * update proto and remove duplication * add more TODOs * use min when calculating amt to withdraw from last val * Update x/valset-pref/validator_set.go --------- Co-authored-by: stackman27 <sis1001@berkeley.edu> Co-authored-by: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: roman <roman@osmosis.team> Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com> Co-authored-by: Adam Tucker <adamleetucker@outlook.com>
Closes: #XXX
What is the purpose of the change
Finishes the val set pref unbonding PR, mainly adds test cases, minor refactoring and better code documentation included.
Note that this PR is pointed towards
dev/valset-pref-unbond-issues
branch, not the main branchTesting and Verifying
This change added tests
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)