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

fix: twap record upgrade handler #5363

Merged
merged 1 commit into from
May 31, 2023
Merged

Conversation

czarcas7ic
Copy link
Member

@czarcas7ic czarcas7ic commented May 30, 2023

Closes: #5343

What is the purpose of the change

We currently create a CL pool and create a position all within the same block in the upgrade handler. This causes the last error time to get set to now (this is default behavior when we create a pool) AND the spot prices are set when we create a position. This causes a genesis check to pop.

This PR nils out the last error time in the upgrade handler for the CL pool's twap record

Testing and Verifying

Nicco tested out this branch with mainnet state and ran the upgrade handler and no longer receives the twap error.

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 May 30, 2023
@github-actions github-actions bot added C:app-wiring Changes to the app folder C:x/twap Changes to the twap module labels May 30, 2023
@czarcas7ic czarcas7ic marked this pull request as ready for review May 30, 2023 21:34
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.

Nice catch/fix!

@p0mvn p0mvn merged commit fe30995 into main May 31, 2023
1 check passed
@p0mvn p0mvn deleted the adam/twap-record-upgrade-handler branch May 31, 2023 02:18
pysel pushed a commit that referenced this pull request Jun 6, 2023
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/twap Changes to the twap module V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v16: unblock testnet by fixing a twap issue
3 participants