Retire remaining CosmWasm IBC execution - #4008
Conversation
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.
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
PR SummaryMedium Risk Overview App wiring drops the static IBC port router ( Tests now assert deprecation for raw IBC packets (keeper and Reviewed by Cursor Bugbot for commit 98e5c1d. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
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, andConvertWasmIBCTimeoutHeightToCosmosHeight(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 { |
There was a problem hiding this comment.
[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.
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.