Skip to content

Builder server name on TBV stream#896

Merged
ZanCorDX merged 4 commits intodevelopfrom
dx/builder-name-on-tbv-stream
Mar 16, 2026
Merged

Builder server name on TBV stream#896
ZanCorDX merged 4 commits intodevelopfrom
dx/builder-name-on-tbv-stream

Conversation

@ZanCorDX
Copy link
Collaborator

📝 Summary

Builder server name on TBV stream

✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@ZanCorDX ZanCorDX requested a review from dvush as a code owner March 16, 2026 14:54
@claude
Copy link
Contributor

claude bot commented Mar 16, 2026

Claude finished @ZanCorDX's task in 1m 38s —— View job


Review: Builder server name on TBV stream

  • Read diff and changed files
  • Analyze code quality and potential issues
  • Post review feedback

Summary

This PR moves builder_name from BuiltBlocksClickhouseConfig up to FlashbotsConfig and threads it into BestTrueValueObserver so the TBV stream reports the server identity instead of the algorithm name. The refactor is clean and straightforward, but there are a few concerns worth addressing:

  1. Breaking serialization change — Renaming builderbuilder_server in BuiltBlockInfo changes the JSON wire format from "builder" to "builderServer" (due to camelCase serde rename). Any downstream consumers reading the old field name will silently lose the builder identity.

  2. Silent empty default#[serde(default)] on builder_name: String means configs without this field will produce empty identifiers in clickhouse and TBV pushes. Consider making it required or providing a meaningful default.

  3. Semantic change in data — The builder field previously carried the algorithm name (ordering_builder, parallel_builder, etc.), and now carries the server name. These are different dimensions. Confirm the algorithm name is reported elsewhere if needed.

See inline comments for details.


pub builder: String,
/// Unique Id of the machine that built the block.
pub builder_server: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking serialization change: BuiltBlockInfo uses #[serde(rename_all = "camelCase")], so the JSON field name changes from "builder" to "builderServer". Any downstream consumers (Redis subscribers, block-processor API, dashboards, etc.) that read this field by its old name will silently stop receiving the builder identity.

If this rename is intentional, please confirm that all consumers have been updated. If not, consider adding #[serde(alias = "builder")] for backwards-compatible deserialization, or #[serde(rename = "builder")] to keep the wire name unchanged.

/// Unique id for this server.
/// Used in clickhouse to identify the builder and in TBV pushes.
#[serde(default)]
pub builder_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#[serde(default)] on a String means an empty string "" if the key is absent from the config. This will silently produce empty builder identifiers in clickhouse and TBV pushes for any config file that hasn't been updated yet. Consider either:

  • Removing #[serde(default)] to make it a required field (fail fast on missing config), or
  • Using a meaningful default (e.g. hostname).

_submit_block_request: Arc<AlloySubmitBlockRequest>,
built_block_trace: Arc<BuiltBlockTrace>,
builder_algorithm_name: String,
_builder_algorithm_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The semantic change here is significant: builder_algorithm_name previously identified which algorithm produced the block (e.g. "ordering_builder", "parallel_builder"), while builder_server_name identifies which machine built it. These are different dimensions of information.

Downstream consumers that used the builder field to distinguish algorithm behavior (e.g. comparing ordering_builder vs parallel_builder performance) will now see the server name instead. Is the algorithm name captured/reported elsewhere?

@claude
Copy link
Contributor

claude bot commented Mar 16, 2026

Claude finished @ZanCorDX's task in 1m 38s —— View job


Review: Builder server name on TBV stream

  • Read diff and changed files
  • Analyze code quality and potential issues
  • Post review feedback

Summary

The refactor to move builder_name from BuiltBlocksClickhouseConfig to FlashbotsConfig and thread it into BestTrueValueObserver is clean and straightforward. However, there are a few concerns worth addressing — see inline comments:

  1. Breaking serialization change — Renaming builderbuilder_server_name in BuiltBlockInfo changes the JSON wire format from "builder" to "builderServerName" (due to camelCase serde rename). Downstream consumers reading the old field name will silently lose the builder identity.

  2. Silent empty default#[serde(default)] on builder_name: String means configs without this field produce empty identifiers in clickhouse and TBV pushes.

  3. Semantic change — The builder field previously carried the algorithm name, now it carries the server name. Confirm the algorithm name is still reported where needed.

  4. Clippy nitbuilder_server_name: builder_server_name is a redundant field initializer (line 55 of best_true_value_pusher.rs).


pub builder: String,
/// Unique Id of the machine that built the block.
pub builder_server_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking serialization change: BuiltBlockInfo uses #[serde(rename_all = "camelCase")], so the JSON field name changes from "builder" to "builderServerName". Any downstream consumers (Redis subscribers, block-processor API, dashboards) reading the old field name will silently stop receiving the builder identity.

If the rename is intentional, please confirm all consumers have been updated. Otherwise, add #[serde(rename = "builder")] to keep the wire name unchanged.

bid,
subsidy,
builder,
builder_server_name: builder_server_name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: redundant field initializer — Clippy will flag this.

Suggested change
builder_server_name: builder_server_name,
builder_server_name,

/// Unique id for this server.
/// Used in clickhouse to identify the builder and in TBV pushes.
#[serde(default)]
pub builder_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#[serde(default)] on String silently produces "" if the key is absent from the config. This means empty builder identifiers in clickhouse and TBV pushes for any config file that hasn't been updated. Consider either:

  • Removing #[serde(default)] to make it required (fail fast on missing config), or
  • Defaulting to hostname or some meaningful identifier.

