fix(runtime): add missing stable2512 storage-version migrations#4064
Merged
Conversation
The polkadot-stable2512 upgrade bumped the storage version of three SDK pallets, but their migrations were never added to the `Migrations` tuple (which only had the permanent XCM migration). try-runtime `on-runtime-upgrade --checks=all` against live paseo (9263) and heima (9262) failed with: Session: on-chain v0 != in-code v1 AuraExt: on-chain v0 != in-code v1 XcmpQueue: on-chain v5 != in-code v7 These are real data migrations (aura-ext `SlotInfo`, session `DisabledValidators`, xcmp-queue queue config), so without them the pallets would read storage in the wrong format after the upgrade. Add them to both heima + paseo: pallet_session::migrations::v1::MigrateV0ToV1<_, InitOffenceSeverity<_>> cumulus_pallet_aura_ext::migration::MigrateV0ToV1 cumulus_pallet_xcmp_queue::migration::v6::MigrateV5ToV6 cumulus_pallet_xcmp_queue::migration::v7::MigrateV6ToV7 Bump spec_version 9270 -> 9271. Verified with try-runtime `on-runtime-upgrade --checks=all` against live paseo (9263->9271) and heima (9262->9271): both pass with zero storage-version mismatches, full state decodes without error, and migrations are idempotent (storage root unchanged on re-run).
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Found while verifying the
v0.9.27-01runtime with try-runtime before enacting it on-chain (thanks to the request to double-check the upgrade). The polkadot-stable2512 upgrade bumped the storage version of three SDK pallets, but their migrations were never added to theMigrationstuple — it only had the permanentMigrateToLatestXcmVersion.try-runtime on-runtime-upgrade --checks=allagainst live paseo (9263) and heima (9262) failed:These are real data migrations, not just version markers:
cumulus_pallet_aura_extv0→v1 — migratesSlotInfo(async-backing slot tracking)pallet_sessionv0→v1 — migratesDisabledValidatorsto the new offence-severity formatcumulus_pallet_xcmp_queuev5→v7 — queue config format (two steps: v5→v6, v6→v7)Without them, the bare upgrade applies (doesn't brick) but those pallets keep old-format storage while the code expects the new format → potential decode errors / misbehaviour.
Fix
Add the SDK-provided migrations to both heima and paseo
Migrationstuples, and bumpspec_version9270 → 9271:(One-time; remove after this upgrade is enacted.)
Verification
try-runtime on-runtime-upgrade --checks=allagainst live state, both networks:Both:
on_runtime_upgradesucceeds, migrations idempotent (storage root unchanged on re-run), full runtime state decodes cleanly.Rollout note
This means the current
v0.9.27-01runtime (spec 9270) should not be enacted as-is; the on-chain upgrade should carry these migrations (9271). The node/image and the async-backing runtime fix (#4061) are unaffected — this only completes the migration set.