Crate pchain_world_state

source ·
Expand description

pchain-world-state defines structs, functions, and methods for reading and writing world state from and into a persistent storage. The world state is stored in Merkle Patricia Trie structure which is the combination of a:

  • Patricia Trie: An efficient Radix Trie (r=16), a data structure in which “keys” represent the path one has to take to reach a node
  • Merkle Tree: A hash tree in which each node’s hash is computed from its child nodes hashes.

Modules§

  • Error handling behaviour of this crate.
  • Definition of Keys that Parallelchain-F are used to writes into persistent storage.
  • The world state data formatting scheme, as well as structs and functions associated with Network Account. Network Account maintains network-wide state in ParallelChain F. This state is maintained in the Storage Trie of an identified Account called the Network Account, which resides at constant address NETWORK_ADDRESS. This Account is not associated with Ed25519 material. The network-significant data that the Network Account stores is composed of various fields stored in its Storage Trie.
  • Definition of WorldState and AccountStorageState methods.
  • Definition of trait for accessing persistent storage from world state, and data structure of the world state changes.