Open
Conversation
huitseeker
approved these changes
Apr 23, 2026
Collaborator
huitseeker
left a comment
There was a problem hiding this comment.
Thanks a lot, this looks great! I added a commit that improves how the snapshot test catches wrong, missing, or extra committed JSON files.
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.
Purpose:
Adds a new benchmark crate under
benches/synthetic-tx-kernel/that reproduces the proving-cost brackets of a real Miden transaction from a small JSON snapshot, without pulling in any protocol-level code. The result is a VM-level regression detector that isolates prover changes from workload changes: when you change the VM, the bench moves; when protocol changes its transaction kernel, miden-vm's bench stays put until a new snapshot is explicitly refreshed.This is a simplified variant of the approach originally prototyped in 0xMiden/protocol#2391. The key simplification: instead of maintaining a fused cross-repo benchmark that depends on protocol's transaction machinery at runtime, we row counts and emit an equivalent synthetic MASM program on the
miden-vmside. The two repos stay loosely coupled via a hand-maintained schema, andmiden-vm's bench has no runtime dependency onprotocol.The snapshot producer lives in a companion protocol PR (
bin/bench-transaction/src/bin/tx-trace-snapshot.rs).How it works
Per bench run:
begin ... endMASM program, verify it lands in the target padded-trace brackets (padded_core_sideandpadded_chiplets), then runexecute+execute_and_proveCriterion groups.A bracket miss fails the bench; sub-bracket drift is reported but tolerated because proving cost is driven by padded trace length, not raw row count.
Validations
Wall-clock prove times against protocol's real
bench-transactionprove benches:consume-single-p2idconsume-two-p2id