Expand description
Header chain trace encoding for ligerito polynomial commitment proofs.
Encodes block headers into a trace polynomial that ligerito can prove over. The trace layout binds block hashes, prev_hash linkage, difficulty progression, state roots at epoch boundaries, and a sentinel row with tip NOMT roots.
§Trace layout (32 fields per header)
Field 0: height
Fields 1-8: block_hash (32 bytes = 8 × 4-byte LE fields)
Fields 9-16: prev_hash (32 bytes = 8 × 4-byte LE fields)
Field 17: nBits (compact difficulty target)
Field 18: cumulative_difficulty (lower 32 bits)
Field 19: running header commitment (Blake2b-512 chain, lower 4 bytes)
Fields 20-23: sapling_root (16 bytes, epoch boundaries only)
Fields 24-27: orchard_root (16 bytes, epoch boundaries only)
Fields 28-29: nullifier_root (8 bytes, epoch boundaries only)
Field 30: state_commitment (Blake2b-512 chain, lower 4 bytes)
Field 31: reservedAfter all headers, a sentinel row of 24 fields:
Fields 0-7: tip_tree_root (32 bytes)
Fields 8-15: tip_nullifier_root (32 bytes)
Fields 16-23: final_actions_commitment (32 bytes)Public outputs are extracted from fixed trace positions by the prover and bound to the Fiat-Shamir transcript. The Ligerito proximity test does NOT constrain these values — soundness relies on the honest-prover assumption plus cross-verification against independent nodes.
Structs§
- Epoch
State Roots - State roots at an epoch boundary.
- Header
Chain Trace - Header chain trace for ligerito proving.
- Trace
Header - Header data for trace encoding. Minimal fields needed. No full block data, just what goes into the trace.
Constants§
- FIELDS_
PER_ HEADER - Fields encoded per block header in the trace polynomial.
- TIP_
SENTINEL_ SIZE - Sentinel row appended after all headers. Contains tip_tree_root, tip_nullifier_root, final_actions_commitment.
Functions§
- bytes_
to_ field - Convert 4 bytes (LE) to a BinaryElem32 trace field.
- encode_
trace - Encode headers into a trace polynomial for ligerito proving.
- hex_
to_ bytes - Hex string to bytes.
- nbits_
to_ difficulty - Convert nBits (compact difficulty target) to difficulty value.
- parse_
tree_ root_ bytes - Derive tree root hash from zebrad’s hex-encoded final state string.
- update_
running_ commitment - Running header commitment chain (Blake2b-512, truncated to 32 bytes).
- update_
state_ commitment - Running state commitment chain (Blake2b-512, truncated to 32 bytes).