Skip to main content

Module path_query

Module path_query 

Source
Expand description

Path-query builders for the sum surface. Single source of truth for the PathQuery shape both the prover (in executors/*) and the verifier (in tests + bench’s display_proofs) construct.

Parallels crate::query::drive_document_count_query::path_query — the bench’s display_proofs function directly calls these as the verifier-side rebuild, so each builder MUST produce the byte-for-byte same PathQuery the prover used. Drift breaks every proof verification.

Two shapes exist for each builder:

  • Instance methods on impl DriveDocumentSumQuery<'_> — called by the per-mode executors which have already resolved the covering index via the picker. These use self.contract_id, self.document_type, self.index, etc.
  • Static associated functions — called by the bench’s display_proofs (verifier-side rebuild) and tests. These re-pick the covering index from the document type’s index map so callers don’t have to thread it through.