Skip to content
Open
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,49 @@ jobs:
--data-directory ${{ env.DATA_DIR }} \
--iterations 10 --concurrency 1 sync-nullifiers --prefixes 10

# Smoke-tests `miden-benchmark` end-to-end against a locally bootstrapped node.
benchmark:
name: benchmark smoke
runs-on: warp-ubuntu-latest-x64-8x
timeout-minutes: 20
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Rustup
run: rustup toolchain install --no-self-update
- uses: WarpBuilds/rust-cache@9d0cc3090d9c87de74ea67617b246e978735b1a1 # v2.9.1
with:
shared-key: ${{ github.job }}
prefix-key: ${{ env.CACHE_PREFIX }}
save-if: ${{ env.SAVE_CACHE }}
- name: Build benchmark stack
run: |
cargo build --release --locked \
--bin miden-node \
--bin miden-validator \
--bin miden-ntx-builder \
--bin miden-benchmark
- name: Run benchmark with N=1
env:
N_TXS: "1"
USE_REMOTE_PROVER: "0"
WAIT_BLOCKS: "30"
RUN_DIR: ${{ runner.temp }}/bench-local-run
run: |
export PATH="$PWD/target/release:$PATH"
./scripts/bench-local.sh
- name: Dump component logs on failure
if: failure()
run: |
set +e
for f in ${{ runner.temp }}/bench-local-run/logs/*.log; do
[ -f "$f" ] || continue
echo "::group::$(basename "$f")"
tail -n 200 "$f"
echo "::endgroup::"
done

# ===============================================================================================
# WASM related jobs
# ===============================================================================================
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ miden-node-stress-test-*
/accounts
/data

# Native benchmark runtime artifacts (data dir, logs, snapshots, proofs).
/node-data*
/logs
/snapshots
/benchmark-proofs

# Sqlite db files
*.sqlite3
*.sqlite3-shm
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
- Replaced blocking-in-async LargeSmt and account state forest operations in the store with wrappers using Tokio's `block_in_place()` ([#2076](https://github.com/0xMiden/node/pull/2076)).
- [BREAKING] Reworked note proto types for multi-attachment support: `NoteMetadata` now carries `attachment_schemes` (repeated) and `attachments_commitment` instead of a single `attachment`. `Note` and `NetworkNote` gained an `attachments` field. `NoteSyncRecord` now embeds full `NoteMetadata` instead of `NoteMetadataHeader`. Removed `NoteAttachmentKind` enum and `NoteMetadataHeader` message ([#2078](https://github.com/0xMiden/node/pull/2078)).
- [BREAKING] Changed `SyncChainMmr` endpoint: the upper end of the block range we're syncing is now the chain tip with the requested finality level. Validator signature is also returned ([#2075](https://github.com/0xMiden/node/pull/2075)).
- Added `miden-benchmark` binary for end-to-end TPS measurements. `create-proofs` generates locally-proven mint/consume transaction pairs bound to the target node's chain tip; `run-benchmark` submits the bundle and reports peak/mean/window-average TPS plus inclusion latency, all derived from block-header data ([#2073](https://github.com/0xMiden/node/pull/2073)).
- Added `--batch.workers` flag (env `MIDEN_NODE_BLOCK_PRODUCER_BATCH_WORKERS`) to the block-producer to make the previously-hardcoded batch-builder worker pool size configurable; default remains 2 ([#2073](https://github.com/0xMiden/node/pull/2073)).
- [BREAKING] Renamed `SubmitProvenTransaction` RPC endpoint to `SubmitProvenTx` ([#2094](https://github.com/0xMiden/node/pull/2094)).
- [BREAKING] Renamed `SubmitProvenBatch` RPC endpoint to `SubmitProvenTxBatch` ([#2094](https://github.com/0xMiden/node/pull/2094)).
## v0.14.11 (TBD)
Expand Down
19 changes: 19 additions & 0 deletions Cargo.lock

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

9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
members = [
"bin/benchmark",
"bin/genesis",
"bin/network-monitor",
"bin/node",
Expand Down Expand Up @@ -157,6 +158,10 @@ should_panic_without_expect = "allow" # We don't care about the specific panic
# Configure `cargo-typos`
[workspace.metadata.typos]
files.extend-exclude = [
"*.min.js", # Minified JS bundles (vendored htmx etc.).
"*.svg", # SVG files.
"*.min.js", # Minified JS bundles (vendored htmx etc.).
"*.svg", # SVG files.
"benchmark-proofs/", # miden-benchmark output.
"logs/", # Native benchmark process logs.
"node-data*/", # Native benchmark runtime data dir + any sibling clones (RocksDB LOGs etc.).
"snapshots/", # Snapshot tarballs used by the bench replay workflow.
]
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ install-stress-test: ## Installs stress-test binary
install-network-monitor: ## Installs network monitor binary
cargo install --path bin/network-monitor --locked

.PHONY: install-benchmark
install-benchmark: ## Installs the benchmark binary
cargo install --path bin/benchmark --locked

# --- docker --------------------------------------------------------------------------------------

.PHONY: compose-genesis
Expand Down
32 changes: 32 additions & 0 deletions bin/benchmark/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
authors.workspace = true
description = "A binary to run benchmarks of the Miden network"
edition.workspace = true
exclude.workspace = true
homepage.workspace = true
keywords = ["benchmark", "miden", "node"]
license.workspace = true
name = "miden-benchmark"
publish = true
readme.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
anyhow = { workspace = true }
clap = { features = ["env", "string"], workspace = true }
fs-err = { workspace = true }
miden-node-proto = { workspace = true }
miden-protocol = { features = ["std", "testing"], workspace = true }
miden-remote-prover-client = { features = ["tx-prover"], workspace = true }
miden-standards = { workspace = true }
miden-tx = { features = ["concurrent", "std"], workspace = true }
rand = { workspace = true }
rayon = { workspace = true }
tokio = { features = ["full"], workspace = true }
tonic = { workspace = true }
url = { features = ["serde"], workspace = true }
Loading
Loading