Open hackfisher opened 4 years ago
We can export the storage datas and serialize to scale codec format, here is a example data used in migration:
Storage maps have iterator for scraping datas in specific storage map and export as scale format.
For snapshot, we only need to scraping the datas usable for the runtime migration or hard fork.
This is a good recipe about migration and forks, might good be documented in migration guides in the-darwinia-book.
The on_runtime_upgrade
trigger could be useful to migration: https://github.com/paritytech/substrate/pull/5058
For Canary Testnet, there are some balances exists from the genesis config, some of them may come from the snapshot of IceFrog Testnet.
Besides, there might be snapshot requirement for later possible hardfork upgrade, maybe we should do a exercise between the IceFrog and Canary.