Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
7d693df
feat(genesis): add batch builder account
Mirko-von-Leipzig Sep 3, 2026
6dbf781
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 15, 2026
4a72eb6
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 15, 2026
65e643c
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 15, 2026
a738d43
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 15, 2026
8ca2d4b
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 15, 2026
ed3ea36
test: keep faucet ownership checks independent of other genesis accounts
Mirko-von-Leipzig Sep 15, 2026
8f71865
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 16, 2026
b0b22a2
feat(genesis): make the batch builder wallet public
Mirko-von-Leipzig Sep 16, 2026
ec44304
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 16, 2026
1d45b24
refactor(genesis): name the batch builder wallet account
Mirko-von-Leipzig Sep 16, 2026
2a01ebd
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 16, 2026
6f24229
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 16, 2026
4dff771
Configure the batch wallet by account ID
Mirko-von-Leipzig Sep 17, 2026
893203f
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 17, 2026
13d57fa
Merge branch 'mirko/batch-fees-pass-through-account' into mirko/batch…
Mirko-von-Leipzig Sep 17, 2026
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
3 changes: 3 additions & 0 deletions bin/benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,14 @@ nohup miden-remote-prover \
> logs/remote-prover.log 2>&1 &

# The node runs store + block-producer + RPC in a single sequencer process.
# This unused account receives benchmark fees without collecting them.
BATCH_BUILDER_WALLET_ACCOUNT_ID=0xcc0000000000dd010000ee000000ff
nohup miden-node sequencer \
--data-directory "$DATA/node" \
--rpc.listen 127.0.0.1:57291 \
--validator.url http://127.0.0.1:50101 \
--ntx-builder.url http://127.0.0.1:50301 \
--batch.builder.wallet-account-id "$BATCH_BUILDER_WALLET_ACCOUNT_ID" \
--batch.max-txs 1024 \
--block.max-batches 64 \
--block.interval 2s \
Expand Down
24 changes: 24 additions & 0 deletions bin/node/src/commands/block_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ use miden_node_block_producer::{
DEFAULT_MAX_TXS_PER_BATCH,
};
use miden_node_utils::clap::duration_to_human_readable_string;
use miden_protocol::account::AccountId;
use url::Url;

// BLOCK PRODUCTION
// ================================================================================================

