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

terra: migrate to cosmwasm 1.1.0 #3138

Merged
merged 12 commits into from
Dec 13, 2023
Merged

Conversation

kcsongor
Copy link
Contributor

@kcsongor kcsongor commented Jun 27, 2023

Terra classic upgraded to CosmWasm 1.0+ (https://classic-agora.terra.money/t/wasmvm-v0-16-6-v1-2-0/50070/73), which introduced a number of breaking changes across the whole ecosystem, ranging from tooling to smart contracts.

This PR upgrades the terra classic contracts to the new CosmWasm stdlib version, along with upgrades to the testing pipeline to support the new version. Some contract changes had to be made to accommodate the new 32 byte addressing scheme, these are documented in #3597.

Reviewing the PR

The PR is best reviewied commit-by-commit. The upgrade to CW1 necessitated vendoring the cw20-legacy library. To keep things tidy, I forked it as a separate repo, the relevant commit is here wormhole-foundation/cw20-legacy@d127247.

@kcsongor kcsongor force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch 2 times, most recently from 88ab475 to aa03d41 Compare June 27, 2023 19:46
@tonyjin
Copy link
Contributor

tonyjin commented Sep 7, 2023

If we go with option 1, do we risk more future breakages?

@evan-gray evan-gray force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch from ab88eb5 to 5e29b43 Compare October 11, 2023 19:20
@eliiik
Copy link

eliiik commented Nov 26, 2023

Any updates? It's still not fixed half a year since then.

@kcsongor kcsongor changed the title terra: vendor terra-cosmwasm-2.2.0 terra: migrate to cosmwasm 1.0.0 Dec 5, 2023
@kcsongor kcsongor force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch from 3bd7c26 to 8d196f2 Compare December 6, 2023 14:11
terra/Makefile Outdated Show resolved Hide resolved
@kcsongor kcsongor force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch 2 times, most recently from 7d2f893 to 410e793 Compare December 6, 2023 17:48
@kcsongor kcsongor force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch 2 times, most recently from 922c159 to 4c7df7b Compare December 6, 2023 23:37
@kcsongor kcsongor changed the title terra: migrate to cosmwasm 1.0.0 terra: migrate to cosmwasm 1.1.0 Dec 6, 2023
@kcsongor kcsongor force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch 2 times, most recently from 4e1ce8f to e689c73 Compare December 6, 2023 23:41
@evan-gray evan-gray force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch from e689c73 to bbffe9c Compare December 7, 2023 19:01
@kcsongor kcsongor marked this pull request as ready for review December 8, 2023 01:12
@kcsongor kcsongor requested a review from a5-pickle as a code owner December 8, 2023 01:12
@kcsongor kcsongor marked this pull request as draft December 8, 2023 01:15
@kcsongor kcsongor force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch from af0da08 to fd4068d Compare December 8, 2023 15:56
@evan-gray evan-gray force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch from 7f32f7f to 447eaef Compare December 8, 2023 17:07
@kcsongor kcsongor force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch from 447eaef to 7679f49 Compare December 8, 2023 17:16
@evan-gray evan-gray force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch 3 times, most recently from 25aedba to 7b797f2 Compare December 10, 2023 01:24
evan-gray
evan-gray previously approved these changes Dec 11, 2023
@kcsongor
Copy link
Contributor Author

for those who'd like to re-review the recent force push, here's the diff https://github.com/wormhole-foundation/wormhole/compare/3567b59af39cf10606b744a57c54013041cf50ff..ckiss/fix-groundbreaking-terra-upgrade

@kcsongor kcsongor requested a review from evan-gray December 12, 2023 21:44
evan-gray
evan-gray previously approved these changes Dec 12, 2023
Base automatically changed from cs/terra-delete-migration to main December 12, 2023 21:51
@kcsongor kcsongor dismissed evan-gray’s stale review December 12, 2023 21:51

The base branch was changed.

@kcsongor kcsongor requested a review from evan-gray December 12, 2023 21:51
@kcsongor kcsongor force-pushed the ckiss/fix-groundbreaking-terra-upgrade branch from 74286d2 to 7b321ca Compare December 12, 2023 21:53
Copy link
Contributor

@a5-pickle a5-pickle left a comment

Choose a reason for hiding this comment

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

Reviewed terra sub-directory. Nicely done

@kcsongor kcsongor merged commit bd62e27 into main Dec 13, 2023
22 checks passed
@kcsongor kcsongor deleted the ckiss/fix-groundbreaking-terra-upgrade branch December 13, 2023 16:27
djb15 pushed a commit to djb15/wormhole that referenced this pull request Dec 14, 2023
* terra/contracts: migrate to cosmwasm 1.1.0

use `classic-bindings` crate instead of terra-cosmwasm.
This is the updated version that calls the correct query post chain upgrade

* terra/Dockerfile: update workspace optimizer

* terra: label is now required on instantiate

* terra: accept either 32 or 20 byte addresses

* terra: update devnet terra classic

* node/cosmwasm: always CW >1

* tilt: re-introduce terra classic tests

* terra: make get_address support both 20 and 32 byte addresses

* terra: fix tests to account for burn tax

Since the tests are now ran against the new LocalTerra which has burn
tax, the transaction results are different from before

* terra/token-bridge: check first 12 bytes to determine native denoms

* terra/token-bridge: simplify conditional

---------

Co-authored-by: Evan Gray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants