# Merkle Branches

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

*A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he's convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it's time stamped in.*

\- Satoshi Nakamoto, Bitcoin Whitepaper

A user can maintain a copy of the block headers from the longest proof-of-work chain, which can be verified through the **Proof-of-work** mechanism. By querying network nodes, the user can ensure they have the longest chain and subsequently obtain the **Merkle branch** that links a specific transaction to the block in which it is recorded.

The Merkle tree structure is pivotal in this verification process, as it **allows users to verify transactions without needing the entire blockchain**. The Merkle tree's design means that only the **Merkle root** (the top hash) and a s**mall branch of the tree** are necessary to confirm whether a transaction is part of the tree. This is **accomplished by taking the nodes along the path** that connects the Merkle root to the transaction in question, thereby creating a proof.

This method of verification can be **likened to a family tree analogy**, where an individual with knowledge of an original ancestor and some middle generations can prove their connection to a specific subject. In the context of blockchain, **users can selectively store only the transactions they are interested in**, rather than maintaining a full copy of the blockchain.


---

# 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-whitepaper-series/section-8-simplified-payment-verification-bitcoin-whitepaper/merkle-branches.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.
