Skip to content

Commit fe53114

Browse files
chore(deps): bump ibc-go to v10.0.0-rc.3 (#2559)
1 parent 38c2a13 commit fe53114

File tree

10 files changed

+24
-142
lines changed

10 files changed

+24
-142
lines changed

app/consumer-democracy/app.go

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ import (
1010

1111
dbm "github.com/cosmos/cosmos-db"
1212
"github.com/cosmos/gogoproto/proto"
13-
"github.com/cosmos/ibc-go/modules/capability"
14-
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
15-
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
1613
"github.com/cosmos/ibc-go/v10/modules/apps/transfer"
1714
ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
1815
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
@@ -146,7 +143,6 @@ var (
146143
auth.AppModuleBasic{},
147144
genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator),
148145
bank.AppModuleBasic{},
149-
capability.AppModuleBasic{},
150146
ccvstaking.AppModuleBasic{},
151147
mint.AppModuleBasic{},
152148
ccvdistr.AppModuleBasic{},
@@ -208,7 +204,6 @@ type App struct { // nolint: golint
208204
// keepers
209205
AccountKeeper authkeeper.AccountKeeper
210206
BankKeeper bankkeeper.Keeper
211-
CapabilityKeeper *capabilitykeeper.Keeper
212207
StakingKeeper *stakingkeeper.Keeper
213208
SlashingKeeper slashingkeeper.Keeper
214209
MintKeeper mintkeeper.Keeper
@@ -225,11 +220,6 @@ type App struct { // nolint: golint
225220
ConsumerKeeper consumerkeeper.Keeper
226221
ConsensusParamsKeeper consensusparamkeeper.Keeper
227222

228-
// make scoped keepers public for test purposes
229-
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
230-
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
231-
ScopedIBCConsumerKeeper capabilitykeeper.ScopedKeeper
232-
233223
// the module manager
234224
MM *module.Manager
235225

@@ -270,12 +260,10 @@ func New(
270260
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, crisistypes.StoreKey,
271261
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
272262
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
273-
evidencetypes.StoreKey, ibctransfertypes.StoreKey,
274-
capabilitytypes.StoreKey, authzkeeper.StoreKey, consensusparamtypes.StoreKey,
263+
evidencetypes.StoreKey, ibctransfertypes.StoreKey, authzkeeper.StoreKey, consensusparamtypes.StoreKey,
275264
consumertypes.StoreKey,
276265
)
277266
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
278-
memKeys := storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
279267

280268
app := &App{
281269
BaseApp: bApp,
@@ -285,7 +273,6 @@ func New(
285273
interfaceRegistry: interfaceRegistry,
286274
keys: keys,
287275
tkeys: tkeys,
288-
memKeys: memKeys,
289276
}
290277

291278
app.ParamsKeeper = initParamsKeeper(
@@ -299,17 +286,6 @@ func New(
299286
app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]), authtypes.NewModuleAddress(govtypes.ModuleName).String(), runtime.EventService{})
300287
bApp.SetParamStore(&app.ConsensusParamsKeeper.ParamsStore)
301288

302-
// add capability keeper and ScopeToModule for ibc module
303-
app.CapabilityKeeper = capabilitykeeper.NewKeeper(
304-
appCodec,
305-
keys[capabilitytypes.StoreKey],
306-
memKeys[capabilitytypes.MemStoreKey],
307-
)
308-
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName)
309-
scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)
310-
scopedIBCConsumerKeeper := app.CapabilityKeeper.ScopeToModule(consumertypes.ModuleName)
311-
app.CapabilityKeeper.Seal()
312-
313289
// add keepers
314290
app.AccountKeeper = authkeeper.NewAccountKeeper(
315291
appCodec,
@@ -490,7 +466,7 @@ func New(
490466
app.GetSubspace(ibctransfertypes.ModuleName),
491467
app.IBCKeeper.ChannelKeeper,
492468
app.IBCKeeper.ChannelKeeper,
493-
app.IBCKeeper.ChannelKeeperV2,
469+
app.MsgServiceRouter(),
494470
app.AccountKeeper,
495471
app.BankKeeper,
496472
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
@@ -533,7 +509,6 @@ func New(
533509
auth.NewAppModule(appCodec, app.AccountKeeper, nil, app.GetSubspace(authtypes.ModuleName)),
534510
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
535511
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)),
536-
capability.NewAppModule(appCodec, *app.CapabilityKeeper, false),
537512
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
538513
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
539514
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)),
@@ -566,9 +541,7 @@ func New(
566541
// there is nothing left over in the validator fee pool, so as to keep the
567542
// CanWithdrawInvariant invariant.
568543
// NOTE: staking module is required if HistoricalEntries param > 0
569-
// NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)
570544
app.MM.SetOrderBeginBlockers(
571-
capabilitytypes.ModuleName,
572545
minttypes.ModuleName,
573546
distrtypes.ModuleName,
574547
slashingtypes.ModuleName,
@@ -592,7 +565,6 @@ func New(
592565
crisistypes.ModuleName,
593566
govtypes.ModuleName,
594567
stakingtypes.ModuleName,
595-
capabilitytypes.ModuleName,
596568
authtypes.ModuleName,
597569
banktypes.ModuleName,
598570
distrtypes.ModuleName,
@@ -614,11 +586,7 @@ func New(
614586
// NOTE: The genutils module must occur after staking so that pools are
615587
// properly initialized with tokens from genesis accounts.
616588
// NOTE: The genutils module must also occur after auth so that it can access the params from auth.
617-
// NOTE: Capability module must occur first so that it can initialize any capabilities
618-
// so that other modules that want to create or claim capabilities afterwards in InitChain
619-
// can do so safely.
620589
app.MM.SetOrderInitGenesis(
621-
capabilitytypes.ModuleName,
622590
authtypes.ModuleName,
623591
banktypes.ModuleName,
624592
distrtypes.ModuleName,
@@ -716,7 +684,6 @@ func New(
716684
// initialize stores
717685
app.MountKVStores(keys)
718686
app.MountTransientStores(tkeys)
719-
app.MountMemoryStores(memKeys)
720687

721688
anteHandler, err := NewAnteHandler(
722689
HandlerOptions{
@@ -760,10 +727,6 @@ func New(
760727
fmt.Fprintln(os.Stderr, err.Error())
761728
}
762729

763-
app.ScopedIBCKeeper = scopedIBCKeeper
764-
app.ScopedTransferKeeper = scopedTransferKeeper
765-
app.ScopedIBCConsumerKeeper = scopedIBCConsumerKeeper
766-
767730
return app
768731
}
769732

@@ -929,11 +892,6 @@ func (app *App) GetIBCKeeper() *ibckeeper.Keeper {
929892
return app.IBCKeeper
930893
}
931894

932-
// GetScopedIBCKeeper implements the TestingApp interface.
933-
func (app *App) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper {
934-
return app.ScopedIBCKeeper
935-
}
936-
937895
// GetTxConfig implements the TestingApp interface.
938896
func (app *App) GetTxConfig() client.TxConfig {
939897
return app.txConfig

app/consumer/app.go

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import (
99
"path/filepath"
1010

1111
dbm "github.com/cosmos/cosmos-db"
12-
"github.com/cosmos/ibc-go/modules/capability"
13-
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
1412
"github.com/cosmos/ibc-go/v10/modules/apps/transfer"
1513
ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
1614
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
@@ -125,7 +123,6 @@ var (
125123
auth.AppModuleBasic{},
126124
genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator),
127125
bank.AppModuleBasic{},
128-
capability.AppModuleBasic{},
129126
params.AppModuleBasic{},
130127
crisis.AppModuleBasic{},
131128
slashing.AppModuleBasic{},
@@ -227,13 +224,11 @@ func New(
227224
keys := storetypes.NewKVStoreKeys(
228225
authtypes.StoreKey, banktypes.StoreKey, slashingtypes.StoreKey, crisistypes.StoreKey,
229226
paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey,
230-
evidencetypes.StoreKey, ibctransfertypes.StoreKey,
231-
capabilitytypes.StoreKey, feegrant.StoreKey, authzkeeper.StoreKey,
227+
evidencetypes.StoreKey, ibctransfertypes.StoreKey, feegrant.StoreKey, authzkeeper.StoreKey,
232228
consensusparamtypes.StoreKey,
233229
ibcconsumertypes.StoreKey,
234230
)
235231
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
236-
memKeys := storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
237232

238233
app := &App{
239234
BaseApp: bApp,
@@ -243,7 +238,6 @@ func New(
243238
interfaceRegistry: interfaceRegistry,
244239
keys: keys,
245240
tkeys: tkeys,
246-
memKeys: memKeys,
247241
}
248242

249243
app.ParamsKeeper = initParamsKeeper(
@@ -378,7 +372,7 @@ func New(
378372
app.GetSubspace(ibctransfertypes.ModuleName),
379373
app.IBCKeeper.ChannelKeeper,
380374
app.IBCKeeper.ChannelKeeper,
381-
app.IBCKeeper.ChannelKeeperV2,
375+
app.MsgServiceRouter(),
382376
app.AccountKeeper,
383377
app.BankKeeper,
384378
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
@@ -448,10 +442,8 @@ func New(
448442
// there is nothing left over in the validator fee pool, so as to keep the
449443
// CanWithdrawInvariant invariant.
450444
// NOTE: staking module is required if HistoricalEntries param > 0
451-
// NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)
452445
app.MM.SetOrderBeginBlockers(
453446
// upgrades should be run first
454-
capabilitytypes.ModuleName,
455447
crisistypes.ModuleName,
456448
ibctransfertypes.ModuleName,
457449
ibchost.ModuleName,
@@ -473,7 +465,6 @@ func New(
473465
ibchost.ModuleName,
474466
feegrant.ModuleName,
475467
authz.ModuleName,
476-
capabilitytypes.ModuleName,
477468
authtypes.ModuleName,
478469
banktypes.ModuleName,
479470
slashingtypes.ModuleName,
@@ -488,11 +479,7 @@ func New(
488479
// NOTE: The genutils module must occur after staking so that pools are
489480
// properly initialized with tokens from genesis accounts.
490481
// NOTE: The genutils module must also occur after auth so that it can access the params from auth.
491-
// NOTE: Capability module must occur first so that it can initialize any capabilities
492-
// so that other modules that want to create or claim capabilities afterwards in InitChain
493-
// can do so safely.
494482
app.MM.SetOrderInitGenesis(
495-
capabilitytypes.ModuleName,
496483
authtypes.ModuleName,
497484
banktypes.ModuleName,
498485
slashingtypes.ModuleName,
@@ -530,7 +517,6 @@ func New(
530517
// initialize stores
531518
app.MountKVStores(keys)
532519
app.MountTransientStores(tkeys)
533-
app.MountMemoryStores(memKeys)
534520

535521
app.SetInitChainer(app.InitChainer)
536522
app.SetPreBlocker(app.PreBlocker)

app/provider/app.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ func New(
486486
app.GetSubspace(ibctransfertypes.ModuleName),
487487
app.IBCKeeper.ChannelKeeper,
488488
app.IBCKeeper.ChannelKeeper,
489-
app.IBCKeeper.ChannelKeeperV2,
489+
app.MsgServiceRouter(),
490490
app.AccountKeeper,
491491
app.BankKeeper,
492492
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
@@ -616,9 +616,6 @@ func New(
616616
// NOTE: The genutils module must occur after staking so that pools are
617617
// properly initialized with tokens from genesis accounts.
618618
// NOTE: The genutils module must also occur after auth so that it can access the params from auth.
619-
// NOTE: Capability module must occur first so that it can initialize any capabilities
620-
// so that other modules that want to create or claim capabilities afterwards in InitChain
621-
// can do so safely.
622619
// NOTE: The provider module must come after genutils and staking, since it relies on the
623620
// information about the validators these modules provide to compute validator updates.
624621
app.MM.SetOrderInitGenesis(

0 commit comments

Comments
 (0)