Skip to content

Add council and democracy to consensus runtime#2949

Merged
vedhavyas merged 6 commits intomainfrom
council
Aug 15, 2024
Merged

Add council and democracy to consensus runtime#2949
vedhavyas merged 6 commits intomainfrom
council

Conversation

@vedhavyas
Copy link
Copy Markdown
Contributor

This PR adds Council and Democracy(scope limited, read notes) to consensus runtime.

Council:

  • Sudo can set the council members over the extrinsic
  • I have skipped adding council election in this PR since allows anyone with enough funds to become a council memeber. This can be added before mainnnet or sometime after mainnet.

Democracy:
For the democracy, at the moment instead of anyone submitting the proposal, the origin is set to any council member. So only a council member can open proposal through democracy directly. This should be changed when we want anyone to submit proposals to democracy.

I have also left TODO for parameters where necessary and also enabled instant execution for democracy. Ideally, in mainnet this Instant execution may not be required.

cc: @dariolina @jfrank-summit @nazar-pc

Please take a look and let me know if you have any questions/concerns

Code contributor checklist:

Copy link
Copy Markdown
Contributor

@teor2345 teor2345 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, just some optional suggestions for making the docs clearer.

Copy link
Copy Markdown
Member

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

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

Looks like a basic setup, I don't have any opinion on the actual parameters though, would be nice if Dariia could take a look

@dariolina
Copy link
Copy Markdown
Contributor

@vedhavyas can you clarify this?

I have skipped adding council election in this PR since allows anyone with enough funds to become a council member.

Does this refer to this election? If so, you're right, we don't want that yet.

@dariolina
Copy link
Copy Markdown
Contributor

@vedhavyas to be able to test this on devnet, can we have voting/enactment period equal to something like 5 min in devnet spec?

@vedhavyas
Copy link
Copy Markdown
Contributor Author

Does this refer to this election? If so, you're right, we don't want that yet.

Yes

@vedhavyas to be able to test this on devnet, can we have voting/enactment period equal to something like 5 min in devnet spec?

This should be possible through pallet-runtime-configs or introducing this macro. Latter brings a feature that needs to be enabled while building. Thoughts @nazar-pc ?

@nazar-pc
Copy link
Copy Markdown
Member

nazar-pc commented Aug 1, 2024

I think genesis config option would be preferred, feature seems fragile, but if we need it as one-off test and remove shortly after than that'll work too.

dariolina
dariolina previously approved these changes Aug 2, 2024
Copy link
Copy Markdown
Contributor

@dariolina dariolina 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 to me, dk if anyone has comments on the last commit

teor2345
teor2345 previously approved these changes Aug 6, 2024
Copy link
Copy Markdown
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Re-approving after chain spec update

@dariolina
Copy link
Copy Markdown
Contributor

@vedhavyas can we get conflicts resolved and merge this?

@nazar-pc
Copy link
Copy Markdown
Member

This will likely conflict with #2969 that is about to be merged

@vedhavyas
Copy link
Copy Markdown
Contributor Author

Would be great to get this in today.
If anyone has a moment, can you give a thumbsup please

@vedhavyas vedhavyas added this pull request to the merge queue Aug 15, 2024
Merged via the queue into main with commit 3eeac78 Aug 15, 2024
@vedhavyas vedhavyas deleted the council branch August 15, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants