Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Committee Gov Module #386

Merged
merged 55 commits into from
Apr 30, 2020
Merged

Committee Gov Module #386

merged 55 commits into from
Apr 30, 2020

Conversation

rhuairahrighairidh
Copy link
Member

@rhuairahrighairidh rhuairahrighairidh commented Mar 4, 2020

In case something going wrong, we need a fast governance mechanism. This module creates "committees" that can vote on governance proposals quickly to update params, shutdown msg types, etc.
Disabling msg types will be handled by a different module.

See x/committee/spec/README.md for an overview of how committees work.

Open Questions

  • do we need more features from committees like 'no' or 'veto' votes?
  • should committee IDs be strings rather than uints?
  • I had to make the committee submit-proposal cli cmd work a a bit differently from how gov does it to avoid forking sdk code. We could replace gov's submit-proposal cmd so they work the same way and have the same UX.
  • Is there enough tests?

@rhuairahrighairidh rhuairahrighairidh changed the title Draft Emergency Gov Mechanism Emergency Gov Mechanism Mar 23, 2020
Copy link
Contributor

@denalimarsh denalimarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a first pass and tested the module. Overall, the code is great and doesn't sacrifice robustness or clarity despite the module's complexity. I left some thoughts and a few revisions.

For the open questions:

  1. Adding no votes/vetos is part of a larger conversation about incentive structures. Until we scope out slashing mechanisms we're already accepting a simplified voting process, so I don't think we need to worry about it until then.
  2. I like ints but don't have a strong preference. Could also add additional committee field name (or put a committee's name in the existing description field).
  3. Does the version upgrade impact our ability to fork Cosmos-sdk code?
  4. The tests capture the spirit of the module very well. The test suite is light in terms of line count (and maybe lines tested?) but it validates the core functionality.

x/committee/client/cli/query.go Outdated Show resolved Hide resolved
x/committee/client/cli/query.go Outdated Show resolved Hide resolved
x/committee/client/rest/tx.go Outdated Show resolved Hide resolved
x/committee/client/rest/tx.go Outdated Show resolved Hide resolved
x/committee/client/rest/rest.go Outdated Show resolved Hide resolved
x/committee/types/gov_proposal.go Outdated Show resolved Hide resolved
x/committee/types/gov_proposal.go Outdated Show resolved Hide resolved
x/committee/types/gov_proposal.go Outdated Show resolved Hide resolved
x/committee/types/querier.go Outdated Show resolved Hide resolved
x/committee/keeper/proposal.go Outdated Show resolved Hide resolved
Copy link
Member

@karzak karzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking very solid. Mostly general/stylistic comments.

x/committee/types/gov_proposal.go Outdated Show resolved Hide resolved
x/committee/types/types.go Outdated Show resolved Hide resolved
x/committee/types/gov_proposal.go Outdated Show resolved Hide resolved
x/committee/types/gov_proposal.go Outdated Show resolved Hide resolved
x/committee/types/types.go Outdated Show resolved Hide resolved
x/committee/types/types.go Outdated Show resolved Hide resolved
x/committee/keeper/proposal_test.go Show resolved Hide resolved
x/committee/keeper/keeper_test.go Outdated Show resolved Hide resolved
x/committee/keeper/keeper_test.go Outdated Show resolved Hide resolved
x/committee/client/rest/query.go Show resolved Hide resolved
Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'll review again after the migration to 0.38

x/committee/genesis.go Outdated Show resolved Hide resolved
x/committee/genesis.go Outdated Show resolved Hide resolved
x/committee/genesis.go Outdated Show resolved Hide resolved
x/committee/handler.go Outdated Show resolved Hide resolved
x/committee/keeper/proposal.go Outdated Show resolved Hide resolved
x/committee/proposal_handler.go Outdated Show resolved Hide resolved
x/committee/proposal_handler.go Outdated Show resolved Hide resolved
x/committee/proposal_handler_test.go Outdated Show resolved Hide resolved
x/committee/proposal_handler_test.go Outdated Show resolved Hide resolved
x/committee/types/codec.go Outdated Show resolved Hide resolved
Copy link
Member

@karzak karzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK. Last things (for follow-on PRs) are adding spec and updating TessAppImportExport to include committee module.

Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

type Committee struct {
ID uint64 `json:"id" yaml:"id"`
Description string `json:"description" yaml:"description"`
Members []sdk.AccAddress `json:"members" yaml:"members"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: how are members added? through regular param change proposals?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module has a couple of gov proposals that create/update/delete committees. So its up to the normal gov to add members, change permissions etc.
In theory these proposals could be submitted to committees, allowing them to change themselves or each other, but it's disabled currently.

@fedekunze fedekunze merged commit e9c16fa into master Apr 30, 2020
@karzak karzak deleted the ro-emergency-gov-module branch May 7, 2020 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R4R When a PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants