BAC-L2-SUB-113Substrate / Polkadot SDK
Runtime upgrades and state migrations
Forkless upgradeability is the Polkadot SDK's headline argument — and the source of its costliest incidents when state migration is botched.
- Level
- L2 — Appchain developer
- Duration
- 4 h
- Maintainer
- Polkadot / Substrate Lead Architect
Learning objectives
- 01Ship a runtime upgrade with no service interruption
- 02Write a state migration with pre- and post-checks
- 03Design a realistic rollback plan
Guided lab
Change a stored structure, write the migration, run it on a populated local network.
Independent lab
Replay the migration against a real state snapshot and show it fits within one block's budget.
Security angle
A forgotten migration: reproduce the resulting inconsistent state in the lab, and the mechanism that would have caught it.
Assessment
Migration successfully executed against a snapshot, with the verification log attached.
