Retire the IBC precompile and drop dead IBC references (step 1 of sei-ibc-go removal) - #3883
Closed
masih wants to merge 3 commits into
Closed
Retire the IBC precompile and drop dead IBC references (step 1 of sei-ibc-go removal)#3883masih wants to merge 3 commits into
masih wants to merge 3 commits into
Conversation
IBC inbound and outbound are disabled on chain and are not coming back, so 0x...1009 can no longer reach a transfer keeper. Every version tag now reverts with a retirement reason instead of building a MsgTransfer. All tags are retired rather than just the current one because the transfer store is being unmounted: a legacy version replayed at an old height would have no keeper to call, so preserving the original code would buy nothing. The address stays registered. Unregistering it would let a call to 0x...1009 succeed and return empty data rather than revert, quietly turning a caller that fails today into one that believes it succeeded. Retiring frees the precompile keeper contract from IBC, so TransferKeeper, ClientKeeper, ConnectionKeeper and ChannelKeeper leave precompiles/utils and app/precompiles.go. Co-authored-by: Masih H. Derkani <m@derkani.org>
x/evm and giga/deps/xevm stored an ibctransferkeeper.Keeper that no method in either package ever read. The state-inspection tooling in tools/utils listed the ibc and transfer stores, and three archived legacy common packages declared IBC keeper interfaces that nothing implements now that the precompile is retired. Co-authored-by: Masih H. Derkani <m@derkani.org>
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3883 +/- ##
==========================================
- Coverage 61.61% 60.78% -0.83%
==========================================
Files 2348 2255 -93
Lines 200852 190196 -10656
==========================================
- Hits 123755 115616 -8139
+ Misses 66044 64376 -1668
+ Partials 11053 10204 -849
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Collaborator
Author
|
Superseded by a cleaner more maintainable approach here #3884 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe your changes and provide context
IBC inbound and outbound are disabled on chain and are not coming back, and all funds have been reviewed. This is the first step toward deleting
sei-ibc-go/entirely at the v6.7 coordinated upgrade. It removes every IBC dependency that can be removed without touching the module wiring, so the later steps have a smaller surface.Two commits:
precompiles/ibc: retire the precompile at every version.0x…1009now reverts with"ibc precompile is retired; ibc transfers are disabled"instead of building aMsgTransfer. A newpcommon.NewRetiredPrecompileholds the single retired implementation; the root package and all 15 legacy tags are thin wrappers over it, each supplying its own embeddedabi.json.Drop IBC references that were already dead.
x/evm/keeperandgiga/deps/xevm/keepereach stored anibctransferkeeper.Keeperthat no method in either package ever read;tools/utilslisted theibc/transferstores; and three archived legacy common packages declared IBC keeper interfaces that nothing implements once the precompile is retired.Three decisions worth reviewing
The address stays registered. Unregistering it would let a call to
0x…1009succeed and return empty data instead of reverting, quietly turning a caller that fails today into one that believes it succeeded. This follows the retired oracle precompile at0x…1008.Every tag is retired, not just the current one. The oracle retirement kept its legacy versions executing real logic, because the oracle module still exists. Here the
transferstore is being unmounted at v6.7, so a legacy version replayed at an old height would have no keeper to call — preserving the original code would buy nothing. The practical cost is thatdebug_traceTransactionon a historical block that called0x…1009reports a revert rather than the original transfer. That fidelity is forfeited by the store removal regardless of what this PR does.Three archived legacy packages were edited.
precompiles/common/legacy/{v605,v606,v610}/expected_keepers.gohad their IBC keeper interfaces removed. This is againstscripts/bump_version's rule that archived tags are immutable, so it is called out rather than slipped in. The edit is compile-only: nothing referenced those interfaces once the precompile stopped needing them.Remaining steps (not in this PR)
sei-wasmd/x/wasm/ibc.go,keeper/{ibc,relay}.go, the handler and query plugins,types/expected_keepers.go,wasmbinding'sIBCRawPacketHandler).app(keepers, IBC router,ModuleBasics,maccPerms, gov client-proposal routes,SetOrderInitGenesis, param subspaces,app/ante.go, theCheckMessageblock inapp/ante/cosmos_checktx.go, theibcclientbegin blocker inapp/legacyabci/begin_block.go).ibc/transfer/capabilityfromapp.kvStoreKeyNamesandsei-db/common/keys.MemIAVLStoreKeys, and addStoreUpgrades{Deleted: ...}forv6.7inSetStoreUpgradeHandlers, the same shape as"dex"at v5.8.0.git rm -r sei-ibc-go(~109k Go lines, roughly half generated.pb.go).One product decision blocks the wasm step.
Keeper.instantiateandKeeper.migratecallensureIbcPortwhenreport.HasIBCEntryPoints. With no port keeper, uploading or instantiating a contract that exports IBC entry points either has to be rejected outright or silently skip port binding. Rejecting is more honest — such a contract cannot work — but it is a consensus behavior change for deployers, so it should be an explicit call rather than an implementation detail.One thing worth doing before the module goes.
seid query ibc-transfer denom-traceis the only way to resolve anibc/<hash>denom to its origin chain and base denom, and it dies with the module. If any of those denoms still carry supply, consider dumping the denom-trace table into the repo first so the mapping survives.Testing performed to validate your change
go build ./...— clean.go vet ./...across the whole repository — clean (this compiles test packages too).go test ./precompiles/...— all pass.go test ./x/evm/keeper/...— passes, includingTestGetCustomPrecompiles, the completeness check that maps every entry in each precompile'sversionsfile to an upgrade height. The IBCversionsfile is unchanged, so all 15 tags still resolve.gofmt -s -l .andgoimports -l .report nothing for any touched file.Not covered: there is no integration test for the IBC precompile to update —
integration_test/precompile_tests/README.mdrecords that it is out of scope, and0x…1009is absent fromPRECOMPILE_ADDRESSES.