Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove ibc wasm module #300

Merged
merged 4 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ import (
"github.com/cosmos/ibc-go/modules/capability"
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts"
icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller"
icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper"
Expand Down Expand Up @@ -278,7 +275,6 @@ type WasmApp struct {
ICAHostKeeper icahostkeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
WasmKeeper wasmkeeper.Keeper
WasmClientKeeper ibcwasmkeeper.Keeper
AbstractAccountKeeper aakeeper.Keeper
IBCHooksKeeper *ibchookskeeper.Keeper
ContractKeeper *wasmkeeper.PermissionedKeeper
Expand Down Expand Up @@ -360,7 +356,7 @@ func NewWasmApp(
nftkeeper.StoreKey, group.StoreKey,
// non sdk store keys
ibcexported.StoreKey, ibctransfertypes.StoreKey, ibcfeetypes.StoreKey,
ibcwasmtypes.StoreKey, wasmtypes.StoreKey, icahosttypes.StoreKey,
wasmtypes.StoreKey, icahosttypes.StoreKey,
aatypes.StoreKey, icacontrollertypes.StoreKey, globalfee.StoreKey,
xiontypes.StoreKey, ibchookstypes.StoreKey, packetforwardtypes.StoreKey,
feeabstypes.StoreKey, jwktypes.StoreKey, tokenfactorytypes.StoreKey,
Expand Down Expand Up @@ -753,15 +749,6 @@ func NewWasmApp(
wasmOpts...,
)

app.WasmClientKeeper = ibcwasmkeeper.NewKeeperWithVM(
appCodec,
runtime.NewKVStoreService(keys[ibcwasmtypes.StoreKey]),
app.IBCKeeper.ClientKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
wasmVM,
app.GRPCQueryRouter(),
)

app.AbstractAccountKeeper = aakeeper.NewKeeper(
appCodec,
keys[aatypes.StoreKey],
Expand Down Expand Up @@ -870,7 +857,6 @@ func NewWasmApp(
xion.NewAppModule(app.XionKeeper),
ibc.NewAppModule(app.IBCKeeper),
ibctm.NewAppModule(),
ibcwasm.NewAppModule(app.WasmClientKeeper),
transfer.NewAppModule(app.TransferKeeper),
ibcfee.NewAppModule(app.IBCFeeKeeper),
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
Expand Down Expand Up @@ -923,7 +909,6 @@ func NewWasmApp(
feeabstypes.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
ibcwasmtypes.ModuleName,
wasmtypes.ModuleName,
aatypes.ModuleName,
xiontypes.ModuleName,
Expand All @@ -949,7 +934,6 @@ func NewWasmApp(
feeabstypes.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
ibcwasmtypes.ModuleName,
wasmtypes.ModuleName,
aatypes.ModuleName,
ibchookstypes.ModuleName,
Expand Down Expand Up @@ -981,7 +965,6 @@ func NewWasmApp(
feeabstypes.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
ibcwasmtypes.ModuleName,
// wasm after ibc transfer
wasmtypes.ModuleName,
aatypes.ModuleName,
Expand Down Expand Up @@ -1350,7 +1333,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(aatypes.ModuleName)
paramsKeeper.Subspace(packetforwardtypes.ModuleName)
paramsKeeper.Subspace(feeabstypes.ModuleName)
paramsKeeper.Subspace(ibcwasmtypes.ModuleName)

// IBC params migration - legacySubspace to selfManaged
// https://github.com/cosmos/ibc-go/blob/main/docs/docs/05-migrations/11-v7-to-v8.md#params-migration
Expand Down
8 changes: 4 additions & 4 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
)

const UpgradeName = "v14"
const UpgradeName = "v15"

func (app *WasmApp) RegisterUpgradeHandlers() {
app.WrapSetUpgradeHandler(UpgradeName)
Expand All @@ -26,12 +26,12 @@ func (app *WasmApp) RegisterUpgradeHandlers() {
if upgradeInfo.Name == UpgradeName {
if !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{
// Remove the ibcwasm module store.
Deleted: []string{
ibcwasmtypes.ModuleName,
},
}

app.Logger().Info("setting upgrade store loaders")
app.Logger().Info("setting upgrade store loaders for v15")
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
}
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/upgrade_ibc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const (
xionVersionFrom = "12.0.1"
xionImageTo = "xion"
xionVersionTo = "local"
xionUpgradeName = "v13"
xionUpgradeName = "v15"

osmosisImage = "ghcr.io/strangelove-ventures/heighliner/osmosis"
osmosisVersion = "v25.2.1"
Expand Down