Yevhenii Doshyn
2 min readApr 2, 2018

UniDAG Backup Framework

The UniDAG backup framework is a set of software and libraries for creating a structured, hard-to-change linear database, based on the dagchain and cryptographic hashing algorithms.

Architecture

The UniDAG backup framework is designed for use on individual devices.

Scheme of work

When constructing the dagchain, two directed ribs (interconnections between blocks) are used in one direction and 2 directed ribs in the opposite direction. At an arbitrarily taken time, the last block actually has only 2 edges and 2 “reserved places”. Each block closes the 2 previous blocks and is closed by 2 subsequent ones.

Stages of work:

  1. Formation of block with serial number N.
  2. Adding an “open” block N to the dagchain. “Closing” the block N previous blocks with serial numbers (N-1) and (N-2) respectively.
  3. Formation of the block with the serial number (N + 1).
  4. Adding an “open” block (N + 1) to the dagchain. “Closing” the block (N + 1) of previous blocks with serial numbers N and (N-1) respectively.
  5. Formation of the block with the serial number (N + 2).
  6. Adding an “open” block (N + 2) to the dagchain. “Closing” block N previous blocks with serial numbers (N + 1) and N, respectively.

When the block is generated, the data is hashed. Then the hashes of the two previous blocks are taken with the received data hash, and they are hashed together to obtain the hash of its own block. Exception: the first two “genesis” blocks. All hash sums are written to the block header. At the same time, two places in the block header are reserved for the 2 hashes of subsequent blocks, and thus the block is opened. When the 2 subsequent blocks are added to the dagchain, they are written to the header of the first block of the hash of their blocks and thus “close” the first block.

It is third part of our main document. You can read others here:

Part 1: Philosophy of the world UniDAG

Part 2: DAGchain

Part 4: The decentralization framework UniDAG

Part 5: Software Development Kit UniDAG

Part 6: Features and practical applications of UniDAG

For more information,please visit http://www.unidag.world