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

chore: v17 upgrade handler pool create/link/sfs #5895

Merged
merged 19 commits into from
Aug 2, 2023

Conversation

czarcas7ic
Copy link
Member

@czarcas7ic czarcas7ic commented Jul 26, 2023

Closes: #5892

What is the purpose of the change

Adds logic to upgrade handler to create CL pools that will be listed in a signaling proposal for v17. The new CL pools are linked to their gamm counterpart and, if SFS was previously enabled on that pair, is enabled on the new CL pool as well.

Testing and Verifying

Upgrade handler tests added to ensure:

  • CL pools created with expected params
  • Links are set
  • Pools that were previously SFS are SFS enabled
  • Pools that were not previously SFS are not SFS enabled
  • No error/panics in upgrade handler logic

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

@czarcas7ic czarcas7ic added V:state/breaking State machine breaking PR A:no-changelog labels Jul 26, 2023
@github-actions github-actions bot added the C:app-wiring Changes to the app folder label Jul 26, 2023
@czarcas7ic
Copy link
Member Author

Just need to implement new e2e logic for all the new pools getting migrated. Halfway done with a solution but its proving to be slightly trickier than I originally thought it would be.

@@ -17,3 +18,204 @@ var Upgrade = upgrades.Upgrade{
Deleted: []string{},
},
}

Copy link
Member Author

Choose a reason for hiding this comment

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

This whole file should be verified against mainnet by the reviewer

Copy link
Member Author

Choose a reason for hiding this comment

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

The only thing that needs to be verified is the pool numbers now, since the other values are auto populated at time of execution

Copy link
Contributor

@stackman27 stackman27 Aug 2, 2023

Choose a reason for hiding this comment

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

checked the assetPairs to migrate and no eth bridge tokens found + all fees are correct + all osmo quoted!

ps: i'm surprised we're not migrating osmo/atom pool

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we are saving the two highest value pools for last. Plan was to work our way down from osmo/dai and then return to top.

@czarcas7ic czarcas7ic marked this pull request as ready for review July 28, 2023 02:08
@czarcas7ic czarcas7ic marked this pull request as draft July 31, 2023 14:31
@czarcas7ic czarcas7ic marked this pull request as ready for review July 31, 2023 21:45
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.

Asset list seems correct - will do another pass for upgrade handler logic

@stackman27 stackman27 self-requested a review August 1, 2023 22:31
Copy link
Contributor

@stackman27 stackman27 left a comment

Choose a reason for hiding this comment

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

just couple of initial thoughts, will review in depth by eod

app/upgrades/v17/concentrated_pool.go Outdated Show resolved Hide resolved
tests/e2e/configurer/upgrade.go Show resolved Hide resolved
app/upgrades/v17/constants.go Outdated Show resolved Hide resolved
app/upgrades/v17/constants.go Show resolved Hide resolved
@github-actions github-actions bot added the C:x/gamm Changes, features and bugs related to the gamm module. label Aug 2, 2023
Copy link
Contributor

@stackman27 stackman27 left a comment

Choose a reason for hiding this comment

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

this LGTM! checked all the Asset pairs manually using app.osmosis.zone & https://info.osmosis.zone

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. Left a few non-blocking comments/questions

} else {
denom1 = coin.Denom
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: wouldn't this logic be cleaner with just two if statements checking each denom?

Copy link
Member Author

Choose a reason for hiding this comment

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

Simplified here bb111c0


// If the spread factor is not manually set above, set it to the the same value as the pool's spread factor.
if assetPair.SpreadFactor.IsNil() {
AssetPairs[i].SpreadFactor = pool.GetSpreadFactor(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to clarify, the only validation we do here to ensure that supported spread factors are used is the manual validation of the pools in AssetPairs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah that is correct, we could for sure improve upon this but don't want to spend too much time on a feature that will be no longer needed by v18

@czarcas7ic czarcas7ic merged commit 0fd37ad into main Aug 2, 2023
@czarcas7ic czarcas7ic deleted the adam/v17-upgrade-handler branch August 2, 2023 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:no-changelog C:app-wiring Changes to the app folder C:x/gamm Changes, features and bugs related to the gamm module. V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create CL pools, link, and enable SFS in v17 upgrade handler
3 participants