-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat(mainnet): add gov: collective, membership, motion #448
Conversation
[sc-2571] |
Polakdot js apps seems to crash after inputting an external motion 😓 with the expectation of pallet_democracy being present ? For the record the call I noted as a preimage was I'd assume this is expected as the runtime doesn't feature a way for non council members to cast votes. I think the app will have just wrapped the noted call as a democracy call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inclusion of these seemed like a sensible choice. Provides a little better UX for the accounts voting on the motions.
Also seems more flexible looking ahead.
[sc-2200] |
The step-by-step guide in the PR description is great. I've been testing and looks good 👌 |
update Cargo.lock
ab5418d
to
c283432
Compare
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #448 +/- ##
==========================================
+ Coverage 73.50% 74.28% +0.78%
==========================================
Files 78 84 +6
Lines 15696 16301 +605
Branches 15696 16301 +605
==========================================
+ Hits 11538 12110 +572
- Misses 3897 3927 +30
- Partials 261 264 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on!
I left a few comments -- biggest one about the min origin required for root.
In a separate PR (maybe with the genesis config presets), I think it would make our lives easier to have a Dev version of mainnet so we can use the dev accounts. Just noting for later.
FYI: I can't approve this PR as I am the original author.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw that prior comments were never submitted, so submitting now in case they are helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
test(governance): improve test
fed0d92
to
3c57991
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High level review only, with various suggestions which is left up to author to decide on whether they should be addressed or not.
Note: did not look at any of the tests.
Co-authored-by: Frank Bell <[email protected]> Update pallets/motion/src/benchmarking.rs Co-authored-by: Frank Bell <[email protected]> Update pallets/motion/src/benchmarking.rs Co-authored-by: Frank Bell <[email protected]> Update pallets/motion/src/benchmarking.rs Co-authored-by: Frank Bell <[email protected]> Update pallets/motion/src/benchmarking.rs Co-authored-by: Frank Bell <[email protected]>
0d639e2
to
604bb64
Compare
chore(motion): add R0GUE as author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me. I have not looked at the tests or config in any detail so would not be comfortable giving it an approval.
Great work in gettting it all neatened up and ready for prime time!
Co-authored-by: Peter White <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I've pushed some of the changes here, this is an approval after a review from @peterwht to my changes.
Adds a Council based governance that:
Relevant configuration:
AtLeastThreeFourthsOfCouncil
: at least 3/4 * total seats are aye votes.UnanimousCouncilVote
: 100% of the votes are aye votes.pallet_collective
pallet_motion
This pallet is how for the council achieves dispatch with Root origin.
To familiarize yourself with this governance mechanism, please use the following guide.
Guide
Goal Checklist
Create a Motion that requires Root
pop up parachain -f networks/mainnet.toml
4
(unanimous)motion.unanimous
, providing Root originbalances.forceSetBalance
council.Proposed
eventVote
button and vote AYE. Repeat this with 4 dev accountsVote
button now changes toClose
. Press this button and submit. The proposal is now passed! You will see several events such ascouncil.voted
,council.Approved
,council.Executed
Notes
One important thing to confirm for ANY governance we choose: do we have to pay DOT to propose a runtime upgrade. This can be costly if so.
By removing the membership pallet the way to change the members of the council is via dispatching the call
council.set_members
, which requires Root origin, hence needs to be wrapped in a motion and approved via super majority or unanimous vote.