Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
LABS
Glossary

Partial Merkle Tree

A Partial Merkle Tree is a cryptographic data structure that allows a verifier to efficiently confirm the inclusion of specific data within a larger dataset using a compact proof, without needing the entire dataset.
Chainscore © 2026
definition
BLOCKCHAIN DATA STRUCTURE

What is a Partial Merkle Tree?

A Partial Merkle Tree is a cryptographic proof structure that allows a verifier to efficiently confirm that a specific piece of data, like a transaction, is part of a larger dataset without needing the entire dataset.

A Partial Merkle Tree (PMT) is a compact, verifiable proof derived from a full Merkle tree that demonstrates the inclusion of one or more specific data elements, such as transactions in a block. It consists of a minimal set of Merkle tree nodes—the target data's hash, sibling hashes along the path to the root, and the Merkle root itself. This allows a lightweight client, like a Simplified Payment Verification (SPV) wallet, to verify that a transaction was included in a block by downloading only a few hundred bytes of proof data instead of the entire multi-megabyte block.

The construction of a PMT is a pruning process. Starting with the full tree, you identify the branch containing the target data (e.g., Tx C). The proof includes the hash of Tx C, the hash of its sibling (Tx D), and then the hashes of the "aunt" and "uncle" nodes needed to recompute each step up the tree. By hashing these provided nodes together in the correct order, the verifier can compute a candidate Merkle root. If this computed root matches the trusted block header's root, the inclusion is cryptographically proven. This process is also known as a Merkle proof or inclusion proof.

Partial Merkle Trees are fundamental to blockchain scalability and privacy for light clients. In Bitcoin, Bloom filters are used to request PMTs for transactions relevant to a wallet. Beyond payments, PMTs enable efficient data availability proofs in layer-2 solutions and cross-chain communication. Their efficiency is measured in proof size, which grows logarithmically (O(log n)) with the total number of elements in the tree, making verification fast and bandwidth-efficient even for blocks containing thousands of transactions.

how-it-works
BLOCKCHAIN DATA STRUCTURE

How a Partial Merkle Tree Works

A Partial Merkle Tree (PMT) is a cryptographic proof that allows a verifier to efficiently confirm that specific data blocks are part of a larger dataset without needing to download the entire structure.

A Partial Merkle Tree is a compact cryptographic proof derived from a full Merkle tree, which is a binary tree of hashes used to summarize and verify large datasets. In a blockchain context, a full Merkle tree is constructed by repeatedly hashing pairs of transaction IDs until a single root hash, the Merkle root, is produced. A PMT does not contain all the leaf nodes (transactions); instead, it contains only the minimal set of Merkle branch hashes—the sibling nodes along the path from the target data to the root—required to recompute and verify the known Merkle root. This structure enables light clients or Simplified Payment Verification (SPV) nodes to verify the inclusion of specific transactions in a block with high confidence.

The verification process for a Partial Merkle Tree is deterministic. The verifier receives the block header containing the trusted Merkle root, the specific transaction data they wish to verify, and the PMT's branch of intermediate hashes. They then hash the transaction, combine it with the provided sibling hashes in the correct order (following the tree's structure), and recalculate the path to the root. If the computed root hash matches the one in the block header, the transaction's inclusion is cryptographically proven. This process is efficient because it requires only O(log n) hashing operations, where n is the total number of transactions, making it vastly more scalable than downloading an entire block.

Partial Merkle Trees are fundamental to blockchain scalability and interoperability. They are the core mechanism behind light client protocols, allowing devices with limited bandwidth and storage to participate in the network securely. Beyond simple transaction verification, PMTs are crucial for cross-chain communication and layer-2 solutions like rollups, where proving the state or inclusion of data on another chain is required. The specific implementation, such as Bitcoin's MerkleBlock message or Ethereum's use of Merkle Patricia Tries for state proofs, defines the exact serialization and rules for constructing a valid partial proof, but the underlying cryptographic principle remains consistent across these applications.

key-features
MECHANISM DEEP DIVE

Key Features of Partial Merkle Trees

A Partial Merkle Tree (PMT) is a cryptographic proof structure that enables efficient verification of specific data within a larger dataset without needing the entire dataset. Its design is fundamental to blockchain scalability and privacy.

01

Data Integrity Proof

