Skip to content

Retire remaining CosmWasm IBC execution - #4008

Merged
masih merged 1 commit into
mainfrom
masih/ibc-wasm-exec-be-gone
Aug 25, 2026
Merged

Retire remaining CosmWasm IBC execution#4008
masih merged 1 commit into
mainfrom
masih/ibc-wasm-exec-be-gone

Conversation

@masih

@masih masih commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Reject raw CosmWasm IBC packet sends with the IBC retirement error and
remove the unreachable IBC callback router wiring.

Drop channel keeper dependencies from wasm message handling while
retaining channel access for existing wasm queries and keeping all
retired stores mounted.

Reject raw CosmWasm IBC packet sends with the IBC retirement error and
remove the unreachable IBC callback router wiring.

Drop channel keeper dependencies from wasm message handling while
retaining channel access for existing wasm queries and keeping all
retired stores mounted.
@github-actions

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedAug 25, 2026, 3:06 PM

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.64%. Comparing base (198641f) to head (98e5c1d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4008      +/-   ##
==========================================
- Coverage   59.72%   58.64%   -1.08%     
==========================================
  Files        2261     2162      -99     
  Lines      194354   182729   -11625     
==========================================
- Hits       116071   107164    -8907     
+ Misses      67565    65790    -1775     
+ Partials    10718     9775     -943     
Flag Coverage Δ
sei-chain-pr 59.97% <100.00%> (?)
sei-db 69.80% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/app.go 71.77% <ø> (-0.07%) ⬇️
sei-wasmd/app/app.go 77.90% <ø> (-0.20%) ⬇️
sei-wasmd/x/wasm/keeper/handler_plugin.go 88.00% <100.00%> (+3.30%) ⬆️
sei-wasmd/x/wasm/keeper/keeper.go 86.31% <100.00%> (ø)
wasmbinding/message_plugin.go 71.42% <100.00%> (ø)
wasmbinding/wasm.go 100.00% <100.00%> (ø)

... and 99 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masih
masih marked this pull request as ready for review August 25, 2026 15:19
@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Contracts that relied on wasm-driven IBC packet sends will fail at execution with a deprecation error; routing removal is low risk if IBC was already retired elsewhere, but cross-chain wasm integrations need verification.

Overview
Completes the IBC retirement path for CosmWasm by blocking contracts that still emit IBC.SendPacket submessages. Those calls no longer reach the channel keeper; IBCRawPacketHandler always returns ibccoretypes.ErrIBCDeprecated (ibc module is deprecated).

App wiring drops the static IBC port router (ibcRouter.AddRoute(wasm.ModuleName, …) and IBCKeeper.SetRouter) in both the main Sei app and sei-wasmd, since wasm IBC callbacks are no longer executed. channelKeeper is removed from the default and Sei custom wasm message handler constructors (NewDefaultMessageHandler, RegisterCustomPlugins, CustomMessageHandler); wasm keeper construction still passes ChannelKeeper for query plugins only.

Tests now assert deprecation for raw IBC packets (keeper and wasmbinding custom handler).

Reviewed by Cursor Bugbot for commit 98e5c1d. Bugbot is set up for automated code reviews on this repo. Configure here.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Retiring raw CosmWasm IBC packet sends and dropping the IBC router wiring is consistent with the already-retired IBC msg server: every call site matches the new signatures, channel access is correctly retained for wasm queries, and the removed router has no reachable consumers. Two non-blocking notes: the rewritten handler test now has three rows that exercise one identical path while the load-bearing fall-through branch is uncovered, and the change orphans the IBC callback handler plus SetRouter.

Findings: 0 blocking | 2 non-blocking | 1 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • [suggestion] This change orphans the code it was the last caller of: wasm.NewIBCHandler/IBCHandler (sei-wasmd/x/wasm/ibc.go) now has no callers at all, ibckeeper.Keeper.SetRouter (sei-ibc-go/modules/core/keeper/keeper.go:80) has no callers, and ConvertWasmIBCTimeoutHeightToCosmosHeight (sei-wasmd/x/wasm/keeper/handler_plugin_encoders.go:298) lost its only use. Since the PR is titled "retire remaining CosmWasm IBC execution" and its description says it removes the unreachable callback wiring, removing the now-unreachable callback implementation itself (or noting it as the deliberate next step) would keep the retirement from leaving a live-looking IBC entry point behind.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.

},
}

specs := map[string]struct {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[suggestion] portID and channelID no longer affect the outcome, so all three rows drive the same two lines and assert the same error — the table costs a struct and a loop for one distinct case. Meanwhile the branch that still has behavior, msg.IBC == nil || msg.IBC.SendPacket == nil returning ErrUnknownMsg, is untested. That return is load-bearing: MessageHandlerChain only continues to NewBurnCoinMessageHandler when this handler reports ErrUnknownMsg, so a slip to ErrIBCDeprecated there would silently break every Bank.Burn from a contract. Consider collapsing the three rows into one direct assertion and adding a case with msg.IBC = nil (and one with IBC set but SendPacket nil) asserting ErrUnknownMsg.

@masih
masih added this pull request to the merge queue Aug 25, 2026
Merged via the queue into main with commit 64e9bc6 Aug 25, 2026
85 of 86 checks passed
@masih
masih deleted the masih/ibc-wasm-exec-be-gone branch August 25, 2026 16:30
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.

3 participants