Skip to content

chore(ntx-builder): add large account benchmark - #2440

Open
SantiagoPittella wants to merge 1 commit into
nextfrom
santiagopittella-benchmark-ntx-builder-large-accounts
Open

chore(ntx-builder): add large account benchmark#2440
SantiagoPittella wants to merge 1 commit into
nextfrom
santiagopittella-benchmark-ntx-builder-large-accounts

Conversation

@SantiagoPittella

Copy link
Copy Markdown
Collaborator

closes #2363

Summary

Why

We need to know if the ntx-builder can cope with a network account that has a huge storage map. It holds each account fully in memory and reloads it from disk on every actor start and expired submission.

How

Two things, and one script that runs both.

  1. A plain benchmark (cargo bench -p miden-ntx-builder --bench large_account) builds the account in memory and measures what it costs.
  2. A live check (bin/large-account-benchmark) seeds the account into genesis, then sends one transaction that emits a network note for it and waits for the counter to go up.
  3. scripts/large-account-harness.sh does everything: seed, measure, start a local network, submit, assert, print a summary.

Result

$ MAP_ENTRIES=1000000 ./scripts/large-account-harness.sh

Building release binaries

Seeding the wallet + counter pair (1000000 map entries)

Measuring the account in isolation (no network)

Starting the local network

Submitting an increment and waiting for the counter to advance

PASS — the ntx-builder loaded the account and consumed the network note

1000000 map entries
  counter on disk          61.0 MiB (64 B/entry)
  wallet on disk           4.2 KiB
  account in isolation     5.3 GiB resident, 8.5 GiB peak, 10926.526 ms to load
  ntx-builder peak RSS     10.3 GiB
  sequencer peak RSS       14.2 GiB
  timings                  86s ready, 1.48s proving, 9 blocks to consume

Isolated figures are exact; RSS is whole-process, sampled at 0.5s, so a floor.

Changelog

changelog = "none"
reason    = "Internal change only."

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.

ntx-builder: benchmark large accounts

1 participant