entekhab.netentekhab.nettrilingual encyclopedia

Merkle Tree

ENGLISHMerkle Treereference
فارسیدرخت مرکلEstablished equivalent
کوردیدارەی مێرکلProposed equivalent — not standard
Category
Blockchain
Level
Expert

Simple definition

A way of hashing many items in pairs, again and again, until one hash stands for all of them. A short proof then shows that one item is inside.

Professional definition

A binary hash tree: each leaf is the hash of an item, each internal node the hash of its two children, and the root a single commitment to the whole ordered set. Membership is proved by supplying one sibling hash per level — the path from leaf to root.

Technical definition

Construction: hash each item, pair adjacent digests, hash the pairs, and repeat until one root remains; an odd level duplicates its last node in Bitcoin's variant. Verification recomputes the root from the leaf plus the ceiling of log base two of n sibling hashes, so proof size grows logarithmically, not linearly, with set size. The root proves inclusion and ordering, never completeness: it cannot show that nothing was withheld.

Academic definition

A vector commitment realised as a binary tree of hash values, in which leaf membership is verifiable against the root by an authentication path of logarithmic length in the number of leaves.

Mechanism

Pairing halves the number of digests at every level, so depth is the logarithm of set size. That single fact is the economy of light clients: a device holding only a block header can be convinced that one transaction is in a block of thousands, because the proof is a handful of hashes rather than the block itself.

In practice

Who uses it
Node and light-client implementers, rollup and bridge engineers, auditors verifying proof-of-reserves style attestations, and anyone designing inclusion proofs.
Why it matters
It lets a verifier check membership in a huge set against one small commitment, which is the basis of light clients, state proofs and cheap on-chain verification.
Limitations
It proves membership against a root you already trust. A valid path against a root from an invalid chain proves nothing, and withheld data stays invisible.

Common mistakes

  • Treating a Merkle proof as evidence that the chain itself is valid.
  • Assuming a root proves a set is complete rather than committed.
  • Overlooking the duplicated last node on odd levels when building proofs.

Examples

crypto

A wallet that stores only block headers asks a peer for one transaction's Merkle path. If the recomputed root matches the header it already holds, the transaction is in that block — no block download needed.

numeric

A block with 2,048 transactions needs 11 sibling hashes for an inclusion proof. At 32 bytes each that is 352 bytes, against 65,536 bytes for all the leaf digests — the logarithmic saving that makes light verification practical.

Given
  • n = 2,048 leaves
  • digest size = 32 bytes (SHA-256)
Steps
  1. path length = ceil(log2 2048) = 11
  2. proof size = 11 x 32 = 352 bytes
  3. all leaf digests = 2048 x 32 = 65,536 bytes
352-byte proof instead of 65,536 bytes of leaf digests

The proof also needs the leaf's own digest and its index; the comparison is of orders of magnitude, not an exact wire format.

Mathematical foundation

|\pi| = \lceil \log_2 n \rceil

Variables

|\pi|Number of sibling hashes in an inclusion proofhashes
nNumber of leaves, that is items committed tocount

Procedure

Count the leaves and take the base-two logarithm, rounded up: that is the tree depth and the number of sibling hashes a verifier needs. Verification hashes the leaf with each sibling in order and compares the final value with the published root.

Worked example

Given
  • n = 2,048
Steps
  1. log2 2048 = 11
  2. ceil(11) = 11
11 sibling hashes, independent of which leaf is being proved

Interpretation

Proof cost grows by one hash each time the set doubles. Doubling a block's transaction count adds 32 bytes to a proof, which is why inclusion verification stays cheap as chains grow.

Assumptions

  • A balanced binary tree with a fixed digest size; other arities and sparse variants give different path lengths.
  • The verifier already holds an authentic root, obtained from a header it trusts.
Limits of the formula
  • Logarithmic cost covers inclusion only. Proving absence needs a sorted or sparse tree design, and proving data availability needs something else entirely.
  • Implementation details, such as duplicating the last node on odd levels, affect how proofs must be encoded and have caused real bugs.

Related terminology

related
Cryptographic Hash Light Client Block Full Node Rollup Zero-Knowledge Proof Proof of Reserves
Commonly confused with

Cryptographic Hash

The hash is the primitive. The Merkle tree is a structure built from many hashes so that one value can commit to a whole set and membership can be proved cheaply.

Sources

Bitcoin: A Peer-to-Peer Electronic Cash System
bitcoin.org · 2008-10-31 · sections 7 and 8: Merkle root, reclaiming disk space and simplified payment verification
https://bitcoin.org/bitcoin.pdf URL verified
Mastering Bitcoin, 2nd ed.
O'Reilly · 2017 · chapter on the blockchain: Merkle trees and proof construction
Print source
Blocks
Ethereum Foundation Developer Docs · roots committed in the block header
https://ethereum.org/developers/docs/blocks/ URL verified

Editorial status

Needs expert reviewconsensusv1.02026-11-05

Flagged by the editor as uncertain on a linguistic, mathematical or regulatory point.

Kurdish headword دارەی مێرکل is this project's proposal and needs native-expert review. The odd-level duplication rule described is Bitcoin's; other protocols pad differently, so the construction is stated as variant-dependent.