Skip to content

feat(bench): benchmark MockChain transactions - #1350

Draft
djolertrk wants to merge 5 commits into
nextfrom
feat/contract-benchmark
Draft

djolertrk wants to merge 5 commits into
nextfrom
feat/contract-benchmark

Conversation

@djolertrk

Copy link
Copy Markdown
Collaborator

It depends on the 0xMiden/miden-debug#127

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Miden examples benchmark

Candidate 840006ab0cfd compared with next 62c4318f44f2. Lower is better.

example VM cycles (vs next) MAST size (vs next)
auth-component-no-auth 7,459 (~0%) 6,300B (~0%)
auth-component-rpo-falcon512 80,179 (~0%) 12,654B (~0%)
basic-wallet 81,696 (~0%) 7,982B (~0%)
basic-wallet-tx-script 83,356 (~0%) 13,556B (~0%)
collatz 5,263 (~0%) 2,401B (~0%)
counter-contract 85,387 (~0%) 13,099B (~0%)
counter-note 85,387 (~0%) 3,197B (~0%)
fibonacci 869 (~0%) 3,219B (~0%)
is-prime 2,332,731 (~0%) 5,864B (~0%)
p2id-note 81,696 (~0%) 17,024B (~0%)
p2id-tx-script 85,331 (~0%) 11,455B (~0%)
p2ide-note 82,099 (~0%) 13,103B (~0%)
storage-example 82,688 (~0%) 15,249B (~0%)

SVG flamegraphs, replay snapshots, and compiled packages are attached to the workflow run.

@djolertrk
djolertrk marked this pull request as ready for review August 24, 2026 13:03
@djolertrk

Copy link
Copy Markdown
Collaborator Author

hey @greenhat @bitwalker. how does this look to you? :)

@greenhat greenhat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!
Please make a task in the Makefile.toml to run the benchmark suitable for agent consumption (stdout only, no report file, no github comments, etc.).
As a side note, could you please skip posting github comment if there are no changes in size or cycles?

asset_qty_map: StorageMap<Word, AssetAmount>,
}

impl foo::Guest for MyAccount {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to leave the storage example as is since it is intended to demonstrate the "escape hatch" of providing your own WIT file for power users.

@djolertrk

Copy link
Copy Markdown
Collaborator Author

As a side note, could you please skip posting github comment if there are no changes in size or cycles?

Yes, it does make sense

@djolertrk

Copy link
Copy Markdown
Collaborator Author

I added:

  • cargo make bench-agent (@greenhat is it a good name?)
  • CI now skips PR comments when no changes
  • addressed the rest

@djolertrk
djolertrk force-pushed the feat/contract-benchmark branch from ba8d343 to 96ae4c1 Compare August 28, 2026 10:30
@djolertrk
djolertrk force-pushed the feat/contract-benchmark branch from 96ae4c1 to 572d493 Compare August 28, 2026 10:55
@djolertrk
djolertrk marked this pull request as draft August 31, 2026 07:52
@djolertrk

Copy link
Copy Markdown
Collaborator Author

The 0xMiden/miden-debug#127 is merged and the new debugger is released, but we need to wait for compiler to be ported to the new vm v0.30.

@greenhat

Copy link
Copy Markdown
Contributor

I added:

  • cargo make bench-agent (@greenhat is it a good name?)

Yep, it's fine.

  • CI now skips PR comments when no changes
  • addressed the rest

Great! Thank you!

@greenhat
greenhat self-requested a review August 31, 2026 12:15
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.

2 participants