2018-10-27 22:17 |
Blockchain’s Merkle Tree Explained
A lot of blockchain enthusiasts have likely heard the term “Merkle Tree” during their exploration of this technology. However, while the term is often met, a lot of people still remain confused regarding what exactly this is, and what it does. Because of that, we will discuss this term today, and hopefully, help you understand it better.
What is Merkle Tree?Merkle Tree, also called hash tree, is a name for an imperative unit of the blockchain. Simply put, this is a structure that allows the verification of content contained within a large information set. It is also one of the most important aspects of this technology, as it ensures the security of the verification process.
It is used by both, Bitcoin and Ethereum blockchains, and it is created in a way that allows blocks that carry recorded data to be transferred from peer to peer. Furthermore, it does this without changing, modifying, or corrupting the block or the stored data in any way.
The majority of Merkle Trees use a dual child node system, which exists under all network nodes. However, only two child nodes can exist in a Merkle Tree at the same time due to its binary nature.
How Does It Work?The Merkle Tree works by generating a common digital fingerprint that represents numerous transaction at once. Through the use of this digital fingerprint, specific transactions can quickly be discovered on the block. However, in order to make a Merkle Tree, it is necessary to repeatedly hash node pairs. This is done until only one hash remains. This single hash will serve as the tree's root. Hence its name — Merkle Root.
Hashes such as this are made by moving transaction hashes bottom up. The tree itself is made up of “leaves”, which are simply nodes that represent the hashes of information contained on the block. Of course, there also exist non-leaf nodes.
When it comes to leaf nodes, they need to be present in an even number, which is once again necessary due to the fact that this is a binary technology. If a block contains four transactions, each of them will be hashed, with the hash ending up in a leaf node. The leaf nodes are then summarized and paired up. After that, they are hashed together once more, and a Merkle Root is created.
Of course, this is only an example, and the process can include far more than only four transactions. However, the process itself remains the same, and hashing will continue until only one node remains. The most often used function for achieving this is an SHA-2 function, although others can be used as well.
What Does It Do?Finally, all that remains is to answer what do Merkle Trees actually do. Simply put, they create block headers through the summary of all the data contained within each block's transactions. The process is very precise, and the change of a single detail within any of these transactions will change the Merkle Tree too.
Their technology's main purpose, however, is to confirm if a particular transaction is part of a set. The Tree can be broken down into individual branches, which makes it different than a regular hash list. In other words, Merkle Tree is there to increase the security of databases on the blockchain.
Similar to Notcoin - Blum - Airdrops In 2024