The recent runtime upgrade from 145 to 146 took 7-8 blocks at 240s per block until the upgrade finished on all nodes.
This upgrade triggered a large chain migration, causing blocks to be finalized only after all the authority nodes were finished with the migration, slowing the chain significantly.
Solution
We should incorporate better handling of chain migrations. Parity developed a solution for this in FRAME[^1]. This pallet handles large migrations much better, so we should incorporate it into our chain and utilize it in future migrations.
Context
The recent runtime upgrade from 145 to 146 took 7-8 blocks at 240s per block until the upgrade finished on all nodes. This upgrade triggered a large chain migration, causing blocks to be finalized only after all the authority nodes were finished with the migration, slowing the chain significantly.
Solution
We should incorporate better handling of chain migrations. Parity developed a solution for this in FRAME[^1]. This pallet handles large migrations much better, so we should incorporate it into our chain and utilize it in future migrations.
[^1]: See related PR: https://github.com/paritytech/polkadot-sdk/pull/1781