-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Communities] Governance for communities #337
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pandres95
force-pushed
the
pallet-communities-voting
branch
2 times, most recently
from
February 2, 2024 04:25
b9c4706
to
0c93134
Compare
pandres95
force-pushed
the
pallet-communities-voting
branch
2 times, most recently
from
February 3, 2024 06:30
b13b235
to
351c07b
Compare
pandres95
force-pushed
the
pallet-communities-voting
branch
3 times, most recently
from
March 9, 2024 12:29
d23bd2c
to
8cf64da
Compare
pandres95
force-pushed
the
pallet-communities-voting
branch
6 times, most recently
from
March 17, 2024 23:04
e70b76c
to
e49aa5b
Compare
pandres95
force-pushed
the
pallet-communities-voting
branch
from
March 21, 2024 17:19
a5a5d48
to
330b281
Compare
pandres95
force-pushed
the
pallet-communities-voting
branch
from
March 29, 2024 23:47
6696b13
to
9158bee
Compare
…capacity overflow
- adjust parameters to calculate more realistic benchmarking scenarios - fix: missing deposit balance for collection owners
… for the decision method of a community on benchmarking
* [ci] calculate weights * change(pallet-communities): weights sanity checks * fix(pallet-communities): on mock, adjust scheduler weight, to make sure passes scheduling add_member tests with more realistic values. * fix(pallet-communities): adjust governance tests since more scheduled tasks are allowed per block in mock --------- Co-authored-by: pandres95 <2502577+pandres95@users.noreply.github.com> Co-authored-by: Pablo Andrés Dorado Suárez <hola@pablodorado.com>
olanod
force-pushed
the
pallet-communities-voting
branch
from
April 2, 2024 08:47
328e540
to
bef99b3
Compare
olanod
force-pushed
the
pallet-communities-voting
branch
from
April 4, 2024 18:55
40c0be9
to
6769f83
Compare
olanod
approved these changes
Apr 4, 2024
olanod
force-pushed
the
pallet-communities-voting
branch
from
April 4, 2024 22:37
3d72796
to
e0a4bac
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements the multi-governance for communities:
This implementation exposes the following methods
set_decision_method
: allows a community management origin to set which is the decision method for a community.Limitations
Tracks
, since there's no easy way to retrieve theOriginCaller
used ontrack_of
having theTrackId
. Instead, the sync-up must be made manually using the appropriate calls (probably using aRoot
origin).vote
: Let a community member cast a vote for a poll opened on a track corresponding to the community.Limitations
vote
track thecommunity_id
derived from themembership_id
and the pollclass
to be compared (maybe, restricting toClass = Into<T::CommunityId>
).Vote::AssetBalance
, funds are held, making them effectively unusable on other applications.Caveats
Vote::AssetBalance
, I needed to first release the hold, then hold the new amount. This is a bit more resource-intensive and may be punished on benchmarks. A permanent solution implies implementingInspectFreeze
andMutateFreeze
onpallet-assets
. I can work on that as a separate PR to upstream onpolkadot-sdk
.Vote::Rank
we have to manually sum for ranks of all members to get the max possible rank sum, and implement the concept of vote_multiplication. These implementations might change over time, as strategies to calculate vote multiplications for ranks can vary between communities.Vote::Membership
we have to manually count for memberships in each community, as there's not a method for that onmembership::Inspect
. This implied storingMembershipsCount
and mutating values onadd_member
/remove_member
.Vote::NativeBalance
usesRuntimeHoldReason
asFreezeId
, something that requires to be set on pallet-balances as such. While unusual, this allows for maximum code reusability. If there's a need to handle it differently, we'll need to discuss in the scope of this PR.remote_vote
: allows for removing a vote, on a poll that's ongoing.unlock
: allows for releasing funds for a vote casted on a poll that's not ongoing (either cancelled or finished).