Skip to main content

Crate ruvector_proof_gate

Crate ruvector_proof_gate 

Source
Expand description

Proof-gated vector writes with Merkle-accumulating witness logs.

Provides cryptographic write admission gates for vector stores. Every admitted write produces a WriteReceipt that commits the gate’s current chain state. Receipts can be stored alongside vector index entries and verified offline without re-querying the write source.

§Gate variants

GatePer-write costGuaranteeUse case
NullGate~0 nsNone (baseline throughput)Development / test
HashChainGate~200 nsSequential tamper-evidenceAgent audit logs
MerkleGate~300 nsMMR membership proofs + tamper-evRAG provenance

§Example

use ruvector_proof_gate::{HashChainGate, WriteGate, WritePayload};

let mut gate = HashChainGate::new();
let payload = WritePayload::new(0, vec![0.1, 0.2, 0.3]);
let receipt = gate.admit(&payload).unwrap();
assert!(gate.verify_receipt(&receipt));
println!("root: {:?}", gate.chain_root());

Structs§

HashChainGate
Sequential SHA-256 hash chain.
MerkleGate
Merkle Mountain Range (MMR) accumulator.
NullGate
No-op gate that admits every payload with zero cryptographic overhead. Used exclusively to establish a throughput ceiling for comparison.
WritePayload
A vector write payload: the unit of admission through a WriteGate.
WriteReceipt
Cryptographic receipt returned by a WriteGate for each admitted payload.

Enums§

GateError
Errors returned when a gate rejects an admission.
GateVariant
Which gate variant produced a receipt.

Traits§

WriteGate
Core admission gate trait for vector writes.

Functions§

synthetic_payloads
Generate a deterministic synthetic dataset for benchmarks.