-
Notifications
You must be signed in to change notification settings - Fork 608
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
[ValSet-Pref] Allow migration of x/lockup uosmo to staking to a valset preference #3810
Conversation
27468f3
to
94c0d3e
Compare
Rebased and ready for review @czarcas7ic |
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.
Left some comments on the parts I feel concerned about, please take a look and lmk!
94c0d3e
to
0da063d
Compare
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.
Main logic lgtm, left some minor comments and reviews upon testing 🌮
dcab3da
to
c5a1fdc
Compare
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.
Looking good! Major logic looks good, just some comments and questions on the testings before merging!
x/valset-pref/msg_server_test.go
Outdated
lockId: testLock[6].ID, | ||
expectPass: false, | ||
}, | ||
{ | ||
name: "Force Unlocks tokens, but doesnot have delegations", |
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.
removing this because multi message tx reverts are being tested manually cli tested
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.
do we have plans to add a go test for this or no?
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.
in the last chain dev call, i think the verdict was to just write e2e test
Thank you @mattverse for your feedback resolved everything here: |
The lock check in the test and LGTM |
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.
This LGTM! Nice job!
_, err := sdk.AccAddressFromBech32(m.Delegator) | ||
if err != nil { | ||
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err) | ||
} | ||
|
||
return nil | ||
} |
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: maybe in future PR can add check that lockId is positive
Closes: #3703
Part of: Part of : #2579
What is the purpose of the change
We should add a new message in valset preference which allows breaking of a bonded lockup (by ID) of osmo, of length <= 2 weeks, add takes all that osmo and stakes according to your current validator set preference. If you don't have a valset preference, return an error. (Noting that there is an implicit valset preference if you've already staked)
Brief Changelog
n/a
Testing and Verifying
added tests for MsgDelegateBondedTokens
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (yes / no)x/<module>/spec/
) / Osmosis docs repo / not documented)