-
Notifications
You must be signed in to change notification settings - Fork 2.6k
pallet-session: Migrate the historical part to the new pallet macro #9878
pallet-session: Migrate the historical part to the new pallet macro #9878
Conversation
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
/cc @thiolliere @KiChjang PTAL |
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
@thiolliere @KiChjang @shawntabrizi Could you review this PR? |
Does anyone have time to review this PR? 😕 |
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.
looks good to me,
The migration needs to be tested on kusama/polkadot with try-runtime
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
@@ -96,6 +96,7 @@ frame_support::construct_runtime!( | |||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, | |||
Staking: pallet_staking::{Pallet, Call, Config<T>, Storage, Event<T>}, | |||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>}, | |||
Historical: pallet_session::historical::{Pallet, Storage}, |
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.
Why?
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.
I think it now needs to have its name in PalletInfo, for the storages, so it needs to be in construct_runtime
/tip medium |
Please fix the following problems before calling the tip bot again:
|
bot merge |
Error: Github API says paritytech/polkadot#3949 is not mergeable |
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
bot merge |
Error: Response error (status 404 Not Found):
|
bot merge |
Error: Response error (status 404 Not Found):
|
if the bot give up on us, we will need another approval on the companion in order to merge manually the companion on polkadot |
bot merge |
Error: Response error (status 404 Not Found):
|
bot merge force |
Error: Response error (status 404 Not Found):
|
…aritytech#9878) * Migrate session-historical to the new pallet macro Signed-off-by: koushiro <koushiro.cqx@gmail.com> * pallet-session: Migrate the historical part to the new pallet macro Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix staking test runtime Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Update frame/session/src/historical/mod.rs * Update frame/session/src/historical/mod.rs * update migration doc Signed-off-by: koushiro <koushiro.cqx@gmail.com> * use hardcoded prefix for migration v1 Signed-off-by: koushiro <koushiro.cqx@gmail.com> * cargo +nightly-2021-11-08 fmt Signed-off-by: koushiro <koushiro.cqx@gmail.com> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
…aritytech#9878) * Migrate session-historical to the new pallet macro Signed-off-by: koushiro <koushiro.cqx@gmail.com> * pallet-session: Migrate the historical part to the new pallet macro Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix staking test runtime Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Update frame/session/src/historical/mod.rs * Update frame/session/src/historical/mod.rs * update migration doc Signed-off-by: koushiro <koushiro.cqx@gmail.com> * use hardcoded prefix for migration v1 Signed-off-by: koushiro <koushiro.cqx@gmail.com> * cargo +nightly-2021-11-08 fmt Signed-off-by: koushiro <koushiro.cqx@gmail.com> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Part of #7882
Migrate historical part of
pallet-session
to the new pallet attribute macro.From https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines
So users of the pallet must be careful about the name they used in
construct_runtime!
. Hence theruntime-migration
label, which might not be needed depending on the configuration of the pallet.polkadot, kusama, westend and rococo use
Historical
as pallet name (but the current module_prefix isSession
), thus need to migrate the storages.polkadot companion: paritytech/polkadot#3949
Polkadot address: 15XuanNimo5951s3RjFTPX1AvYVnCwfr3SDhb3AV4fQF3LpK