-
Notifications
You must be signed in to change notification settings - Fork 609
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
Create Message for Staking Conversion #5949
Conversation
devbot merge base |
# Conflicts: # CHANGELOG.md # go.sum
ah sorry, didn't make dev-bot have goimports ignore generated files, now fixed. (Though TBH that is a bit odd that our codegen doesn't obey goimports) |
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.
Requested changes for relaxing valset delegation
eab4bfa
to
18f4bd7
Compare
Merge conflict situation is pretty bad here 😭 |
yes!!! |
Just did a quick pass and it appears the merge conflicts were fixed, nice job Matt. Will now do another review, should be my final one, thanks again Matt :) |
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.
Awesome job with all the iterations on this!! Must have been really exhausting :(
I think we should be looking for two more approvals, but I don't think they will be very far behind as it looks like we have converged on pretty much all comments.
Again, great job :)
Thanks so much! Thanks for the detailed review iterations as well :) 🙏 |
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.
Phenomenal work on addressing multiple rounds of feedback and testing everything thoroughly, including localosmosis!
The summaries of localosmosis tests were especially helpful.
I would like to suggest for the future to try adding comment test summaries about the invariants being tested by each test. This would make the test review easier and faster
Co-authored-by: Roman <roman@osmosis.team>
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.
LGTM, nice work. No major issues came up on this pass through
originalBondDenomAmt := exitCoins.AmountOf(bondDenom) | ||
|
||
// track how much non-uosmo tokens we have converted to uosmo | ||
totalAmtCoverted = sdk.ZeroInt() |
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.
nit: coverted -> converted
// - If valAddr not provided and valset exists, valsetpref.Delegate | ||
// - If valAddr not provided and valset delegation is not possible, refer back to original lock's superfluid validator if it was a superfluid lock | ||
// - Else: error | ||
func (k Keeper) delegateBaseOnValsetPref(ctx sdk.Context, sender sdk.AccAddress, valAddr, originalSuperfluidValAddr string, totalAmtToStake sdk.Int) error { |
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.
nit: delegateBaseOnValsetPref
-> delegateBasedOnValsetPref
* WIP * Almost done, need more test cases... * Finish adding test cases * Use val set * Add changelog * Fix simple problems * Update tx.pb.go * Remove partial unlocking * Use val set delegation and edit test cases * Update proto/osmosis/superfluid/tx.proto Co-authored-by: Adam Tucker <adam@osmosis.team> * Update x/superfluid/keeper/stake.go Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> * Romans comment, add balancer check * Adam's comment * Change errors from bool to check error * Add validate basic, bring back partial share migration for liquid gamm shares * Try abstracting check logics from test * Romans comment * Add cli * Fix cli * Update x/superfluid/keeper/stake.go * Update x/superfluid/client/cli/tx.go * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Roman and Adam * Update x/superfluid/keeper/stake.go * Adams comment * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Romans comments --------- Co-authored-by: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> Co-authored-by: Roman <roman@osmosis.team> (cherry picked from commit d99138f)
* WIP * Almost done, need more test cases... * Finish adding test cases * Use val set * Add changelog * Fix simple problems * Update tx.pb.go * Remove partial unlocking * Use val set delegation and edit test cases * Update proto/osmosis/superfluid/tx.proto Co-authored-by: Adam Tucker <adam@osmosis.team> * Update x/superfluid/keeper/stake.go Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> * Romans comment, add balancer check * Adam's comment * Change errors from bool to check error * Add validate basic, bring back partial share migration for liquid gamm shares * Try abstracting check logics from test * Romans comment * Add cli * Fix cli * Update x/superfluid/keeper/stake.go * Update x/superfluid/client/cli/tx.go * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Roman and Adam * Update x/superfluid/keeper/stake.go * Adams comment * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Romans comments --------- Co-authored-by: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> Co-authored-by: Roman <roman@osmosis.team> (cherry picked from commit d99138f) Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com>
…bs#6094) * WIP * Almost done, need more test cases... * Finish adding test cases * Use val set * Add changelog * Fix simple problems * Update tx.pb.go * Remove partial unlocking * Use val set delegation and edit test cases * Update proto/osmosis/superfluid/tx.proto Co-authored-by: Adam Tucker <adam@osmosis.team> * Update x/superfluid/keeper/stake.go Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> * Romans comment, add balancer check * Adam's comment * Change errors from bool to check error * Add validate basic, bring back partial share migration for liquid gamm shares * Try abstracting check logics from test * Romans comment * Add cli * Fix cli * Update x/superfluid/keeper/stake.go * Update x/superfluid/client/cli/tx.go * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Roman and Adam * Update x/superfluid/keeper/stake.go * Adams comment * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Romans comments --------- Co-authored-by: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> Co-authored-by: Roman <roman@osmosis.team> (cherry picked from commit d99138f) Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com>
* WIP * Almost done, need more test cases... * Finish adding test cases * Use val set * Add changelog * Fix simple problems * Update tx.pb.go * Remove partial unlocking * Use val set delegation and edit test cases * Update proto/osmosis/superfluid/tx.proto Co-authored-by: Adam Tucker <adam@osmosis.team> * Update x/superfluid/keeper/stake.go Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> * Romans comment, add balancer check * Adam's comment * Change errors from bool to check error * Add validate basic, bring back partial share migration for liquid gamm shares * Try abstracting check logics from test * Romans comment * Add cli * Fix cli * Update x/superfluid/keeper/stake.go * Update x/superfluid/client/cli/tx.go * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Roman and Adam * Update x/superfluid/keeper/stake.go * Adams comment * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Romans comments --------- Co-authored-by: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> Co-authored-by: Roman <roman@osmosis.team>
* WIP * Almost done, need more test cases... * Finish adding test cases * Use val set * Add changelog * Fix simple problems * Update tx.pb.go * Remove partial unlocking * Use val set delegation and edit test cases * Update proto/osmosis/superfluid/tx.proto Co-authored-by: Adam Tucker <adam@osmosis.team> * Update x/superfluid/keeper/stake.go Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> * Romans comment, add balancer check * Adam's comment * Change errors from bool to check error * Add validate basic, bring back partial share migration for liquid gamm shares * Try abstracting check logics from test * Romans comment * Add cli * Fix cli * Update x/superfluid/keeper/stake.go * Update x/superfluid/client/cli/tx.go * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Roman and Adam * Update x/superfluid/keeper/stake.go * Adams comment * Update x/superfluid/keeper/stake.go Co-authored-by: Roman <roman@osmosis.team> * Romans comments --------- Co-authored-by: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Adam Tucker <adam@osmosis.team> Co-authored-by: alpo <62043214+AlpinYukseloglu@users.noreply.github.com> Co-authored-by: Adam Tucker <adamleetucker@outlook.com> Co-authored-by: Roman <roman@osmosis.team>
Closes: #XXX
What is the purpose of the change
Closes: #5898
WIP
Testing and Verifying
(example:)
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)