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

Disable proposal submission for the Democracy pallet by rejecting the tx #2572

Merged
merged 6 commits into from
Dec 8, 2023

Conversation

rimbi
Copy link
Contributor

@rimbi rimbi commented Nov 21, 2023

What does it do?

Disables the proposal submission for Democracy pallet by rejecting the transaction on the node side.
image

Now that the proposal submission is disabled, some test cases were either changed or deleted.

What alternative implementations were considered?

  • A better version of this solution would disable the submit button on the UI but it is not possible with the polkadot.js as it is not maintained with us.
  • Also, it is not possible to return a custom error message to users instead of invalid transaction.

What value does it bring to the blockchain users?

It is a step in moving from Gov1 to Gov2.

@rimbi rimbi self-assigned this Nov 21, 2023
@crystalin
Copy link
Collaborator

crystalin commented Nov 21, 2023

If propose is disabled, what is the purpose to keep the democracy pallet ?
(Also it means that we won't be able to fast-track on our internal testnet anymore)

Propose will be disabled for normal user but the Council can still propose (and propose external)

@tmpolaczyk
Copy link
Contributor

I don't see RuntimeCall::Democracy in the MaintenanceFilter, does that mean that proposals would actually be allowed in maintenance mode?

@librelois
Copy link
Collaborator

@rimbi please apply the same changes to the maintenance filter

@rimbi rimbi added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes not-breaking Does not need to be mentioned in breaking changes D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Nov 21, 2023
@rimbi
Copy link
Contributor Author

rimbi commented Nov 21, 2023

If propose is disabled, what is the purpose to keep the democracy pallet ? (Also it means that we won't be able to fast-track on our internal testnet anymore)

Propose will be disabled for normal user but the Council can still propose (and propose external)

via Democracy? @noandrea

@crystalin
Copy link
Collaborator

If propose is disabled, what is the purpose to keep the democracy pallet ? (Also it means that we won't be able to fast-track on our internal testnet anymore)
Propose will be disabled for normal user but the Council can still propose (and propose external)

via Democracy? @noandrea

No, via the Council, they can propose on democracy (usually as external proposal but it doesn't have to be), which is executed as root I believe and so is not filtered

@rimbi
Copy link
Contributor Author

rimbi commented Nov 23, 2023

Can you review it again, please? @librelois @tmpolaczyk

Copy link
Contributor

github-actions bot commented Dec 8, 2023

Coverage Report

@@                         Coverage Diff                          @@
##           master   cem-disable-gov1-proposal-submit      +/-   ##
====================================================================
- Coverage   81.90%                             81.89%   -0.01%     
  Files         286                                286              
  Lines       95261                              95261              
====================================================================
- Hits        78018                              78012       -6     
+ Misses      17243                              17249       +6     
Files Changed Coverage
/runtime/moonbase/src/lib.rs 50.13% (-0.25%) 🔽
/runtime/moonbeam/src/lib.rs 69.05% (-0.25%) 🔽
/runtime/moonriver/src/lib.rs 68.97% (-0.25%) 🔽

Coverage generated Fri Dec 8 09:16:29 UTC 2023

@noandrea noandrea merged commit c8551ab into master Dec 8, 2023
28 checks passed
@noandrea noandrea deleted the cem-disable-gov1-proposal-submit branch December 8, 2023 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. not-breaking Does not need to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants