opentensor / subtensor

Bittensor Blockchain Layer
The Unlicense
117 stars 107 forks source link

Incorporate pallet_migrations for future migrations #593

Closed sam0x17 closed 15 hours ago

sam0x17 commented 5 days ago

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

sam0x17 commented 15 hours ago

closing in favor of #596