Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a4e9c7c
feat(prover): add composable prover interface
adr1anh Jul 29, 2026
69cd025
refactor(verifier): simplify proof verification
adr1anh Jul 29, 2026
e914e93
refactor(prover): finalize composable proof lifecycle
adr1anh Jul 30, 2026
e27dbd8
refactor(prover): streamline public proving API
adr1anh Jul 30, 2026
8d303a7
feat(core): add mergeable precompile witnesses
adr1anh Jul 31, 2026
bbcde26
feat(core): represent deferred execution proofs
adr1anh Jul 31, 2026
b02e6a1
refactor(prover): support deferred and full proving
adr1anh Jul 31, 2026
4b1b636
feat(verifier): verify deferred execution proofs
adr1anh Jul 31, 2026
ade1d07
refactor(vm): migrate deferred proof workflows
adr1anh Jul 31, 2026
703e47e
docs: simplify prover API documentation
adr1anh Jul 31, 2026
181ee48
refactor(proof): clarify deferred verification semantics
adr1anh Jul 31, 2026
084745d
refactor(processor): privatize trace replay
adr1anh Jul 31, 2026
f9cb1ed
refactor(processor): aggregate execution witnesses
adr1anh Jul 31, 2026
8a3c205
refactor(processor): rename materialized VM trace
adr1anh Jul 31, 2026
c2a9889
refactor(processor): rename execution-for-proving API
adr1anh Jul 31, 2026
c546565
refactor(prover): converge witness and trace proving
adr1anh Jul 31, 2026
2b238ad
chore(processor): format replay refactor
adr1anh Jul 31, 2026
303955d
refactor(vm): migrate composable proof lifecycle
adr1anh Jul 31, 2026
3f01949
chore(core): remove redundant proof clone
adr1anh Jul 31, 2026
12a83bf
chore: untrack prover API planning docs
adr1anh Aug 1, 2026
23e252d
docs: finalize prover API review
adr1anh Aug 1, 2026
a17cbf3
fix(prover): reconcile canonical execution claims
adr1anh Aug 3, 2026
cf74ad4
docs: clean up rebased prover API history
adr1anh Aug 3, 2026
ac6b5e4
fix(vm): stabilize rebased proving checks
adr1anh Aug 3, 2026
a09439b
fix(verifier): preserve deferred recursive fixtures
adr1anh Aug 3, 2026
7e9dccf
fix(prover): address API review feedback
adr1anh Aug 4, 2026
74a5bed
fix(core): bound aggregate precompile resources
adr1anh Aug 4, 2026
9a73f2b
Merge remote-tracking branch 'origin/next' into adr1anh/prover-api
adr1anh Aug 4, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/blake3-nonregression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ on:
default: "200,15,3"
type: string
bench_axes:
description: "Comma-separated axes: all, execute_trace_inputs_sync, build_trace, prove_trace_sync, e2e_prove."
description: "Comma-separated axes: all, execute_for_proving_sync, build_trace, prove_trace_sync, e2e_prove."
required: false
default: "all"
type: string
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@
- [BREAKING] Removed unused public APIs and narrowed test-only helper visibility across VM and crypto crates ([#3424](https://github.com/0xMiden/miden-vm/pull/3424)).
- Enable simd128 Plonky3 backend for WASM builds and added related CI job ([#3433](https://github.com/0xMiden/miden-vm/pull/3433)).
- [BREAKING] Bumped Plonky3 related dependencies to integrate SVE2 and WASM-SIMD128 speed-ups and include a NEON bugfix. ([#3441](https://github.com/0xMiden/miden-vm/pull/3441)).
- [BREAKING] Superseded the preceding unreleased partial-proof and configurable-verifier APIs with
checked `ExecutionWitness` and `VmWitness` artifacts, VM-first `Prover` methods,
deferred/complete `ExecutionProof` states, and borrowed verification that reports any
authenticated outstanding precompile root. The intermediate `prove_partial*`,
`Verifier::verify_partial`, and `Verifier::with_max_deferred_elements` APIs were removed. Proof
encoding preserves representation without establishing validity, with standard and
custom-registry decode paths carrying deferred-element bounds. A deferred proof retains a
hydrated `PrecompileWitness`; `DeferredStateWire` is its transport representation, not the
in-memory proof payload. See the PR description for the complete migration guide
([#3437](https://github.com/0xMiden/miden-vm/pull/3437)).

#### Fixes

Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

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

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ RAYON_NUM_THREADS=16 cargo run --profile optimized -p miden-vm-blake3-bench --bi
--git-ref "$(git rev-parse HEAD)"
```

The result is written to `target/blake3-nonregression/result.json`; the harness does not parse the `miden-vm run` or `miden-vm prove` text output. The benchmark records `execute_trace_inputs_sync`, `build_trace`, `prove_trace_sync`, and `e2e_prove`. The `e2e_prove` metric runs execution and trace generation on each sample, but only measures the prover span. The harness also proves and verifies the program once before timing proof-heavy axes.
The result is written to `target/blake3-nonregression/result.json`; the harness does not parse
the `miden-vm run` or `miden-vm prove` text output. The benchmark records
`execute_for_proving_sync`, `build_trace`, `prove_trace_sync`, and `e2e_prove`. The `e2e_prove`
metric runs execution and trace generation on each sample, but only measures the prover span. The
harness also proves and verifies the program once before timing proof-heavy axes.

### Single-core prover performance

Expand Down
30 changes: 15 additions & 15 deletions benches/blake3-bench/benches/blake3_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ use std::{hint::black_box, time::Duration};
use codspeed_criterion_compat as criterion;
use criterion::{BatchSize, Criterion, SamplingMode, criterion_group, criterion_main};
use miden_vm_blake3_bench::{
BENCH_GROUP, Blake3Fixture, build_trace, execute_program, execute_trace_inputs,
BENCH_GROUP, Blake3Fixture, build_trace, execute_for_proving, execute_program,
prove_and_verify_once, prove_span_duration, prove_trace, repo_root_from_manifest,
};

const ALL_AXES: [&str; 5] = [
"execute_sync",
"execute_trace_inputs_sync",
"execute_for_proving_sync",
"build_trace",
"prove_trace_sync",
"e2e_prove",
];
const PROOF_AXES: [&str; 2] = ["e2e_prove", "prove_trace_sync"];
const LIGHT_AXES: [&str; 3] = ["execute_sync", "execute_trace_inputs_sync", "build_trace"];
const LIGHT_AXES: [&str; 3] = ["execute_sync", "execute_for_proving_sync", "build_trace"];

fn env_usize(name: &str, default: usize) -> usize {
match std::env::var(name) {
Expand Down Expand Up @@ -55,7 +55,7 @@ fn resolve_axes() -> Vec<&'static str> {
"all" => requested.extend(ALL_AXES),
"e2e_prove" | "prove" | "prove_program_sync" => requested.push("e2e_prove"),
"execute_sync" => requested.push("execute_sync"),
"execute_trace_inputs_sync" => requested.push("execute_trace_inputs_sync"),
"execute_for_proving_sync" => requested.push("execute_for_proving_sync"),
"prove_trace_sync" => requested.push("prove_trace_sync"),
"build_trace" => requested.push("build_trace"),
_ => panic!(
Expand Down Expand Up @@ -116,10 +116,10 @@ fn blake3_bench(c: &mut Criterion) {
if has_axis(&axes, "prove_trace_sync") {
group.bench_function("prove_trace_sync", |b| {
b.iter_batched(
|| execute_trace_inputs(&fixture),
|trace_inputs| {
let trace_inputs = black_box(trace_inputs);
prove_trace(trace_inputs);
|| execute_for_proving(&fixture),
|execution_witness| {
let execution_witness = black_box(execution_witness);
prove_trace(execution_witness);
},
BatchSize::SmallInput,
);
Expand Down Expand Up @@ -151,11 +151,11 @@ fn blake3_bench(c: &mut Criterion) {
});
}

if has_axis(&axes, "execute_trace_inputs_sync") {
group.bench_function("execute_trace_inputs_sync", |b| {
if has_axis(&axes, "execute_for_proving_sync") {
group.bench_function("execute_for_proving_sync", |b| {
b.iter_batched(
|| fixture.clone(),
|fixture| black_box(execute_trace_inputs(&fixture)),
|fixture| black_box(execute_for_proving(&fixture)),
BatchSize::SmallInput,
);
});
Expand All @@ -164,10 +164,10 @@ fn blake3_bench(c: &mut Criterion) {
if has_axis(&axes, "build_trace") {
group.bench_function("build_trace", |b| {
b.iter_batched(
|| execute_trace_inputs(&fixture),
|trace_inputs| {
let trace_inputs = black_box(trace_inputs);
build_trace(trace_inputs);
|| execute_for_proving(&fixture),
|execution_witness| {
let execution_witness = black_box(execution_witness);
build_trace(execution_witness);
},
BatchSize::SmallInput,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn select_primary_metric(
PRIMARY_METRIC,
"prove_trace_sync",
"build_trace",
"execute_trace_inputs_sync",
"execute_for_proving_sync",
"execute_sync",
]
.into_iter()
Expand Down Expand Up @@ -153,9 +153,9 @@ pub(crate) fn selected_criterion_axes(bench_axes: &str) -> Option<BTreeSet<Strin

fn report_span_metric_name(name: &str) -> Option<String> {
match name {
"execute_trace_inputs_with_package_debug_info_sync"
| "execute_trace_inputs_with_package_debug_info_at_source_node_sync" => {
Some("execute_trace_inputs_sync".to_string())
"execute_for_proving_with_package_debug_info_sync"
| "execute_for_proving_with_package_debug_info_at_source_node_sync" => {
Some("execute_for_proving_sync".to_string())
},
"build aux traces" => Some("build_aux_trace".to_string()),
"to_core_chiplets_matrices" => Some("to_row_major_matrix".to_string()),
Expand Down
55 changes: 26 additions & 29 deletions benches/blake3-bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ use std::{

use miden_core_lib::CoreLibrary;
use miden_vm::{
Assembler, DefaultHost, ExecutionOptions, FastProcessor, HashFunction, Program, ProvingOptions,
StackInputs, TraceBuildInputs, TraceProvingInputs, Verifier,
Assembler, DefaultHost, ExecutionOptions, ExecutionWitness, FastProcessor, HashFunction,
Program, Prover, StackInputs, Verifier,
advice::AdviceInputs,
assembly::{
DefaultSourceManager, Path as LibraryPath,
ast::{Module, ModuleKind},
package::debug_info::{DebugSourceNodeId, PackageDebugInfo},
},
internal::InputFile,
prove_from_trace_sync, trace,
trace,
};
use serde::{Deserialize, Serialize};
use tracing::{Subscriber, span};
Expand Down Expand Up @@ -89,10 +89,6 @@ pub fn execution_options() -> ExecutionOptions {
.expect("CLI-compatible Blake3 execution options should be valid")
}

pub fn proving_options() -> ProvingOptions {
ProvingOptions::with_96_bit_security(HashFunction::Blake3_256)
}

pub fn default_host() -> DefaultHost {
DefaultHost::default()
.with_library(&CoreLibrary::default())
Expand All @@ -103,7 +99,7 @@ fn host_for_fixture(fixture: &Blake3Fixture) -> DefaultHost<DefaultSourceManager
default_host().with_source_manager(fixture.source_manager.clone())
}

pub fn execute_trace_inputs(fixture: &Blake3Fixture) -> TraceBuildInputs {
pub fn execute_for_proving(fixture: &Blake3Fixture) -> ExecutionWitness {
let mut host = host_for_fixture(fixture);
let processor = FastProcessor::new_with_options(
fixture.stack_inputs,
Expand All @@ -113,22 +109,22 @@ pub fn execute_trace_inputs(fixture: &Blake3Fixture) -> TraceBuildInputs {
.expect("processor advice inputs should fit advice map limits");
match (fixture.debug_info.as_ref(), fixture.entrypoint_source_node) {
(Some(debug_info), Some(entrypoint_source_node)) => processor
.execute_trace_inputs_with_package_debug_info_at_source_node_sync(
.execute_for_proving_with_package_debug_info_at_source_node_sync(
&fixture.program,
debug_info,
entrypoint_source_node,
&mut host,
)
.expect("failed to execute Blake3 benchmark"),
(Some(debug_info), None) => processor
.execute_trace_inputs_with_package_debug_info_sync(
.execute_for_proving_with_package_debug_info_sync(
&fixture.program,
debug_info,
&mut host,
)
.expect("failed to execute Blake3 benchmark"),
(None, _) => processor
.execute_trace_inputs_sync(&fixture.program, &mut host)
.execute_for_proving_sync(&fixture.program, &mut host)
.expect("failed to execute Blake3 benchmark"),
}
}
Expand All @@ -148,36 +144,37 @@ pub fn execute_program(fixture: &Blake3Fixture) {

pub fn prove_program(fixture: &Blake3Fixture) {
let _span = tracing::info_span!("prove_program_sync").entered();
prove_trace(execute_trace_inputs(fixture));
prove_trace(execute_for_proving(fixture));
}

pub fn prove_trace(trace_inputs: TraceBuildInputs) {
let _ = prove_trace_outputs(trace_inputs);
pub fn prove_trace(witness: ExecutionWitness) {
let _ = prove_trace_outputs(witness);
}

pub fn prove_and_verify_once(fixture: &Blake3Fixture) {
let stack_inputs = fixture.stack_inputs;
let trace_inputs = execute_trace_inputs(fixture);
let (stack_outputs, proof) = prove_trace_outputs(trace_inputs);
let claim = miden_vm::ExecutionClaim::from_program_info(
fixture.program.to_info(),
stack_inputs,
stack_outputs,
);
Verifier::new()
.verify(proof, claim)
let witness = execute_for_proving(fixture);
let claim = witness.claim();
let (_, proof) = prove_trace_outputs(witness);
let outcome = Verifier::new()
.verify(&claim, &proof)
.expect("failed to verify Blake3 benchmark proof");
assert!(outcome.is_complete(), "prove_full must settle all precompile work");
}

fn prove_trace_outputs(
trace_inputs: TraceBuildInputs,
witness: ExecutionWitness,
) -> (miden_vm::StackOutputs, miden_vm::ExecutionProof) {
prove_from_trace_sync(TraceProvingInputs::new(trace_inputs, proving_options()))
.expect("failed to prove Blake3 benchmark trace")
let stack_outputs = *witness.claim().stack_outputs();
let proof = Prover::new()
.with_hash_fn(HashFunction::Blake3_256)
.prove_full(witness)
.expect("failed to prove Blake3 benchmark witness");
(stack_outputs, proof)
}

pub fn build_trace(trace_inputs: TraceBuildInputs) {
trace::build_trace(trace_inputs).expect("failed to build Blake3 execution trace");
pub fn build_trace(witness: ExecutionWitness) {
let (vm_witness, _) = witness.into_parts();
trace::build_trace(vm_witness).expect("failed to build Blake3 execution trace");
}

#[derive(Clone, Debug, Serialize, Deserialize)]
Expand Down
1 change: 0 additions & 1 deletion benches/synthetic-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ codspeed-criterion-compat = { workspace = true }
miden-assembly = { workspace = true, features = ["std"] }
miden-core = { workspace = true, features = ["std"] }
miden-core-lib = { workspace = true, features = ["std"] }
miden-prover = { workspace = true, features = ["concurrent"] }
miden-utils-testing = { workspace = true, features = ["std"] }

[[bench]]
Expand Down
Loading
Loading