Skip to content

Commit 8bd6db4

Browse files
authored
refactor!: ibc v10 bump (#3560)
* bump ibc and deps to v10 (no tests) * upgrade test deps * ics * ibc-go * interchaintest * add todo to tm light client * fix integration test * lint fix * more lint fixes * bump pfm to v10 beta 2 * bump rate limiting to v10 beta 2 * bump wasmd to latest forked version * add changes to changelog * bump to ics v7 * add wasm light client module to routes * descriptive storekey * remove blsverifier replacement * lint fix
1 parent 4e05094 commit 8bd6db4

35 files changed

+335
-363
lines changed

CHANGELOG.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,29 @@
22

33
## UNRELEASED
44

5-
### Dependencies
5+
### DEPENDENCIES
66

77
- Bump Go to 1.23 [\#3556](https://github.com/cosmos/gaia/pull/3556)
8+
- Bump [ibc-go](https://github.com/cosmos/ibc-go) to [v10.0.0-beta.2](https://github.com/cosmos/ibc-go/tree/v10.0.0-beta.2) ([\#3560](https://github.com/cosmos/gaia/pull/3560))
9+
- Bump [ibc-apps/modules/rate-limiting](https://github.com/cosmos/ibc-apps/tree/main/modules/rate-limiting) to [v10.0.0-beta.2](https://github.com/cosmos/ibc-apps/tree/modules/rate-limiting/v10.0.0-beta.2) ([\#3560](https://github.com/cosmos/gaia/pull/3560))
10+
- Bump [ibc-apps/middleware/packet-forward-middleware](https://github.com/cosmos/ibc-apps/tree/main/middleware/packet-forward-middleware) to [v10.0.0-beta.2](https://github.com/cosmos/ibc-apps/tree/middleware/packet-forward-middleware/v10.0.0-beta.2) ([\#3560](https://github.com/cosmos/gaia/pull/3560))
11+
- Bump [ibc-go/modules/apps/callbacks](https://github.com/cosmos/ibc-go/tree/main/modules/apps/callbacks) to [v0.3.0+ibc-go-v10.0-beta.2](https://github.com/cosmos/ibc-go/tree/modules/apps/callbacks/v0.3.0%2Bibc-go-v10.0-beta.2/modules/apps/callbacks) ([\#3560](https://github.com/cosmos/gaia/pull/3560))
12+
- Bump [ibc-go/modules/light-clients/08-wasm](https://github.com/cosmos/ibc-go/tree/main/modules/light-clients/08-wasm) to [v0.6.0+ibc-go-v10.0-wasmvm-v2.2-beta.2](https://github.com/cosmos/ibc-go/tree/modules/light-clients/08-wasm/v0.6.0%2Bibc-go-v10.0-wasmvm-v2.2-beta.2) ([\#3560](https://github.com/cosmos/gaia/pull/3560))
13+
- Bump [interchain-security](https://github.com/cosmos/interchain-security) to [v7.0.0-rc0](https://github.com/cosmos/interchain-security/tree/v7.0.0-rc0) ([\#3560](https://github.com/cosmos/gaia/pull/3560))
14+
- Bump [cosmos-sdk](https://github.com/cosmos/cosmos-sdk) to [v0.50.12](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.12) ([\#3560](https://github.com/cosmos/gaia/pull/3560))
815

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

14-
### Improvements
15-
16-
### Features
17-
18-
- Add 08-wasm light client ([\#3554](https://github.com/cosmos/gaia/pull/3554))
21+
### IMPROVEMENTS
1922

20-
### Bug-Fixes
23+
### FEATURES
24+
- Add [ibc-go/modules/light-clients/08-wasm](https://github.com/cosmos/ibc-go/tree/main/modules/light-clients/08-wasm) ([\#3554](https://github.com/cosmos/gaia/pull/3554))
2125

22-
### State Breaking
23-
- Remove the IBC Fee Middleware ([\#3553](https://github.com/cosmos/gaia/pull/3553))
26+
### STATE BREAKING
27+
- Remove [ibc-go/modules/apps/29-fee](https://github.com/cosmos/ibc-go/tree/v8.5.3/modules/apps/29-fee) ([\#3553](https://github.com/cosmos/gaia/pull/3553))
2428

2529
### API-Breaking
2630

ante/ante.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
feemarketante "github.com/skip-mev/feemarket/x/feemarket/ante"
55
feemarketkeeper "github.com/skip-mev/feemarket/x/feemarket/keeper"
66

7-
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
8-
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
7+
ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante"
8+
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
99

1010
corestoretypes "cosmossdk.io/core/store"
1111
errorsmod "cosmossdk.io/errors"

app/app.go

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ import (
1919

2020
dbm "github.com/cosmos/cosmos-db"
2121
"github.com/cosmos/gogoproto/proto"
22+
ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm"
2223
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
23-
ibctesting "github.com/cosmos/ibc-go/v8/testing"
24-
providertypes "github.com/cosmos/interchain-security/v6/x/ccv/provider/types"
24+
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
25+
ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint"
26+
ibctesting "github.com/cosmos/ibc-go/v10/testing"
27+
providertypes "github.com/cosmos/interchain-security/v7/x/ccv/provider/types"
2528

2629
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
2730
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
@@ -63,7 +66,7 @@ import (
6366
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
6467
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
6568

66-
wasm "github.com/CosmWasm/wasmd/x/wasm"
69+
"github.com/CosmWasm/wasmd/x/wasm"
6770
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
6871
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
6972

@@ -194,9 +197,18 @@ func NewGaiaApp(
194197
wasmOpts,
195198
)
196199

200+
// Create IBC Tendermint Light Client Stack
201+
clientKeeper := app.AppKeepers.IBCKeeper.ClientKeeper
202+
tmLightClientModule := ibctm.NewLightClientModule(appCodec, clientKeeper.GetStoreProvider())
203+
clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule)
204+
205+
// Create WASM Light Client Stack
206+
wasmLightClientModule := ibcwasm.NewLightClientModule(app.WasmClientKeeper, clientKeeper.GetStoreProvider())
207+
clientKeeper.AddRoute(ibcwasmtypes.ModuleName, &wasmLightClientModule)
208+
197209
// NOTE: Any module instantiated in the module manager that is later modified
198210
// must be passed by reference here.
199-
app.mm = module.NewManager(appModules(app, appCodec, txConfig, skipGenesisInvariants)...)
211+
app.mm = module.NewManager(appModules(app, appCodec, txConfig, skipGenesisInvariants, tmLightClientModule)...)
200212
app.ModuleBasics = newBasicManagerFromManager(app)
201213

202214
enabledSignModes := append([]sigtypes.SignMode(nil), authtx.DefaultSignModes...)
@@ -223,7 +235,6 @@ func NewGaiaApp(
223235
// there is nothing left over in the validator fee pool, so as to keep the
224236
// CanWithdrawInvariant invariant.
225237
// NOTE: staking module is required if HistoricalEntries param > 0
226-
// NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)
227238
// Tell the app's module manager how to set the order of BeginBlockers, which are run at the beginning of every block.
228239
app.mm.SetOrderBeginBlockers(orderBeginBlockers()...)
229240

@@ -232,9 +243,6 @@ func NewGaiaApp(
232243
// NOTE: The genutils module must occur after staking so that pools are
233244
// properly initialized with tokens from genesis accounts.
234245
// NOTE: The genutils module must also occur after auth so that it can access the params from auth.
235-
// NOTE: Capability module must occur first so that it can initialize any capabilities
236-
// so that other modules that want to create or claim capabilities afterwards in InitChain
237-
// can do so safely.
238246
app.mm.SetOrderInitGenesis(orderInitBlockers()...)
239247

240248
// Uncomment if you want to set a custom migration order here.
@@ -355,7 +363,7 @@ func NewGaiaApp(
355363
tmos.Exit(fmt.Sprintf("WasmKeeper failed initialize pinned codes %s", err))
356364
}
357365

358-
if err := ibcwasmkeeper.InitializePinnedCodes(ctx); err != nil {
366+
if err := app.WasmClientKeeper.InitializePinnedCodes(ctx); err != nil {
359367
panic(fmt.Sprintf("wasmlckeeper failed initialize pinned codes %s", err))
360368
}
361369
}

app/app_helpers.go

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package gaia
22

33
import (
4-
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
5-
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
6-
ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types"
7-
icstest "github.com/cosmos/interchain-security/v6/testutil/integration"
8-
ibcproviderkeeper "github.com/cosmos/interchain-security/v6/x/ccv/provider/keeper"
4+
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
5+
icstest "github.com/cosmos/interchain-security/v7/testutil/integration"
6+
ibcproviderkeeper "github.com/cosmos/interchain-security/v7/x/ccv/provider/keeper"
97
)
108

119
// ProviderApp interface implementations for icstest tests
@@ -15,21 +13,11 @@ func (app *GaiaApp) GetProviderKeeper() ibcproviderkeeper.Keeper { //nolint:noli
1513
return app.ProviderKeeper
1614
}
1715

18-
// GetStakingKeeper implements the TestingApp interface. Needed for ICS.
19-
func (app *GaiaApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { //nolint:nolintlint
20-
return app.StakingKeeper
21-
}
22-
2316
// GetIBCKeeper implements the TestingApp interface.
2417
func (app *GaiaApp) GetIBCKeeper() *ibckeeper.Keeper { //nolint:nolintlint
2518
return app.IBCKeeper
2619
}
2720

28-
// GetScopedIBCKeeper implements the TestingApp interface.
29-
func (app *GaiaApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { //nolint:nolintlint
30-
return app.ScopedIBCKeeper
31-
}
32-
3321
// GetTestStakingKeeper implements the ProviderApp interface.
3422
func (app *GaiaApp) GetTestStakingKeeper() icstest.TestStakingKeeper { //nolint:nolintlint
3523
return app.StakingKeeper

0 commit comments

Comments
 (0)