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.
You can install the CLI using install script:
curl -fsSL https://raw.githubusercontent.com/HerodotusDev/hdp-cairo/main/install-cli.sh | bash
To install the required dependencies and set up the Python virtual environment, run:
make
Runtime require chain nodes RPC calls, ensure an environment variables .env are set.
-
Simulate Cairo1 Module and Collect Proofs Information:
cargo run --release --bin hdp-cli -- dry-run -m module_contract_class.json --print_output
module_contract_class.json
is built contract code fromScarb
build, more specific example in DOCS -
Fetch On-Chain Proofs Needed for the HDP Run:
cargo run --release --bin hdp-cli --features progress_bars -- fetch-proofs
-
Run Cairo1 Module with Verified On-Chain Data:
cargo run --release --bin hdp-cli -- sound-run -m module_contract_class.json --print_output
module_contract_class.json
is built contract code fromScarb
build, more specific example in DOCS
The program will output the results root and tasks root. These roots can be used to extract the results from the on-chain contract.
Tests require chain nodes RPC calls. Ensure an environment variables .env are set.
-
Build Cairo1 Modules:
scarb build
-
Run Tests with nextest:
cargo nextest run