Skip to content

Commit

Permalink
refactor!: remove democracy/governance whitelisting (#2381)
Browse files Browse the repository at this point in the history
* remove governance whitelisting

* tests fix

* doc fix

* Update testing documentation

* Revert "doc fix"

This reverts commit ea0b735.

* Update testing documentation

* added changelog

* doc update

* Update docs/docs/consumer-development/consumer-chain-governance.md

Co-authored-by: Marius Poke <[email protected]>

* cr fix - doc

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Marius Poke <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent b9ecf44 commit 22f72bd
Show file tree
Hide file tree
Showing 17 changed files with 10 additions and 811 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[x/democracy/governance]` Removal of consumer governance whitelisting functionality
([\#2381](https://github.com/cosmos/interchain-security/pull/2381))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[x/democracy/governance]` Removal of consumer governance whitelisting functionality
([\#2381](https://github.com/cosmos/interchain-security/pull/2381))
57 changes: 0 additions & 57 deletions app/consumer-democracy/ante/forbidden_proposals_ante.go

This file was deleted.

169 changes: 0 additions & 169 deletions app/consumer-democracy/ante/forbidden_proposals_ante_test.go

This file was deleted.

2 changes: 0 additions & 2 deletions app/consumer-democracy/ante_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"

democracyante "github.com/cosmos/interchain-security/v6/app/consumer-democracy/ante"
consumerante "github.com/cosmos/interchain-security/v6/app/consumer/ante"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v6/x/ccv/consumer/keeper"
)
Expand Down Expand Up @@ -45,7 +44,6 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
ante.NewExtensionOptionsDecorator(nil),
consumerante.NewMsgFilterDecorator(options.ConsumerKeeper),
consumerante.NewDisabledModulesDecorator("/cosmos.evidence", "/cosmos.slashing"),
democracyante.NewForbiddenProposalsDecorator(IsProposalWhitelisted, IsModuleWhiteList),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
Expand Down
4 changes: 2 additions & 2 deletions app/consumer-democracy/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
"cosmossdk.io/x/feegrant"
feegrantkeeper "cosmossdk.io/x/feegrant/keeper"
feegrantmodule "cosmossdk.io/x/feegrant/module"

// add mint
"cosmossdk.io/x/upgrade"
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
Expand Down Expand Up @@ -114,7 +115,6 @@ import (
consumerkeeper "github.com/cosmos/interchain-security/v6/x/ccv/consumer/keeper"
consumertypes "github.com/cosmos/interchain-security/v6/x/ccv/consumer/types"
ccvdistr "github.com/cosmos/interchain-security/v6/x/ccv/democracy/distribution"
ccvgov "github.com/cosmos/interchain-security/v6/x/ccv/democracy/governance"
ccvstaking "github.com/cosmos/interchain-security/v6/x/ccv/democracy/staking"
)

Expand Down Expand Up @@ -549,7 +549,7 @@ func New(
capability.NewAppModule(appCodec, *app.CapabilityKeeper, false),
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
ccvgov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper, IsProposalWhitelisted, app.GetSubspace(govtypes.ModuleName), IsModuleWhiteList),
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)),
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.ConsumerKeeper, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry),
ccvdistr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, *app.StakingKeeper, authtypes.FeeCollectorName, app.GetSubspace(distrtypes.ModuleName)),
Expand Down
55 changes: 0 additions & 55 deletions app/consumer-democracy/proposals_whitelisting.go

This file was deleted.

Loading

0 comments on commit 22f72bd

Please sign in to comment.