Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Feb 27, 2023
1 parent 79a6c6c commit faf6661
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 25 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
56 changes: 34 additions & 22 deletions x/gov/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ staking token of the chain.
* [EndBlocker](#endblocker)
* [Handlers](#handlers)
* [Parameters](#parameters)
* [SubKeys](#subkeys)
* [Client](#client)
* [CLI](#cli)
* [gRPC](#grpc)
Expand Down Expand Up @@ -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
Expand All @@ -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.

Expand Down Expand Up @@ -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} |
Expand All @@ -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} |
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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} |
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions x/gov/types/v1/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down Expand Up @@ -95,7 +95,7 @@ func DefaultParams() Params {
DefaultMinInitialDepositRatio.String(),
DefaultProposalCancelRatio.String(),
DefaultProposalCancelDestAddress,
DefaultBurnProposal,
DefaultBurnProposalPrevote,
DefaultBurnVoteQuorom,
DefaultBurnVoteVeto,
)
Expand Down

0 comments on commit faf6661

Please sign in to comment.