-
Notifications
You must be signed in to change notification settings - Fork 29
fix: injective-cosmwasm-stargate-example test fixes for chain 1.18 #264
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,3 +27,4 @@ tarpaulin-report.* | |
| packages/*/schema | ||
| contracts/*/schema | ||
| /packages/injective-cosmwasm/Cargo.lock | ||
| /CLAUDE.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/bash | ||
| ARCH="" | ||
|
|
||
| if [[ $(arch) = "arm64" ]]; then | ||
| ARCH=-arm64 | ||
| fi | ||
|
|
||
| WORKSPACE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" | ||
|
|
||
| docker run --rm -v "$WORKSPACE_ROOT":/code -v "$HOME/.cargo/git":/usr/local/cargo/git \ | ||
| --mount type=volume,source="$(basename "$WORKSPACE_ROOT")_cache",target=/target \ | ||
| --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ | ||
| cosmwasm/optimizer${ARCH}:0.17.0 "./" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| [toolchain] | ||
| channel = "1.87.0" | ||
| channel = "1.86.0" | ||
| components = [ "rustfmt" ] | ||
| profile = "minimal" | ||
| targets = [ "wasm32-unknown-unknown" ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: InjectiveLabs/cw-injective
Length of output: 1900
🏁 Script executed:
Repository: InjectiveLabs/cw-injective
Length of output: 1016
🌐 Web query:
arch command output aarch64 vs arm64 Linux ARM64 systems💡 Result:
On Linux,
archis essentially equivalent touname -m(it prints the machine hardware name of the running kernel/userspace environment, not a distro “marketing” name). On ARM 64-bit systems you’ll commonly see eitheraarch64orarm64, but in practice they refer to the same ISA/CPU execution state (ARMv8+ 64-bit). (en.wikipedia.org)Why you often see
aarch64on Linuxaarch64is the canonical GNU/ELF/GCC naming (e.g., toolchain triplets likeaarch64-linux-gnu) and is what many Linux environments report viauname -m/arch. (lwn.net)arm64(a kernel-community naming choice), even thoughuname/archmay still sayaarch64. (lwn.net)How distros use the names
arm64aarch64-linux-gnu(wiki.debian.org)Practical interpretation (Linux)
arch/uname -m→aarch64⇒ you’re in a 64-bit ARM environment.arch/uname -m→armv7l(etc.) ⇒ you’re in a 32-bit ARM environment.Also note: in containers/VMs,
archreflects the container/guest environment’s kernel view, which can differ from what you think you’re targeting. (geekchamp.com)Citations:
🏁 Script executed:
Repository: InjectiveLabs/cw-injective
Length of output: 1357
🏁 Script executed:
Repository: InjectiveLabs/cw-injective
Length of output: 5755
🌐 Web query:
cosmwasm/optimizer docker image arm64 aarch64 variants💡 Result:
cosmwasm/optimizerimage that automatically servesarm64/aarch64. CosmWasm publishes separate ARM64 images with an-arm64suffix.aarch64==arm64in Docker platform terms. [1]cosmwasm/optimizer-arm64(combined image; ARM, marked experimental) [1][2]cosmwasm/rust-optimizer-arm64,cosmwasm/workspace-optimizer-arm64[1][2]make publish-x86_64andmake publish-arm64). [3]Sources: [1] CosmWasm/optimizer README, [2] Docker Hub
cosmwasmorg image list, [3] CosmWasm/optimizer “Releasing” wiki.Architecture detection is too narrow and fails on Linux ARM64 hosts.
The
archcommand on Linux ARM64 systems returnsaarch64, notarm64, so the current check never activates and ARM runners pull the wrong optimizer image. This issue exists in three files:contracts/injective-cosmwasm-stargate-example/build.sh(lines 4–6),build.sh(lines 10–13), andbuild_release.sh.Suggested fix (apply to all three files)
Note: CosmWasm publishes separate ARM64 images (
cosmwasm/optimizer-arm64), but these can produce different wasm artifacts than x86_64 images and are not recommended for production releases.📝 Committable suggestion
🤖 Prompt for AI Agents