Merkle Trees

A Merkle Tree is a way of hashing a large number of data chunks together in order to make the data storage efficient and improve the ability to locate and verify the stored data.

A Merkle Tree works by splitting up the chunks of data into buckets then taking the hash of each bucket. The process is repeated until the total number of hashes remaining becomes one. This final hash is known as the root hash. This arrangement allows you to efficiently prove that a particular piece of data is included in the ledger.

Bitcoin uses Merkle Trees in order to store the relevant transactions in each block. In each block, the leaf nodes are transactions and each internal node consists of two pointers. The hash of the latest block acts as a digest – a change in any transaction in the block will result in changes that propagate through the hashes all the way to the root hash

It is possible to create blockchains without Merkle Tree data structures but this would limit the ability to scale the network and be extremely computationally expensive.

Leave a Reply