@@ -22,25 +22,23 @@ import (
2222 cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
2323 dbm "github.com/cosmos/cosmos-db"
2424 "github.com/cosmos/gogoproto/proto"
25- ica "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts"
26- icacontroller "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller"
27- icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper"
28- icacontrollertypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/types"
29- icahost "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host"
30- icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper"
31- icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types"
32- icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types"
33- ibccallbacks "github.com/cosmos/ibc-go/v10/modules/apps/callbacks"
34- "github.com/cosmos/ibc-go/v10/modules/apps/transfer"
35- ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
36- ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
37- ibc "github.com/cosmos/ibc-go/v10/modules/core"
38- ibcclienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types"
39- ibcconnectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types"
40- porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
41- ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
42- ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
43- ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint"
25+ ica "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts"
26+ icacontroller "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/controller"
27+ icacontrollerkeeper "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/controller/keeper"
28+ icacontrollertypes "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/controller/types"
29+ icahost "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/host"
30+ icahostkeeper "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/host/keeper"
31+ icahosttypes "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/host/types"
32+ icatypes "github.com/cosmos/ibc-go/v11/modules/apps/27-interchain-accounts/types"
33+ ibccallbacks "github.com/cosmos/ibc-go/v11/modules/apps/callbacks"
34+ "github.com/cosmos/ibc-go/v11/modules/apps/transfer"
35+ ibctransferkeeper "github.com/cosmos/ibc-go/v11/modules/apps/transfer/keeper"
36+ ibctransfertypes "github.com/cosmos/ibc-go/v11/modules/apps/transfer/types"
37+ ibc "github.com/cosmos/ibc-go/v11/modules/core"
38+ porttypes "github.com/cosmos/ibc-go/v11/modules/core/05-port/types"
39+ ibcexported "github.com/cosmos/ibc-go/v11/modules/core/exported"
40+ ibckeeper "github.com/cosmos/ibc-go/v11/modules/core/keeper"
41+ ibctm "github.com/cosmos/ibc-go/v11/modules/light-clients/07-tendermint"
4442 memiavlstore "github.com/crypto-org-chain/cronos-store/store"
4543 "github.com/crypto-org-chain/cronos/client/docs"
4644 "github.com/crypto-org-chain/cronos/x/cronos"
@@ -80,34 +78,27 @@ import (
8078 "cosmossdk.io/client/v2/autocli"
8179 "cosmossdk.io/core/appmodule"
8280 "cosmossdk.io/errors"
83- "cosmossdk.io/log"
84- storetypes "cosmossdk.io/store/types"
85- "cosmossdk.io/x/evidence"
86- evidencekeeper "cosmossdk.io/x/evidence/keeper"
87- evidencetypes "cosmossdk.io/x/evidence/types"
88- "cosmossdk.io/x/feegrant"
89- feegrantkeeper "cosmossdk.io/x/feegrant/keeper"
90- feegrantmodule "cosmossdk.io/x/feegrant/module"
91- "cosmossdk.io/x/upgrade"
92- upgradekeeper "cosmossdk.io/x/upgrade/keeper"
93- upgradetypes "cosmossdk.io/x/upgrade/types"
81+ "cosmossdk.io/log/v2"
9482
9583 "github.com/cosmos/cosmos-sdk/baseapp"
9684 "github.com/cosmos/cosmos-sdk/baseapp/txnrunner"
97- "github.com/cosmos/cosmos-sdk/blockstm"
9885 "github.com/cosmos/cosmos-sdk/client"
9986 "github.com/cosmos/cosmos-sdk/client/flags"
10087 "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice"
10188 "github.com/cosmos/cosmos-sdk/client/grpc/node"
10289 "github.com/cosmos/cosmos-sdk/codec"
10390 "github.com/cosmos/cosmos-sdk/codec/address"
10491 "github.com/cosmos/cosmos-sdk/codec/types"
92+ "github.com/cosmos/cosmos-sdk/contrib/x/crisis"
93+ crisiskeeper "github.com/cosmos/cosmos-sdk/contrib/x/crisis/keeper"
94+ crisistypes "github.com/cosmos/cosmos-sdk/contrib/x/crisis/types"
10595 "github.com/cosmos/cosmos-sdk/runtime"
10696 runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"
10797 "github.com/cosmos/cosmos-sdk/server"
10898 "github.com/cosmos/cosmos-sdk/server/api"
10999 "github.com/cosmos/cosmos-sdk/server/config"
110100 servertypes "github.com/cosmos/cosmos-sdk/server/types"
101+ storetypes "github.com/cosmos/cosmos-sdk/store/v2/types"
111102 sdk "github.com/cosmos/cosmos-sdk/types"
112103 sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
113104 "github.com/cosmos/cosmos-sdk/types/mempool"
@@ -131,12 +122,15 @@ import (
131122 "github.com/cosmos/cosmos-sdk/x/consensus"
132123 consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
133124 consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
134- "github.com/cosmos/cosmos-sdk/x/crisis"
135- crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
136- crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
137125 distr "github.com/cosmos/cosmos-sdk/x/distribution"
138126 distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
139127 distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
128+ "github.com/cosmos/cosmos-sdk/x/evidence"
129+ evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper"
130+ evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
131+ "github.com/cosmos/cosmos-sdk/x/feegrant"
132+ feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper"
133+ feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module"
140134 "github.com/cosmos/cosmos-sdk/x/genutil"
141135 genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
142136 "github.com/cosmos/cosmos-sdk/x/gov"
@@ -159,6 +153,9 @@ import (
159153 "github.com/cosmos/cosmos-sdk/x/staking"
160154 stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
161155 stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
156+ "github.com/cosmos/cosmos-sdk/x/upgrade"
157+ upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
158+ upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
162159)
163160
164161const (
@@ -299,10 +296,10 @@ type App struct {
299296 UpgradeKeeper upgradekeeper.Keeper
300297 ParamsKeeper paramskeeper.Keeper //nolint:staticcheck
301298 IBCKeeper * ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
302- ICAControllerKeeper icacontrollerkeeper.Keeper
303- ICAHostKeeper icahostkeeper.Keeper
299+ ICAControllerKeeper * icacontrollerkeeper.Keeper
300+ ICAHostKeeper * icahostkeeper.Keeper
304301 EvidenceKeeper evidencekeeper.Keeper
305- TransferKeeper ibctransferkeeper.Keeper
302+ TransferKeeper * ibctransferkeeper.Keeper
306303 FeeGrantKeeper feegrantkeeper.Keeper
307304 ConsensusParamsKeeper consensusparamkeeper.Keeper
308305
@@ -340,7 +337,6 @@ type App struct {
340337func New (
341338 logger log.Logger ,
342339 db dbm.DB ,
343- traceStore io.Writer ,
344340 loadLatest bool ,
345341 // this line is used by starport scaffolding # stargate/app/newArgument
346342 appOpts servertypes.AppOptions ,
@@ -406,7 +402,7 @@ func New(
406402 app .SetMempool (mpool )
407403
408404 // Re-use the default prepare proposal handler, extend the transaction validation logic
409- defaultProposalHandler := baseapp .NewDefaultProposalHandlerFast (mpool , app )
405+ defaultProposalHandler := baseapp .NewDefaultProposalHandler (mpool , app )
410406 defaultProposalHandler .SetTxSelector (NewExtTxSelector (
411407 baseapp .NewDefaultTxSelector (),
412408 txDecoder ,
@@ -441,7 +437,6 @@ func New(
441437 // NOTE we use custom transaction decoder that supports the sdk.Tx interface instead of sdk.StdTx
442438 bApp := baseapp .NewBaseApp (Name , logger , db , txConfig .TxDecoder (), baseAppOptions ... )
443439
444- bApp .SetCommitMultiStoreTracer (traceStore )
445440 bApp .SetVersion (version .Version )
446441 bApp .SetInterfaceRegistry (interfaceRegistry )
447442 bApp .SetTxEncoder (txConfig .TxEncoder ())
@@ -591,7 +586,6 @@ func New(
591586 app .IBCKeeper = ibckeeper .NewKeeper (
592587 appCodec ,
593588 runtime .NewKVStoreService (keys [ibcexported .StoreKey ]),
594- app .GetSubspace (ibcexported .ModuleName ),
595589 app .UpgradeKeeper ,
596590 authAddr ,
597591 )
@@ -600,29 +594,26 @@ func New(
600594 app .ICAControllerKeeper = icacontrollerkeeper .NewKeeper (
601595 appCodec ,
602596 runtime .NewKVStoreService (keys [icacontrollertypes .StoreKey ]),
603- app .GetSubspace (icacontrollertypes .SubModuleName ),
604- app .IBCKeeper .ChannelKeeper ,
605597 app .IBCKeeper .ChannelKeeper ,
606598 app .MsgServiceRouter (),
607599 authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
608600 )
609601 app .ICAHostKeeper = icahostkeeper .NewKeeper (
610602 appCodec ,
611603 runtime .NewKVStoreService (keys [icahosttypes .StoreKey ]),
612- app .GetSubspace (icahosttypes .SubModuleName ),
613- app .IBCKeeper .ChannelKeeper ,
614604 app .IBCKeeper .ChannelKeeper ,
615605 app .AccountKeeper ,
616606 app .MsgServiceRouter (),
617607 app .GRPCQueryRouter (),
618608 authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
619609 )
620- icaModule := ica .NewAppModule (& app .ICAControllerKeeper , & app .ICAHostKeeper )
610+ icaModule := ica .NewAppModule (app .ICAControllerKeeper , app .ICAHostKeeper )
621611
622612 // Create Transfer Keepers
623613 app .TransferKeeper = ibctransferkeeper .NewKeeper (
624- appCodec , runtime .NewKVStoreService (keys [ibctransfertypes .StoreKey ]), app .GetSubspace (ibctransfertypes .ModuleName ),
625- app .IBCKeeper .ChannelKeeper , app .IBCKeeper .ChannelKeeper ,
614+ appCodec , app .AccountKeeper .AddressCodec (),
615+ runtime .NewKVStoreService (keys [ibctransfertypes .StoreKey ]),
616+ app .IBCKeeper .ChannelKeeper ,
626617 app .MsgServiceRouter (),
627618 app .AccountKeeper , app .BankKeeper ,
628619 authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
@@ -688,8 +679,9 @@ func New(
688679 govKeeper := govkeeper .NewKeeper (
689680 appCodec ,
690681 runtime .NewKVStoreService (keys [govtypes .StoreKey ]),
691- app .AccountKeeper , app .BankKeeper , app .StakingKeeper , app . DistrKeeper ,
682+ app .AccountKeeper , app .BankKeeper , app .DistrKeeper ,
692683 app .MsgServiceRouter (), govConfig , authAddr ,
684+ govkeeper .NewDefaultCalculateVoteResultsAndVotingPower (app .StakingKeeper ),
693685 )
694686
695687 // Set legacy router for backwards compatibility with gov v1beta1
@@ -710,13 +702,12 @@ func New(
710702
711703 var icaControllerStack porttypes.IBCModule
712704 icaControllerStack = icacontroller .NewIBCMiddleware (app .ICAControllerKeeper ) // we don't limit gas usage here, because the cronos keeper will use network parameter to control it.
713- icaControllerStack = ibccallbacks .NewIBCMiddleware (icaControllerStack , app .IBCKeeper .ChannelKeeper , app .CronosKeeper , math .MaxUint64 )
714- icaICS4Wrapper , ok := icaControllerStack .(porttypes.ICS4Wrapper )
715- if ! ok {
716- panic (fmt .Errorf ("cannot convert %T to %T" , icaControllerStack , icaICS4Wrapper ))
717- }
705+ icaCallbacks := ibccallbacks .NewIBCMiddleware (app .CronosKeeper , math .MaxUint64 )
706+ icaCallbacks .SetUnderlyingApplication (icaControllerStack )
707+ icaCallbacks .SetICS4Wrapper (app .IBCKeeper .ChannelKeeper )
708+ icaControllerStack = icaCallbacks
718709 // Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper
719- app .ICAControllerKeeper .WithICS4Wrapper (icaICS4Wrapper )
710+ app .ICAControllerKeeper .WithICS4Wrapper (icaCallbacks )
720711
721712 icaHostStack := icahost .NewIBCModule (app .ICAHostKeeper )
722713
@@ -1033,7 +1024,7 @@ func New(
10331024 }
10341025 }
10351026
1036- if err := app .RefreshBlockList (app .NewUncachedContext (false , cmtproto.Header {})); err != nil {
1027+ if err := app .RefreshBlockList (app .NewUncachedContext (false , cmtproto.Header {})); err != nil { //nolint:staticcheck
10371028 if ! cast .ToBool (appOpts .Get (FlagUnsafeIgnoreBlockListFailure )) {
10381029 panic (err )
10391030 }
@@ -1056,7 +1047,7 @@ func New(
10561047 return denom
10571048 }
10581049 app .SetBlockSTMTxRunner (evmapp .NewPatchedTxRunner (
1059- blockstm .NewSTMRunner (
1050+ txnrunner .NewSTMRunner (
10601051 app .txConfig .TxDecoder (),
10611052 app .GetStoreKeys (),
10621053 workers ,
@@ -1321,7 +1312,9 @@ func (app *App) RegisterTendermintService(clientCtx client.Context) {
13211312}
13221313
13231314func (app * App ) RegisterNodeService (clientCtx client.Context , cfg config.Config ) {
1324- node .RegisterNodeService (clientCtx , app .GRPCQueryRouter (), cfg )
1315+ node .RegisterNodeService (clientCtx , app .GRPCQueryRouter (), cfg , func () int64 {
1316+ return app .CommitMultiStore ().EarliestVersion ()
1317+ })
13251318}
13261319
13271320// DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
@@ -1399,12 +1392,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
13991392 paramsKeeper .Subspace (slashingtypes .ModuleName )
14001393 paramsKeeper .Subspace (govtypes .ModuleName ).WithKeyTable (govv1 .ParamKeyTable ()) //nolint: staticcheck
14011394 paramsKeeper .Subspace (crisistypes .ModuleName )
1402- // register the key tables for legacy param subspaces
1403- keyTable := ibcclienttypes .ParamKeyTable ()
1404- keyTable .RegisterParamSet (& ibcconnectiontypes.Params {})
1405- paramsKeeper .Subspace (ibcexported .ModuleName ).WithKeyTable (keyTable )
1406- paramsKeeper .Subspace (ibctransfertypes .ModuleName ).WithKeyTable (ibctransfertypes .ParamKeyTable ())
1407- paramsKeeper .Subspace (icacontrollertypes .SubModuleName ).WithKeyTable (icacontrollertypes .ParamKeyTable ())
14081395 paramsKeeper .Subspace (evmtypes .ModuleName ).WithKeyTable (v0evmtypes .ParamKeyTable ()) //nolint: staticcheck
14091396 paramsKeeper .Subspace (feemarkettypes .ModuleName ).WithKeyTable (feemarkettypes .ParamKeyTable ())
14101397 // this line is used by starport scaffolding # stargate/app/paramSubspace
0 commit comments