Super World Computer
  • About Super World Computer
  • Core Concepts
    • Soul Gas Token
    • Inbox Contract
    • L2 Blob
    • web3://
    • L1 Header Hash History
  • Guides
    • App Developers
      • Receive tokens
      • Bridge tokens
      • EthStorage Usage Guide
    • Node Operators
      • Run an Ethereum node
      • Run a Super World Computer node
      • Run op-challenger
  • Network Reference
    • Contract addresses
    • RPC configurations
  • Fork Diff
    • op-node forkdiff
    • op-geth forkdiff
  • Others
    • Join our Discord
    • Whitepaper
Powered by GitBook
On this page
  • Motivation
  • How It Works
  1. Core Concepts

L1 Header Hash History

Previousweb3://NextApp Developers

Last updated 2 months ago

Motivation

The "L1 Header Hash History" feature allows direct access to recent L1 header hash on L2.

It is useful for two primary applications:

  1. Random number generator.

  2. Verification of L1 state on L2.

This feature is similar to the recent , which finally lands after 5 years.

How It Works

We implemented it by extending the L1Block a bit , which is used by OP Stack to store information about L1 block.

When L1 block information is saved, it is now also stored in one slot of the 8192-window buffer.

The slot for block N can be computed as:

N % HISTORY_SIZE

The stored block hash can be retrieved by calling the method.

EIP-2935
here
blockHash(uint256 _historyNumber)