Skip to main content
This page summarizes the most important HDP runtime types and where to find them in source.

Rust pipeline types

TypeUsed inPurpose
HDPDryRunInputStage 1Input payload for dry-run (module + params + optional injected state)
HDPInputStage 3Input payload for sound-run (module + params + proofs + optional injected state)
ProofsDataStage 2 outputFull proof payload (chain_proofs, state_proofs, unconstrained)
HDPDryRunOutputStage 1 outputDecoded output fields emitted by dry run
HDPOutputStage 3 outputDecoded output fields emitted by sound run
MmrMetaOutputStage 3 outputPer-chain MMR metadata entry
Related docs:

ProofsData JSON shape

{
  "chain_proofs": [],
  "state_proofs": [],
  "unconstrained": {}
}
chain_proofs carries chain-specific header/state proof bundles, state_proofs carries injected-state read/write proofs, and unconstrained carries hash-validated large payloads.

Chain-level enums and bundles

TypePurpose
ChainIdsSupported chain enum
ChainProofsPer-chain proof bundle wrapper
HashingFunctionMMR hashing mode (Poseidon or Keccak)

Cairo constants (chain IDs)

EVM:
  • ETHEREUM_MAINNET_CHAIN_ID
  • ETHEREUM_TESTNET_CHAIN_ID
  • OPTIMISM_MAINNET_CHAIN_ID
  • OPTIMISM_TESTNET_CHAIN_ID
Starknet:
  • STARKNET_MAINNET_CHAIN_ID
  • STARKNET_TESTNET_CHAIN_ID
See API usage in Capabilities.

Cairo key structs (practical shapes)

EVM keys:
HeaderKey { chain_id, block_number }
AccountKey { chain_id, block_number, address }
StorageKey { chain_id, block_number, address, storage_slot }
BlockTxKey { chain_id, block_number, transaction_index }
BlockReceiptKey { chain_id, block_number, transaction_index }
LogKey { chain_id, block_number, transaction_index, log_index }
Starknet keys:
HeaderKey { chain_id, block_number }
StorageKey { chain_id, block_number, address, storage_slot }

Output fields (decoded from output segment)

task_hash_low, task_hash_high,
output_root_low, output_root_high,
poseidon_len, keccak_len,
poseidon_metas (4 felts each),
keccak_metas (5 felts each)
For semantics and formulas: