Herodotus Docs
Home
  • Introduction
  • FAQ
  • developers
    • Storage Proofs
      • Workflow
      • Workflow Examples
      • Accessing Block Hash
    • Storage Proof API
      • Interactive Docs
      • Step by step example
    • Turbo
      • Supported Networks
      • Turbo zksync demo
    • Data Processor
      • Why use HDP?
      • Getting Started
      • HDP Jargon
        • What is a Data Lake?
        • What is a Module?
        • Cairo1/Cairo0 Interoperability
      • Architecture
      • Additional Resources
    • Data Processor API
      • Program Registry API
      • Interactive Docs
    • Data Structure Indexer API
      • Interactive Docs
    • Supported Networks
    • Contract Addresses
    • API Status
  • Scaling Solutions
    • Integrity Verifier
  • Protocol Design
    • Architecture
      • Smart Contracts
      • OP Stack
    • Historical Block Hash Accumulator
      • Merkle Mountain Ranges
      • Initial Accumulation Event
    • Timestamp to Block Mapper
      • Edge Cases
  • Security
    • Audits
  • GitHub
  • Twitter
  • LinkedIn
  • Telegram
  • Media Kit
Powered by GitBook
On this page
  1. Protocol Design
  2. Historical Block Hash Accumulator

Merkle Mountain Ranges

PreviousHistorical Block Hash AccumulatorNextInitial Accumulation Event

Last updated 8 months ago

Try our to grow an MMR using Keccak or Poseidon right in your browser!

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

Cairo MMR

Rust

Additional Learning Resources:

MMR Visualizer and Detailed Explanation

online tool
https://github.com/HerodotusDev/solidity-mmr
https://github.com/HerodotusDev/cairo-lib/tree/main/src/data_structures/mmr
https://github.com/HerodotusDev/rust-accumulators
https://mmr.herodotus.dev