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

Migrate elections-phragmen module storage to proper prefix #7657

Closed
kianenigma opened this issue Dec 2, 2020 · 4 comments
Closed

Migrate elections-phragmen module storage to proper prefix #7657

kianenigma opened this issue Dec 2, 2020 · 4 comments
Labels
I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue.

Comments

@kianenigma
Copy link
Contributor

Currently, the module's data is stored under prefix PhragmenElection, while the version is stored under ElectionsPhragmen. This is also changing with #5678, and will be just additional confusion everywhere to maintain. Move all to a unified prefix.

@kianenigma kianenigma added the I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue. label Dec 2, 2020
@gui1117
Copy link
Contributor

gui1117 commented Dec 3, 2020

This is currently the case with a lot of pallets.

storage version is stored using PalletInfo::name<pallet::Module<..>>() and storages are stored after a fixed prefix declared in decl_storage and instances.

All this will be solved by macro attribute as storages will use PalletInfo::name<pallet::Module<..>>() similarly to stored version.

So I guess this issue should be fixed by upgrading pallets to macro attribute once it is merged.

@bkchr
Copy link
Member

bkchr commented Dec 4, 2020

Yeah, I don't see the reason for this issue?

This is nothing that can be changed from the pallet itself.

@kianenigma
Copy link
Contributor Author

Indeed, if we move the macro attribute then they will be unified and fixed.

I am not sure if it is noted somewhere: This can cause some migrations to happen by migrating to to attribute macros, which should not be overlooked.

@gui1117
Copy link
Contributor

gui1117 commented Dec 4, 2020

This can cause some migrations to happen by migrating to to attribute macros, which should not be overlooked.

Yes I wrote it in the upgrade guidelines https://thiolliere.github.io/doc/frame_support/attr.pallet.html#checking-upgrade-guidelines

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue.
Projects
None yet
Development

No branches or pull requests

3 participants