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

Create Message for Staking Conversion #5949

Merged
merged 33 commits into from
Aug 15, 2023
Merged

Conversation

mattverse
Copy link
Member

@mattverse mattverse commented Aug 2, 2023

Closes: #XXX

What is the purpose of the change

Closes: #5898
WIP

Testing and Verifying

(example:)

  • Added unit test that validates ...
  • Added integration tests for end-to-end deployment with ...
  • Extended integration test for ...
  • Manually verified the change by ...

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

@mattverse mattverse marked this pull request as draft August 2, 2023 10:43
@github-actions github-actions bot added T:CI C:app-wiring Changes to the app folder labels Aug 3, 2023
@ValarDragon ValarDragon added the V:state/breaking State machine breaking PR label Aug 3, 2023
@mattverse mattverse marked this pull request as ready for review August 4, 2023 14:16
@ValarDragon
Copy link
Member

devbot merge base
fix

@ValarDragon
Copy link
Member

ValarDragon commented Aug 7, 2023

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)

Copy link
Member

@ValarDragon ValarDragon left a 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

.golangci.yml Outdated Show resolved Hide resolved
proto/osmosis/superfluid/tx.proto Outdated Show resolved Hide resolved
x/superfluid/keeper/migrate.go Show resolved Hide resolved
x/superfluid/keeper/migrate_test.go Show resolved Hide resolved
x/superfluid/keeper/stake.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake.go Show resolved Hide resolved
proto/osmosis/superfluid/tx.proto Outdated Show resolved Hide resolved
proto/osmosis/superfluid/tx.proto Show resolved Hide resolved
x/superfluid/keeper/migrate.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake_test.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake_test.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake_test.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake_test.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake_test.go Show resolved Hide resolved
@mattverse mattverse force-pushed the mattverse/stake-multi0msg branch from eab4bfa to 18f4bd7 Compare August 11, 2023 17:47
@mattverse
Copy link
Member Author

Merge conflict situation is pretty bad here 😭

@mattverse
Copy link
Member Author

yes!!!

@czarcas7ic
Copy link
Member

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 :)

Copy link
Member

@czarcas7ic czarcas7ic left a 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 :)

x/superfluid/keeper/stake.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake_test.go Show resolved Hide resolved
@mattverse
Copy link
Member Author

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 :) 🙏

Copy link
Member

@p0mvn p0mvn left a 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

x/superfluid/keeper/stake.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake_test.go Outdated Show resolved Hide resolved
x/superfluid/keeper/stake_test.go Show resolved Hide resolved
Copy link
Contributor

@AlpinYukseloglu AlpinYukseloglu left a 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()
Copy link
Contributor

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: delegateBaseOnValsetPref -> delegateBasedOnValsetPref

@ValarDragon ValarDragon self-requested a review August 14, 2023 19:17
@czarcas7ic czarcas7ic dismissed ValarDragon’s stale review August 15, 2023 17:23

requested dismissal

@czarcas7ic czarcas7ic merged commit d99138f into main Aug 15, 2023
@czarcas7ic czarcas7ic deleted the mattverse/stake-multi0msg branch August 15, 2023 17:24
@mattverse mattverse added the A:backport/v17.x backport patches to v17.x branch label Aug 17, 2023
mergify bot pushed a commit that referenced this pull request Aug 17, 2023
* 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 <[email protected]>

* Update x/superfluid/keeper/stake.go

Co-authored-by: alpo <[email protected]>

* 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 <[email protected]>

* Roman and Adam

* Update x/superfluid/keeper/stake.go

* Adams comment

* Update x/superfluid/keeper/stake.go

Co-authored-by: Roman <[email protected]>

* Romans comments

---------

Co-authored-by: devbot-wizard <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: alpo <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: Roman <[email protected]>
(cherry picked from commit d99138f)
ValarDragon pushed a commit that referenced this pull request Aug 17, 2023
* 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 <[email protected]>

* Update x/superfluid/keeper/stake.go

Co-authored-by: alpo <[email protected]>

* 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 <[email protected]>

* Roman and Adam

* Update x/superfluid/keeper/stake.go

* Adams comment

* Update x/superfluid/keeper/stake.go

Co-authored-by: Roman <[email protected]>

* Romans comments

---------

Co-authored-by: devbot-wizard <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: alpo <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: Roman <[email protected]>
(cherry picked from commit d99138f)

Co-authored-by: Matt, Park <[email protected]>
traviolus pushed a commit to alleslabs/osmosis that referenced this pull request Aug 23, 2023
…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 <[email protected]>

* Update x/superfluid/keeper/stake.go

Co-authored-by: alpo <[email protected]>

* 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 <[email protected]>

* Roman and Adam

* Update x/superfluid/keeper/stake.go

* Adams comment

* Update x/superfluid/keeper/stake.go

Co-authored-by: Roman <[email protected]>

* Romans comments

---------

Co-authored-by: devbot-wizard <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: alpo <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: Roman <[email protected]>
(cherry picked from commit d99138f)

Co-authored-by: Matt, Park <[email protected]>
p0mvn added a commit that referenced this pull request Aug 29, 2023
* 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 <[email protected]>

* Update x/superfluid/keeper/stake.go

Co-authored-by: alpo <[email protected]>

* 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 <[email protected]>

* Roman and Adam

* Update x/superfluid/keeper/stake.go

* Adams comment

* Update x/superfluid/keeper/stake.go

Co-authored-by: Roman <[email protected]>

* Romans comments

---------

Co-authored-by: devbot-wizard <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: alpo <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: Roman <[email protected]>
nicolaslara pushed a commit that referenced this pull request Aug 31, 2023
* 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 <[email protected]>

* Update x/superfluid/keeper/stake.go

Co-authored-by: alpo <[email protected]>

* 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 <[email protected]>

* Roman and Adam

* Update x/superfluid/keeper/stake.go

* Adams comment

* Update x/superfluid/keeper/stake.go

Co-authored-by: Roman <[email protected]>

* Romans comments

---------

Co-authored-by: devbot-wizard <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: alpo <[email protected]>
Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: Roman <[email protected]>
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
@github-actions github-actions bot mentioned this pull request Mar 15, 2024
@github-actions github-actions bot mentioned this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v17.x backport patches to v17.x branch C:app-wiring Changes to the app folder C:CLI C:x/superfluid V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Message for Staking Conversion
7 participants