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: update all migrated whitewhale contracts to code id 641 #7966

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

PaddyMc
Copy link
Collaborator

@PaddyMc PaddyMc commented Apr 5, 2024

What is the purpose of the change

Since whitewhale have migrated their contracts twice, we need to upgrade all code ids for whitewhale contracts to code id 641

Testing and Verifying

test using an in-place-testnet

what it looked like before

osmosisd q poolmanager pool 1584 --node https://rpc.osmosis.zone:443
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "572"
  contract_address: osmo1w2sdnptx8jt4vuugcauv6tj3c2syjay5rx2mxalngn7m2cywllsq6xt64k
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xbmtqY2s3Nzc0c2Vtc2xxazZmOG4wNThtNGd3Y3c1c3BxdHphMGhyamY4ZTJrc2huNHg2c3ZqcmMwbSJ9
  pool_id: "1584"

osmosisd q poolmanager pool 1575 --node https://rpc.osmosis.zone:443
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "572"
  contract_address: osmo1hnlw8ajwhgg7rsyke2t34uknp4jjcmm23zeygsu7n8cwjqnt2jsqju3nz4
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xM2M1azJ3eHEzY3g1eGFucW5xamR5cnd2Z3cwcXM4ZWE3azhjOWR6ZGRkbHRoZzU1c3VocXB2am5xNyJ9
  pool_id: "1575"

osmosisd q poolmanager pool 1514 --node https://rpc.osmosis.zone:443
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "572"
  contract_address: osmo1g883rt8ytjlhawxey39m3w90nyaxg2vfmlfh6jvnv9ec3py2hgxq9qdz53
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xNjkydGx1d3p6bW54NTZ0bTV2N3Iwbjh2NWZnMzJucmQ5bnV1a3A5ano0NThhcDd3bWNsczljejIwbSJ9
  pool_id: "1514"

osmosisd q poolmanager pool 1463 --node https://rpc.osmosis.zone:443
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "503"
  contract_address: osmo184utpa0q2x5d79ctpewwvskea50x7tr3fkgj7ge2r0uavhqexququsj3xq
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xOHIzNWx1eXlmcXA3anRlcjZqYzkzdnpoZnQ1empndnNndDJ0Z3g3NnFlejJscGpwemZ4cXd4NHluayJ9
  pool_id: "1463"

osmosisd q poolmanager pool 1462 --node https://rpc.osmosis.zone:443
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "503"
  contract_address: osmo1suf8z9ypyv3kk4egr7plde00dfetw7rcm4m9ecut7x3720z8l46q23663a
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xdzhlMnd5emhyZzN5NWdoZTl5ZzB4bjB1NzU0OGU2Mjd6czd4YWhmdm41bDYzcnkyeDh6c3RhcmF4cyJ9
  pool_id: "1462"

osmosisd q poolmanager pool 1461 --node https://rpc.osmosis.zone:443
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "503"
  contract_address: osmo14zdnsp658g6tf7s5863ygeuj9ce5g00szud3tup6sqpwhuxmdwusc2eq7v
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xNjkydGx1d3p6bW54NTZ0bTV2N3Iwbjh2NWZnMzJucmQ5bnV1a3A5ano0NThhcDd3bWNsczljejIwbSJ9
  pool_id: "1461"

what it looks like after

osmosisd q poolmanager pool 1461                                    
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "641"
  contract_address: osmo14zdnsp658g6tf7s5863ygeuj9ce5g00szud3tup6sqpwhuxmdwusc2eq7v
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xNjkydGx1d3p6bW54NTZ0bTV2N3Iwbjh2NWZnMzJucmQ5bnV1a3A5ano0NThhcDd3bWNsczljejIwbSJ9
  pool_id: "1461"

osmosisd q poolmanager pool 1462                                    
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "641"
  contract_address: osmo1suf8z9ypyv3kk4egr7plde00dfetw7rcm4m9ecut7x3720z8l46q23663a
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xdzhlMnd5emhyZzN5NWdoZTl5ZzB4bjB1NzU0OGU2Mjd6czd4YWhmdm41bDYzcnkyeDh6c3RhcmF4cyJ9
  pool_id: "1462"

osmosisd q poolmanager pool 1514                                    
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "641"
  contract_address: osmo1g883rt8ytjlhawxey39m3w90nyaxg2vfmlfh6jvnv9ec3py2hgxq9qdz53
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xNjkydGx1d3p6bW54NTZ0bTV2N3Iwbjh2NWZnMzJucmQ5bnV1a3A5ano0NThhcDd3bWNsczljejIwbSJ9
  pool_id: "1514"

