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(x/gov): add max cancel voting period param #18856

Merged
merged 9 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changelog + docs
  • Loading branch information
julienrbrt committed Dec 21, 2023
commit bd57ad80cd6d3eb717dead5b06537d8b64344a1a
2 changes: 1 addition & 1 deletion x/gov/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Improvements

* []() Add `ProposalCancelMaxCancelPeriod` for modifying how long a proposal can be cancelled after it has been submitted.
* [#18856](https://github.com/cosmos/cosmos-sdk/pull/18856) Add `ProposalCancelMaxCancelPeriod` for modifying how long a proposal can be cancelled after it has been submitted.
julienrbrt marked this conversation as resolved.
Show resolved Hide resolved
* [#18445](https://github.com/cosmos/cosmos-sdk/pull/18445) Extend gov config.
* [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Repurpose `govcliutils.NormalizeProposalType` to work for gov v1 proposal types.

Expand Down
37 changes: 20 additions & 17 deletions x/gov/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,23 +591,26 @@ The governance module emits the following events:

The governance module contains the following parameters:

| Key | Type | Example |
| ------------------------------- | ---------------------- | --------------------------------------- |
| min_deposit | array (coins) | [{"denom":"uatom","amount":"10000000"}] |
| max_deposit_period | string (time ns) | "172800000000000" (17280s) |
| voting_period | string (time ns) | "172800000000000" (17280s) |
| quorum | string (dec) | "0.334000000000000000" |
| threshold | string (dec) | "0.500000000000000000" |
| veto | string (dec) | "0.334000000000000000" |
| expedited_threshold | string (time ns) | "0.667000000000000000" |
| expedited_voting_period | string (time ns) | "86400000000000" (8600s) |
| expedited_min_deposit | array (coins) | [{"denom":"uatom","amount":"50000000"}] |
| burn_proposal_deposit_prevote | bool | false |
| burn_vote_quorum | bool | false |
| burn_vote_veto | bool | true |
| min_initial_deposit_ratio | string | "0.1" |
| optimistic_rejected_threshold | string (dec) | "0.1" |
| optimistic_authorized_addresses | bytes array (addreses) | [][] |
| Key | Type | Example |
| --------------------------------- | ---------------------- | --------------------------------------- |
| min_deposit | array (coins) | [{"denom":"uatom","amount":"10000000"}] |
| max_deposit_period | string (time ns) | "172800000000000" (17280s) |
| voting_period | string (time ns) | "172800000000000" (17280s) |
| quorum | string (dec) | "0.334000000000000000" |
| threshold | string (dec) | "0.500000000000000000" |
| veto | string (dec) | "0.334000000000000000" |
| expedited_threshold | string (time ns) | "0.667000000000000000" |
| expedited_voting_period | string (time ns) | "86400000000000" (8600s) |
| expedited_min_deposit | array (coins) | [{"denom":"uatom","amount":"50000000"}] |
| burn_proposal_deposit_prevote | bool | false |
| burn_vote_quorum | bool | false |
| burn_vote_veto | bool | true |
| min_initial_deposit_ratio | string | "0.1" |
| proposal_cancel_ratio | string (dec) | "0.5" |
| proposal_cancel_dest | string (address) | "cosmos1.." or empty for burn |
| proposal_cancel_max_cancel_period | string (dec) | "0.5" |
| optimistic_rejected_threshold | string (dec) | "0.1" |
| optimistic_authorized_addresses | bytes array (addreses) | [][] |

**NOTE**: The governance module contains parameters that are objects unlike other
modules. If only a subset of parameters are desired to be changed, only they need
Expand Down
4 changes: 2 additions & 2 deletions x/gov/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ func (suite *KeeperTestSuite) TestMsgCancelProposal() {
},
depositor: proposer,
expErr: true,
expErrMsg: "not found",
expErrMsg: "proposal 0 doesn't exist",
julienrbrt marked this conversation as resolved.
Show resolved Hide resolved
},
"valid proposal but invalid proposer": {
preRun: func() uint64 {
return proposalID
return res.ProposalId
},
depositor: addrs[1],
expErr: true,
Expand Down