diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index ceb553dd7d62..903fe55f926e 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -450,6 +450,8 @@ func (app *BaseApp) StoreConsensusParams(ctx sdk.Context, cp *abci.ConsensusPara app.paramStore.Set(ctx, ParamStoreKeyBlockParams, cp.Block) app.paramStore.Set(ctx, ParamStoreKeyEvidenceParams, cp.Evidence) app.paramStore.Set(ctx, ParamStoreKeyValidatorParams, cp.Validator) + // We're explicitly not storing the Tendermint app_version in the param store. It's + // stored instead in the x/upgrade store, with its own bump logic. } // getMaximumBlockGas gets the maximum gas from the consensus params. It panics diff --git a/simapp/app.go b/simapp/app.go index 9197cd1b0765..4ce4c791afb5 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -224,7 +224,7 @@ func NewSimApp( app.ParamsKeeper = initParamsKeeper(appCodec, legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey]) // set the BaseApp's parameter store - bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramskeeper.ConsensusParamsKeyTable())) + bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable())) app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) diff --git a/x/params/module.go b/x/params/module.go index f412e705adea..3f14475cd087 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -112,6 +112,7 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd // module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { proposal.RegisterQueryServer(cfg.QueryServer(), am.keeper) + } // ProposalContents returns all the params content functions used to diff --git a/x/params/keeper/consensus_params.go b/x/params/types/consensus_params.go similarity index 79% rename from x/params/keeper/consensus_params.go rename to x/params/types/consensus_params.go index 5ce8d340d0d9..fe27f7e8d9aa 100644 --- a/x/params/keeper/consensus_params.go +++ b/x/params/types/consensus_params.go @@ -1,11 +1,10 @@ -package keeper +package types import ( abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/x/params/types" ) // ConsensusParamsKeyTable returns an x/params module keyTable to be used in @@ -13,15 +12,15 @@ import ( // standard validation functions. Applications can choose to adopt this KeyTable // or provider their own when the existing validation functions do not suite their // needs. -func ConsensusParamsKeyTable() types.KeyTable { - return types.NewKeyTable( - types.NewParamSetPair( +func ConsensusParamsKeyTable() KeyTable { + return NewKeyTable( + NewParamSetPair( baseapp.ParamStoreKeyBlockParams, abci.BlockParams{}, baseapp.ValidateBlockParams, ), - types.NewParamSetPair( + NewParamSetPair( baseapp.ParamStoreKeyEvidenceParams, tmproto.EvidenceParams{}, baseapp.ValidateEvidenceParams, ), - types.NewParamSetPair( + NewParamSetPair( baseapp.ParamStoreKeyValidatorParams, tmproto.ValidatorParams{}, baseapp.ValidateValidatorParams, ), )