Skip to content

feat(zkvm): wire receipt into ProofBundle + witnex-zkvm CLI#17

Merged
MoonZagallo merged 1 commit into
WitnexCorp:mainfrom
MoonZagallo:feat/zkvm-bundle
Jun 19, 2026
Merged

feat(zkvm): wire receipt into ProofBundle + witnex-zkvm CLI#17
MoonZagallo merged 1 commit into
WitnexCorp:mainfrom
MoonZagallo:feat/zkvm-bundle

Conversation

@MoonZagallo

Copy link
Copy Markdown
Contributor

Summary

Wire the Risc0 receipt into the bundle and add a real prover/verifier CLI.

  • zkvm/host:
    • attach_proof(bundle) — proves the bundle's trace and embeds the bincode-serialized Receipt into proof.bytes, with the journal as commitment.
    • verify_bundle(bundle) — deserializes the receipt, verifies it against the guest image id, and binds it: journal == bundle.commitment == trace.commitment().
  • New witnex-zkvm binary: prove <bundle.json> / verify <bundle.json> — pairs with witnex demo summarize --out b.json to produce a real-proof bundle and check it.

Validated on a real Linux box (dev mode)

$ cd zkvm && RISC0_DEV_MODE=1 cargo test --workspace
test tests::prove_then_verify_recovers_commitment ... ok
test tests::bundle_roundtrips_through_json_and_verifies ... ok
test tests::tampered_trace_fails_bundle_verification ... ok
test result: ok. 3 passed; 0 failed

Receipt now round-trips through ProofBundle JSON and verifies; a forged trace is rejected. The release build (real-proof profile) also compiles clean (~4m on a 1-core box); a full non-dev STARK run is heavy and left to run on demand.

Scope

The main witnex CLI stays structural (no risc0 in the root workspace); real receipt verification is via witnex-zkvm, built with the rzup toolchain on Linux/macOS/WSL. Dev mode skips STARK generation (warnings are expected).

- host: attach_proof() proves a bundle trace and embeds the bincode-
  serialized receipt in proof.bytes; verify_bundle() checks the receipt
  against the guest image id and binds journal == bundle.commitment ==
  trace.commitment()
- new `witnex-zkvm` binary: `prove <bundle.json>` / `verify <bundle.json>`
  (real receipt), pairs with the main `witnex demo summarize` output
- dev-mode tests: bundle JSON round-trip verifies; tampered trace rejected
@MoonZagallo MoonZagallo merged commit 4673235 into WitnexCorp:main Jun 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant