Skip to content
Open
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
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,24 @@ jobs:
- name: Check recursive constraint artifacts for drift
run: make check-constraints

check-pvm-registry:
name: check PVM ACE registry constants
runs-on: warp-ubuntu-latest-x64-8x
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Cleanup large tools for build space
uses: ./.github/actions/cleanup-runner
- uses: WarpBuilds/rust-cache@9d0cc3090d9c87de74ea67617b246e978735b1a1 # v2.9.1
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Install rust
run: rustup update --no-self-update
- name: Check PVM registry constants for drift (full 10! recompute)
run: make check-pvm-registry

run-examples:
name: run masm examples
runs-on: warp-ubuntu-latest-x64-8x
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#### Changes

- [BREAKING] Factored recursive ACE circuits into per-order and shared sections, generalized the registry infrastructure to arbitrary AIR sets, and added the ten-AIR precompile VM registry. This changes the Miden VM and precompile VM ACE roots, relation digests, circuit shapes, and recursive-proof transcripts ([#3465](https://github.com/0xMiden/miden-vm/pull/3465)).
- [BREAKING] Reduced the precompile STARK relation from 12 AIRs to 10 by merging the chunk/node/sponge and EC point/group stores ([#3464](https://github.com/0xMiden/miden-vm/pull/3464)).

## v0.29.0 (2026-08-04)
Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

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

12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ help:
@printf " make test-core-lib # Test core-lib crate\n"
@printf " make test-verifier # Test verifier crate\n"
@printf " make check-constraints # Check core-lib constraint artifacts\n"
@printf " make check-pvm-registry # Check PVM ACE registry constants\n"
@printf " make regenerate-constraints # Regenerate core-lib constraint artifacts\n"
@printf " make regenerate-pvm-registry # Regenerate PVM ACE registry constants\n"
@printf "\nExamples:\n"
@printf " make test-air test=\"some_test\" # Test specific function\n"
@printf " make test-fast # Fast tests (no proptests/CLI)\n"
Expand All @@ -38,7 +40,7 @@ DOCS_NIGHTLY_TOOLCHAIN ?= nightly
ALL_FEATURES := --all-features

# Workspace-wide test features
WORKSPACE_TEST_FEATURES := concurrent,testing,executable
WORKSPACE_TEST_FEATURES := concurrent,testing,executable,registry-tools
FAST_TEST_FEATURES := concurrent,testing
MIDEN_CRYPTO_FUZZ_TARGETS := smt word merkle merkle_store smt_serde partial_smt mmr crypto aead signatures
MIDEN_SERDE_UTILS_FUZZ_TARGETS := primitives collections string vint64 goldilocks budgeted
Expand Down Expand Up @@ -290,6 +292,14 @@ regenerate-constraints: ## Regenerate the checked-in constraint artifacts (MASM
cargo run --package miden-core-lib --features constraints-tools --bin regenerate-constraints -- --write
cargo run --package miden-core-lib --features constraints-tools --bin regenerate-evaluator -- --write

.PHONY: regenerate-pvm-registry
regenerate-pvm-registry: ## Regenerate the PVM ACE registry constants (~2 min; protocol break)
cargo run --release --package miden-precompiles-prover --features registry-tools --bin pvm-registry-regen -- --write

.PHONY: check-pvm-registry
check-pvm-registry: ## Check the PVM ACE registry constants for drift (full recompute)
cargo run --release --package miden-precompiles-prover --features registry-tools --bin pvm-registry-regen -- --check

.PHONY: check-constraints
check-constraints: ## Check the checked-in constraint artifacts for drift
cargo run --package miden-core-lib --features constraints-tools --bin regenerate-constraints -- --check
Expand Down
12 changes: 10 additions & 2 deletions air/src/ace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,13 @@
mod multi_air;
mod recursive;

pub use multi_air::build_multi_air_ace_circuit_for_order;
pub use recursive::{RecursiveAceCircuit, build_recursive_verifier_ace_circuit};
pub use multi_air::{
FactoredMultiAirCircuit, build_factored_multi_air_ace_circuit,
build_multi_air_ace_circuit_for_order,
};
#[cfg(feature = "std")]
pub(crate) use recursive::shared_recursive_factory;
pub use recursive::{
RecursiveAceCircuit, RecursiveAceCircuitFactory, RecursiveRegistryEntry,
build_recursive_verifier_ace_circuit, recursive_registry_entry,
};
54 changes: 49 additions & 5 deletions air/src/ace/multi_air.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,63 @@
use alloc::vec::Vec;

use miden_ace_codegen::{AceCircuit, AceConfig, AceError, build_multi_air_ace_circuit};
use miden_ace_codegen::{AceCircuit, AceConfig, AceError, InputLayout};
use miden_core::field::QuadFelt;

use crate::{AIRS, HandwrittenMidenAir, ProofOrder};

/// Per-AIR preprocessed, main, and aux regions are padded to this width before concatenation.
const LMCS_ALIGNMENT: usize = 8;

/// Builds the Miden multi-AIR ACE circuit for the supplied proof order.
///
/// The assembled circuit evaluates the proof-order Horner fold of the per-AIR alpha-folded
/// constraint roots. It is the factored form: a per-order shuffle section routing the
/// proof-order READ slots (and fold coefficients) into canonical wires, followed by the
/// order-invariant common section.
pub fn build_multi_air_ace_circuit_for_order(
config: AceConfig,
order: &ProofOrder,
) -> Result<AceCircuit<QuadFelt>, AceError> {
const LMCS_ALIGNMENT: usize = 8;
build_factored_multi_air_ace_circuit(config)?.circuit_for_order(order)
}

let airs = AIRS.map(HandwrittenMidenAir);
let proof_order: Vec<usize> = order.airs().iter().map(|air| air.instance_index()).collect();
/// Factored Miden multi-AIR circuit: canonical common section plus per-order shuffle assembly.
#[derive(Debug, Clone)]
pub struct FactoredMultiAirCircuit {
inner: miden_ace_codegen::FactoredMultiAirCircuit<QuadFelt>,
}

impl FactoredMultiAirCircuit {
/// Return the input layout shared by every proof order.
pub fn layout(&self) -> &InputLayout {
self.inner.layout()
}

/// Number of shuffle-section ops (also the section length in stream felts).
pub fn num_shuffle_ops(&self) -> usize {
self.inner.num_shuffle_ops()
}

build_multi_air_ace_circuit(&airs, &proof_order, config, LMCS_ALIGNMENT)
/// Assemble the full circuit for one proof order.
pub fn circuit_for_order(&self, order: &ProofOrder) -> Result<AceCircuit<QuadFelt>, AceError> {
let proof_order: Vec<usize> = order.airs().iter().map(|air| air.instance_index()).collect();
self.inner.circuit_for_order(&proof_order)
}

/// Unwrap into the generic ace-codegen composition (for [`FactoredCircuitFactory`]).
///
/// [`FactoredCircuitFactory`]: miden_ace_codegen::FactoredCircuitFactory
pub(crate) fn into_inner(self) -> miden_ace_codegen::FactoredMultiAirCircuit<QuadFelt> {
self.inner
}
}

/// Build the canonical Miden multi-AIR composition and lower it into the factored form.
pub fn build_factored_multi_air_ace_circuit(
config: AceConfig,
) -> Result<FactoredMultiAirCircuit, AceError> {
let airs = AIRS.map(HandwrittenMidenAir);
let inner =
miden_ace_codegen::build_factored_multi_air_ace_circuit(&airs, config, LMCS_ALIGNMENT)?;
Ok(FactoredMultiAirCircuit { inner })
}
Loading
Loading