Expand description
“Diff” between a trie and the next.
Imagine two HashMap<Vec<u8>, Vec<u8>>s representing the content of a trie. This data
structure contains the difference from one to the other.
This data structure can be used in a variety of circumstances, such as storing the storage differences between a block and its child or storing on-going changes while a runtime call is being performed. It can also be used to store an entire trie, by representing a diff where the base is an empty trie.
§About keys hashing
This data structure internally uses a hash map. This hash map assumes that storage keys are already uniformly distributed and doesn’t perform any additional hashing.
You should be aware that a malicious runtime could perform hash collision attacks that considerably slow down this data structure.