Skip to content

Commit

Permalink
refactor!: Remove ibcfee middleware (#3553)
Browse files Browse the repository at this point in the history
* Remove ibcfee middleware

* Remove test

* Update changelog

* Disable feemarket
  • Loading branch information
Eric-Warehime authored Feb 26, 2025
1 parent b950f8c commit 643d0f4
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 180 deletions.
15 changes: 8 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@

## UNRELEASED

### DEPENDENCIES
### Dependencies

### BUG FIXES
### Bug Fixes
- Export only validators that are participating in consensus
([\#3490](https://github.com/cosmos/gaia/pull/3490))
- Fix goreleaser config to generate Linux builds again. ([\#3506](https://github.com/cosmos/gaia/pull/3506))

### IMPROVEMENTS
### Improvements

### FEATURES
### Features

### BUG-FIXES
### Bug-Fixes

### STATE BREAKING
### State Breaking
- Remove the IBC Fee Middleware ([\#3553](https://github.com/cosmos/gaia/pull/3553))

### API-BREAKING
### API-Breaking

## v22.2.0

Expand Down
20 changes: 3 additions & 17 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ import (
icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper"
icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types"
ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee"
ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper"
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
"github.com/cosmos/ibc-go/v8/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
Expand Down Expand Up @@ -122,7 +119,6 @@ type AppKeepers struct {

// Modules
ICAModule ica.AppModule
IBCFeeKeeper ibcfeekeeper.Keeper
TransferModule transfer.AppModule
PFMRouterModule pfmrouter.AppModule
RateLimitModule ratelimit.AppModule
Expand Down Expand Up @@ -398,13 +394,6 @@ func NewAppKeeper(
// If evidence needs to be handled for the app, set routes in router here and seal
appKeepers.EvidenceKeeper = *evidenceKeeper

appKeepers.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
appCodec, appKeepers.keys[ibcfeetypes.StoreKey],
appKeepers.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.IBCKeeper.PortKeeper, appKeepers.AccountKeeper, appKeepers.BankKeeper,
)

// ICA Host keeper
appKeepers.ICAHostKeeper = icahostkeeper.NewKeeper(
appCodec,
Expand Down Expand Up @@ -432,7 +421,7 @@ func NewAppKeeper(
govAuthority, // authority
appKeepers.BankKeeper,
appKeepers.IBCKeeper.ChannelKeeper, // ChannelKeeper
appKeepers.IBCFeeKeeper, // ICS4Wrapper
appKeepers.IBCKeeper.ChannelKeeper, // ICS4Wrapper
)

// ICA Controller keeper
Expand Down Expand Up @@ -488,7 +477,7 @@ func NewAppKeeper(
appKeepers.BankKeeper,
appKeepers.StakingKeeper,
distrkeeper.NewQuerier(appKeepers.DistrKeeper),
appKeepers.IBCFeeKeeper,
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.IBCKeeper.PortKeeper,
appKeepers.scopedWasmKeeper,
Expand Down Expand Up @@ -530,17 +519,14 @@ func NewAppKeeper(
pfmrouterkeeper.DefaultForwardTransferPacketTimeoutTimestamp,
)
transferStack = ratelimit.NewIBCMiddleware(appKeepers.RatelimitKeeper, transferStack)
transferStack = ibcfee.NewIBCMiddleware(transferStack, appKeepers.IBCFeeKeeper)

// Create ICAHost Stack
var icaHostStack porttypes.IBCModule = icahost.NewIBCModule(appKeepers.ICAHostKeeper)

// Create Interchain Accounts Controller Stack
var icaControllerStack porttypes.IBCModule = icacontroller.NewIBCMiddleware(nil, appKeepers.ICAControllerKeeper)

var wasmStack porttypes.IBCModule
wasmStack = wasm.NewIBCHandler(appKeepers.WasmKeeper, appKeepers.IBCKeeper.ChannelKeeper, appKeepers.IBCFeeKeeper)
wasmStack = ibcfee.NewIBCMiddleware(wasmStack, appKeepers.IBCFeeKeeper)
wasmStack := wasm.NewIBCHandler(appKeepers.WasmKeeper, appKeepers.IBCKeeper.ChannelKeeper, appKeepers.IBCKeeper.ChannelKeeper)

// Create IBC Router & seal
ibcRouter := porttypes.NewRouter().
Expand Down
6 changes: 2 additions & 4 deletions app/modules.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package gaia

import (
feemarket "github.com/skip-mev/feemarket/x/feemarket"
"github.com/skip-mev/feemarket/x/feemarket"
feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types"

pfmroutertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"
"github.com/cosmos/ibc-go/modules/capability"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"
ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee"
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v8/modules/core"
Expand Down Expand Up @@ -59,7 +58,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/staking"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

wasm "github.com/CosmWasm/wasmd/x/wasm"
"github.com/CosmWasm/wasmd/x/wasm"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

"github.com/cosmos/gaia/v23/x/metaprotocols"
Expand Down Expand Up @@ -115,7 +114,6 @@ func appModules(
sdkparams.NewAppModule(app.ParamsKeeper),
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
wasm.NewAppModule(appCodec, &app.AppKeepers.WasmKeeper, app.AppKeepers.StakingKeeper, app.AppKeepers.AccountKeeper, app.AppKeepers.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
ibcfee.NewAppModule(app.IBCFeeKeeper),
app.TransferModule,
app.ICAModule,
app.PFMRouterModule,
Expand Down
11 changes: 11 additions & 0 deletions app/upgrades/v23/constants.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package v23

import (
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"

"cosmossdk.io/store/types"

"github.com/cosmos/gaia/v23/app/upgrades"
)

Expand All @@ -12,4 +16,11 @@ const (
var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: types.StoreUpgrades{
Added: nil,
Renamed: nil,
Deleted: []string{
ibcfeetypes.StoreKey,
},
},
}
152 changes: 0 additions & 152 deletions tests/integration/ibcfee_test.go

This file was deleted.

1 change: 1 addition & 0 deletions tests/integration/interchain_security_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func init() {
}

func TestCCVTestSuite(t *testing.T) {
ante.UseFeeMarketDecorator = false
// Run tests
suite.Run(t, ccvSuite)
}
Expand Down

0 comments on commit 643d0f4

Please sign in to comment.