Skip to main content

Module storage

Module storage 

Source
Expand description

Storage key construction and map-key recovery.

A storage item’s key is twox128(pallet_prefix) ++ twox128(item_name) ++ hashed(param).... Reversible hashers (Blake2_128Concat / Twox64Concat / Identity) carry the raw key material after the hash, which is how map keys decode straight from the storage key.

Functions§

concat_hash_len
How many hash bytes precede the raw key material, for hashers whose keys are recoverable from the storage key.
hash_param
Apply one metadata-named storage hasher.
storage_prefix
twox128(prefix) ++ twox128(name) — the 32-byte item prefix.