-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 <[email protected]>
Signed-off-by: koushiro <[email protected]>
|
/cc @thiolliere @KiChjang PTAL |
Signed-off-by: koushiro <[email protected]>
|
@thiolliere @KiChjang @shawntabrizi Could you review this PR? |
|
Does anyone have time to review this PR? 😕 |
gui1117
left a comment
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 <[email protected]>
Signed-off-by: koushiro <[email protected]>
| 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
kianenigma
left a comment
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.
LGTM!
|
/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 <[email protected]>
|
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 <[email protected]> * pallet-session: Migrate the historical part to the new pallet macro Signed-off-by: koushiro <[email protected]> * Fix staking test runtime Signed-off-by: koushiro <[email protected]> * Update frame/session/src/historical/mod.rs * Update frame/session/src/historical/mod.rs * update migration doc Signed-off-by: koushiro <[email protected]> * use hardcoded prefix for migration v1 Signed-off-by: koushiro <[email protected]> * cargo +nightly-2021-11-08 fmt Signed-off-by: koushiro <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]>
…aritytech#9878) * Migrate session-historical to the new pallet macro Signed-off-by: koushiro <[email protected]> * pallet-session: Migrate the historical part to the new pallet macro Signed-off-by: koushiro <[email protected]> * Fix staking test runtime Signed-off-by: koushiro <[email protected]> * Update frame/session/src/historical/mod.rs * Update frame/session/src/historical/mod.rs * update migration doc Signed-off-by: koushiro <[email protected]> * use hardcoded prefix for migration v1 Signed-off-by: koushiro <[email protected]> * cargo +nightly-2021-11-08 fmt Signed-off-by: koushiro <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]>
Part of #7882
Migrate historical part of
pallet-sessionto 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-migrationlabel, which might not be needed depending on the configuration of the pallet.polkadot, kusama, westend and rococo use
Historicalas pallet name (but the current module_prefix isSession), thus need to migrate the storages.polkadot companion: paritytech/polkadot#3949
Polkadot address: 15XuanNimo5951s3RjFTPX1AvYVnCwfr3SDhb3AV4fQF3LpK