Questions tagged [storage]
Questions about storing and accessing stored data on a Substrate blockchain.
237 questions
0 votes
0 answers
9 views
Best practices for versioning and API management
With forkless upgrades and storage migrations comes an additional set of problems in API management. The official Polkadot recommendation is to simply use state queries where possible to retrieve ...
3 votes
2 answers
69 views
How to prune large storage in a Substrate chain and store the data off-chain?
I’m working on an exchange-based Substrate chain, and some storage sizes are increasing over time. I’m exploring ways to prune this data. One idea is to set a limit for each storage that needs pruning,...
1 vote
1 answer
19 views
Store and query offchain data
Is it possible to store information on RocksDB in an offchain DB (outside the blockchain state) when executing an extrinsic and then querying such information from the node side on an RPC for example?
0 votes
2 answers
44 views
Staking Pallet storage deprecations and "EraInfo"
Several storage items in the Staking pallet are deprecated with the following text: /// Note: Deprecated since v14. Use `EraInfo` instead to work with exposures. However I cannot find any storage ...
0 votes
1 answer
40 views
How to check if runtime is constructed or not
Is there a way to check if the runtime is constructed? I want to configure my pallet differently if the runtime is constructed compared to when it's not yet. I've tried using something like this in my ...
0 votes
0 answers
45 views
Accessing pallet's runtime storage at genesis
I want to access one pallet's runtime storage from another pallet's Config at genesis. Is that possible to do? More context: I am using pallet_base_fee inside my runtime. It's configured like this: ...
0 votes
1 answer
17 views
All or nothing state updates on hooks
I have a hook that iterates through a collection and applies state updates for each item. Each state update contains multiple state updates -- storage updates, balance transfers, etc. I need to ensure ...
1 vote
0 answers
29 views
ImOnline Pallet Migration Causing Storage Root Mismatch
my name is Jimmy and I am a member of the Gossamer team at ChainSafe Systems. We are building a Golang implementation of the Polkadot host and are currently using Paseo as one of the networks to test ...
0 votes
1 answer
27 views
the trait bound `I: scale_info::TypeInfo` is not satisfied
I am writing Pallet which has generic parameter T and static parameter I, but as soon as I wish to create storage for Struct with generic parameter T I receive tons of errors. What am I doing wrong? ...
0 votes
1 answer
30 views
Substrate storage query response does not seems to be correct for System.digests
I am developing a series of Java tools for Substrate based chains, polkadot4j (it is currently under heavy development). I have problem in querying the storage for the pallet system and storage entry ...
1 vote
1 answer
42 views
How to migrate the storagemap into storagedoublemap through runtime upgrade?
Whenever i try to do runtime upgrade within the pallet which has storagemap and then I replace it with storagedoublemap, it removes all the data present in the storagemap. How can i migrate this data ?...
1 vote
2 answers
68 views
Should one use mutate or insert to update storage?
What should one use to update the values, mutate or insert? And why in algorithm point of view? <SimpleMap<T>>::insert(&user, entry); <SimpleMap<T>>::mutate(&user, |...
3 votes
1 answer
44 views
How to import big data into the runtime?
I am having a scenario where my chain is responsible for keeping records of airdrop accounts. Initially, all accounts have a zero balance. When I receive a list of accounts with the respective ...
1 vote
2 answers
35 views
How to use `setStorage` in Polkadot JS Apps? Entries cannot be decoded after setting
I need to manually change the storage entry of a storage map which does not have a setter function. Unfortunately, after calling setStorage($STORAGE_KEY, $NEW_VALUE) the corresponding storage cannot ...
2 votes
2 answers
39 views
As a registrar, how to find unjudged indentities in the indentity pallet?
If I am a registrar, how can I find the judgements that I need/can judge? As far as I know there is not storage that provides that inforamtion. How the registrar can know what indetity has to be ...