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
  • Background
  • OP Stack Indexer
  • Workflow Examples
  • Ethereum on OP Stack
  • OP Stack on OP Stack
  • OP Stack on Starknet
  1. Protocol Design
  2. Architecture

OP Stack

Storage Proofs on Optimism and OP Stack Blockchains

PreviousSmart ContractsNextHistorical Block Hash Accumulator

Last updated 8 months ago

Background

The first step in the is always accessing the block hash. Due to this, to enable cross-chain data access on OP Stack chains, we need to understand what data gets committed to L1.

Since the launch of Optimism Bedrock, the block hash of an L2 block is committed to L1. The structure of the block header on Optimism Bedrock is the same as on EVM.

The contract emits OutputProposed events when new L2 outputs are proposed. The event structure is:

event OutputProposed( bytes32 indexed outputRoot, uint256 indexed l2OutputIndex, uint256 indexed l2BlockNumber, uint256 l1Timestamp);

Calling the getL2Output read method using l2OutputIndex returns output. This pre-image of outputRoot is made of the following values:

version, l2_block_state_root, l2_withdrawals_storage_root, l2_block_hash

The l2_block_hash can be decoded from the pre-image and sent to a Header Store smart contract deployed on Optimism or other OP Stack rollups.

OP Stack Indexer

GitHub:

The OP Stack Indexer is responsible for monitoring Ethereum for all OP Stack events. Output Roots are indexed in a database. The repository supports OP Stack rollups such as Optimism, Base, and Zora.

Workflow Examples

Ethereum on OP Stack

Step 2: Send block hash to Commitments Inbox, Headers Store and Facts Registry smart contracts, which are deployed on OP Stack.

OP Stack on OP Stack

Step 2: Send block hash to Commitments Inbox, Headers Store and Facts Registry smart contracts, which are deployed on OP Stack.

OP Stack on Starknet

Step 2: Send block hash to the Commitments Inbox, Headers Store and Facts Registry smart contracts, which are deployed on Starknet.

Step 1: .

Step 3: Proceed with .

Step 1: Index the block header(pre-image) of an OP Stack block hash that has already settled on L1. This can be done using the .

Step 3: Proceed with .

Step 1: Index the block header(pre-image) of an OP Stack block hash that has already settled on L1. This can be done using the .

Step 3: Proceed with .

Access the block hash
Storage Proof Workflow
OP Stack Indexer
Storage Proof Workflow
OP Stack Indexer
Storage Proof Workflow
Storage Proof Workflow
L2OutputOracle
https://github.com/HerodotusDev/opstack_indexer
Ethereum on OP Stack
OP Stack on OP Stack
OP Stack on Starknet