Skip to main content

Questions tagged [trie]

The tag has no usage guidance.

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

What are the "values" in the substrate Merkle Patricia tree?

I've read Shawn's substrate storage deep dive recently. It is very informative and I roughly understand different key systems exist and how the keys are caclulated. However, one thing that puzzles me ...
Kailai's user avatar
  • 383
0 votes
0 answers
26 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 ...
ZKT's user avatar
  • 113
4 votes
3 answers
116 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 ...
Dan's user avatar
  • 41
3 votes
2 answers
147 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 ...
Dzmitry Lahoda's user avatar
0 votes
1 answer
39 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 ...
chexware's user avatar
  • 325
3 votes
2 answers
92 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, ...
Quentin Mcgaw's user avatar
1 vote
2 answers
137 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 ...
Paul Etscheit's user avatar
3 votes
2 answers
79 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 ...
Quentin Mcgaw's user avatar
1 vote
1 answer
98 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 ...
Paul Etscheit's user avatar
5 votes
1 answer
148 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 ...
jpataylor's user avatar
  • 321