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

Moves ValidatePermissionlessPoolCreationEnabled out of poolmanager module #6421

Merged
merged 13 commits into from
Sep 24, 2023

Conversation

sunnya97
Copy link
Collaborator

@sunnya97 sunnya97 commented Sep 17, 2023

This removes ValidatePermissionlessPoolCreationEnabled from the pooltype interface

What is the purpose of the change

  • The concentrated liquidity module was the only pool type making use of it
  • boolean for permissionless or not is not fine grained enough. For example CL module wants a whitelist of addresses that can bypass the restriction

Testing and Verifying

  • added unit tests

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

@sunnya97 sunnya97 changed the base branch from main to sunny/bypass-cl-checks- September 17, 2023 14:57
@github-actions github-actions bot added C:x/gamm Changes, features and bugs related to the gamm module. C:x/concentrated-liquidity C:x/poolmanager labels Sep 17, 2023
@sunnya97 sunnya97 changed the title Sunny/move permissionless check into pool Moves ValidatePermissionlessPoolCreationEnabled out of poolmanager module Sep 17, 2023
@sunnya97 sunnya97 marked this pull request as ready for review September 17, 2023 15:32
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.

Nice work!

There is an alternative strategy for bypassing the check by extending ValidatePermissionlessPoolCreationEnabled API to also take in the sender. However, this LGTM 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.

I think this change + some tests will need updates prior to merge

x/concentrated-liquidity/keeper.go Outdated Show resolved Hide resolved
@sunnya97
Copy link
Collaborator Author

Probably should merge #6420 first, because this is built on top of that atm

@sunnya97 sunnya97 requested a review from p0mvn September 17, 2023 21:03
@p0mvn
Copy link
Member

p0mvn commented Sep 17, 2023

Probably should merge #6420 first, because this is built on top of that atm

ACKed #6420

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.

LGTM once e2e is passing

x/concentrated-liquidity/keeper.go Outdated Show resolved Hide resolved
s.Require().NoError(s.App.ConcentratedLiquidityKeeper.ValidatePermissionlessPoolCreationEnabled(s.Ctx))
s.Require().True(s.App.ConcentratedLiquidityKeeper.IsPermissionlessPoolCreationEnabled(s.Ctx))
Copy link
Member

Choose a reason for hiding this comment

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

It seems that the comment above is outdated.

Permissionless pool creation is now enabled in tests by default:

defaultParams.IsPermissionlessPoolCreationEnabled = true

Would be great to update it

Copy link
Member

@mattverse mattverse left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from sunny/bypass-cl-checks- to main September 21, 2023 15:26
@sunnya97 sunnya97 added the V:state/compatible/backport State machine compatible PR, should be backported label Sep 24, 2023
@sunnya97 sunnya97 merged commit 0898499 into main Sep 24, 2023
1 check passed
@sunnya97 sunnya97 deleted the sunny/move-permissionless-check-into-pool branch September 24, 2023 10:40
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
@github-actions github-actions bot mentioned this pull request Apr 1, 2024
@github-actions github-actions bot mentioned this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/concentrated-liquidity C:x/gamm Changes, features and bugs related to the gamm module. C:x/poolmanager V:state/compatible/backport State machine compatible PR, should be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants