Merkle DAG
If you have learned about the internals of Git, Merkle Directed Acyclic Graph (DAG) shouldn’t be too foreign. As a version control system software, Git is required to keep many versions of a file and distribute them easily to other people. It also needs to be able to check the integrity of the file very quickly.
There are two words that make up Merkle DAG: Merkle and DAG. Let’s discuss Merkle first. Actually, the full word of Merkle in this context is Merkle tree. A Merkle tree is a fast way to check whether partial data has been tampered with or not.
Merkle tree
Let’s take a look at an example of a Merkle tree in order to understand it. Let’s say you have eight pieces of data. In this case, we will use the names of animals for our data, but in Bitcoin, which uses a Merkle tree, the pieces of data are usually transactions. Back to Merkle trees: put the data in order, so in this case, cat is the first piece of data, dog is the second,...