feat(zkvm): wire receipt into ProofBundle + witnex-zkvm CLI#17
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-serializedReceiptintoproof.bytes, with the journal ascommitment.verify_bundle(bundle)— deserializes the receipt, verifies it against the guest image id, and binds it:journal == bundle.commitment == trace.commitment().witnex-zkvmbinary:prove <bundle.json>/verify <bundle.json>— pairs withwitnex demo summarize --out b.jsonto produce a real-proof bundle and check it.Validated on a real Linux box (dev mode)
Receipt now round-trips through
ProofBundleJSON 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
witnexCLI stays structural (no risc0 in the root workspace); real receipt verification is viawitnex-zkvm, built with the rzup toolchain on Linux/macOS/WSL. Dev mode skips STARK generation (warnings are expected).