February 2019
Intermediate to advanced
450 pages
9h 59m
English
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, ant is the third, and so on:

We take the hash of each piece of data, in this case, cat, dog, ant, and so on. For this demonstration, we use the hash function SHA256. Because of limited space, we have truncated the full hash result in the diagram. For now, ...