Skip to main content
5 votes
Accepted

Forked Parity pallet, didn't migrate storage, deployed to chain. How to clear original storage from the live chain?

You can use remove_storage_prefix: remove_storage_prefix("OldPalletNameInYourRuntime", "LastAuthoredBlock", &[]); You need to place this into a runtime migration. The last ...
bkchr's user avatar
  • 11.5k
3 votes
Accepted

Reclaim used space of a removed StorageItem on a live chain

Yes, you will need to kill/drain the old storage items. There is no way the chain can detect that storage items are unused and prune them automatically.
bkchr's user avatar
  • 11.5k
1 vote
Accepted

When to use StorageDoubleMap `clear_prefix` vs `drain_prefix`?

The main difference to me is if it returns a closure. When you just want to remove it: Foo::clear_prefix(); Note: these are pseudo code When you want to interact with the removed item: Foo::...
AurevoirXavier's user avatar
  • 10.6k

Only top scored, non community-wiki answers of a minimum length are eligible