Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Bounties Pallet to FrameV2 #9566

Merged
31 commits merged into from
Sep 21, 2021
Merged

Conversation

ferrell-code
Copy link
Contributor

@ferrell-code ferrell-code commented Aug 14, 2021

relates: #7882

Following the upgrade guidelines here: https://crates.parity.io/frame_support/attr.pallet.html#upgrade-guidelines.

⚠️ Breaking Change ⚠️

From https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines

storages now use PalletInfo for module_prefix instead of the one given to decl_storage: Thus any use of this pallet in construct_runtime! should be careful to update name in order not to break storage or to upgrade storage (moreover for instantiable pallet). If pallet is published, make sure to warn about this breaking change.

So users of the Bounties pallet must be careful about the name they used in construct_runtime!. Hence the runtime-migration label, which might not be needed depending on the configuration of the Bounties pallet. Since the old version was using Treasury in storage, it is probably safe to say all users of Bounties pallet must migrate.

Polkadot and Kusama both use the name Bounties in construct_runtime. They must be both migrated from the current pallet prefix of Treasury. see companion PR

polkadot companion: paritytech/polkadot#3704

@ferrell-code ferrell-code changed the title Fer bounties framev2 Bounties Pallet to FrameV2 Aug 14, 2021
frame/bounties/src/lib.rs Outdated Show resolved Hide resolved
@gui1117 gui1117 added A3-in_progress Pull request is in progress. No review needed at this stage. B3-apinoteworthy C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Aug 16, 2021
@gui1117 gui1117 added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Aug 21, 2021
@ferrell-code
Copy link
Contributor Author

ferrell-code commented Aug 24, 2021

Not exactly sure how to test if this does indeed migrate the storage correctly, may need a pointer on that

frame/bounties/src/migrations/v4.rs Show resolved Hide resolved
frame/bounties/src/migrations/v4.rs Outdated Show resolved Hide resolved
frame/bounties/src/migrations/v4.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@gui1117 gui1117 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, I'll test the runtime migration on polkadot/kusama using try-runtime when reviewing the companion

@gui1117
Copy link
Contributor

gui1117 commented Sep 21, 2021

bot merge

@ghost
Copy link

ghost commented Sep 21, 2021

Trying merge.

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants