# Historical Block Hash Accumulator

Using ZK-STARKs and Cairo, we developed a system where we provably traverse the Ethereum blockchain by checking the cryptographic linkage between block headers. Essentially, we are proving that the parent hash of the latest block is actually the previous block's hash. We do this process several million times until we reach the genesis block.

While traversing the block headers, we build two Merkle Mountain Range(MMR) accumulators, one with the Keccak256 hash and one with the Poseidon hash containing only the provably valid Ethereum block hashes.

Conducting this traversal process every single time a historical block hash is needed would be immensely computationally and financially expensive. This is precisely why we employ accumulators. Using MMR accumulators ensures that we undertake this process only once. Thanks to the append-friendly nature of MMRs, we can easily expand the range of blocks covered by the accumulator in the future.

We opt for two accumulators to guarantee compatibility with a broad spectrum of Ethereum rollups and reduce expenses on our supported blockchains. For example, the Keccack256 version of the MMR will be used on Ethereum and many of its EVM-based rollups, while the Poseidon version of the MMR will be used on Starknet and other zk-rollups.

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

Reading arbitrary historical block hashes will become possible by verifying an inclusion proof against the Keccack256 or Poseidon root of the MMR.

This is a crucial development for storage proofs since they can be verified against historical block hashes present within the accumulator!

The Herodotus Historical Block Hash Accumulators essentially enable [EIP-2935](https://eips.ethereum.org/EIPS/eip-2935) without any protocol-level changes.


---

# 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://docs.herodotus.dev/herodotus-docs/protocol-design/historical-block-hash-accumulator.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.