osmosisd q poolmanager pool 1575                                    
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "641"
  contract_address: osmo1hnlw8ajwhgg7rsyke2t34uknp4jjcmm23zeygsu7n8cwjqnt2jsqju3nz4
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xM2M1azJ3eHEzY3g1eGFucW5xamR5cnd2Z3cwcXM4ZWE3azhjOWR6ZGRkbHRoZzU1c3VocXB2am5xNyJ9
  pool_id: "1575"

osmosisd q poolmanager pool 1584                                    
pool:
  '@type': /osmosis.cosmwasmpool.v1beta1.CosmWasmPool
  code_id: "641"
  contract_address: osmo1w2sdnptx8jt4vuugcauv6tj3c2syjay5rx2mxalngn7m2cywllsq6xt64k
  instantiate_msg: eyJ3aGl0ZV93aGFsZV9wb29sIjogIm9zbW8xbmtqY2s3Nzc0c2Vtc2xxazZmOG4wNThtNGd3Y3c1c3BxdHphMGhyamY4ZTJrc2huNHg2c3ZqcmMwbSJ9
  pool_id: "1584"

Or unit test by:

  • cd app/upgrades/v24
  • go test ./... -cover

Summary by CodeRabbit

  • New Features
    • Enhanced the upgrade handler to support a wider range of pool IDs and introduced a new code ID comparison logic for migrations.
  • Tests
    • Updated tests to reflect the new code ID values for specific pools.

Copy link
Contributor

coderabbitai bot commented Apr 5, 2024

Walkthrough

The recent update introduces enhancements to the upgrade handling mechanism within the application. Specifically, it expands the pool IDs array to encompass more values in the CreateUpgradeHandler function, and refines the code ID verification process by incorporating a new comparison, adjusting the code ID during migrations. Additionally, unit tests have been updated to reflect the change in code ID for specific pools, ensuring the application's robustness and readiness for future expansions.

Changes

Files Change Summary
.../v24/upgrades.go Expanded pool IDs array, updated code ID check and migration logic.
.../v24/upgrades_test.go Updated unit tests to change code ID for specific pools.

🐇✨
In the realm of code, where logic threads weave,
A rabbit hopped through, changes to conceive.
Pool IDs expand, code IDs align,
Tests adapt, in harmony, they intertwine.
🌟📜 For progress, we leap, through digital glades,
Guided by the light, of upgrades' parades.
🐾

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the C:app-wiring Changes to the app folder label Apr 5, 2024
@PaddyMc PaddyMc added V:state/breaking State machine breaking PR and removed C:app-wiring Changes to the app folder labels Apr 5, 2024
@github-actions github-actions bot added the C:app-wiring Changes to the app folder label Apr 5, 2024
app/upgrades/v24/upgrades.go Show resolved Hide resolved
app/upgrades/v24/upgrades.go Show resolved Hide resolved
app/upgrades/v24/upgrades_test.go Outdated Show resolved Hide resolved
@PaddyMc PaddyMc added the A:backport/v24.x backport patches to v24.x branch label Apr 5, 2024
@@ -84,6 +84,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#7951](https://github.com/osmosis-labs/osmosis/pull/7951) Only migrate selected cl incentives
* [#7938](https://github.com/osmosis-labs/osmosis/pull/7938) Add missing swap events for missing swap event for cw pools.
* [#7957](https://github.com/osmosis-labs/osmosis/pull/7957) Update to the latest version of ibc-go
* [#7966](https://github.com/osmosis-labs/osmosis/pull/7966) Update all governance migrated white whale pools to code id 641
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure the changelog entry accurately reflects the changes made in pull request #7966, including the migration of all governance migrated white whale pools to code ID 641.

@czarcas7ic czarcas7ic merged commit 505cc98 into main Apr 5, 2024
1 check passed
@czarcas7ic czarcas7ic deleted the chore/update-whitewhale-migrated-contracts branch April 5, 2024 20:09
mergify bot pushed a commit that referenced this pull request Apr 5, 2024
* fix: update all migrated whitewhale contracts to code id 641

* chore: update CHANGELOG.md

(cherry picked from commit 505cc98)
czarcas7ic pushed a commit that referenced this pull request Apr 5, 2024
…7971)

* fix: update all migrated whitewhale contracts to code id 641

* chore: update CHANGELOG.md

(cherry picked from commit 505cc98)

Co-authored-by: PaddyMc <[email protected]>
@github-actions github-actions bot mentioned this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v24.x backport patches to v24.x branch C:app-wiring Changes to the app folder V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants