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

added fields AnnouncementSigner and CommunityRules to CommunityMetadata #336

Merged
merged 19 commits into from
Jul 29, 2023

Conversation

brenzi
Copy link
Member

@brenzi brenzi commented Jul 26, 2023

closes #334
closes #335

breaking change!
includes a storage migration to v2 for the communities pallet

@brenzi brenzi requested a review from clangenb July 26, 2023 07:41
@brenzi
Copy link
Member Author

brenzi commented Jul 26, 2023

caveat: the rpc reads CommunityMetadata.name and will break if this can't be decoded. therefore we need state migration (manual or automated)

@brenzi brenzi changed the title added field AnnouncementSigner to CommunityMetadata added fields AnnouncementSigner and CommunityRules to CommunityMetadata Jul 26, 2023
@brenzi brenzi requested a review from pifragile July 27, 2023 07:51
communities/src/migrations.rs Outdated Show resolved Hide resolved
communities/src/migrations.rs Show resolved Hide resolved
@brenzi
Copy link
Member Author

brenzi commented Jul 27, 2023

while parity tends to do single-step migrations, I believe this case here is much simpler to understand and comes with less boilerplate if we allow migration from v0->v2 and v1->v2 in a single move. v0->v1 was a noop with bound checks only

@brenzi brenzi requested a review from pifragile July 27, 2023 20:51
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.

Looks good to me, only some minor comments. I like that we are no longer afraid of storage migrations. XD

primitives/src/common.rs Show resolved Hide resolved
primitives/src/common.rs Outdated Show resolved Hide resolved
primitives/src/communities.rs Outdated Show resolved Hide resolved
primitives/src/communities.rs Outdated Show resolved Hide resolved
@brenzi brenzi requested a review from clangenb July 29, 2023 13:26
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.

All questions satisfied! :) Looks good to me

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.

introduce CommunityRules enum in community metadata introduce per-community announcement signer
3 participants