1. Home
  2. Docs
  3. Hyperchain data structure and algorithm in a nut shell
  4. Block data storage and addressing

Block data storage and addressing

In the Hyperchain network, Hyperblocks and Local Chain blocks are stored in a decentralized manner on various peer nodes. All data blocks are addressed using the Hyperchain triplet [Hid, Cid, Bid] addressing data rules and are uniformly encoded during consensus. The set of all data blocks that conform to the addressing data rules maps to a logical space of all data blocks, called the Chain Space.

Each node maintains a view of the chain space locally and caches the necessary data blocks. When a node needs more data blocks, it can obtain them from any reachable neighbor node.

To avoid situations where uncached data blocks cannot be obtained, nodes need to know which neighbor nodes store the data blocks, ensuring that enough neighbor nodes store the required data blocks. If the number of neighbor nodes storing the data blocks is less than the alert threshold, the node needs to take measures, such as finding more neighbor nodes that store data block copies to reduce risks, or copying the data blocks locally to ensure business availability.

In the chain space, although each node only owns some data blocks, when multiple nodes are connected to each other, they can provide the full set of chain space data blocks. If a single node caches the full set of chain space data blocks, it can provide full node services. If it caches the full set of chain data blocks for a single chain or a specific application, it can provide single-chain or application-specific full node service.

Nodes do not need to store business-irrelevant data blocks, solving the problem of data expansion for traditional blockchain nodes where all nodes must be full nodes.

Was this article helpful to you? Yes No