A PMT provides a cryptographic proof that a specific piece of data (e.g., a transaction) is included in a block. It does this by supplying a minimal set of hash values (the Merkle path) from the leaf to the root, allowing a verifier to recompute the known Merkle root without possessing the entire tree.

  • Core Function: Proves inclusion, not exclusion.
  • Verification: Requires only O(log n) hashes, where n is the number of leaves.
02

Bandwidth Efficiency

The primary advantage of a PMT is its drastic reduction in data transfer requirements. Instead of downloading an entire block (which can be megabytes in size), a light client or Simplified Payment Verification (SPV) node only needs the block header and a small PMT to verify transaction inclusion.

  • Example: Verifying one transaction in a 4000-tx block requires ~12 hashes (for a tree depth of 12) versus the entire block data.
03

Merkle Path Structure

The proof itself is a Merkle path or authentication path. It consists of the sibling hashes needed at each level of the tree to reconstruct the root.

  • Components: The target leaf's hash, the sibling hashes at each level, and the position (left/right) of each hash.
  • Process: The verifier hashes the leaf with its provided sibling, then hashes that result with the next sibling, recursively climbing to the root.
04

Use in Light Clients & SPV

PMTs are the enabling technology for Simplified Payment Verification (SPV), as defined in the Bitcoin whitepaper. Light clients use PMTs to verify that payments to them were confirmed, relying on the full nodes' proof-of-work but not storing the chain.

  • Trust Model: Trusts that the Merkle root in the valid, mined block header is correct.
  • Privacy Consideration: Requesting a PMT for a specific transaction can reveal user interest to the serving full node.
05

Comparison with Full Merkle Tree

A Full Merkle Tree contains every node hash and is used by full nodes to calculate the root for a new block. A Partial Merkle Tree is a subset derived from it for verification purposes.

  • Full Tree: Constructed by block producers. Size: ~2n hashes.
  • Partial Tree: Extracted by full nodes for queriers. Size: ~log₂(n) hashes.
  • Relationship: The PMT is a verifiable slice of the full tree's data structure.
06

Implementation in Bitcoin (MerkleBlock)

Bitcoin implements PMTs via the merkleblock message (P2P command) and the CMerkleBlock structure. It includes a bitmask to indicate which nodes in the traversal are part of the proof, along with the vector of hashes.

  • Protocol Message: A full node sends a merkleblock in response to a getdata request for a transaction filtered by a Bloom filter.
  • Structure: Contains the block header, the number of transactions, the hashes, and the traversal flag bits.
ecosystem-usage
PARTIAL MERKLE TREE

Ecosystem Usage & Protocols

A Partial Merkle Tree (PMT) is a cryptographic data structure that enables efficient and verifiable proof of inclusion for specific data within a larger dataset, without needing the entire dataset. It is a core component for scaling blockchain data transmission and verification.

01

Core Mechanism: Merkle Proofs

A Partial Merkle Tree is constructed by hashing data into leaf nodes and building a binary tree of hashes up to a single Merkle root. To prove a specific piece of data (e.g., a transaction) is included, one provides a Merkle proof—the minimal set of sibling hashes needed to recompute the root from the target leaf. This allows verification with O(log n) data instead of the full tree.

02

Primary Use Case: Simplified Payment Verification (SPV)

Light clients and Simplified Payment Verification (SPV) wallets rely on PMTs. They do not store the full blockchain. Instead, they download block headers containing the Merkle root. To verify a transaction, a full node provides a compact Merkle proof. The client hashes the transaction with the proof; if it matches the root in the validated block header, the transaction's inclusion is cryptographically proven.

03

Protocol Implementation: Bitcoin & Ethereum

  • Bitcoin: Uses PMTs in its merkleblock message format. SPV clients request this message to filter and verify transactions relevant to their wallets.
  • Ethereum: Employs Merkle Patricia Tries for state and transaction verification. Light clients use Les protocol to request proofs for account balances or transaction receipts via PMT-like structures.
04

Data Efficiency & Bandwidth Savings

PMTs drastically reduce the data required for verification. For a blockchain with thousands of transactions per block, a proof requires only a few hundred bytes (logarithmic scale) versus megabytes for the full block. This is critical for mobile wallets, IoT devices, and scaling solutions that need trust-minimized access to chain data without running a full node.

05

Related Concept: Bloom Filters vs. PMTs

Historically, SPV clients used Bloom filters to privately request relevant transactions from full nodes, which then returned PMT proofs. This was privacy-leaking and inefficient. Modern protocols like BIP 157/158 (Neutrino) use client-side filtering: nodes serve compact filters, and clients download entire blocks, using PMTs internally to verify only their transactions, improving privacy and efficiency.

