From 0c1a9dcc421e547122513083eecd54f42d02064e Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Sun, 8 Jul 2018 19:50:24 -0400 Subject: [PATCH 1/5] Update with Gov CLI for gaia-7000 --- cmd/gaia/testnets/README.md | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/cmd/gaia/testnets/README.md b/cmd/gaia/testnets/README.md index e8d1f83e4d..7d72d2de2f 100644 --- a/cmd/gaia/testnets/README.md +++ b/cmd/gaia/testnets/README.md @@ -353,6 +353,75 @@ gaiacli stake delegation \ --chain-id=gaia-6002 ``` +## Governance + +Governace is the process from which users in Cosmos can come to consensus on software updates, parameters of the mainnet or on custom proposals for independent sovereign zones/hubs. + +Governance is done through voting on proposals, which will be submitted by `Atom` holders on the mainnet. For more information about the governance process and how it works, please check out the Governance module [specification](https://github.com/cosmos/cosmos-sdk/tree/develop/docs/spec/governance). + +### Create a Governance proposal + +In order to create a governance proposal, you must submit an initial deposit along with the proposal details (_i.e_ `title`, `description` and `type`, which must be of value _Text_, _ParameterChange_ or _SoftwareUpgrade_): + +```bash +gaiacli gov submit-proposal \ + --title= \ + --description=<description> \ + --type=<Text/ParameterChange/SoftwareUpgrade> \ + --proposer=<account_cosmosaccaddr> \ + --deposit=<40steak> \ + --from=<name> \ + --chain-id=gaia-7000 +``` + + +### Rise deposit + +In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (default: `10 steak`). If the proposal you previously created didn't meet this requirement, you can still rise the total amount deposited to make it valid. Once the minimum deposit is reached, proposal enters voting period: + +```bash +gaiacli gov deposit \ + --proposalID=<proposal_id> \ + --depositer=<account_cosmosaccaddr> \ + --deposit=<200steak> \ + --from=<name> \ + --chain-id=gaia-7000 +``` + +_NOTE_: Proposals that don't meet this requirement will be deleted. + +#### Query proposal + +Once created, you can now query information of the proposal: + +```bash +gaiacli gov query-proposal \ + --proposalID=<proposal_id> \ + --chain-id=gaia-7000 +``` + +### Vote on a proposal + +```bash +gaiacli gov vote \ + --proposalID=<proposal_id> \ + --voter=<account_cosmosaccaddr> \ + --option=<Yes/No/NoWithVeto/Abstain> \ + --from=<name> \ + --chain-id=gaia-7000 +``` + +#### Query vote + +Check the vote with the option you just submitted: + +```bash +gaiacli gov query-vote \ + --proposalID=<proposal_id> \ + --voter=<account_cosmosaccaddr> \ + --chain-id=gaia-7000 +``` + ## Other Operations ### Send Tokens From 023b6c14832426b8c0a8b6ab569bd07b5a3157b3 Mon Sep 17 00:00:00 2001 From: Federico Kunze <fekunze@berkeley.edu> Date: Mon, 9 Jul 2018 10:43:53 -0400 Subject: [PATCH 2/5] Addressed comments from Gautier and Dev --- cmd/gaia/testnets/README.md | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/cmd/gaia/testnets/README.md b/cmd/gaia/testnets/README.md index 7d72d2de2f..33cf98f956 100644 --- a/cmd/gaia/testnets/README.md +++ b/cmd/gaia/testnets/README.md @@ -355,13 +355,28 @@ gaiacli stake delegation \ ## Governance -Governace is the process from which users in Cosmos can come to consensus on software updates, parameters of the mainnet or on custom proposals for independent sovereign zones/hubs. +Governance is the process from which users in the Cosmos Hub can come to consensus on software upgrades, parameters of the mainnet or on custom text proposals. -Governance is done through voting on proposals, which will be submitted by `Atom` holders on the mainnet. For more information about the governance process and how it works, please check out the Governance module [specification](https://github.com/cosmos/cosmos-sdk/tree/develop/docs/spec/governance). +Governance is done through voting on proposals, which will be submitted by `Atom` holders on the mainnet. + +Some considerations about + +- Voting is done by bonded Atom holders on a 1 bonded `Atom` 1 vote basis +- Delegators inherit the vote of their validator if they don't vote +- **Validators MUST vote on every proposal**. If a validator does not vote on a proposal, they will be **partially slashed**. +- Votes are tallied at the end of the voting period (2 weeks on mainnet). Each address can vote multiple times (paying the transaction fee each time), only the last casted vote will count. +- Voters can choose between options `Yes`, `No`, `NoWithVeto` and `Abstain` +At the end of the voting period, a proposal is accepted if `(YesVotes/(YesVotes+NoVotes+NoWithVetoVotes))>1/2` and `(NoWithVetoVotes/(YesVotes+NoVotes+NoWithVetoVotes))<1/3`. It is rejected otherwise. + +For more information about the governance process and how it works, please check out the Governance module [specification](https://github.com/cosmos/cosmos-sdk/tree/develop/docs/spec/governance). ### Create a Governance proposal -In order to create a governance proposal, you must submit an initial deposit along with the proposal details (_i.e_ `title`, `description` and `type`, which must be of value _Text_, _ParameterChange_ or _SoftwareUpgrade_): +In order to create a governance proposal, you must submit an initial deposit along with the proposal details: + +- `title`: Title of the proposal +- `description`: Description of the proposal +- `type`: Type of proposal. Must be of value _Text_ (types _SoftwareUpgrade_ and _ParameterChange_ not supported yet). ```bash gaiacli gov submit-proposal \ @@ -375,7 +390,7 @@ gaiacli gov submit-proposal \ ``` -### Rise deposit +### Increase deposit In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (default: `10 steak`). If the proposal you previously created didn't meet this requirement, you can still rise the total amount deposited to make it valid. Once the minimum deposit is reached, proposal enters voting period: @@ -388,7 +403,7 @@ gaiacli gov deposit \ --chain-id=gaia-7000 ``` -_NOTE_: Proposals that don't meet this requirement will be deleted. +_NOTE_: Proposals that don't meet this requirement will be deleted after `MaxDepositPeriod` is reached. #### Query proposal @@ -402,6 +417,8 @@ gaiacli gov query-proposal \ ### Vote on a proposal +After a proposal's deposit reaches the `MinDeposit` value, the voting period opens. Bonded Atom holders can then cast vote on it: + ```bash gaiacli gov vote \ --proposalID=<proposal_id> \ From ab2d5a73e3bc443b4922cce80d79c2fb618ad02b Mon Sep 17 00:00:00 2001 From: Federico Kunze <fekunze@berkeley.edu> Date: Mon, 9 Jul 2018 11:03:42 -0400 Subject: [PATCH 3/5] Typos and format --- cmd/gaia/testnets/README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/cmd/gaia/testnets/README.md b/cmd/gaia/testnets/README.md index 33cf98f956..b266d7dcb4 100644 --- a/cmd/gaia/testnets/README.md +++ b/cmd/gaia/testnets/README.md @@ -310,11 +310,11 @@ WantedBy=multi-user.target ## Delegating to a Validator -On the upcoming mainnet, you can delegate `atom` to a validator. These [delegators](https://cosmos.network/resources/delegators) can receive part of the validator's fee revenue. Read more about the [Cosmos Token Model](https://github.com/cosmos/cosmos/raw/master/Cosmos_Token_Model.pdf). +On the upcoming mainnet, you can delegate `Atom` to a validator. These [delegators](https://cosmos.network/resources/delegators) can receive part of the validator's fee revenue. Read more about the [Cosmos Token Model](https://github.com/cosmos/cosmos/raw/master/Cosmos_Token_Model.pdf). ### Bond Tokens -On the testnet, we delegate `steak` instead of `atom`. Here's how you can bond tokens to a testnet validator: +On the testnet, we delegate `steak` instead of `Atom`. Here's how you can bond tokens to a testnet validator: ```bash gaiacli stake delegate \ @@ -355,18 +355,16 @@ gaiacli stake delegation \ ## Governance -Governance is the process from which users in the Cosmos Hub can come to consensus on software upgrades, parameters of the mainnet or on custom text proposals. +Governance is the process from which users in the Cosmos Hub can come to consensus on software upgrades, parameters of the mainnet or on custom text proposals. This is done through voting on proposals, which will be submitted by `Atom` holders on the mainnet. -Governance is done through voting on proposals, which will be submitted by `Atom` holders on the mainnet. +Some considerations about the voting process: -Some considerations about - -- Voting is done by bonded Atom holders on a 1 bonded `Atom` 1 vote basis +- Voting is done by bonded `Atom` holders on a 1 bonded `Atom` 1 vote basis - Delegators inherit the vote of their validator if they don't vote -- **Validators MUST vote on every proposal**. If a validator does not vote on a proposal, they will be **partially slashed**. -- Votes are tallied at the end of the voting period (2 weeks on mainnet). Each address can vote multiple times (paying the transaction fee each time), only the last casted vote will count. +- **Validators MUST vote on every proposal**. If a validator does not vote on a proposal, they will be **partially slashed** +- Votes are tallied at the end of the voting period (2 weeks on mainnet). Each address can vote multiple times (paying the transaction fee each time), only the last casted vote will count - Voters can choose between options `Yes`, `No`, `NoWithVeto` and `Abstain` -At the end of the voting period, a proposal is accepted if `(YesVotes/(YesVotes+NoVotes+NoWithVetoVotes))>1/2` and `(NoWithVetoVotes/(YesVotes+NoVotes+NoWithVetoVotes))<1/3`. It is rejected otherwise. +At the end of the voting period, a proposal is accepted if `(YesVotes/(YesVotes+NoVotes+NoWithVetoVotes))>1/2` and `(NoWithVetoVotes/(YesVotes+NoVotes+NoWithVetoVotes))<1/3`. It is rejected otherwise For more information about the governance process and how it works, please check out the Governance module [specification](https://github.com/cosmos/cosmos-sdk/tree/develop/docs/spec/governance). @@ -392,7 +390,7 @@ gaiacli gov submit-proposal \ ### Increase deposit -In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (default: `10 steak`). If the proposal you previously created didn't meet this requirement, you can still rise the total amount deposited to make it valid. Once the minimum deposit is reached, proposal enters voting period: +In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (default: `10 steak`). If the proposal you previously created didn't meet this requirement, you can still increase the total amount deposited to activate it. Once the minimum deposit is reached, the proposal enters voting period: ```bash gaiacli gov deposit \ @@ -403,7 +401,7 @@ gaiacli gov deposit \ --chain-id=gaia-7000 ``` -_NOTE_: Proposals that don't meet this requirement will be deleted after `MaxDepositPeriod` is reached. +> _NOTE_: Proposals that don't meet this requirement will be deleted after `MaxDepositPeriod` is reached. #### Query proposal @@ -417,7 +415,7 @@ gaiacli gov query-proposal \ ### Vote on a proposal -After a proposal's deposit reaches the `MinDeposit` value, the voting period opens. Bonded Atom holders can then cast vote on it: +After a proposal's deposit reaches the `MinDeposit` value, the voting period opens. Bonded `Atom` holders can then cast vote on it: ```bash gaiacli gov vote \ @@ -451,7 +449,7 @@ gaiacli send \ --to=<destination_cosmosaccaddr> ``` -> _*Note:*_ The `--amount` flag accepts the format `--amount=<value|coin_name>`. +> _*NOTE:*_ The `--amount` flag accepts the format `--amount=<value|coin_name>`. Now, view the updated balances of the origin and destination accounts: From 47948707539990ab5dae04de23d7371e38aaf7f8 Mon Sep 17 00:00:00 2001 From: Federico Kunze <fekunze@berkeley.edu> Date: Mon, 9 Jul 2018 11:10:56 -0400 Subject: [PATCH 4/5] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58cf20c879..a1170035af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ BREAKING CHANGES * go-crypto, abci, tmlibs have been merged into Tendermint * Various other fixes * [auth] Signers of a transaction now only sign over their own account and sequence number -* [auth] Removed MsgChangePubKey +* [auth] Removed MsgChangePubKey * [auth] Removed SetPubKey from account mapper * [auth] AltBytes renamed to Memo, now a string, max 100 characters, costs a bit of gas * [types] `GetMsg()` -> `GetMsgs()` as txs wrap many messages @@ -78,7 +78,7 @@ FEATURES * [gaiacli] Ledger support added - You can now use a Ledger with `gaiacli --ledger` for all key-related commands - Ledger keys can be named and tracked locally in the key DB -* [testing] created a randomized testing framework. +* [testing] created a randomized testing framework. - Currently bank has limited functionality in the framework - Auth has its invariants checked within the framework * [gaiacli] added the following flags for commands that post transactions to the chain: @@ -98,6 +98,7 @@ IMPROVEMENTS * [keys] improve error message when deleting non-existent key * [gaiacli] improve error messages on `send` and `account` commands * added contributing guidelines +* [docs] Added commands for governance CLI on testnet README BUG FIXES * [x/slashing] \#1510 Unrevoked validators cannot un-revoke themselves From 841c322ddd2a0d91b2735139482236887d6bb579 Mon Sep 17 00:00:00 2001 From: Federico Kunze <fekunze@berkeley.edu> Date: Mon, 9 Jul 2018 11:30:32 -0400 Subject: [PATCH 5/5] Update Gov process considerations --- cmd/gaia/testnets/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/gaia/testnets/README.md b/cmd/gaia/testnets/README.md index b266d7dcb4..86dc62e74f 100644 --- a/cmd/gaia/testnets/README.md +++ b/cmd/gaia/testnets/README.md @@ -362,7 +362,7 @@ Some considerations about the voting process: - Voting is done by bonded `Atom` holders on a 1 bonded `Atom` 1 vote basis - Delegators inherit the vote of their validator if they don't vote - **Validators MUST vote on every proposal**. If a validator does not vote on a proposal, they will be **partially slashed** -- Votes are tallied at the end of the voting period (2 weeks on mainnet). Each address can vote multiple times (paying the transaction fee each time), only the last casted vote will count +- Votes are tallied at the end of the voting period (2 weeks on mainnet). Each address can vote multiple times to update its `Option` value (paying the transaction fee each time), only the last casted vote will count as valid - Voters can choose between options `Yes`, `No`, `NoWithVeto` and `Abstain` At the end of the voting period, a proposal is accepted if `(YesVotes/(YesVotes+NoVotes+NoWithVetoVotes))>1/2` and `(NoWithVetoVotes/(YesVotes+NoVotes+NoWithVetoVotes))<1/3`. It is rejected otherwise