Skip to content

fix: wasm IBC connection#1981

Open
RafilxTenfen wants to merge 3 commits intomainfrom
rafilx/fix-wasm-ibc
Open

fix: wasm IBC connection#1981
RafilxTenfen wants to merge 3 commits intomainfrom
rafilx/fix-wasm-ibc

Conversation

@RafilxTenfen
Copy link
Contributor

@RafilxTenfen RafilxTenfen commented Mar 16, 2026

Summary

  • Fix nil wasmStack IBC module handler in app/keepers/keepers.go that prevented any wasm IBC channel from being opened
  • Add wasm query helpers (QueryWasmLatestCodeID, QueryWasmContractByCodeID, QueryWasmContractInfo) to the e2ev2 test framework
  • Add SignMsgWithGas to WalletSender for transactions requiring custom gas limits (e.g., wasm store code)
  • Add LoadWasmBytecode utility to the e2ev2 test framework
  • Add e2e test TestWasmIBCHandler that deploys an IBC-capable wasm contract and verifies channel creation works

Details

wasmStackIBCHandler was created on line 652 but never assigned to wasmStack, which was registered as nil in the IBC router on line 714. Any MsgChannelOpenInit targeting the wasm
port triggered a nil pointer dereference panic caught by baseapp's recovery middleware, causing the tx to fail. This did not halt the chain but made wasm IBC completely non-functional.

The fix assigns the handler directly: var wasmStack porttypes.IBCModule = wasmStackIBCHandler.

The intermediate wasmStack variable was then removed by the linter since it's no longer needed — wasmStackIBCHandler is used directly in AddRoute

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

🔐 Commit Signature Verification

All 3 commit(s) passed verification

Commit Author Signature Key Type Key Check
c6f05216a690 RafilxTenfen sk-ssh-ed25519
4b520e493b26 RafilxTenfen sk-ssh-ed25519
e310a870952a RafilxTenfen sk-ssh-ed25519

Summary

  • Commits verified: 3
  • Signature check: ✅ All passed
  • Key type enforcement: ✅ All sk-ssh-ed25519

Required key type: sk-ssh-ed25519 (FIDO2 hardware key)

Last verified: 2026-03-16 20:42 UTC

@RafilxTenfen RafilxTenfen self-assigned this Mar 16, 2026
@RafilxTenfen RafilxTenfen marked this pull request as ready for review March 16, 2026 20:36
@RafilxTenfen RafilxTenfen requested a review from a team as a code owner March 16, 2026 20:36
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.

Nil wasmStack IBCModule registered in IBC router enables chain halt

1 participant