No description
  • Cairo 63.6%
  • Rust 35.4%
  • Shell 0.7%
  • Makefile 0.2%
  • Dockerfile 0.1%
Find a file
2026-02-13 14:41:22 +01:00
.config chore(config): Remove cargo dev profile and simplify toolchain file 2025-10-10 09:36:39 +02:00
.github/workflows Update CI workflows for nightly toolchain and test lanes 2026-01-23 14:27:54 +01:00
crates Remove dry run keys from sound hint processor 2026-01-25 12:30:57 +01:00
docs Restructure mdBook docs into sectioned chapters 2026-01-23 14:28:02 +01:00
examples Adjust example Cairo modules 2026-01-23 14:28:01 +01:00
hdp_cairo Reuse u256 conversion for EVM memorizer results 2026-01-25 12:30:57 +01:00
packages chore(deps): Update eth_essentials submodule 2025-10-28 22:22:05 +01:00
src Document chain info and RLP prefix ranges 2026-01-25 12:30:57 +01:00
tests Update test modules for new layouts and errors 2026-01-23 14:28:01 +01:00
.dockerignore feat: Migrate Python environment to uv 2025-08-21 15:19:40 -03:00
.gitignore Adjust gitignore for Cursor and test fixtures 2026-01-23 14:27:55 +01:00
.gitmodules chore: update lib repo name 2024-04-23 16:45:49 +02:00
.tool-versions Add most and all features example & uograde tooling 2025-09-29 16:37:01 +02:00
Cargo.lock Update Cargo.lock after dependency changes 2026-01-23 14:28:03 +01:00
Cargo.toml Tighten workspace linting and dev targets 2026-01-23 14:27:55 +01:00
Dockerfile Improve Docker build caching and runtime defaults 2026-01-25 16:02:30 +01:00
example.env Rename Optimism testnet env var in template 2026-01-23 14:28:02 +01:00
install-cli.sh Allow STWO builds in install script 2026-01-23 14:28:02 +01:00
LICENSE Update LICENSE 2024-04-24 12:08:04 +02:00
Makefile Refactor Makefile tool defaults and helper targets 2026-01-25 16:02:30 +01:00
pyproject.toml Add Python dev extras and update uv lockfile 2026-01-23 14:27:56 +01:00
README.md Merge branch 'main' into docs_codebase_refactor 2026-01-28 13:40:42 +01:00
rust-toolchain.toml Tighten workspace linting and dev targets 2026-01-23 14:27:55 +01:00
rustfmt.toml Tighten workspace linting and dev targets 2026-01-23 14:27:55 +01:00
Scarb.lock eth_call_example: vitalik's usdc balance at 21370000 on L1 2025-11-11 16:39:06 -03:00
Scarb.toml eth_call_example: vitalik's usdc balance at 21370000 on L1 2025-11-11 16:39:06 -03:00
typos.toml typos and clippy 2025-07-08 10:42:50 +02:00
uv.lock Add Python dev extras and update uv lockfile 2026-01-23 14:27:56 +01:00

HDP Cairo

Ask DeepWiki

HDP (Herodotus Data Processor) is a modular framework for validating on-chain data from multiple blockchain RPC sources, executing user-defined logic written in Cairo1, and producing an execution trace that can be used to generate a zero-knowledge proof. The proof attests to the correctness of both the on-chain data and the performed computation.


HDP Cairo

program_hash

Quick start (CLI)

curl -fsSL https://raw.githubusercontent.com/HerodotusDev/hdp-cairo/main/install-cli.sh | bash
hdp env-info
hdp dry-run -m module_contract_class.json --print_output
hdp fetch-proofs
hdp sound-run -m module_contract_class.json --print_output

module_contract_class.json is produced by a Scarb build of your Cairo1 module.

Prerequisites

  • Rust toolchain: pinned to nightly-2025-04-06 via rust-toolchain.toml. rustup will install it automatically, or run:
    rustup toolchain install nightly-2025-04-06
    
  • uv: Python package manager used to install Cairo0 tooling.
    curl -LsSf https://astral.sh/uv/install.sh | sh
    

Installation

curl -fsSL https://raw.githubusercontent.com/HerodotusDev/hdp-cairo/main/install-cli.sh | bash

To install a specific version:

VERSION=vX.X.X curl -fsSL https://raw.githubusercontent.com/HerodotusDev/hdp-cairo/main/install-cli.sh | bash

Option 2: Build from source

  1. Clone and init submodules:
    git clone https://github.com/HerodotusDev/hdp-cairo.git
    cd hdp-cairo
    git submodule update --init
    
  2. Install Python deps and Cairo0 tooling:
    uv sync
    
  3. Build the CLI:
    cargo build --release --bin hdp-cli
    

To use cairo-format from the virtual environment:

source .venv/bin/activate

Toolchain and features

  • Default: builds with the pinned nightly toolchain.
  • STWO prover input: build with --features stwo.
cargo build --release --bin hdp-cli --features stwo

If you run hdp sound-run --stwo_prover_input ... without --features stwo, the CLI will instruct you to rebuild.

Runtime configuration

The runtime requires RPC access. Use the CLI helpers or copy the example env file:

hdp env-info
hdp env-check --inputs dry_run_output.json
cp example.env .env

RPC variables (see example.env):

  • RPC_URL_HERODOTUS_INDEXER
  • RPC_URL_ETHEREUM_MAINNET
  • RPC_URL_ETHEREUM_TESTNET
  • RPC_URL_STARKNET_MAINNET
  • RPC_URL_STARKNET_TESTNET
  • RPC_URL_OPTIMISM_MAINNET
  • RPC_URL_OPTIMISM_TESTNET

hdp fetch-proofs reads the dry-run output and fails fast with the missing variables for the chains used in that run.

Workflow

  1. Dry run: simulate the module and collect proof requirements.
    hdp dry-run -m module_contract_class.json --print_output
    
  2. Fetch proofs:
    hdp fetch-proofs
    
  3. Sound run: execute the module with verified data.
    hdp sound-run -m module_contract_class.json --print_output
    

For source builds, use cargo run --release --bin hdp-cli -- <command>.

Documentation

  • docs/ contains the mdBook sources.
  • Cairo library details live under docs/src/cairo_library/.

Development and testing

cargo test

Optional:

scarb build
cargo nextest run

To enable integration-heavy tests:

HDP_INTEGRATION_TESTS=1 cargo test

If you see future-incompatible warnings (e.g. size-of), inspect with:

make future-incompat

Note on on-chain finality

Even if local stages (dry run, proof fetching, sound run) succeed, on-chain settlement depends on MMRs (Merkle Mountain Ranges). Blocks accessed must be included in the MMRs within the Herodotus Satellite contracts.

Mentions

Provable ETH call (in hdp_cairo/src/eth_call/) adapts code from Kakarot (kkrt-labs/kakarot-ssj) under the MIT License.

License

hdp-cairo is licensed under the Apache-2.0 license.