From faf666151a9b7a24543a1973d368864a40babf2e Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 27 Feb 2023 19:21:59 +0100 Subject: [PATCH] address comments --- CHANGELOG.md | 2 +- x/gov/README.md | 56 ++++++++++++++++++++++++---------------- x/gov/types/v1/params.go | 4 +-- 3 files changed, 37 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dff23a24c5e..4adb829b5632 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,7 +78,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/bank) [#14894](https://github.com/cosmos/cosmos-sdk/pull/14894) Return a human readable denomination for IBC vouchers when querying bank balances. Added a `ResolveDenom` parameter to `types.QueryAllBalancesRequest` and `--resolve-denom` flag to `GetBalancesCmd()`. * (x/groups) [#14879](https://github.com/cosmos/cosmos-sdk/pull/14879) Add `Query/Groups` query to get all the groups. * (x/genutil,cli) [#15147](https://github.com/cosmos/cosmos-sdk/pull/15147) Add `--initial-height` flag to cli init cmd to provide `genesis.json` with user defined initial block height -* (x/gov) [#15151](https://github.com/cosmos/cosmos-sdk/pull/15151) Add `burn_vote_quorum`, `burn_proposal_deposit` and `burn_vote_veto` params to allow applications to decide if they would like to burn deposits +* (x/gov) [#15151](https://github.com/cosmos/cosmos-sdk/pull/15151) Add `burn_vote_quorum`, `burn_proposal_deposit_prevote` and `burn_vote_veto` params to allow applications to decide if they would like to burn deposits ### Improvements diff --git a/x/gov/README.md b/x/gov/README.md index 374ae5c24ca3..d41c4dfd7fe6 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -53,7 +53,6 @@ staking token of the chain. * [EndBlocker](#endblocker) * [Handlers](#handlers) * [Parameters](#parameters) - * [SubKeys](#subkeys) * [Client](#client) * [CLI](#cli) * [gRPC](#grpc) @@ -260,6 +259,16 @@ new version of the software. Validators and full nodes can use an automation tool, such as [Cosmovisor](https://docs.cosmos.network/main/tooling/cosmovisor), for automatically switching version of the chain. +#### Burnable Params + +There are three parameters that define if the deposit of a proposal should be burned or returned to the depositors. + +* `BurnVoteVeto` burns the proposal deposit if the proposal gets vetoed. +* `BurnVoteQuorum` burns the proposal deposit if the proposal deposit if the vote does not reach quorum. +* `BurnProposalDepositPrevote` burns the proposal deposit if it does not enter the voting phase. + +> Note: These parameters are modifiable via governance. + ## State ### Constitution @@ -274,12 +283,12 @@ Validators and full nodes can use an automation tool, such as [Cosmovisor](https Since this is more of a social feature than a technical feature, we'll now get into some items that may have been useful to have in a genesis constitution: * What limitations on governance exist, if any? - * is it okay for the community to slash the wallet of a whale that they no longer feel that they want around? (viz: Juno Proposal 4 and 16) - * can governance "socially slash" a validator who is using unapproved MEV? (viz: commonwealth.im/osmosis) - * In the event of an economic emergency, what should validators do? - * Terra crash of May, 2022, saw validators choose to run a new binary with code that had not been approved by governance, because the governance token had been inflated to nothing. + * is it okay for the community to slash the wallet of a whale that they no longer feel that they want around? (viz: Juno Proposal 4 and 16) + * can governance "socially slash" a validator who is using unapproved MEV? (viz: commonwealth.im/osmosis) + * In the event of an economic emergency, what should validators do? + * Terra crash of May, 2022, saw validators choose to run a new binary with code that had not been approved by governance, because the governance token had been inflated to nothing. * What is the purpose of the chain, specifically? - * best example of this is the Cosmos hub, where different founding groups, have different interpertations of the purpose of the network. + * best example of this is the Cosmos hub, where different founding groups, have different interpertations of the purpose of the network. This genesis entry, "constitution" hasn't been designed for existing chains, who should likely just ratify a constitution using their governance system. Instead, this is for new chains. It will allow for validators to have a much clearer idea of purpose and the expecations placed on them while operating thier nodes. Likewise, for community members, the constitution will give them some idea of what to expect from both the "chain team" and the validators, respectively. @@ -716,7 +725,7 @@ The governance module emits the following events: ### EndBlocker | Type | Attribute Key | Attribute Value | -| ----------------- | --------------- | ---------------- | +|-------------------|-----------------|------------------| | inactive_proposal | proposal_id | {proposalID} | | inactive_proposal | proposal_result | {proposalResult} | | active_proposal | proposal_id | {proposalID} | @@ -727,7 +736,7 @@ The governance module emits the following events: #### MsgSubmitProposal | Type | Attribute Key | Attribute Value | -| ------------------- | ------------------- | --------------- | +|---------------------|---------------------|-----------------| | submit_proposal | proposal_id | {proposalID} | | submit_proposal [0] | voting_period_start | {proposalID} | | proposal_deposit | amount | {depositAmount} | @@ -741,7 +750,7 @@ The governance module emits the following events: #### MsgVote | Type | Attribute Key | Attribute Value | -| ------------- | ------------- | --------------- | +|---------------|---------------|-----------------| | proposal_vote | option | {voteOption} | | proposal_vote | proposal_id | {proposalID} | | message | module | governance | @@ -751,7 +760,7 @@ The governance module emits the following events: #### MsgVoteWeighted | Type | Attribute Key | Attribute Value | -| ------------- | ------------- | --------------------- | +|---------------|---------------|-----------------------| | proposal_vote | option | {weightedVoteOptions} | | proposal_vote | proposal_id | {proposalID} | | message | module | governance | @@ -761,7 +770,7 @@ The governance module emits the following events: #### MsgDeposit | Type | Attribute Key | Attribute Value | -| -------------------- | ------------------- | --------------- | +|----------------------|---------------------|-----------------| | proposal_deposit | amount | {depositAmount} | | proposal_deposit | proposal_id | {proposalID} | | proposal_deposit [0] | voting_period_start | {proposalID} | @@ -775,17 +784,20 @@ 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"}] | +| 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 | **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 diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 13e85fdef118..fbf2faef16d5 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -27,7 +27,7 @@ var ( DefaultMinInitialDepositRatio = sdk.ZeroDec() DefaultProposalCancelRatio = sdk.MustNewDecFromStr("0.5") DefaultProposalCancelDestAddress = "" - DefaultBurnProposal = false // set to false to replicate behavior of when this change was made (0.47) + DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47) DefaultBurnVoteQuorom = false // set to false to replicate behavior of when this change was made (0.47) DefaultBurnVoteVeto = true // set to true to replicate behavior of when this change was made (0.47) ) @@ -95,7 +95,7 @@ func DefaultParams() Params { DefaultMinInitialDepositRatio.String(), DefaultProposalCancelRatio.String(), DefaultProposalCancelDestAddress, - DefaultBurnProposal, + DefaultBurnProposalPrevote, DefaultBurnVoteQuorom, DefaultBurnVoteVeto, )