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

chore: integrate wasmd and bump dependencies (cosmos-sdk and ibc-go) #129

Closed
wants to merge 18 commits into from

Conversation

queencre
Copy link
Contributor

@queencre queencre commented Dec 7, 2022

Description

This PR adds wasmd v0.29.2 as well as upgrading cosmos-sdk to v1.1.3-sdk-0.45.9 and ibc-go to v3.3.1-crescent-v4-1.

Tasks

  • Bump forks of cosmos-sdk and ibc-go respectively
  • Import and add wasmd in app.go
  • Add comment that the farming module will be deprecated in v4
  • Update github workflow action because the wasmd does not fully support M1
  • Resolve failing test cases
  • Add migration script for v4. Reference IBC Migration - Support Denoms With Slashes.

Notes

Adding migration script for v4 is required when upgrading Crescent chain from v3 to v4. This is because currently running version uses ibc-go v2.2.0-crescent-v3. According to IBC Migration - Support Denoms With Slashes document, chains from a version that does not support base dnoms with slashes (all versions of ibc-go smaller than v2.3.0) require to add migration script to call RunMigrations so that the app-transfer module runs its migration to replace any incorrectly stored trace information. Reference #1680 for a detailed information.

Tests

  • Start a local network and deploy sample contract to see if it functions well
  • ...

Discussion

  1. According to this README.md file, the wasmd only supports Intel/AMD64 MacOS and Linux. However, M1 macs are not fully supported. As workflow action in build.yml returns the following error (see the error below), I remove arm64 architecture in build.yml file as i thought it was closely related to the wamsd not supporting M1 macs. However, I am wondering why GasMeter and Gas are not found in the mocks.go file in wasmvm directory and thinking that it might not be due to the supporting M1 macs reason. As it is taking a while to debug, it would be great if @kingcre @crypin can provide some hand here to debug together and find the reason. Right now, I am referencing this Add support for ARM CosmWasm/wasmvm#53 issue and trying to understand wasmvm in depth.

Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:195:2: undefined: GasMeter
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:196:20: undefined: Gas
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:200:11: undefined: Gas
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:201:11: undefined: Gas
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:205:28: undefined: Gas
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:212:38: undefined: Gas
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:216:32: undefined: Gas
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:230:42: undefined: Gas
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:329:7: undefined: KVStore
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mock_failure.go:15:27: undefined: GoAPI
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:329:7: too many errors

(UPDATE) If you read this https://docs.cosmwasm.com/docs/1.0/integration, it states that wamsd currently only supports Intel/AMD64 CPUs and OSX or Linux.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Appropriate labels applied
  • Targeted PR against correct branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@queencre queencre changed the title chore: integrate wasmd and bump ibc-go to v3.3.1 chore: integrate wasmd and bump dependencies (cosmos-sdk and ibc-go) Dec 7, 2022
@queencre
Copy link
Contributor Author

queencre commented Dec 9, 2022

[UPDATE]
After doing some research and reading the following links https://github.com/CosmWasm/wasmd#supported-systems and https://docs.cosmwasm.com/docs/1.0/integration, So, I come to conclude that the following error coming from the Github action when building a binary (see the build.yml) in Ubuntu OS with arm64 architecture is expected.

Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:195:2: undefined: GasMeter
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:196:20: undefined: Gas
Error: ../../../go/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/mocks.go:200:11: undefined: Gas
...

@queencre
Copy link
Contributor Author

queencre commented Dec 14, 2022

[UPDATE]

After an internal discussion, it is decided to break this PR into a few different ones to prevent from having to review giant PR. This PR can be broken down into #131 and #132.

@queencre queencre closed this Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant