Skip to content
Draft
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
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
CHANGELOG.md merge=union
CHANGELOG.md merge=union
bin/bench-transaction/bench-tx.json linguist-generated=true
Cargo.lock linguist-generated=true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

### Changes

- Keyed `bench-tx.json`'s per-note cycle counts by note label instead of note commitment, and added `total_cycles` to each scenario ([#3726](https://github.com/0xMiden/protocol/pull/3726)).
- [BREAKING] Refactored `AccountVaultDelta` to track generic assets. `FungibleAssetDelta`, `NonFungibleAssetDelta` and `NonFungibleDeltaAction` were removed ([3485](https://github.com/0xMiden/protocol/pull/3485)).
- [BREAKING] Moved the internal shared helpers of `miden::protocol::input_note`, `miden::protocol::active_note`, and the note memory-write helpers into private `input_note_internal` and `note_internal` modules ([#3501](https://github.com/0xMiden/protocol/pull/3501)).
- [BREAKING] Changed asset callbacks into validation-only interfaces that return no asset value; the transaction kernel retains and uses the original value, preventing callbacks from modifying it. The kernel commitment changes ([#3505](https://github.com/0xMiden/protocol/issues/3505), [#3513](https://github.com/0xMiden/protocol/pull/3513)).
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

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

1 change: 0 additions & 1 deletion bin/bench-transaction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ tokio = { optional = true, workspace = true }

[dev-dependencies]
criterion = { features = ["async_tokio", "html_reports"], workspace = true }
rstest = { workspace = true }
8 changes: 6 additions & 2 deletions bin/bench-transaction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Regenerate the tables (and `bench-tx.json`) with:
make update-note-costs
```

Freshness is enforced in CI: the `checked_in_cost_matches_benched_cycles` snapshot tests in `src/note_costs.rs` re-execute every priced scenario during the regular test run and fail when a measured cost drifts more than 5% from its checked-in constant. Drift within the tolerance (from unrelated changes landing on the base branch) is absorbed without regeneration - fee-wise this is safe, since the fee is logarithmic in cycles and the pricing safety margin dwarfs it. A PR that meaningfully changes cycle counts must run `make update-note-costs` and commit the updated tables - which doubles as review signal, since cost regressions show up as table diffs.
Freshness is enforced in CI: the `checked_in_note_costs_match_executed_scenarios` snapshot test in `src/note_costs.rs` re-executes every priced scenario during the regular test run and fails when a measured cost drifts more than 5% from its checked-in constant, or when a note's declared `created_notes` do not match what its scenarios actually create. It walks `PricedNote::all` - so all priced notes are covered. Drift within the tolerance (from unrelated changes landing on the base branch) is absorbed without regeneration - fee-wise this is safe, since the fee is logarithmic in cycles and the pricing safety margin dwarfs it. A PR that meaningfully changes cycle counts must run `make update-note-costs` and commit the updated tables - which doubles as review signal, since cost regressions show up as table diffs.

### Benchmark Groups

Expand All @@ -49,8 +49,12 @@ Each of the above transactions is measured in two groups:

For each transaction, data is collected on the number of cycles required to complete:
- Prologue
- `total_cycles`: the sum of the prologue, notes-processing, tx-script and epilogue intervals,
and the figure the cost tables above are derived from
- All notes processing
- Each note execution
- Each note execution, in consumption order and labelled by note kind (`P2ID`, or `P2ID#0` /
`P2ID#1` when a scenario consumes several notes of one kind). Notes whose script is neither a
standard nor an agglayer one are labelled `UNKNOWN`.
- Transaction script processing
- Epilogue:
- Total number of cycles
Expand Down
Loading
Loading