_submit_block_request: Arc<AlloySubmitBlockRequest>,
built_block_trace: Arc<BuiltBlockTrace>,
builder_algorithm_name: String,
_builder_algorithm_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantic change: builder previously carried the algorithm name (e.g. "ordering_builder", "parallel_builder"), now it carries the server name. These are different dimensions. If the algorithm name is needed downstream (e.g. comparing per-algorithm performance), it's now lost from the TBV stream. Is it captured elsewhere?

@claude
Copy link
Contributor

claude bot commented Mar 16, 2026

Claude finished @ZanCorDX's task in 2m 0s —— View job


Review: Builder server name on TBV stream

  • Read diff and changed files
  • Analyze code quality and potential issues
  • Post review feedback

Summary

The refactor to move builder_name from BuiltBlocksClickhouseConfig to FlashbotsConfig and thread it into BestTrueValueObserver is clean. Four issues to address:

  1. Breaking serialization — Renaming builderbuilder_server_name changes the JSON wire field from "builder" to "builderServerName" (due to camelCase serde rename). Downstream consumers will silently lose data. Consider #[serde(rename = "builder")] to preserve the wire name.

  2. Not actually mandatory — Despite the "builder_name mandatory" commit, FlashbotsConfig has struct-level #[serde(default)], so builder_name still silently defaults to "".

  3. Semantic change — The builder field previously carried the algorithm name, now the server name. These are different dimensions — confirm the algorithm name is still available where needed.

  4. Clippy nitbuilder_server_name: builder_server_name is a redundant field initializer.

See inline comments for details.


pub builder: String,
/// Unique Id of the machine that built the block.
pub builder_server_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking serialization change: BuiltBlockInfo uses #[serde(rename_all = "camelCase")], so this rename changes the JSON wire field from "builder" to "builderServerName". Any downstream consumer (Redis subscribers, block-processor API, dashboards) reading the old key will silently lose this data.

If this is intentional, confirm all consumers are updated. Otherwise, preserve the wire name:

Suggested change
pub builder_server_name: String,
#[serde(rename = "builder")]
pub builder_server_name: String,

bid,
subsidy,
builder,
builder_server_name: builder_server_name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clippy lint: redundant field initializer.

Suggested change
builder_server_name: builder_server_name,
builder_server_name,


/// Unique id for this server.
/// Used in clickhouse to identify the builder and in TBV pushes.
pub builder_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FlashbotsConfig has struct-level #[serde(default)] (line 102), so builder_name still silently defaults to "" if absent from the config. Despite the commit message saying "builder_name mandatory", this field is not actually required at deserialization time. If the intent is to enforce it, you'd need to remove the struct-level #[serde(default)] (which would affect all fields) or add post-deserialization validation.

_submit_block_request: Arc<AlloySubmitBlockRequest>,
built_block_trace: Arc<BuiltBlockTrace>,
builder_algorithm_name: String,
_builder_algorithm_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The builder field in BuiltBlockInfo previously carried the algorithm name (e.g. "ordering_builder", "parallel_builder"), now it carries the server name. These are different dimensions. If downstream consumers used the old field to compare per-algorithm performance, that information is now lost from the TBV stream. Confirm the algorithm name is still reported where needed.

@claude
Copy link
Contributor

claude bot commented Mar 16, 2026

Claude finished @ZanCorDX's task in 1m 26s —— View job


Review: Builder server name on TBV stream

  • Read diff and changed files
  • Analyze code quality and potential issues
  • Post review feedback

Summary

The refactor to move builder_name from BuiltBlocksClickhouseConfig to FlashbotsConfig and thread it into BestTrueValueObserver is clean. Three issues to address:

  1. Breaking serialization — Renaming builderbuilder_server_name in BuiltBlockInfo changes the JSON wire field from "builder" to "builderServerName" (due to camelCase serde rename). Downstream consumers will silently lose data. Consider #[serde(rename = "builder")] to preserve the wire name.

  2. Not actually mandatoryFlashbotsConfig has struct-level #[serde(default)], so builder_name still silently defaults to "". Add post-deserialization validation to reject empty values.

  3. Semantic change — The field previously carried the algorithm name, now the server name. Confirm the algorithm name is still available where needed downstream.

See inline comments for details.


pub builder: String,
/// Unique Id of the machine that built the block.
pub builder_server_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking serialization change: BuiltBlockInfo uses #[serde(rename_all = "camelCase")], so the JSON wire field changes from "builder" to "builderServerName". Any downstream consumer (Redis subscribers, block-processor API, dashboards) reading the old key will silently lose this data.

If the wire format change is intentional, this should be called out explicitly. Otherwise, preserve compatibility:

Suggested change
pub builder_server_name: String,
#[serde(rename = "builder")]
pub builder_server_name: String,


/// Unique id for this server.
/// Used in clickhouse to identify the builder and in TBV pushes.
pub builder_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FlashbotsConfig has #[serde(default)] at the struct level (line 102), so builder_name silently defaults to "" when absent from the config. Despite the commit message "builder_name mandatory", it is not enforced at deserialization time. An empty builder name will propagate silently into clickhouse and TBV pushes.

Consider adding post-deserialization validation (e.g. in a validate() method or builder pattern) to reject empty builder_name.

_submit_block_request: Arc<AlloySubmitBlockRequest>,
built_block_trace: Arc<BuiltBlockTrace>,
builder_algorithm_name: String,
_builder_algorithm_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantic change: The builder field in BuiltBlockInfo previously carried the algorithm name (e.g. "ordering_builder", "parallel_builder"), now it carries the server name. These are different dimensions. If anything downstream used the old field to compare per-algorithm performance, that information is now lost from the TBV stream. Confirm the algorithm name is still available where needed.

@ZanCorDX ZanCorDX merged commit 7a4d084 into develop Mar 16, 2026
16 checks passed
@ZanCorDX ZanCorDX deleted the dx/builder-name-on-tbv-stream branch March 16, 2026 15:32
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.

2 participants