Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 16 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ thiserror = "2"
# CLI
clap = { version = "4", features = ["derive"] }
colored = "3"
indicatif = "0.17"
indicatif = "0.18"

# Logging
tracing = "0.1"
Expand Down Expand Up @@ -67,7 +67,7 @@ uuid = { version = "1", features = ["v4", "serde"] }
lazy_static = "1"

# VeriSimDB integration (optional — behind "verisim" feature)
serde_cbor = { version = "0.11", optional = true }
ciborium = { version = "0.2", optional = true }
sha2 = { version = "0.10", optional = true }

# Chrono for timestamps
Expand All @@ -86,7 +86,7 @@ typed-wasm = { path = "crates/typed_wasm" }
default = []
chapel = [] # Enable Chapel parallel proof search (requires Zig FFI library)
verisim = [ # Enable VeriSimDB persistent proof storage (8-modality octads)
"dep:serde_cbor",
"dep:ciborium",
"dep:sha2",
]
# Enable the live-prover test suite (tests/live_prover_suite.rs). Gated so that
Expand Down
6 changes: 4 additions & 2 deletions src/rust/proof_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ use crate::provers::ProverKind;
/// - Self-describing (VeriSimDB can introspect without schema)
/// - Matches VeriSimDB's semantic modality expectation
pub fn encode_proof_state_cbor(proof: &ProofState) -> Result<Vec<u8>> {
serde_cbor::to_vec(proof).context("Failed to CBOR-encode ProofState")
let mut buf = Vec::new();
ciborium::into_writer(proof, &mut buf).context("Failed to CBOR-encode ProofState")?;
Ok(buf)
}

/// Decode a ProofState from CBOR bytes.
pub fn decode_proof_state_cbor(bytes: &[u8]) -> Result<ProofState> {
serde_cbor::from_slice(bytes).context("Failed to CBOR-decode ProofState")
ciborium::from_reader(bytes).context("Failed to CBOR-decode ProofState")
}

/// Generate a stable, content-addressed proof identity for use as a VeriSimDB octad key.
Expand Down
Loading