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

Deprecate unused pool id field in swap estimate #6530

Merged
merged 9 commits into from
Nov 5, 2023

Conversation

mattverse
Copy link
Member

Closes: #XXX

What is the purpose of the change

Deprecates unused and unnecessary pool id field in swap estimate queries.

Testing and Verifying

This change is a trivial rework / code cleanup without any test coverage.

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 added the V:state/breaking State machine breaking PR label Sep 25, 2023
@mattverse mattverse added V:state/compatible/no_backport State machine compatible PR, depends on prior breaks and removed V:state/breaking State machine breaking PR labels Sep 25, 2023
@mattverse
Copy link
Member Author

This field was unused any where so should be state compatible, but happy to include it in the next major upgrade just in case there was an oversight

@nicolaslara
Copy link
Contributor

doesn't this need to be retracted? Something like

@mattverse
Copy link
Member Author

@nicolaslara Both ways work, deprecation or reserving, I feel like they have updated the proto gen policy in the latest docker image for creating proto bufs, it wouldn't allow me to create the reserved field for some reason 🤔

TokenOut: req.TokenOut,
Routes: types.SwapAmountOutRoutes{{PoolId: req.PoolId, TokenInDenom: req.TokenInDenom}},
Routes: types.SwapAmountOutRoutes{{TokenInDenom: req.TokenInDenom}},
Copy link
Member

Choose a reason for hiding this comment

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

This change doesn't follow for me.. I can see why you wouldn't need the PoolId field, but the PoolId within the Routes feels necessary, unless I am missing something?

Copy link
Member

Choose a reason for hiding this comment

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

Its a single pool is why

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah I do see the point, we're deprecating pool id field due to it being in the routes for normal swaps, but for single swaps, this isn't the case, we're getting pool id as input and constructing it as routes within query proto wrap so we should indeed be having the pool id field only for single swap estimate

Copy link
Member Author

Choose a reason for hiding this comment

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

Changes introduced in 600209d

Copy link
Member

@czarcas7ic czarcas7ic Oct 13, 2023

Choose a reason for hiding this comment

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

Right but we were removing BOTH pool ids, you need at least one of them to determine what pool we are in, otherwise we would just have a denom. I think your change addresses this tho

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 exactly!

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.

LGTM

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@github-actions github-actions bot added the Stale label Oct 30, 2023
@mattverse mattverse removed the Stale label Nov 3, 2023
@ValarDragon ValarDragon merged commit f2cd0d8 into main Nov 5, 2023
1 check passed
@ValarDragon ValarDragon deleted the mattverse/rm-pool-id branch November 5, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CLI C:x/poolmanager V:state/compatible/no_backport State machine compatible PR, depends on prior breaks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants