Skip to content

fix(runtime): add missing stable2512 storage-version migrations#4064

Merged
Kailai-Wang merged 1 commit into
devfrom
fix/stable2512-storage-version-migrations
Jul 4, 2026
Merged

fix(runtime): add missing stable2512 storage-version migrations#4064
Kailai-Wang merged 1 commit into
devfrom
fix/stable2512-storage-version-migrations

Conversation

@Kailai-Wang

Copy link
Copy Markdown
Collaborator

Problem

Found while verifying the v0.9.27-01 runtime 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 the Migrations tuple — it only had the permanent MigrateToLatestXcmVersion.

try-runtime on-runtime-upgrade --checks=all against live paseo (9263) and heima (9262) failed:

Session:    on-chain StorageVersion(0) != in-code StorageVersion(1)
AuraExt:    on-chain StorageVersion(0) != in-code StorageVersion(1)
XcmpQueue:  on-chain StorageVersion(5) != in-code StorageVersion(7)
"On chain and in-code storage version do not match. Missing runtime upgrade?"

These are real data migrations, not just version markers:

  • cumulus_pallet_aura_ext v0→v1 — migrates SlotInfo (async-backing slot tracking)
  • pallet_session v0→v1 — migrates DisabledValidators to the new offence-severity format
  • cumulus_pallet_xcmp_queue v5→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 Migrations tuples, and bump spec_version 9270 → 9271:

pallet_session::migrations::v1::MigrateV0ToV1<Runtime, InitOffenceSeverity<Runtime>>,
cumulus_pallet_aura_ext::migration::MigrateV0ToV1<Runtime>,
cumulus_pallet_xcmp_queue::migration::v6::MigrateV5ToV6<Runtime>,
cumulus_pallet_xcmp_queue::migration::v7::MigrateV6ToV7<Runtime>,

(One-time; remove after this upgrade is enacted.)

Verification

try-runtime on-runtime-upgrade --checks=all against live state, both networks:

before after this PR
paseo (9263→9271) 3 storage-version mismatches, panics ✅ 0 mismatches, all try-state checks pass
heima (9262→9271) (same gap) ✅ 0 mismatches, 13.6 MB state decodes without error

Both: on_runtime_upgrade succeeds, migrations idempotent (storage root unchanged on re-run), full runtime state decodes cleanly.

Rollout note

This means the current v0.9.27-01 runtime (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.

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).
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
heima-aa-demo-app Ignored Ignored Jul 3, 2026 10:59pm

Request Review

@Kailai-Wang Kailai-Wang enabled auto-merge (squash) July 3, 2026 23:34
@Kailai-Wang Kailai-Wang merged commit ac48380 into dev Jul 4, 2026
15 checks passed
@Kailai-Wang Kailai-Wang deleted the fix/stable2512-storage-version-migrations branch July 4, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant