Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Removed legacy-submit-proposal support for consumer addition/modification/removal #2130

Merged
merged 11 commits into from
Aug 14, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Remove support for legacy-proposal to add/modify/remove consumer proposals
([\#2130](https://github.com/cosmos/interchain-security/pull/2130))
6 changes: 0 additions & 6 deletions app/provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ var (
gov.NewAppModuleBasic(
[]govclient.ProposalHandler{
paramsclient.ProposalHandler,
ibcproviderclient.ConsumerAdditionProposalHandler,
ibcproviderclient.ConsumerRemovalProposalHandler,
ibcproviderclient.ConsumerModificationProposalHandler,
ibcproviderclient.ChangeRewardDenomsProposalHandler,
bermuell marked this conversation as resolved.
Show resolved Hide resolved
},
),
Expand Down Expand Up @@ -579,9 +576,6 @@ func New(
govtypes.ModuleName: gov.NewAppModuleBasic(
[]govclient.ProposalHandler{
paramsclient.ProposalHandler,
ibcproviderclient.ConsumerAdditionProposalHandler,
ibcproviderclient.ConsumerRemovalProposalHandler,
ibcproviderclient.ConsumerModificationProposalHandler,
ibcproviderclient.ChangeRewardDenomsProposalHandler,
},
),
Expand Down
34 changes: 21 additions & 13 deletions docs/docs/upgrading/migrate_v4_v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,28 +159,36 @@ interchain-security-pd q provider params -o json

### Governance proposals

Submitting the following legacy proposals is still supported:
bermuell marked this conversation as resolved.
Show resolved Hide resolved

# Consumer addition proposal

```shell
interchain-security-pd tx gov submit-legacy-proposal consumer-addition <proposal_file.json>
interchain-security-pd tx gov submit-proposal <proposal_file.json>
```

# Consumer removal proposal

```shell
interchain-security-pd tx gov submit-legacy-proposal consumer-removal <proposal_file.json>
interchain-security-pd tx gov submit-proposal <proposal_file.json>
```

# Consumer addition proposal
# Consumer modification proposal
```shell
interchain-security-pd tx gov submit-legacy-proposal change-reward-denoms <proposal_file.json>
interchain-security-pd tx gov submit-proposal <proposal_file.json>
```

You may also submit proposal messages above using `submit-proposal`.
Run `interchain-security-pd tx gov draft-proposal` command and select in `other` one of the following
message types to generate a draft example:
- `/interchain_security.ccv.provider.v1.MsgConsumerAddition`
- `/interchain_security.ccv.provider.v1.MsgConsumerModification`
- `/interchain_security.ccv.provider.v1.MsgConsumerRemoval`


# Change reward denoms

```shell
interchain-security-pd tx gov submit-legacy-proposal change-reward-denoms <proposal_file.json>
```

## Consumer

### Keeper initialization
Expand Down Expand Up @@ -226,22 +234,22 @@ app.ConsumerKeeper = ibcconsumerkeeper.NewKeeper(
// for x/ccv/democracy using the x/gov module address is correct
// if you don't have a way of updating consumer params you may still use the line below as it will have no affect
+ authtypes.NewModuleAddress(govtypes.ModuleName).String(),
// add address codecs

// add address codecs
+ authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()),
+ authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()),
)
```


* `authority` was added - requirement for executing `MsgUpdateParams`
* make sure the authority address makes sense for your chain
* make sure the authority address makes sense for your chain
* the exact module account may differ depending on your setup (`x/gov`, `x/admin` or custom module)
* for `x/ccv/democracy` using the `x/gov` module address is correct
* if you don't have a way of updating consumer params you may use `authtypes.NewModuleAddress(govtypes.ModuleName).String()` (has no effect on functionality)

* `validatorAddressCodec` & `consensusAddressCodec` were added - they must match the bech32 address codec used by `x/auth`, `x/bank`, `x/staking`


### Additions

Expand All @@ -250,7 +258,7 @@ app.ConsumerKeeper = ibcconsumerkeeper.NewKeeper(
**This functionality is not supported on `x/ccv/consumer` without additional configuration.**
* if you are using `x/ccv/democracy` the feature is supported out of the box
* if you are using custom logic for changing consumer params, please update your code by providing the appropriate `authority` module account during `ConsumerKeeper` initialization in `app.go`.

**You must add `"/interchain_security.ccv.consumer.v1.MsgUpdateParams"` to your parameters whitelist to be able to change `ccvconsumer` parameters via governance.**

It is available when using `gov` CLI commands:
Expand Down Expand Up @@ -376,7 +384,7 @@ The consumer implements the `StakingKeeper` interface shown above.

## Democracy

Changes in `Consumer` also apply to `Democracy`.
Changes in `Consumer` also apply to `Democracy`.

Democracy `x/staking`, `x/distribution` and `x/gov` were updated to reflect changes in `cosmos-sdk v0.50.x`.

Expand Down
Loading
Loading