Skip to main content
This document freezes the certificate contract so an independent implementation can reproduce it. The format is versioned; changes require a version increment and updated test vectors.
This page defines the on-the-wire format of the Verifiable Query Certificate (VQC) introduced in Proof-Carrying Knowledge. It exists so the reproducibility claim is checkable rather than asserted.

Layout

The certificate reuses the canonical export framing documented in the Graph Engine:
  • Magic: b"KVQC", version 1
  • Encoding: postcard, the same deterministic codec used by KREX
  • No timestamp, no randomness, no floating-point value appears in any field

CertHeader

CertBody

Determinism contract

A conforming implementation MUST satisfy: for a fixed graph state and a fixed query, the produced certificate bytes are identical across runs, machines, and implementations. Divergent bytes indicate a defect. This holds because each input to the certificate is itself deterministic: the state via canonical KREX, the traversal via BTreeMap iteration order, and the hash via BLAKE3 over the canonical bytes.

Test vectors

The implementation ships frozen vectors as integration tests so the contract can be verified without trusting any single run:
Each vector builds a fixed graph, produces a certificate, and asserts the bytes are reproducible and round-trip through the canonical decoder. At least one case uses grounding = unknown with an empty result, exercising the proof-of-absence path (QueryCertificate::is_proof_of_absence). A divergence between two runs, or against the decoded form, fails the build.
Last modified on June 2, 2026