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

Migrate pallet-treasury to the new pallet attribute macro #9197

Merged
9 commits merged into from
Jul 13, 2021
Merged

Migrate pallet-treasury to the new pallet attribute macro #9197

9 commits merged into from
Jul 13, 2021

Conversation

koushiro
Copy link
Contributor

@koushiro koushiro commented Jun 24, 2021

Part of #7882

Migrate the pallet-treasury to the new pallet attribute macro.

⚠️ 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 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 pallet.

polkadot and kusama use Treasury as pallet name, thus no need for migration


polkadot companion: paritytech/polkadot#3359

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
@koushiro koushiro marked this pull request as ready for review June 24, 2021 10:12
@koushiro
Copy link
Contributor Author

@thiolliere @KiChjang PTAL

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, polkadot and kusama does use the name Treasury for the name of the pallet, thus no migration needed.
westend and rococo don't have treasury pallet

frame/treasury/src/lib.rs Show resolved Hide resolved
frame/treasury/src/lib.rs Outdated Show resolved Hide resolved
@gui1117 gui1117 added A0-please_review Pull request needs code review. 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 Jul 12, 2021
gui1117 and others added 5 commits July 12, 2021 17:58
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
@shawntabrizi
Copy link
Member

bot merge

@ghost
Copy link

ghost commented Jul 13, 2021

Waiting for commit status.

@ghost
Copy link

ghost commented Jul 13, 2021

Merge aborted: Checks failed for 5f644dc

@shawntabrizi
Copy link
Member

bot merge

@ghost
Copy link

ghost commented Jul 13, 2021

Trying merge.

@ghost ghost merged commit e0638a1 into paritytech:master Jul 13, 2021
@koushiro koushiro deleted the migrate-pallet-treasury branch July 13, 2021 08:06
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.

3 participants