Questions tagged [trie]
The trie tag has no usage guidance.
9
questions
0
votes
0
answers
25
views
Not able to retrieve value for given key when new key-value pair inserted
Crate used:- https://github.com/paritytech/trie
#[test]
fn test_two_assets_memory_db() {
let mut memdb = MemoryDB::<BlakeTwo256>::new(&[0u8]);
let mut root = H256::zero();
let ...
3
votes
1
answer
92
views
Is it possible to use a flat structure storage in the Runtime?
The Runtime storage in Substrate is based on a tree structure rather than a flat structure. While this allows for efficient integrity verification, it incurs data retrieval overhead. According to the ...
3
votes
2
answers
128
views
How to write pallet rename data migration?
I want to rename one of our collective pallet instances to be visible in the PolkaddotJs App.
I think the best option would be to migrate raw data.
I assume that all pallet data has the same trie path ...
0
votes
1
answer
38
views
Decoding merkle root passed as child trie parameter
We implemented decentralised reward campaigns using child tries. Currently we are using the AccountId together with TrieIndex and Balance or NftId as parameters (depending on the type of campaign ...
3
votes
2
answers
76
views
What's the size of the current state trie?
Approximately, what is the size of the state trie (in example on Polkadot for a recent block)?
For example how many nodes are in the trie? Even better would be the total bytes of node partial keys, ...
1
vote
2
answers
118
views
Polkadot Patricia Trie compatible with Ethereum implementation
I'm currently looking to verify ethereum transaction merkle-proofs in runtime. As Ethereum also uses a patricia-trie, I was wondering if the two implementations are generally compatible. Is it ...
3
votes
2
answers
77
views
Proof order of proof encoded nodes
Does the order of the Merkle proof encoded nodes matter for the state trie?
I am working on Gossamer and for now we produce proofs without considering order of encoded nodes in Gossamer.
Now I am ...
1
vote
1
answer
79
views
Verify storage entry with getReadProof
I'm currently trying to prove a storage entry by verifying the output of getReadProof but am not really sure how to do this.
For some context: I want to query a parachains header from the relay chains ...
5
votes
1
answer
122
views
How to create an iterator for a child storage trie?
I have a Storage Map which I am using to to store structs and a Storage Value to use for indexing this:
#[pallet::storage]
#[pallet::getter(fn consequences)]
/// Storage map holding basic Consequence ...