cosmos-sdk/docs/spec/governance
frog power 4000 7f789d2ed3
Merge PR #3281: Staking Spec Upgrade
* remove kv seperation for marshalling

* pending

* cleanup

* cleanup x2

* pending

* working

* minor refactors

* entry structs defined

* uncompiled mechanism written

* add many compile fixes

* code compiles

* fix test compile errors

* test cover passes

* ...

* multiple entries fix

* ...

* more design fix

* working

* fix test cover bug

* Update PENDING.md

* update comment around queue completion for redelegations/ubds

* basic spec updates

* spec folder cleanup

* cleanup docs folder cont.

* ...

* find-replace and folder rename

* supplimentary find/replace

* pending

* supplimentary

* pending

* few undos, stakingd -> staked

* to staking -> to stake

* undos

* most staking -> most stake

* ...

* undos

* simplestake->simplestaking

* ...

* pending update

* capital letter replacements

* ...

* working

* staking doc updates from rigel/delegation-index branch

* spec-spec

* spec-spec

* LooseTokens -> NotBondedTokens

* staking state.md updates

* updates to hook and endblock spec

* Update docs/gaia/gaiacli.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* Update docs/gaia/validators/validator-setup.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* Update docs/gaia/validators/validator-setup.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* comment undo

* remove ErrConflictingRedelegation

* @cwgoes comments are resolved

* further updates to endblock and state

* msg json update

* working transaction updates

* working

* complete transaction rewrite

* PENDING.md

* typo

* add todo

* address @jackzampolin @cwgoes comments

* couple leftover comments, rename

* Update x/staking/types/pool.go

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* cwgoes additions

* cwgoes suggestions x2
2019-01-21 19:52:03 -05:00
..
README.md R4R: Query Gov Params (#2576) 2018-11-13 15:45:37 -08:00
future_improvements.md Split in multiple files 2018-02-26 16:35:09 +01:00
messages.md Merge PR #3281: Staking Spec Upgrade 2019-01-21 19:52:03 -05:00
overview.md Governance Quorum (#3053) 2018-12-10 02:50:20 -08:00
state.md Rename stake/ to staking/ (#3280) 2019-01-11 12:08:01 -08:00
tags.md Tags Cleanup & Docs (#3137) 2018-12-19 19:28:38 -08:00

README.md

Governance module specification

Abstract

This paper specifies the Governance module of the Cosmos-SDK, which was first described in the Cosmos Whitepaper in June 2016.

The module enables Cosmos-SDK based blockchain to support an on-chain governance system. In this system, holders of the native staking token of the chain can vote on proposals on a 1 token 1 vote basis. Next is a list of features the module currently supports:

  • Proposal submission: Users can submit proposals with a deposit. Once the minimum deposit is reached, proposal enters voting period
  • Vote: Participants can vote on proposals that reached MinDeposit
  • Inheritance and penalties: Delegators inherit their validator's vote if they don't vote themselves. If validators do not vote, they get partially slashed.
  • Signal and switch: If a proposal of type SoftwareUpgradeProposal is accepted, validators can signal it and switch once enough validators have signalled.
  • Claiming deposit: Users that deposited on proposals can recover their deposits if the proposal was accepted OR if the proposal never entered voting period.

Features that may be added in the future are described in Future improvements

This module will be used in the Cosmos Hub, the first Hub in the Cosmos network.

Contents

The following specification uses Atom as the native staking token. The module can be adapted to any Proof-Of-Stake blockchain by replacing Atom with the native staking token of the chain.

  1. Design overview
  2. Implementation
    1. State
      1. Parameters
      2. Proposals
      3. Proposal Processing Queue
    2. Transactions
      1. Proposal Submission
      2. Deposit
      3. Claim Deposit
      4. Vote
  3. Future improvements