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

Add council and democracy to consensus runtime #2949

Merged
merged 6 commits into from
Aug 15, 2024
Merged

Add council and democracy to consensus runtime #2949

merged 6 commits into from
Aug 15, 2024

Conversation

vedhavyas
Copy link
Member

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
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.

crates/subspace-runtime/src/lib.rs Outdated Show resolved Hide resolved
crates/subspace-runtime/src/lib.rs Outdated Show resolved Hide resolved
Copy link
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

crates/subspace-runtime/src/lib.rs Outdated Show resolved Hide resolved
@dariolina
Copy link
Member

@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
Member

@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
Member 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
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
Member

@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
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
Member

@vedhavyas can we get conflicts resolved and merge this?

@nazar-pc
Copy link
Member

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

@vedhavyas
Copy link
Member 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
11 checks passed
@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