Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
- [BREAKING] Refactored protobuf messages ([#1045](https://github.com/0xMiden/miden-node/pull/#1045)).
- Added `SyncStorageMaps` gRPC endpoint for retrieving account storage maps ([#1140](https://github.com/0xMiden/miden-node/pull/1140), [#1132](https://github.com/0xMiden/miden-node/pull/1132)).
- Added `SyncAccountVault` gRPC endpoints for retrieving account assets ([#1176](https://github.com/0xMiden/miden-node/pull/1176)).
- Refactored Network Transaction Builder to manage dedicated tasks for every network account in the chain ([#1219](https://github.com/0xMiden/miden-node/pull/1219)).

### Changes

Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions bin/node/src/commands/bundled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ impl BundledCommand {
block_producer: BlockProducerConfig,
grpc_timeout: Duration,
) -> anyhow::Result<()> {
let should_start_ntb = !ntx_builder.disabled;
// Start listening on all gRPC urls so that inter-component connections can be created
// before each component is fully started up.
//
Expand Down Expand Up @@ -186,8 +185,9 @@ impl BundledCommand {
})
.id();

// A sync point between the ntb and block-producer components.
let checkpoint = if should_start_ntb {
// A sync point between the ntx-builder and block-producer components.
let should_start_ntx_builder = !ntx_builder.disabled;
let checkpoint = if should_start_ntx_builder {
Barrier::new(2)
} else {
Barrier::new(1)
Expand Down Expand Up @@ -266,7 +266,7 @@ impl BundledCommand {
let store_ntx_builder_url = Url::parse(&format!("http://{store_ntx_builder_address}"))
.context("Failed to parse URL")?;

if should_start_ntb {
if should_start_ntx_builder {
let id = join_set
.spawn(async move {
let block_producer_url =
Expand All @@ -279,7 +279,7 @@ impl BundledCommand {
ntx_builder.ticker_interval,
checkpoint,
)
.serve_new()
.run()
.await
.context("failed while serving ntx builder component")
})
Expand Down
4 changes: 2 additions & 2 deletions bin/node/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn duration_to_human_readable_string(duration: Duration) -> String {
#[derive(clap::Args)]
pub struct NtxBuilderConfig {
/// Disable spawning the network transaction builder.
#[arg(long = "no-ntb", default_value_t = false)]
#[arg(long = "no-ntx-builder", default_value_t = false)]
pub disabled: bool,

/// The remote transaction prover's gRPC url, used for the ntx builder. If unset,
Expand All @@ -54,7 +54,7 @@ pub struct NtxBuilderConfig {

/// Interval at which to run the network transaction builder's ticker.
#[arg(
long = "ntb.interval",
long = "ntx-builder.interval",
default_value = &duration_to_human_readable_string(DEFAULT_NTX_TICKER_INTERVAL),
value_parser = humantime::parse_duration,
value_name = "DURATION"
Expand Down
6 changes: 3 additions & 3 deletions crates/block-producer/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ impl BlockProducer {

// Launch the gRPC server and wait at the checkpoint for any other components to be in sync.
//
// This is used to ensure the ntb can subscribe to the mempool events without playing catch
// up caused by block-production.
// This is used to ensure the ntx-builder can subscribe to the mempool events without
// playing catch up caused by block-production.
//
// This is a temporary work-around until the ntb can resync on the fly.
// This is a temporary work-around until the ntx-builder can resync on the fly.
let rpc_id = tasks
.spawn({
let mempool = mempool.clone();
Expand Down
4 changes: 3 additions & 1 deletion crates/ntx-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ workspace = true
[dependencies]
anyhow = { workspace = true }
futures = { workspace = true }
indexmap = { workspace = true }
miden-node-proto = { workspace = true }
miden-node-utils = { workspace = true }
miden-objects = { default-features = true, workspace = true }
Expand All @@ -24,7 +25,8 @@ miden-tx = { default-features = true, workspace = true }
thiserror = { workspace = true }
tokio = { features = ["rt-multi-thread"], workspace = true }
tokio-stream = { workspace = true }
tonic = { default-features = true, workspace = true }
tokio-util = { version = "0.7" }
tonic = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }

Expand Down
Loading