This crate provides performance benchmarks for the check_notes_consumability function in the Miden transaction executor.
The primary benchmark (mixed_successful_and_failing_notes) tests a scenario with:
- 1 successful note (P2ID note that can be consumed)
- N failing notes (notes that cause division by zero errors)
- 1 more successful note (another P2ID note that can be consumed)
This pattern tests the worst-case scenario for the iterative elimination algorithm:
- First iteration: Executes two notes → first successful note passes, first failing note fails.
- Subsequent iterations: Progressively eliminates failing notes one by one.
- Final iteration: Successfully executes the two valid notes together.
The benchmark varies N (number of failing notes) to measure how performance scales with the number of elimination iterations required.
To run only the criterion benchmarks:
cargo bench -p bench-note-checker --bench benchesor
make bench-note-checkerThis project is MIT licensed.