Skip to content

Deprecate IBC write handlers - #3947

Merged
masih merged 5 commits into
mainfrom
masih/ibc-deprecation-write-side-first
Aug 19, 2026
Merged

Deprecate IBC write handlers#3947
masih merged 5 commits into
mainfrom
masih/ibc-deprecation-write-side-first

Conversation

@masih

@masih masih commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Now that IBC in/outbound is disabled as part of SIP-3:

  • reject all IBC client, connection, and channel messages
  • reject IBC transfer messages
  • reject IBC client governance proposals
  • return stable module deprecation errors
  • add coverage for every deprecated write handler

Now that IBC in/outbound is disabled as part of SIP-3:
- reject all IBC client, connection, and channel messages
- reject IBC transfer messages
- reject IBC client governance proposals
- return stable module deprecation errors
- add coverage for every deprecated write handler
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedAug 19, 2026, 9:18 AM

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.62%. Comparing base (fab5625) to head (8d9d9b5).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3947      +/-   ##
==========================================
- Coverage   59.60%   58.62%   -0.98%     
==========================================
  Files        2331     2233      -98     
  Lines      200124   188194   -11930     
==========================================
- Hits       119277   110329    -8948     
+ Misses      69413    67401    -2012     
+ Partials    11434    10464     -970     
Flag Coverage Δ
sei-chain-pr 43.67% <100.00%> (?)
sei-db 70.41% <ø> (-0.22%) ⬇️
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.91% <ø> (-0.05%) ⬇️
...ules/apps/transfer/keeper/deprecated_msg_server.go 100.00% <100.00%> (ø)
sei-ibc-go/modules/apps/transfer/module.go 52.77% <100.00%> (ø)
sei-ibc-go/modules/core/02-client/client/cli/tx.go 29.03% <ø> (-1.02%) ⬇️
sei-ibc-go/modules/core/02-client/keeper/client.go 55.73% <ø> (+20.60%) ⬆️
sei-ibc-go/modules/core/02-client/keeper/events.go 58.33% <ø> (+22.33%) ⬆️
sei-ibc-go/modules/core/02-client/keeper/keeper.go 39.69% <ø> (-2.96%) ⬇️
...ei-ibc-go/modules/core/02-client/keeper/metrics.go 50.00% <ø> (ø)
sei-ibc-go/modules/core/keeper/msg_server.go 100.00% <100.00%> (+50.13%) ⬆️
sei-ibc-go/modules/core/keeper/params.go 100.00% <ø> (+50.00%) ⬆️
... and 1 more

... and 102 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 18, 2026 16:51
@cursor

cursor Bot commented Aug 18, 2026

Copy link
Copy Markdown

PR Summary

High Risk
This permanently blocks live IBC handshakes, relays, and transfers at the message layer—core cross-chain behavior—with a large deletion surface across sei-ibc-go and app wiring.

Overview
Disables new IBC activity by routing all core IBC transaction handlers (client, connection, channel, and packet messages) to return ErrIBCDeprecated instead of executing keeper logic. ICS-20 MsgTransfer is similarly rejected via a dedicated DeprecatedMsgServer, while transfer keeper code remains for versioned EVM precompile historical replay.

Removes governance and CLI paths for IBC client update/upgrade proposals from the main and wasmd apps, and deletes the associated client proposal handlers, keeper methods (CreateClient, UpgradeClient, misbehaviour handling), inbound/outbound gating helpers, and related metrics/events.

Cleans up tests by dropping the wasmd ibctesting harness and IBC relay integration tests, and adding unit tests that assert every deprecated msg server method returns the expected deprecation errors.

Reviewed by Cursor Bugbot for commit 8d9d9b5. 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.

The automated review did not complete; see the failing AI Review check for details.

seidroid[bot]
seidroid Bot previously requested changes Aug 18, 2026

@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.

Clean, well-scoped deprecation of the IBC write paths with good test coverage of the rejecting handlers, but two issues need attention: dropping the ibc gov route can panic the gov EndBlocker on an in-flight legacy IBC client proposal, and rejecting Timeout/TimeoutOnClose/Acknowledgement (which base deliberately left ungated) makes any outstanding packet commitment unresolvable and its escrow unrecoverable.

Findings: 2 blocking | 4 non-blocking | 3 posted inline

Blockers

  • None at the file/PR level.
  • 2 blocking issue(s) flagged inline on specific lines.

Non-blocking

  • Deleting sei-wasmd/x/wasm/ibctesting/*, ibc_reflect_test.go, relay_test.go, and relay_pingpong_test.go removes all integration coverage of the wasm IBC application callbacks in sei-wasmd/x/wasm/ibc.go, which remain in the tree. The new tests only assert the deprecation error, so nothing exercises those callbacks anymore. Worth a note in the PR description that this coverage is intentionally retired along with IBC.
  • The tx CLI still advertises commands that can now only produce rejected transactions: sei-ibc-go/modules/core/02-client/client/cli/tx.go keeps create/update/misbehaviour/upgrade, and the transfer module keeps its transfer command. Since the gov-proposal CLI commands were removed in this PR, removing (or marking deprecated in Short) these too would keep the surface consistent.
  • sei-ibc-go/modules/core/keeper/params.go still exposes GetParams/SetParams over types.Params{InboundEnabled, OutboundEnabled}, but the core keeper no longer reads either field (only the 03-connection and 04-channel keepers, which read their own copies from the shared subspace). Not a defect, just dead surface on the core keeper now.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread app/app.go
Comment thread sei-ibc-go/modules/core/keeper/msg_server.go
types.RegisterMsgServer(cfg.MsgServer(), am.keeper)
// Transactions are rejected as deprecated; Keeper.Transfer stays executable
// for the versioned EVM precompiles that replay historical blocks.
types.RegisterMsgServer(cfg.MsgServer(), keeper.DeprecatedMsgServer{})

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] The comment says Keeper.Transfer stays executable only for versioned precompiles replaying historical blocks, but the current precompile also calls it directly: precompiles/ibc/ibc.go:169 and :255 invoke p.transferKeeper.Transfer(...), bypassing the msg-service router and therefore DeprecatedMsgServer. So a live EVM IBC.transfer call still attempts a real transfer and fails deeper down with ibc-channel: ibc outbound disabled rather than ErrTransferDeprecated.

Given the PR's goal of a stable deprecation error for transfer writes, consider gating the live precompile too (and adjusting this comment, which currently reads as if only legacy versions reach the keeper).

@masih
masih dismissed seidroid[bot]’s stale review August 19, 2026 11:06

Blocker 1, acceptable risk at low severity, because it requires a passed IBC proposal to trigger and that category of risk is mitigated by the fact that no proposal can be submitted by the new binary.

Blocker 2, confirmed as a non-issue based on on-chain state.

@masih
masih added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit 3bf98f3 Aug 19, 2026
121 of 128 checks passed
@masih
masih deleted the masih/ibc-deprecation-write-side-first branch August 19, 2026 11:26
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