06

Application in Cross-Chain & Layer 2

PMTs are fundamental to interoperability and scaling:

  • Cross-Chain Bridges: Relays use Merkle proofs to verify events (e.g., token locks) on a source chain for execution on a destination chain.
  • Optimistic Rollups: Fraud proofs often involve providing a Merkle proof to demonstrate incorrect state transition within a rollup block.
  • Light Client Bridges: Chains like Cosmos IBC use light clients that verify headers and proofs from other chains.
visual-explainer
DATA STRUCTURE

Visualizing a Merkle Proof

A step-by-step graphical explanation of how a Merkle proof cryptographically verifies the inclusion of a single data block within a larger dataset, without needing the entire dataset.

A Merkle proof is a compact cryptographic path that demonstrates a specific data block, or leaf node, is part of a larger Merkle tree. To visualize it, imagine a binary tree where each leaf is a hash of a data block (e.g., a transaction in a blockchain block). Each parent node, or interior node, is the hash of its two child nodes. The Merkle root at the top is a single hash representing the entire dataset. A Merkle proof for a specific leaf provides only the minimal set of sibling hashes needed to recompute the path from that leaf up to the publicly known root.

The verification process works by hashing upwards. Starting with the target leaf's hash, the verifier combines it with the first provided sibling hash, hashes the pair, and moves up a level. This process repeats at each level, using each subsequent sibling hash from the proof, until a final hash is computed. If this computed hash matches the trusted Merkle root, the proof is valid, confirming the leaf's inclusion and integrity. This is efficient because it requires transmitting and processing only a logarithmic number of hashes (O(log n)) instead of the entire tree.

In blockchain systems like Bitcoin, this is critical for Simplified Payment Verification (SPV). A lightweight client, which doesn't store the full chain, can request a Merkle proof for a transaction. By providing the transaction hash and the relevant sibling hashes from that block's Merkle tree, a full node can prove the transaction's inclusion without sending the entire block. This visualization underscores the power of cryptographic commitment: the root commits to all data, and any change to a single leaf would alter the root, making tampering immediately detectable.

examples
PARTIAL MERKLE TREE

Primary Use Cases & Examples

Partial Merkle Trees enable efficient and secure verification of specific data within a larger dataset without requiring the entire structure, a critical primitive for blockchain scaling and interoperability.

03

Data Availability Sampling

In modular blockchain architectures like Ethereum with danksharding, Partial Merkle Trees (or their extension, Kate commitments) are crucial for data availability sampling. Light nodes randomly sample small pieces of erasure-coded data and verify their inclusion via proofs. By collecting enough samples, they can probabilistically guarantee the entire data block is available, preventing data withholding attacks without downloading all data.

04

Optimistic Rollup Fraud Proofs

In Optimistic Rollups, a Partial Merkle Tree is used to generate concise fraud proofs. When a sequencer posts an invalid state transition, a verifier can challenge it by submitting a proof containing only the relevant state leaves (e.g., account balances) and their Merkle paths. The Layer 1 contract verifies this small proof against the published state root, enabling secure scaling with minimal on-chain data.

05

Ethereum's Bloom Filters (Historical)

Ethereum originally used Bloom filters in logs to help light clients find transactions of interest, but verification still relied on Merkle Patricia proofs. A client would query for logs matching a filter and then verify the returned log's inclusion in a block using a Partial Merkle Tree proof. This combined approach allowed for efficient querying and cryptographically secure verification of event data.

06

Merkle Mountain Ranges (MMR)

A Merkle Mountain Range is a variant optimized for append-only data structures. It allows for efficient generation of inclusion proofs for any leaf while supporting easy pruning of old proofs. MMRs are used in protocols like FlyClient for efficient blockchain bridging and in Bitcoin's transaction index to provide compact proofs of inclusion across a chain of block headers, enhancing proof efficiency over standard Merkle trees.

DATA STRUCTURE

Comparison: Full vs. Partial Merkle Tree

Key architectural and performance differences between the two primary Merkle tree implementations used in blockchain systems.

Feature / MetricFull Merkle TreePartial Merkle Tree

Data Structure

Complete binary tree containing all leaf nodes (transactions).

Sparse tree containing only the Merkle branch needed for a proof.

Proof Size (for N leaves)

