What a storage migration is
A runtime upgrade changes code. Sometimes it also changes the shape of stored data — a field added, a unit changed, a key renamed. Existing state must be transformed in the same block the new code takes effect, or the new code reads old data as garbage. That transformation is a storage migration, and it is the most dangerous kind of upgrade: it rewrites state that users depend on, once, irreversibly.
The first one
Runtime 213 changed the storage market's billing unit from whole gigabytes to bytes. Every existing storage record — how much a user had stored, what they owed — was denominated in GB and had to be re-expressed in bytes, rounding up so no record became free.
Under the upgrade policy, an economic-class change: 48-hour testnet timelock, economic simulation, and a try-runtime dry run against a snapshot of the live state with the report and its hash in the manifest. The post_upgrade hook verified its own migration's effect — old keys gone, new keys holding byte values, storage version bumped — not facts about the world.
Applied to the live chain in place. Genesis unchanged. Records migrated.
Why it is a first worth recording
The mainnet gate requires the testnet to rehearse four upgrade classes before any mainnet conversation: normal, storage migration, economic, emergency-with-rollback. Runtime 213 is the second rehearsal completed (208 was the first normal one). The economic class as such and the emergency drill remain.
What the same weeks taught about migrations
- Four
post_upgradehooks elsewhere asserted "storage is empty" without checking their migration ran; rewritten. try-runtime's fast-forward mode caught an authority-set change that the full test suite passed and that would have halted the chain.- The metadata changes in every upgrade, so clients that cache it break at each one.
The winners
The page this replaces named another ecosystem's hackathon winners. EmpoorioChain's first storage migration had no winner — only a manifest, a dry-run hash, and records that came out the other side still adding up.
Based on the runtime 213 record, RUNTIME_UPGRADE_POLICY.md and MAINNET_GATE.md.


