# Understanding Merkle Proofs

A **Merkle Proof** is a cryptographic method used to verify that a **specific piece of data** exists within a larger dataset—without needing to download or view the entire dataset.

<figure><img src="/files/1cP0P06cfsmQaUORVr5o" alt=""><figcaption></figcaption></figure>

#### How Merkle Proofs Verify Data

Imagine you are given a **UTXO (Unspent Transaction Output)**.\
If you can verify that this UTXO exists within a **block**, you can confirm that:

* It was **validated by a miner**, following all consensus rules.
* The UTXO **legitimately contained funds** at least once.
* The transaction creating it **was accepted by other nodes**, forming part of the growing blockchain.

Because invalid transactions cannot be included in a valid block, verifying inclusion through a Merkle Proof is a **trustless confirmation** of legitimacy.

***

#### Why Merkle Proofs Matter for SPV

Merkle Proofs make **Simplified Payment Verification (SPV)** possible — a concept first described in **Section 8 of the Bitcoin whitepaper**.\
SPV allows a **wallet or business** to verify that a transaction is valid **without storing or downloading the entire blockchain**.

With SPV:

* A **merchant** can confirm that a sender has control of their funds before completing a payment.
* Small-value transactions can be accepted with minimal risk and **lower operational costs**.
* **Businesses** can operate efficiently without running a full node client, rather using a **'Working Blockchain'**.

<figure><img src="/files/jR9A3lQmvdZ61ju33Lcr" alt=""><figcaption></figcaption></figure>

Because SPV nodes only store **block headers** (not full blocks), the required storage remains tiny — around **60 MB** as of January 2022, covering roughly 750,000 blocks.

Each new block adds only **80 bytes**, meaning the dataset grows at a modest rate of about **4.2 MB per year**.

Without SPV, a business would need to handle **hundreds or thousands of gigabytes** of data, which is far more costly and complex.

<figure><img src="/files/emH0PAMnUXksOGgCFG4q" alt=""><figcaption></figcaption></figure>

#### Performing a Merkle Proof

To carry out a Merkle Proof, the verifying node or wallet uses several key pieces of data:

1. The **TXID** (Transaction ID) of the target transaction.
2. Its **index position** within the block.
3. The **TXID or leaf node** it was originally paired with.
4. The **interior node values** (hashes) along the Merkle path leading to the Merkle Root.

Starting from the **leaf node layer**, the wallet or node:

1. **Concatenates** the leaf node with its provided pair for that layer.
2. **Hashes** the result to produce the parent node.
3. **Repeats** the process, layer by layer, until reaching the **Merkle Root**.

The number of node values provided depends on the **depth of the Merkle Tree**, but it is always **much smaller than the total dataset** — an efficiency that scales with the size of the block.

***

#### Structure of the Merkle Tree

In a block’s Merkle Tree:

* The first layer of **TXID leaf nodes** is labelled **Layer 0**.
* Layers increase numerically **toward the root**.
* The **first transaction** — the **coinbase transaction** — always has an **index value of 0**

<figure><img src="/files/jfLlcsodfDQFLTNsBf9E" alt=""><figcaption></figcaption></figure>

#### Key Takeaway

Merkle Proofs allow for **lightweight, verifiable participation** in the BSV network.

They make **SPV wallets** and **efficient business operations** possible by proving transaction validity without full blockchain access.

This elegant design ensures **security, scalability, and efficiency**, maintaining trust while minimizing resource requirements.

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hub.bsvblockchain.org/higher-learning/bsv-academy/bitcoin-primitives-merkle-trees/standardised-merkle-proof/understanding-merkle-proofs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
