-
Notifications
You must be signed in to change notification settings - Fork 870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AHM: Staking Migration Plan #7858
Comments
Next steps:
|
Dual Staking PalletsWe have decided to fully fork off the staking pallet, and have two versions of it. The outcome should be:
Upon the migration of AHM, How we get there:
Then, asking @tdimitrov to take over the task of:
|
Alternatively, migration is scheduled by era, and the era change signals the start of the migration.
This is okay but probably easier to not process xcm messages on AH (keep them in the queue) until migration is done? We probably have to do it otherwise as well?
If we go by above idea, fellowship schedules the migration era, or once they signal, migration starts on era rotation. |
Not disagreeing, but what is the motivation for this?
Fungible migration is okay to do in AH as well. But should be done as part of AHM. |
|
@kianenigma I think we need to backport the staking pallet changes from #5724 too. |
This PR was merged before cutoff for 2503 so it should be included in it without a backport. Is there a different reason why we should backport it? |
Ignore that. Initially we were planning to overwrite staking pallet with the one from stable. We are reverting PRs instead so this comment is no longer relevant. |
#7939) Revert the following PRs which we are pulling from release stable2503: - #7582 - #7424 - #7282 and leave pallet-staking in its pre-AHM state. ## Context We are forking pallet-staking into `pallet-staking` (also referred as staking-classic, this is the version that will stay on RC) and `pallet-staking-next` which will live on AH post AHM. Additional context: #7858 (comment) These changes in crate `pallet-staking` will become the staking classic. The staking next version is worked in the PR #7601. ## For AHM migration The `UnappliedSlashes` storage will need to be translated from `rc::staking-classic` to `ah::staking-next`. [Bookmarking](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/staking/src/migrations.rs#L91) the code that can be referred for this. ## Follow ups (cc: @tdimitrov and @seadanda ) 1) Revert pallet-staking v17 migration in westend. - Update `in code storage version` of pallet-staking storage from 17 to 16 (separate PR). - Update `on chain storage version` of pallet-staking storage from 17 to 16. The storage key for pallet-staking on chain version is `0x5f3e4907f716ac89b6347d15ececedca4e7b9012096b41c4eb3aaf947f6ea429` which should be set currently to `0x1100`, and needs to be updated to `0x1000`. - After the runtime upgrade with the code from this PR is deployed on Westend, kill the following storage prefixes under the Pallet prefix `Staking`: - OffenceQueue - OffenceQueueEras - ProcessingOffence - UnappliedSlashes: This also exists in staking-classic as a storage map (one key) and in pre-revert code as double storage map (two keys). Killing with prefix `UnappliedSlashes` may kill the ones created post upgrade (but that's okay for westend). - VoterSnapshotStatus - NextElectionPage - ElectableStashes 2) Remove exposure dependency Worked in the PR: #7936. --------- Co-authored-by: Tsvetomir Dimitrov <[email protected]> Co-authored-by: Maciej <[email protected]>
#7939) Revert the following PRs which we are pulling from release stable2503: - #7582 - #7424 - #7282 and leave pallet-staking in its pre-AHM state. We are forking pallet-staking into `pallet-staking` (also referred as staking-classic, this is the version that will stay on RC) and `pallet-staking-next` which will live on AH post AHM. Additional context: #7858 (comment) These changes in crate `pallet-staking` will become the staking classic. The staking next version is worked in the PR #7601. The `UnappliedSlashes` storage will need to be translated from `rc::staking-classic` to `ah::staking-next`. [Bookmarking](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/staking/src/migrations.rs#L91) the code that can be referred for this. (cc: @tdimitrov and @seadanda ) 1) Revert pallet-staking v17 migration in westend. - Update `in code storage version` of pallet-staking storage from 17 to 16 (separate PR). - Update `on chain storage version` of pallet-staking storage from 17 to 16. The storage key for pallet-staking on chain version is `0x5f3e4907f716ac89b6347d15ececedca4e7b9012096b41c4eb3aaf947f6ea429` which should be set currently to `0x1100`, and needs to be updated to `0x1000`. - After the runtime upgrade with the code from this PR is deployed on Westend, kill the following storage prefixes under the Pallet prefix `Staking`: - OffenceQueue - OffenceQueueEras - ProcessingOffence - UnappliedSlashes: This also exists in staking-classic as a storage map (one key) and in pre-revert code as double storage map (two keys). Killing with prefix `UnappliedSlashes` may kill the ones created post upgrade (but that's okay for westend). - VoterSnapshotStatus - NextElectionPage - ElectableStashes 2) Remove exposure dependency Worked in the PR: #7936. --------- Co-authored-by: Tsvetomir Dimitrov <[email protected]> Co-authored-by: Maciej <[email protected]>
As the code for staking is almost e2e code-complete, we can draw a more concrete plan as to how the migration is going to work.
Already Done
Release
stable-2503
Relay Chain
pallet-staking-next
)Exposure
toExistence
#7936migrate_currency
handles any scenario where an old staking lock exists #7933Everything else remains as-is
Asset Hub
Nothing
Release
unstable-AHM
(betweenstable2503
andstable2506
or juststable2506
)Relay Chain
x <= SlashDeferDuration
before the migration (just migrateUnappliesSlashes
)DualSessionManager<Staking, StakingAhController>
and switches them with fellowship signalDualOffenceHandler<Staking, StakingAgController>
and switches them with fellowship signalAssetHub
Forcing::ForceNone
pallet-staking
storage items #255)on_initialize
Fellowship Signal
Relay Chain
Staking
staking-classic
toForcing::ForceNone
(likely okay to still the session manager)pallet-election-provider-multi-phase
do nothing.StakingAhController
Specifically to test:
AssetHub
ForceEra
toForcing::NotForcing
ActiveEra
with its last known (RC) timestamp is setMinimumScore
inelection-provider
Misc Leftover Checklist
AHM-dru-run
as noted aboveThe text was updated successfully, but these errors were encountered: