DAGchain is a continuous sequential chain of blocks with data, built according to the rules of a directed acyclic graph.
The main function of DAGchain is to save and protect the data unchanged.
General circuit diagram
When constructing a chain of dagchain blocks, a directed acyclic graph is used, the vertices of which are taken from blocks with data. Just like in the blockchain, the block consists of a header and data.
A — Block header.
В — Data.
The edges of a graph are the interrelationships between blocks. Each block in the Dagchain UniDAG is the terminal vertex for only 2 edges.
Each block is sequentially assigned its integer sequence number with an increase of 1 from the beginning of the chain and adding this number to the block header.
1 , 2 , 3 , N , (N+1) , (N+2) — sequence numbers of blocks
To ensure the invariability of the dagchain data in the edges of the graph (interrelations between blocks) irreversible cryptographic methods of hashing are used.
When the block is generated, the data is hashed. Then the hashes of the two previous blocks are taken, the hash of the data is received and hashed to get the hash of its own block. The exception is the first two ‘genesis’ blocks. All hash sums are written to the block header.
The basic rules in the construction of the dagchin are the preservation of the sequence of blocks, the use of the same number of edges (links), and the use of cryptostable algorithms for hashing.
DAGchain vs Blockchain
Both the UniDAG dagchain and blockchain are particular examples of an ordered linear unidirectional linked list. Classic blockchain can be represented as a dagchain.
k — number of edges (relationships)
The fundamental difference between them is the number of connections between nodes (blocks).
k=1 — an example of a classic blockchain with 1 edge, that is, the hash of the previous block participates in hashing of the next block of the chain.
k=2 — dagchain UniDAG, where the hash of the previous two blocks is used in the hash of the block.
k=3 — in the hash of the block, 3 hashes of the previous blocks are used.
k=(N+1) In the hash of the block, hashes of all previous blocks are used.
With this approach, the possibilities of practical application of the dagchain significantly increase. However, it becomes clear that the more links we use, the more it is necessary to write down the hashes of the data of the previous blocks in the header and the more to use the computing resources. In practice, in most cases, simply there is no need to use the maximum possible number of hashes.
Another significant difference is the ability to create dagchain from open / closed blocks. The essence of this process is that ‘places’ are reserved in the header of the block for recording hashes of subsequent blocks. The number of these ‘places’ directly depends on the number of edges (interconnections). An open block is a block with the possibility of additional entry into its header, closed — without this possibility.
k — number of edges (relationships)
Let’s consider an example with the number of edges k = 2, which is used in the dagchain UniDAG.
The current block is closed by hashes of the following two
Thus, in order to change the data of the N block in the dagchain with 2 edges, it is necessary to change the data, and accordingly their hashes, (N-2) and (N-1) blocks, which increases the security and invariability of the dagchain generally.
Website: www.unidag.world
Telegram: @World_UniDAG
Medium: @yevheniikonstantinovichdoshyn