-
Notifications
You must be signed in to change notification settings - Fork 2.7k
contracts: Multi block migrations #13638
Description
pallet-contracts is notorious for requiring storage migrations when upgrading to a new version. Those migrations are also tend be quite heavy. Both in ref_time and proof_size. In general, migrations need to happen in a single block. Builders already ran into the problem that our migrations are too big for that. Hence they needed to write their own ad hoc multi block migrations.
We want to solve this problem by providing all migrations delivered with pallet-contracts to be multi block. To that end we will create a framework that allows our migrations to be written in a in a multi block fashion without too much boilerplate. Access to pallet-contracts will be blocked while the migration is in progress. This approach can probably be generalized to the rest of FRAME in the future. The whole runtime will be rejecting transactions while upgrading in that case, though. This might be okay if we also buffer/delay XCM messages while we are upgrading.
Migration for storage version 9 will be available retroactively as a multi block migration. Older versions are dropped as there is no chain in production using them anymore. Porting them all over would be an unreasonable amount of work. All future migrations will be multi block.
Metadata
Metadata
Labels
Type
Projects
Status