#[derive(clap::Args, Clone, Debug)]
pub struct BlockProducerOptions {
#[command(flatten)]
pub builder: BuilderOptions,

#[command(flatten)]
pub batch: BatchOptions,

Expand Down Expand Up @@ -64,6 +68,7 @@ mod tests {
BlockOptions,
BlockProducerOptions,
BlockProverOptions,
BuilderOptions,
MempoolOptions,
};
use crate::commands::block_producer::{
Expand All @@ -74,6 +79,12 @@ mod tests {

fn options(max_batches: usize, max_txs: usize) -> BlockProducerOptions {
BlockProducerOptions {
builder: BuilderOptions {
wallet_account_id: miden_protocol::account::AccountId::from_hex(
"0xcc0000000000dd010000ee000000ff",
)
.unwrap(),
},
batch: BatchOptions {
interval: DEFAULT_BATCH_INTERVAL,
max_txs: NonZeroUsize::new(max_txs).unwrap(),
Expand Down Expand Up @@ -126,6 +137,19 @@ mod tests {
}
}

#[derive(clap::Args, Clone, Debug)]
pub struct BuilderOptions {
/// Wallet account ID that receives the batch builder's fees.
#[arg(
long = "batch.builder.wallet-account-id",
env = "MIDEN_NODE_BATCH_BUILDER_WALLET_ACCOUNT_ID",
value_name = "ACCOUNT_ID",
value_parser = AccountId::from_hex,
help_heading = super::section::BLOCK_PRODUCTION_HELP_HEADING
)]
pub wallet_account_id: AccountId,
}

#[derive(clap::Args, Clone, Debug)]
pub struct BatchOptions {
/// Maximum interval between batch scheduler checks.
Expand Down
2 changes: 2 additions & 0 deletions compose/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ services:
- --validator.url=http://validator-2:50101
- --validator.url=http://validator-3:50101
- --ntx-builder.url=http://ntx-builder:50301
# This unused account receives development-network fees without collecting them.
- --batch.builder.wallet-account-id=${MIDEN_NODE_BATCH_BUILDER_WALLET_ACCOUNT_ID:-0xcc0000000000dd010000ee000000ff}
- --rpc.network-tx-auth-header-value=secret_value
environment:
MIDEN_NODE_DISABLE_ACCOUNT_ALLOWLIST: "${MIDEN_NODE_DISABLE_ACCOUNT_ALLOWLIST:-true}"
Expand Down
3 changes: 3 additions & 0 deletions docs/external/src/network-operator/sequencer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ miden-node sequencer \
--validator.url http://validator-2:50101 \
--validator.url http://validator-3:50101 \
--ntx-builder.url http://ntx-builder:50301 \
--batch.builder.wallet-account-id <wallet-account-id> \
--rpc.network-tx-auth-header-value <network-tx-auth-secret>
```

Only the public RPC listener should be externally reachable. The validator, NTX builder, and prover URLs are trusted
internal services.

The wallet account receives batch-building fees. The sequencer needs only its ID, not its signing key.

The network transaction auth value is a shared secret used to authorize network transaction submissions. It must match
the NTX builder's `--rpc.auth-header-value`; otherwise, the sequencer rejects network transactions from the builder.

Expand Down
3 changes: 3 additions & 0 deletions scripts/bench-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ USE_REMOTE_PROVER="${USE_REMOTE_PROVER:-0}"
CONCURRENCY="${CONCURRENCY:-8}"
WAIT_BLOCKS="${WAIT_BLOCKS:-30}"
RUN_DIR="${RUN_DIR:-./bench-local-run}"
# This unused account receives development-network fees without collecting them.
BATCH_BUILDER_WALLET_ACCOUNT_ID="${BATCH_BUILDER_WALLET_ACCOUNT_ID:-0xcc0000000000dd010000ee000000ff}"
# Insecure, hard-coded local dev validator signing key and its public key (committed at
# genesis). Generate a fresh pair with `miden-validator keygen`.
VALIDATOR_SIGNING_KEY_HEX="${VALIDATOR_SIGNING_KEY_HEX:-0101010101010101010101010101010101010101010101010101010101010101}"
Expand Down Expand Up @@ -177,6 +179,7 @@ start_bg node miden-node sequencer \
--rpc.listen "127.0.0.1:$RPC_PORT" \
--validator.url "http://127.0.0.1:$VALIDATOR_PORT" \
--ntx-builder.url "http://127.0.0.1:$NTX_PORT" \
--batch.builder.wallet-account-id "$BATCH_BUILDER_WALLET_ACCOUNT_ID" \
--batch.max-txs 64 \
--block.max-batches 16 \
--block.interval 2s \
Expand Down
3 changes: 3 additions & 0 deletions scripts/run-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -euo pipefail
SKIP_BOOTSTRAP="${SKIP_BOOTSTRAP:-false}"
ENABLE_FULL_NODES="${ENABLE_FULL_NODES:-true}"
EXTRA_ARGS="${EXTRA_ARGS:-}"
# This unused account receives development-network fees without collecting them.
BATCH_BUILDER_WALLET_ACCOUNT_ID="${BATCH_BUILDER_WALLET_ACCOUNT_ID:-0xcc0000000000dd010000ee000000ff}"
# Shared secret authorizing the ntx-builder to submit network transactions to the sequencer's RPC.
# Must match on both the sequencer (--rpc.network-tx-auth-header-value) and the ntx-builder
# (--rpc.auth-header-value), otherwise network transactions are rejected with
Expand Down Expand Up @@ -242,6 +244,7 @@ OTEL_RESOURCE_ATTRIBUTES="$(node_resource_attributes sequencer)" \
--validator.url "http://127.0.0.1:$VALIDATOR_1_PORT" \
--validator.url "http://127.0.0.1:$VALIDATOR_2_PORT" \
--ntx-builder.url "http://127.0.0.1:$NTX_BUILDER_PORT" \
--batch.builder.wallet-account-id "$BATCH_BUILDER_WALLET_ACCOUNT_ID" \
--internal.listen "0.0.0.0:$SEQUENCER_INTERNAL_PORT" \
$EXTRA_ARGS &
PIDS+=($!)
Expand Down
Loading