Miden verifier
This crate contains a light-weight verifier for proofs of program execution generated by Miden VM.
While the Miden crate also contains verifier functionality, this crate may be more appropriate for projects that only need verification.
Usage
Use Verifier::new().verify(&claim, &proof) to verify a deferred or complete ExecutionProof
against its ExecutionClaim. The claim contains the program information and public stack inputs and
outputs. The VM STARK authenticates the precompile root in either state. For a deferred proof, the
passive wire is neither hydrated nor validated and the outcome exposes only the authenticated root;
for a complete proof, the aggregate precompile STARK is also verified when present.
Use Verifier::new().verify_precompile(&proof, expected_root) to validate a PrecompileProof
without first attaching it to an execution proof. It checks the expected-root membership and full
ordered aggregate statement, verifies the precompile STARK, and returns its security level.
Stack inputs are in push order (the last value is on top), while stack outputs are in pop order (the first value is on top).
Verifier::verify returns a VerificationOutcome. Its security_level() is the minimum security
level among the STARK components actually verified. Deferred verification exposes the authenticated
obligation through outstanding_precompile_root(); complete verification returns no outstanding
root. See the deferred-proof semantics for artifact,
transport, and fixed-limit policy.
Crate features
Miden verifier can be compiled with the following features:
std- enabled by default and relies on the Rust standard library.no_stddoes not rely on the Rust standard library and enables compilation to WebAssembly.- Only the
wasm32-unknown-unknownandwasm32-wasip1targets are officially supported.
- Only the
To compile with no_std, disable default features via --no-default-features flag.
License
This project is dual-licensed under the MIT and Apache 2.0 licenses.