> For the complete documentation index, see [llms.txt](https://docs.herodotus.dev/herodotus-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.herodotus.dev/herodotus-docs/protocol-design/historical-block-hash-accumulator/merkle-mountain-ranges.md).

# Merkle Mountain Ranges

{% hint style="info" %}
Try our [online tool](https://mmr.herodotus.dev/) to grow an MMR using Keccak or Poseidon right in your browser!
{% endhint %}

Merkle Mountain Ranges (MMRs) are essentially a variation of a Merkle tree, a structure used for efficiently summarizing and verifying the integrity of large sets of data. The key characteristic of an MMR is its structure, which consists of several smaller Merkle trees, known as 'mountains', that are combined to form a single range. Each mountain in the range is a perfect binary tree, and new mountains are added as the data grows. This structure is particularly beneficial in blockchain environments because it allows for efficient and secure data verification without the need to traverse the entire blockchain.

The growing nature of blockchains makes MMRs an ideal choice for managing historical data. Unlike traditional data structures that might struggle with constant additions, MMRs are inherently append-friendly. This means that as new blocks are added to a blockchain, they can be efficiently integrated into the existing MMR without the need for significant restructuring or computational overhead.

For a deeper dive into practical implementations, take a look at our MMR implementations:

**Solidity MMR**

<https://github.com/HerodotusDev/solidity-mmr>

**Cairo MMR**

<https://github.com/HerodotusDev/cairo-lib/tree/main/src/data_structures/mmr>

**Rust**

<https://github.com/HerodotusDev/rust-accumulators>

Additional Learning Resources:

**MMR Visualizer and Detailed Explanation**

<https://mmr.herodotus.dev>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.herodotus.dev/herodotus-docs/protocol-design/historical-block-hash-accumulator/merkle-mountain-ranges.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
