-
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
base: main
Are you sure you want to change the base?
Conversation
@@ -189,7 +189,7 @@ pub fn mainnet_chain_spec(relay: Relay) -> MainnetChainSpec { | |||
) | |||
.with_name("Pop Network") | |||
.with_id("pop") | |||
.with_chain_type(ChainType::Live) | |||
.with_chain_type(ChainType::Development) |
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.
temporary change for better dev account support.
} | ||
|
||
impl pallet_membership::Config<pallet_membership::Instance1> for Runtime { | ||
type AddOrigin = MoreThanHalfCouncil; |
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.
recommend we make several of these configs Super Majority (2/3 or 3/4). We can't do unanimous
for removing members as the removed member probably wouldn't vote AYE.
type SimpleMajorityOrigin = | ||
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>; | ||
type SuperMajorityOrigin = | ||
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 2, 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.
recommend we remove these two origins and force unanimous if we want to use Root.
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.
This makes sense to me.
[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.
} | ||
|
||
impl pallet_membership::Config<pallet_membership::Instance1> for Runtime { | ||
type AddOrigin = MoreThanHalfCouncil; |
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 that AddOrigin
should be configured to be unanimous.
type MaxMembers = CouncilMaxMembers; | ||
type MembershipChanged = Council; | ||
type MembershipInitialized = Council; | ||
type PrimeOrigin = MoreThanHalfCouncil; |
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.
PrimeOrigin
should be configured to the closest ratio equivalent to all votes in favor but one.
type MembershipChanged = Council; | ||
type MembershipInitialized = Council; | ||
type PrimeOrigin = MoreThanHalfCouncil; | ||
type RemoveOrigin = MoreThanHalfCouncil; |
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.
Same as above
type MembershipInitialized = Council; | ||
type PrimeOrigin = MoreThanHalfCouncil; | ||
type RemoveOrigin = MoreThanHalfCouncil; | ||
type ResetOrigin = MoreThanHalfCouncil; |
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.
This looks like it should be either unanimous or the same as the above ones.
type RemoveOrigin = MoreThanHalfCouncil; | ||
type ResetOrigin = MoreThanHalfCouncil; | ||
type RuntimeEvent = RuntimeEvent; | ||
type SwapOrigin = MoreThanHalfCouncil; |
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.
Super majority or a ratio equivalent to all votes in favor but one seems to fit this origin.
[sc-2200] |
The step-by-step guide in the PR description is great. I've been testing and looks good 👌 |
[This is a spike and an incomplete PR. But the governance is implemented and can be used]
Adds a Council based governance that:
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
Create a Motion that adds a member
Propose motion
4
(more realistic)councilMembership.addMember
forproposal
(we do NOT need to usepallet-motion
for this). Note, do not usecouncil
to set members.Eve
orFerdie
(or other as you please)Propose
Create a Motion that removes a member
Propose motion
4
(more realistic)councilMembership.removeMember
forproposal
(we do NOT need to usepallet-motion
for this). Note, do not usecouncil
to set members.Eve
orFerdie
(or other as you please)Propose
Notes