Merkle Root


A Merkle tree (or hash tree) is a binary tree structure where each leaf node represents a hash of a block of data. The tree is built by hashing pairs of leaf nodes until there is only one hash left, which is the Merkle root.

The Merkle root contributes to the security of the blockchain by allowing quick detection of changes in any transaction within a block without having to store or process the entire block’s transaction data. Instead of verifying each transaction individually, the Merkle root allows nodes to verify that a transaction is part of a block by only checking a small subset of the hashes.

As the final hash of the Merkle tree, if even a single transaction is altered, the corresponding hash will change, leading to a completely different Merkle root and making it evident that the data has been tampered with.

In Bitcoin, every block contains a Merkle tree that reflects all the transactions within that block. When miners create a block, they compute the Merkle root based on the transactions, and this root is included in the block’s header. This helps maintain the integrity and security of the blockchain.

Key Takeaway

A key concept in how data is securely and efficiently verified within a blockchain, a Merkle root represents the combined hash of all transactions within a block.

Related Words