feat(builder): add RLP block size metrics#1866
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
mattsse
approved these changes
Jan 6, 2026
Zygimantass
pushed a commit
that referenced
this pull request
Jan 11, 2026
### Motivation - Add visibility into the RLP-encoded size of built blocks so operators can monitor block size and investigate block-too-large or gas/rlp-related issues. - Provide both a histogram and a latest-value gauge to expose per-payload and last-payload RLP size in metrics dashboards. - Avoid duplicate work by computing the RLP length once and reusing it for the Osaka block size check and metric reporting. ### Description - Added `rlp_block_size_bytes` (histogram) and `rlp_block_size_bytes_last` (gauge) to `TempoPayloadBuilderMetrics` in `crates/payload/builder/src/metrics.rs`. - Compute `rlp_block_size_bytes = sealed_block.rlp_length()` in `crates/payload/builder/src/lib.rs` and reuse it for the Osaka max-size check and error payload. - Record the new metrics with `self.metrics.rlp_block_size_bytes.record(...)` and `self.metrics.rlp_block_size_bytes_last.set(...)` right after payload finalization. ### Testing - Ran `cargo fmt`, which completed successfully but emitted warnings about unstable rustfmt options. - No additional automated tests were executed as part of this change. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_b_695cf977cc5c83219d1ea3383dcca640)
dankrad
pushed a commit
that referenced
this pull request
Jan 12, 2026
### Motivation - Add visibility into the RLP-encoded size of built blocks so operators can monitor block size and investigate block-too-large or gas/rlp-related issues. - Provide both a histogram and a latest-value gauge to expose per-payload and last-payload RLP size in metrics dashboards. - Avoid duplicate work by computing the RLP length once and reusing it for the Osaka block size check and metric reporting. ### Description - Added `rlp_block_size_bytes` (histogram) and `rlp_block_size_bytes_last` (gauge) to `TempoPayloadBuilderMetrics` in `crates/payload/builder/src/metrics.rs`. - Compute `rlp_block_size_bytes = sealed_block.rlp_length()` in `crates/payload/builder/src/lib.rs` and reuse it for the Osaka max-size check and error payload. - Record the new metrics with `self.metrics.rlp_block_size_bytes.record(...)` and `self.metrics.rlp_block_size_bytes_last.set(...)` right after payload finalization. ### Testing - Ran `cargo fmt`, which completed successfully but emitted warnings about unstable rustfmt options. - No additional automated tests were executed as part of this change. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_b_695cf977cc5c83219d1ea3383dcca640)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
rlp_block_size_bytes(histogram) andrlp_block_size_bytes_last(gauge) toTempoPayloadBuilderMetricsincrates/payload/builder/src/metrics.rs.rlp_block_size_bytes = sealed_block.rlp_length()incrates/payload/builder/src/lib.rsand reuse it for the Osaka max-size check and error payload.self.metrics.rlp_block_size_bytes.record(...)andself.metrics.rlp_block_size_bytes_last.set(...)right after payload finalization.Testing
cargo fmt, which completed successfully but emitted warnings about unstable rustfmt options.Codex Task