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
16 changes: 8 additions & 8 deletions bin/ntx-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ layout.

## Role

The network transaction builder syncs blocks from an upstream node, tracking network notes and accounts. It starts
per-account workers for network accounts with pending work. Each worker selects viable notes, constructs a transaction,
proves it, and submits the proven transaction back through the upstream node's RPC API.
The network transaction builder syncs blocks from an upstream node, tracking network notes and accounts. On every
committed block it picks the network accounts that have pending notes and spawns one short-lived transaction attempt per
account, up to a configured concurrency limit. Each attempt selects viable notes, constructs a transaction, proves it,
and submits the proven transaction back through the upstream node's RPC API.

The builder can use a remote transaction prover through `miden-remote-prover`, or fall back to in-process proving where
appropriate for local development. It also exposes an internal gRPC API that the node RPC component can use for
Expand All @@ -22,11 +23,10 @@ be exposed through the public RPC API.

## Benchmarks

`benches/large_account.rs` measures the cost of a large network account, which each actor keeps fully resident for its
lifetime and reloads from the database on start and after every expired submission. It synthesizes a network account
with a populated storage map and reports resident/peak heap, serialized size, and per-operation timings. Per-candidate
cost is not a factor: the account is shared via `Arc` and advanced with `Arc::make_mut`, and `PartialAccount::from` is
constant-time in the map size for existing accounts.
`benches/large_account.rs` measures the cost of a large network account, which every transaction attempt loads from the
database. It synthesizes a network account with a populated storage map and reports resident/peak heap, serialized size,
and per-operation timings. Per-candidate cost is not a factor: the account is shared via `Arc`, and
`PartialAccount::from` is constant-time in the map size for existing accounts.

```bash
# Default sizes (1k, 10k, 100k entries).
Expand Down
8 changes: 4 additions & 4 deletions bin/ntx-builder/benches/large_account.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Benchmark: building a network transaction against a very large account.
//!
//! The `ntx-builder` keeps the native network `Account` fully resident in memory for the lifetime of
//! an actor. For an account with a large storage map (e.g. a million entries) that could become
//! untenable. This benchmark measures the costs so we can decide whether lazy/partial native-account
//! loading is worth implementing.
//! Every `ntx-builder` transaction attempt loads the native network `Account` from the database. For
//! an account with a large storage map (e.g. a million entries) that could become untenable. This
//! benchmark measures the costs so we can decide whether lazy/partial native-account loading is
//! worth implementing.

use std::alloc::{GlobalAlloc, Layout, System};
use std::collections::BTreeSet;
Expand Down
1,016 changes: 0 additions & 1,016 deletions bin/ntx-builder/src/actor/mod.rs

This file was deleted.

Loading
Loading