Expand description
Sync verification primitives for Zcash light clients.
Pure verification logic with no IO, no wallet state, and no network calls. Every function takes data in and returns a verdict. This is the core of the trust model: the server provides claims, these functions verify them against cryptographic proofs anchored to the hardcoded activation block hash.
§Verification flow
header proof bytes ─→ verify_header_proof() ─→ ProvenRoots
│
┌─────────────────────────────────┼──────────────────────┐
│ │ │
▼ ▼ ▼
verify_commitment_proofs() verify_nullifier_proofs() verify_actions_commitment()
(received notes exist) (spent/unspent status) (block action integrity)All verification functions return Result<T, ZyncError>. An Err means the
server is lying or compromised. The caller MUST abort the sync and not persist
any data from this session.
§Memo extraction
extract_enc_ciphertext parses raw V5 transaction bytes to find the 580-byte
encrypted ciphertext for a specific action. Memo decryption itself requires
orchard key types (version-sensitive), so callers handle try_note_decryption
directly using their own orchard dependency.
Structs§
- Commitment
Proof Data - Commitment proof from a server, ready for verification.
- Cross
Verify Tally - Result of cross-verifying a block hash against multiple endpoints.
- Nullifier
Proof Data - Nullifier proof from a server, ready for verification.
- Proven
Roots - Proven NOMT roots extracted from the ligerito header proof. These are the roots that NOMT merkle proofs must verify against.
Functions§
- chain_
actions_ commitment - Compute running actions commitment for a sequence of blocks.
- extract_
enc_ ciphertext - Extract the 580-byte enc_ciphertext for an action matching cmx+epk from raw tx bytes.
- hashes_
match - Compare two block hashes, accounting for LE/BE byte order differences between native gRPC lightwalletd (BE display order) and zidecar (LE internal).
- verify_
actions_ commitment - Verify the running actions commitment chain against the proven value.
- verify_
commitment_ proofs - Verify a batch of commitment proofs against proven roots.
- verify_
header_ proof - Validate a header proof and extract proven NOMT roots.
- verify_
nullifier_ proofs - Verify a batch of nullifier proofs against proven roots.