Skip to content

fix(net): Increment out_of_order_requests in BodiesDownloader on range reset#19063

Merged
mattsse merged 1 commit intoparadigmxyz:mainfrom
GarmashAlex:fix/bodies-out-of-order-metric
Oct 16, 2025
Merged

fix(net): Increment out_of_order_requests in BodiesDownloader on range reset#19063
mattsse merged 1 commit intoparadigmxyz:mainfrom
GarmashAlex:fix/bodies-out-of-order-metric

Conversation

@GarmashAlex
Copy link
Copy Markdown
Contributor

This change increments the bodies downloader metric out_of_order_requests when the download range is reset and the new start block is below the last block returned by the stream. This matches the metric’s documented intent (“count out-of-order re-requests after unwind or external writes”) and aligns behavior with the headers downloader, which already increments its analogous metric on sync target changes. The change adds a simple check in BodiesDownloader::set_download_range before self.clear() to increment the counter when range.start() < latest_queued_block_number. No functional behavior is altered; this improves observability and monitoring accuracy for out-of-order body requests.

Copy link
Copy Markdown
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this makes sense because we also use this when updating the target

@github-project-automation github-project-automation Bot moved this from Backlog to In Progress in Reth Tracker Oct 16, 2025
@mattsse mattsse added this pull request to the merge queue Oct 16, 2025
Merged via the queue into paradigmxyz:main with commit 3de82cf Oct 16, 2025
42 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Reth Tracker Oct 16, 2025
emhane pushed a commit to op-rs/op-reth that referenced this pull request Oct 20, 2025
emhane pushed a commit to op-rs/op-reth that referenced this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants