-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ 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 AuthorityDiscovery
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 AuthorityDiscovery
pallet.
name of the pallet in both kusama, polkadot and westend are: AuthorityDiscovery
thus no need for migration.
Looks good.
@ferrell-code got a compiler error here:
Are you able to resolve it? |
Sorry I introduced it by deprecated the assimilate_storage. I think we can remove or deprecate the implementation though, but we can do that in later PR it is fine to me. EDIT: in general now that we use construct_runtime in tests we should no longer use these method but rather build the GenesisConfig of the runtime directly (instead of each pallet genesis config) |
Cool I get it, assimilate_storage method is the old way of doing it. I can update the tests to remove the implementation (or deprecate it if necessary), idk if you'd rather it be in this PR or open another one |
this pattern of reexposing manually the old method instead of using GenesisBuild has been used in other crates as well. So we will need to clean it in the future anyway. You can do for this pallet in this PR if you want, other in a follow-up, or we'll do once we deprecate all of those. If you want to merge as-is could you merge master to make CI happy ? |
bot merge |
Trying merge. |
thank you @ferrell-code |
migrated the pallet to new macro :). I believe there is a minor issue with the macro in genesis config. The assimilate_storage function needs the Config trait for genesis builder, but when the genesis config doesn't have the Config trait it won't work. Delete my manual impl of assimilate_storage and try to run the tests and you will see what I mean