Skip to content

PVM MASM verifier - #3467

Open
Al-Kindi-0 wants to merge 9 commits into
al/pvm-ace-registry-pr2from
al/pvm-masm-verifier
Open

PVM MASM verifier#3467
Al-Kindi-0 wants to merge 9 commits into
al/pvm-ace-registry-pr2from
al/pvm-masm-verifier

Conversation

@Al-Kindi-0

@Al-Kindi-0 Al-Kindi-0 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This PR adds a MASM verifier for recursively verifying PVM STARK proofs inside the Miden VM.

As an integration example, the PR shows how this verifier can settle a deferred computation: a Miden program requests a PVM proof for its deferred claim and verifies that proof when the host makes it available.

What changed

  • Add miden::core::sys::pvm::verify_proof.
  • Represent the PVM statement as DeferredClaim and support an MVM-to-PVM flow: verify an MVM proof, request the PVM proof for its authenticated deferred claim, install the returned advice package, and verify the PVM proof against the same claim.
  • Add mixed MVM/PVM recursive-verification benchmarks.

Performance

For the canonical 100-Keccak/4-ECDSA proof, the optimized MASM verifier uses 53,307 cycles and 136,240 Poseidon2 rows.

The mixed recursive benchmark places one PVM proof slightly below three synthetic transaction proofs for this workload:

Workload Proving time
4 MVM + 1 PVM 5.06 s
7 MVM 5.14 s
5 MVM + 1 PVM 5.11 s
8 MVM 6.79 s

@Al-Kindi-0
Al-Kindi-0 changed the base branch from next to al/pvm-ace-registry-pr2 August 4, 2026 23:24
@Al-Kindi-0
Al-Kindi-0 force-pushed the al/pvm-masm-verifier branch from 5bcae0b to 366a5b4 Compare August 5, 2026 22:29
@Al-Kindi-0
Al-Kindi-0 force-pushed the al/pvm-masm-verifier branch from 366a5b4 to 8136b04 Compare August 6, 2026 06:14
@Al-Kindi-0
Al-Kindi-0 marked this pull request as ready for review August 6, 2026 12:08
@Al-Kindi-0
Al-Kindi-0 force-pushed the al/pvm-masm-verifier branch from 8136b04 to 37bc3c2 Compare August 7, 2026 11:19
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

This PR contains unsigned commits. All commits must be cryptographically signed (GPG or SSH).

Unsigned commits:

  • b8f5f0b0 feat(core-lib): add recursive PVM proof verification
  • a4f4a4bf feat(core-lib): support awaited PVM proof settlement
  • 19172650 refactor(deferred): represent PVM proofs with explicit claims
  • fa8b3d39 test(core-lib): verify recursive AIR selectors
  • 72573ba5 perf(core-lib): optimize generic proof-order tag derivation
  • 73ec5290 Precompute factorials for generic proof-order tags
  • 610650fe perf(core-lib): batch PVM public-input transcript absorption
  • b9e831a7 perf(core-lib): optimize PVM auxiliary-boundary folding
  • 37bc3c2f Benchmark mixed MVM and PVM recursive verification

For instructions on setting up commit signing and re-signing existing commits, see:
https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

@Al-Kindi-0
Al-Kindi-0 force-pushed the al/pvm-masm-verifier branch from 37bc3c2 to f152c5f Compare August 7, 2026 11:29
- add sys::pvm::verify_proof and its Poseidon2 host-input adapter
- extract relation-independent STARK verifier logic for MVM and PVM wrappers
- generate and authenticate the factored PVM ACE evaluator with four quotient chunks
- define relation-local memory layouts and guard them against overlap
- pin transcript, PCS, circuit, and proof-order contracts with cross-language tests
- verify MVM and PVM proofs can execute safely in the same program
- share proof-request addressing and security outputs across recursive verifiers
- let async hosts install PVM proof packages for authenticated deferred roots
- test MVM-to-PVM ECDSA settlement and harden verifier input handling
- split the height scan to remove redundant comparisons
- reduce PVM verification by 2,431 cycles without scratch memory
- cover AIR counts 2–12, u32 boundaries, stable ties, and cycle regressions
compare 4 MVM + 1 PVM and 5 MVM + 1 PVM against 7 and 8 MVM proofs
using the canonical 100-Keccak/4-ECDSA PVM proof
@Al-Kindi-0
Al-Kindi-0 force-pushed the al/pvm-masm-verifier branch from f152c5f to e1ed817 Compare August 7, 2026 20:04
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