Skip to main content

Questions tagged [storage-migration]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
11 views

Remove undecodable storage keys from StorageDoubleMap

I want to remove keys from the storage which cannot be decoded by using unhashed. I know there are undecodable keys because when counting the number of storage keys via MyStorage::<T>::iter_keys(...
0x5hmoo's user avatar
  • 189
2 votes
1 answer
68 views

removing a StorageMap from a pallet

I am looking to completely remove a StorageMap from the inclusion runtime module of the polkadot relay chain. I am writing a migration for it and I'm wondering whether it's enough to call clear on the ...
Alin Dima's user avatar
1 vote
1 answer
39 views

Why do I need to call the upgrade_account in the balance pallet?

With the introduction of version 0.9.42, the logic of how balances work in Substrate changed. This version upgrade introduced a new extrinsic called upgrade_account. The fee_frozen attribute of the ...
Adel Golghalyani's user avatar
1 vote
1 answer
34 views

How to migrate events from the frame_system pallet?

I am trying to migrate the events storage value of the frame_system pallet, this is required because the EventRecord is now a generic over RuntimeEvent instead of Event, but I am not sure of how to ...
Sebastian's user avatar
  • 407
1 vote
1 answer
15 views

Does adding a property to the end of a struct require a storage migration?

Does adding a property to the end of a struct used in a storagemap require a storage migration?
Sebastian's user avatar
  • 407
2 votes
1 answer
94 views

Hooks doesn't expose `try_on_runtime_upgrade`?

If defining migrations in structs that impl OnRuntimeUpgrade. And these structs are then put into a Tuple migration, pre and post-upgrade hooks are noops on the tuple. See this issue. The idea being ...
Kyle's user avatar
  • 311
4 votes
2 answers
47 views

pallet storage migration fails try-runtime idempotent test

Some of the pallets storage migrations fail the idempotent test because in the pre_upgrade method there is an ensure! check to make sure that the current storage version is the one that applies for ...
Sebastian's user avatar
  • 407
1 vote
2 answers
86 views

Integrating storage migration for pallet-contracts

When integrating pallet-contracts v10 storage migration in pub type Migrations use pallet_contracts::migration::{v10, v11, v12}; pub type Migrations = ( v10::Migration<Runtime>, ) I get an ...
Simson's user avatar
  • 1,201
1 vote
1 answer
52 views

Do I need to run a pallet storage migrations even when I'm just adding the pallet to the runtime for the first time?

Do I need to run a pallet storage migrations even when I'm just adding the pallet to the runtime for the first time? This question came up because while testing the upgrade using the try-runtime cli, ...
Sebastian's user avatar
  • 407
0 votes
0 answers
15 views

is the pallet bounties migration only required if the pallet name has changed?

I noticed that the pallet bounties has a migration that updates the storage to version 4, but it seems only to migrate the storage to a new prefix based on a pallet name change. Is it only required if ...
Sebastian's user avatar
  • 407
0 votes
0 answers
15 views

Does pallet_identity require a migration if pallet_identity::simple::IdentityInfo is used as the InformationProvider type?

Recently the pallet_identity added the InformationProvider type which defines the structure to be used to store identity information. Am I right to think that no migration is required for the pallet ...
Sebastian's user avatar
  • 407
2 votes
1 answer
51 views

Storage migrations for frame pallets

I've noticed that some of the frame pallets have migrations and others don't, so I was just wondering if all the required migrations are implemented by the frame pallets, or if it depends on the ...
Sebastian's user avatar
  • 407
1 vote
0 answers
71 views

How to fix try-runtime execution aborted issue?

Trying to do a try-runtime in a test node using the command - try-runtime --runtime ./target/release/wbuild/alphanet-runtime/alphanet_runtime.wasm on-runtime-upgrade live --uri ws://IP:PORT and ...
Immanuel John's user avatar
4 votes
1 answer
82 views

How to reset a pallet

I'm planning to reset a pallet. To do this, I've developed a migration process aimed at clearing all storage associated with the MyPallet key. Additionally, I've followed up by renaming the pallet. I'...
magecnion's user avatar
  • 222
2 votes
0 answers
65 views

How to solve Failed to get runtime version issue?

I recently upgraded the chain from version 0.9.36 to 1.0.0. Following this update, when attempting to perform a runtime upgrade on the blockchain, I encountered an error that resulted in the chain no ...
Ajit's user avatar
  • 827
0 votes
1 answer
41 views

What is the new label in polkadot-sdk to track runtime migrations?

We used to have E0-runtime-migration labels to track storage migrations of FRAME pallets but I can't see anything on the new repo. Has one not been created yet?
Purple_Turtle's user avatar
2 votes
1 answer
46 views

How to hardcode few AccountIds to a storage in migration?

During a storage migration I want to add few SS58 Address in one storage. How to hardcode it in migration script?
Immanuel John's user avatar
0 votes
0 answers
63 views

Storage Migration failed even after we tested with fork-off

We have a live testnet chain where we planned a runtime upgrade (RU). Before performing RU in the live chain we performed fork-off of that chain to get all the states same as it is and started a local ...
Immanuel John's user avatar
2 votes
1 answer
40 views

EVM solo to para migration on Genesis

I need to migrate the state of an EVM solochain (not substrate) into a Frontier-based parachain. The original chain has been running for a while with high activity, so the state is fairly big. I am ...
Bernardo Rodrigues's user avatar
3 votes
2 answers
45 views

Is it possible to bootstrap a parachain node from pre-existing solo chainstate?

Let's imagine a scenario where a team is running a substrate private network and have all their chainstate that they want to move to a parachain after acquiring a slot. My question is, when the team ...
Purple_Turtle's user avatar
4 votes
2 answers
60 views

Need to migrate u32 to Vec<T::AccountId>

I have one storagemap which stores u32 values, now I need to migrate this to Vec<T::AccountId> How to do this?
Ajit's user avatar
  • 827