Skip to content

fix: missed flashblocks at end metric#548

Open
akundaz wants to merge 2 commits into
mainfrom
ash-nnqqqomqovkw
Open

fix: missed flashblocks at end metric#548
akundaz wants to merge 2 commits into
mainfrom
ash-nnqqqomqovkw

Conversation

@akundaz

@akundaz akundaz commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The metric and log message at the end of flashblock building was overcounting the number of flashblocks we built by 1 because it was including the index-0 flashblock. So the metric for missed flashblocks would mistakenly show zero because we never miss more than one flashblock at the end.

Copilot AI review requested due to automatic review settings July 3, 2026 14:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an off-by-one error in the “flashblocks built” accounting used for end-of-build metrics/logging by excluding the index-0 fallback flashblock from the built count, so the “missed flashblocks at end” metric is computed correctly.

Changes:

  • Renames progress/stat tracking from flashblock_index (next-to-build) to flashblocks_built (excluding fallback).
  • Adds FlashblocksState::scheduled_flashblocks_built() to compute the correct built count via saturating_sub(1).
  • Updates metrics and tracing fields to use flashblocks_built for flashblock_count and missing_flashblocks_count.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/op-rbuilder/src/builder/payload.rs
@akundaz akundaz force-pushed the ash-nnqqqomqovkw branch from ac0e2d1 to 1000acf Compare July 3, 2026 14:57
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