O(log N) hashes (full path).

O(log N) hashes (minimal path).

Storage Overhead

High. Stores all intermediate hashes for the entire dataset.

Low. Stores only the root hash; proofs are generated on-demand.

Verification Complexity

O(log N) hash operations.

O(log N) hash operations.

Construction Complexity

O(N) operations to build the full tree.

O(log N) operations to generate a proof from existing data.

Primary Use Case

State root validation, full node synchronization.

Light client verification (Simplified Payment Verification - SPV), transaction inclusion proofs.

Data Requirement for Proof

Requires access to the entire set of leaf data.

Requires only the specific leaf data and its Merkle path.

Example Blockchain Usage

Ethereum state root in block headers.

Bitcoin transaction verification in light wallets.

security-considerations
PARTIAL MERKLE TREE

Security Considerations & Assumptions

A Partial Merkle Tree is a cryptographic structure that allows a verifier to efficiently prove the inclusion of specific data elements within a larger dataset without needing the entire dataset. This section details the security properties and critical assumptions underlying its use in blockchain systems.

01

Data Integrity & Non-Repudiation

The core security guarantee of a Partial Merkle Tree is data integrity. By providing a Merkle proof (or inclusion proof) consisting of sibling hashes along a path to the root, any verifier can cryptographically confirm that a specific leaf node (e.g., a transaction) is part of the committed dataset. This proof is non-repudiable; if the root hash is trusted, the proof's validity is mathematically certain.

02

Trust in the Merkle Root

The security of a partial verification rests entirely on the authenticity of the Merkle root. In blockchain contexts, this root is typically embedded in a block header and secured by Proof-of-Work or Proof-of-Stake. The critical assumption is that the majority of the network's consensus power is honest, making the published root a trustworthy commitment. A malicious actor controlling the root could construct valid proofs for non-existent data.

03

Light Client Security Model

Partial Merkle Trees enable the light client security model (e.g., Simplified Payment Verification - SPV). A light client assumes:

  • The consensus mechanism securing the block headers is robust.
  • It has a honest-majority connection to the network to receive valid block headers.
  • The provided Merkle proofs originate from a full node that honestly constructed them from the actual block data. This model trades full validation for efficiency, relying on these external trust assumptions.
04

Proof Construction & Attack Vectors

The party constructing the proof must be trusted to provide a valid proof structure. Potential attacks include:

  • Proof Forgery: Impossible if the root is fixed, as any change to the proof data invalidates the hash chain.
  • Data Withholding: A malicious prover can simply not reveal the proof for a transaction, creating a false negative. The verifier cannot prove the data doesn't exist, only that it wasn't proven.
  • Malleability: Care must be taken that the data hashed into leaves is canonically encoded to prevent multiple valid representations.
05

Assumption of Cryptographic Primitive Security

The system assumes the underlying cryptographic hash function (e.g., SHA-256, Keccak) is secure against:

  • Pre-image resistance: Cannot find an input given an output hash.
  • Second pre-image resistance: Cannot find a different input with the same hash as a known input.
  • Collision resistance: Cannot find any two different inputs with the same hash. A break in these properties would allow an attacker to create fraudulent Merkle proofs.
06

Efficiency vs. Completeness Trade-off

The primary security trade-off is completeness. A Partial Merkle Proof verifies inclusion but not exclusion. It proves a specific element is in the tree, but a light client does not verify the entire set of transactions in a block. It therefore cannot independently detect invalid transactions outside its proof or ensure the total block data size is correct, relying on the full node network for those guarantees.

PARTIAL MERKLE TREE

Frequently Asked Questions (FAQ)

A Partial Merkle Tree (PMT) is a cryptographic data structure used to prove the inclusion of specific data within a larger dataset without revealing the entire dataset. These FAQs address its core mechanics, applications, and advantages in blockchain systems.

A Partial Merkle Tree is a cryptographic proof that a specific piece of data is part of a larger dataset, verified by providing only a small subset of the tree's hash nodes. It works by constructing a standard Merkle Tree where each leaf node is a hash of a data block (e.g., a transaction), and each parent node is the hash of its children. To prove inclusion, you provide the Merkle path or Merkle proof—the minimal set of sibling hashes needed to recompute the path from the target leaf to the Merkle root. A verifier can hash along this path; if the computed root matches the known, trusted root, the data's inclusion is proven without needing the entire tree.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected direct pipeline