$EX5 pre-sale — Seed tier · 500M fixed supply · 50% burn · sign up at portal.ex5.comJOIN →
Updated

Merkle Tree

In short: A Merkle tree is a data structure used in computer science and cryptography to verify the integrity of stored or transmitted data.

A Merkle tree is a data structure used in computer science and cryptography to verify the integrity of stored or transmitted data. It combines the hashes of many pieces of data, pair by pair, into a single hash called the Merkle root.

Why it matters

Blockchains such as Bitcoin store the Merkle root of all transactions in each block header. Because every hash depends on the data below it, changing even one transaction changes the root, so tampering is easy to detect. A Merkle tree also lets a light wallet confirm that a transaction is in a block with a short proof of a few hashes, instead of downloading the whole block. Some exchanges use Merkle trees in proof-of-reserves reports so users can check that their balance was included.

Example

Take four transactions: A, B, C and D. Each one is hashed. The hashes of A and B are combined and hashed again, and so are the hashes of C and D. Finally, those two results are hashed together to form the root. To prove that C is included, you only need the hash of D, the combined hash of A and B, and the root.