Skip to content

Merkle Tree

    Merkle Tree is a methodology used to validate data structure and ensure data authenticity. The primary goal of this methodology is to organize large amounts of data to reduce the amount of work required to verify it. A Merkle Tree is created by hashing each node in a dataset. Nodes are organized into a tree structure to compute the hash of the entire tree (root). If data in a node changes, the root hash changes. As a result, only the root hash must compute to confirm the integrity of the entire dataset.
    Blockchains use Merkle Trees to organize data for security and to improve the efficiency of verifying transactions. New transactions produce a hash value. The blockchain pairs the hash value of each with transaction another transaction’s hash value and then hashes them together to create a combined hash value (i.e., hash values “AB” and “CD”’ combine to create the hash value “BCE”). The combined hash represents the paired hashes of the two transactions. This process of pairing hash values continues with each transaction added, culminating in a final hash value for the block (the Merkle root). The block creator adds the root hash to the block header and uses it to verify the integrity of the block header and all transactions associated with this block.