Skip to content

Commit

Permalink
Merge pull request #693 from neutron-org/feat/allow-consensus-params-…
Browse files Browse the repository at this point in the history
…update

feat: allow consensus MsgParamsUpdate from governance #ntrn-344
  • Loading branch information
pr0n00gler authored Aug 29, 2024
2 parents 7890f41 + 9bfe0b0 commit 6c975ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ import (
ccvconsumertypes "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types"

storetypes "cosmossdk.io/store/types"
"github.com/cosmos/cosmos-sdk/x/consensus"
consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
pfmkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper"
Expand Down Expand Up @@ -279,6 +280,7 @@ var (
oracle.AppModuleBasic{},
marketmap.AppModuleBasic{},
dynamicfees.AppModuleBasic{},
consensus.AppModuleBasic{},
)

// module account permissions
Expand Down Expand Up @@ -969,6 +971,7 @@ func New(
marketmapModule,
oracleModule,
auction.NewAppModule(appCodec, app.AuctionKeeper),
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
// always be last to make sure that it checks for all invariants and not only part of them
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
)
Expand Down Expand Up @@ -1015,6 +1018,7 @@ func New(
feemarkettypes.ModuleName,
ibcswaptypes.ModuleName,
dextypes.ModuleName,
consensusparamtypes.ModuleName,
)

app.mm.SetOrderEndBlockers(
Expand Down Expand Up @@ -1051,6 +1055,7 @@ func New(
feemarkettypes.ModuleName,
ibcswaptypes.ModuleName,
dextypes.ModuleName,
consensusparamtypes.ModuleName,
)

// NOTE: The genutils module must occur after staking so that pools are
Expand Down Expand Up @@ -1093,6 +1098,7 @@ func New(
ibcswaptypes.ModuleName,
dextypes.ModuleName,
dynamicfeestypes.ModuleName,
consensusparamtypes.ModuleName,
)

app.mm.RegisterInvariants(&app.CrisisKeeper)
Expand Down
2 changes: 2 additions & 0 deletions app/proposals_allowlisting.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
Expand Down Expand Up @@ -63,6 +64,7 @@ func isSdkMessageWhitelisted(msg sdk.Msg) bool {
*wasmtypes.MsgUpdateParams,
*wasmtypes.MsgPinCodes,
*wasmtypes.MsgUnpinCodes,
*consensustypes.MsgUpdateParams,
*upgradetypes.MsgSoftwareUpgrade,
*upgradetypes.MsgCancelUpgrade,
*ibcclienttypes.MsgRecoverClient,
Expand Down

0 comments on commit 6c975ef

Please sign in to comment.