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.
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_outputmodule_contract_class.json is produced by a Scarb build of your Cairo1 module.
- Rust toolchain: pinned to
nightly-2025-04-06viarust-toolchain.toml.rustupwill 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
curl -fsSL https://raw.githubusercontent.com/HerodotusDev/hdp-cairo/main/install-cli.sh | bashTo install a specific version:
VERSION=vX.X.X curl -fsSL https://raw.githubusercontent.com/HerodotusDev/hdp-cairo/main/install-cli.sh | bash- Clone and init submodules:
git clone https://github.com/HerodotusDev/hdp-cairo.git cd hdp-cairo git submodule update --init - Install Python deps and Cairo0 tooling:
uv sync
- Build the CLI:
cargo build --release --bin hdp-cli
To use cairo-format from the virtual environment:
source .venv/bin/activate- Default: builds with the pinned nightly toolchain.
- STWO prover input: build with
--features stwo.
cargo build --release --bin hdp-cli --features stwoIf you run hdp sound-run --stwo_prover_input ... without --features stwo, the CLI will instruct you to rebuild.
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 .envRPC variables (see example.env):
RPC_URL_HERODOTUS_INDEXERRPC_URL_ETHEREUM_MAINNETRPC_URL_ETHEREUM_TESTNETRPC_URL_STARKNET_MAINNETRPC_URL_STARKNET_TESTNETRPC_URL_OPTIMISM_MAINNETRPC_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.
- Dry run: simulate the module and collect proof requirements.
hdp dry-run -m module_contract_class.json --print_output
- Fetch proofs:
hdp fetch-proofs
- 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>.
docs/contains the mdBook sources.- Cairo library details live under
docs/src/cairo_library/.
cargo testOptional:
scarb build
cargo nextest runTo enable integration-heavy tests:
HDP_INTEGRATION_TESTS=1 cargo testIf you see future-incompatible warnings (e.g. size-of), inspect with:
make future-incompatEven 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.
Provable ETH call (in hdp_cairo/src/eth_call/) adapts code from
Kakarot (kkrt-labs/kakarot-ssj)
under the MIT License.
hdp-cairo is licensed under the Apache-2.0 license.
