Axiom V2 Docs Old
  • Introduction
    • What is Axiom?
    • Quickstart
  • Examples
    • Autonomous Airdrop
      • AxiomREPL Code
      • Contract
      • Web App
      • DataQuery-only Version
  • Developers
    • Axiom for Developers
    • Specifying a Query into Axiom
    • AxiomREPL
      • AxiomREPL Examples
    • Exporting a Client Side Prover
    • Handling Axiom Callbacks
    • Common Issues
      • Callback Debugging
  • SDK and REPL Reference
    • Axiom SDK Reference
      • QueryBuilderV2
      • Data Subqueries
        • Header Subquery
        • Account Subquery
        • Storage Subquery
        • Transaction Subquery
        • Receipt Subquery
        • Solidity Nested Mapping Subquery
    • AxiomREPL Reference
      • Circuit Types
      • Circuit Functions
      • Data Functions
      • Compute Functions
  • Protocol Design
    • Architecture Overview
    • Caching Block Hashes
    • Axiom Query Protocol
      • Axiom Query Format
    • ZK Circuits for Axiom Queries
    • Ethereum On-chain Data
    • Guardrails
  • Transparency and Security
    • KZG Trusted Setup
    • Contract Addresses
    • On-chain ZK Verifiers
    • Security
  • Zero Knowledge Proofs
    • Introduction to ZK
    • ZK Examples
    • Getting Started with halo2
    • halo2-repl
  • Additional Resources
    • Axiom V2 Explorer
    • Github
    • Website
    • Telegram
    • Discord
    • Axiom V1 Docs
Powered by GitBook
On this page
  • Caching block hashes in AxiomV2Core
  • Fulfilling queries in AxiomV2Query
  1. Protocol Design

Architecture Overview

A high-level technical view into Axiom

PreviousCompute FunctionsNextCaching Block Hashes

Last updated 1 year ago

Axiom consists of two main technical pieces:

  • AxiomV2Core -- a cache of Ethereum block hashes starting from genesis

  • AxiomV2Query -- a smart contract which fulfills user queries by verifying against AxiomV2Core

Caching block hashes in AxiomV2Core

The AxiomV2Core smart contract caches Ethereum block hashes from genesis in two forms.

  • First, we cache the Merkle roots of groups of 1024 consecutive block hashes. These Merkle roots are kept updated by ZK proofs which verify that hashes of block headers form a commitment chain that ends in either one of the 256 most recent blocks to the EVM or a block hash already present in the AxiomV2Core cache.

  • Second, we store a padded of these Merkle roots starting from the genesis block. This Merkle Mountain Range is updated alongside updates to the Keccak Merkle roots in the first portion of the AxiomV2Core cache.

In summary, AxiomV2Core provides an efficient way for smart contracts to verify the validity of any historic block hash on Ethereum.

See the page below for more details on how this cache is maintained or accessed.

Fulfilling queries in AxiomV2Query

The AxiomV2Query protocol is a collection of smart contracts that fulfill user queries for computations over historic Ethereum data. Queries can be made on-chain and are fulfilled on-chain with ZK proof verification.

All computations and Ethereum data accessed within a user query are ZK proved to be valid with respect to Ethereum block hashes. The AxiomV2Query smart contract verifies this ZK proof on-chain and also verifies the block hashes against the block hashes cached in AxiomV2Core. The result is that all user queries are trustlessly verified with the same security guarantees as Ethereum itself.

Further details about our query protocol are in the page below.

Keccak
directly accessible
Merkle Mountain Range
Caching Block Hashes
Axiom Query Protocol