0g-chain/x/committee/spec
Ruaridh c28bc03248
Committtee audit revisions (#510)
* comments from review

Co-authored-by: Sunny Aggarwal <sunnya97@protonmail.ch>
Co-authored-by: jmahess <maheswaran@google.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* add vote methods

* add draft new param change permission

* add and update tests

* rename ParamChangePermission

* account for perms becoming invalid at a later time

* add debtParam to permission

* add bep3 AssetParam to permissions

* add pricefeed Markets to permission

* add upgrade permission

* move proposal passing to the begin blocker

* fix iteration bug

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* address todos and audit comments

* add proposal examples

* refactor handler to be easier to read

* address review comments

* update comments

Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
Co-authored-by: Sunny Aggarwal <sunnya97@protonmail.ch>
Co-authored-by: jmahess <maheswaran@google.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-15 15:25:49 -04:00
..
01_concepts.md add committee spec 2020-05-07 16:58:46 -04:00
02_state.md add committee spec 2020-05-07 16:58:46 -04:00
03_messages.md add committee spec 2020-05-07 16:58:46 -04:00
04_events.md Committtee audit revisions (#510) 2020-05-15 15:25:49 -04:00
05_params.md add committee spec 2020-05-07 16:58:46 -04:00
06_begin_block.md add committee spec 2020-05-07 16:58:46 -04:00
README.md add committee spec 2020-05-07 16:58:46 -04:00

committee

Table of Contents

  1. Concepts
  2. State
  3. Messages
  4. Events
  5. Params
  6. BeginBlock

Overview

The x/committee module is Cosmos-SDK module that acts as an additional governance module to cosmos-sdk/x/gov.

It allows groups of accounts to vote on and enact proposals without a full chain governance vote. Certain proposal types can then be decided on quickly in emergency situations, or low risk parameter updates can be delegated to a smaller group of individuals.

Committees work with "proposals", using the same type from the gov module so they are compatible with all existing proposal types such as param changes, or community pool spend, or text proposals.

Committees have members and permissions. Committees are 'elected' via traditional gov proposals - ie. all coin-holders vote on the creation, deletion, and updating of committees.

Members of committees vote on proposals, with one vote per member and no deposits or slashing. Only a member of a committee can submit a proposal for that committee. More sophisticated voting could be added, as well as the ability for committees to edit themselves or other committees. A proposal passes when the number of votes is over the threshold for that committee. Vote thresholds are set per committee. Committee members vote yes by casting a vote and vote no by abstaining from voting and letting the proposal expire.

Permissions scope the allowed set of proposals a committee can enact. For example:

  • allow the committee to only change the cdp CircuitBreaker param.
  • allow the committee to change auction bid increments, but only within the range [0, 0.1]
  • allow the committee to only disable cdp msg types, but not staking or gov

A permission acts as a filter for incoming gov proposals, rejecting them at the handler if they do not have the required permissions. A permission can be any type with a method Allows(p Proposal) bool. The handler will reject all proposals that are not explicitly allowed. This allows permissions to be parameterized to allow fine grained control specified at runtime. For example a generic parameter permission type can allow a committee to only change a particular param, or only change params within a certain range.