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

implement proposal type petition #400

Merged
merged 13 commits into from
Aug 26, 2024
Merged

implement proposal type petition #400

merged 13 commits into from
Aug 26, 2024

Conversation

brenzi
Copy link
Member

@brenzi brenzi commented Aug 20, 2024

closes #383

@brenzi brenzi requested review from clangenb and pifragile and removed request for clangenb August 20, 2024 12:35
Copy link
Member

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

LGTM. Quite simple. 🥳

Comment on lines +96 to +97
#[pallet::weight((<T as Config>::WeightInfo::new_community(), DispatchClass::Normal, Pays::Yes)
)]
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, weird fmt.

@pifragile
Copy link
Contributor

LGTM 👍
One thing to keep in mind: We only allow one concurrent proposal per ProposalActionIdentifier. This means one Petition per community and one global one. So if there are multiple petitions being voted on in one community, as soon as one gets enacted, the others will be cancelled. While this implementation makes sense for things like updating the demurrage, for petitions this would be debatable.

@brenzi
Copy link
Member Author

brenzi commented Aug 22, 2024

Good point. We don't want to cancel petitions. Will look into it

edit:

  • there may be other proposal types which should not supersede the same type, like treasury spends. So I introduced a helper fn to define the behavior per action type

@brenzi brenzi merged commit 557aea1 into master Aug 26, 2024
6 checks passed
@pifragile
Copy link
Contributor

Good point. We don't want to cancel petitions. Will look into it

edit:

  • there may be other proposal types which should not supersede the same type, like treasury spends. So I introduced a helper fn to define the behavior per action type

seems legit!

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.

[democracy] add Petition as ProposalAction
3 participants