Skip to content

ibd: start a fresh stall window on the next getdata - #1032

Merged
reardencode merged 1 commit into
masterfrom
ibd/stall-window-reset
Oct 16, 2026
Merged

reardencode merged 1 commit into
masterfrom
ibd/stall-window-reset

Conversation

@rearden-grok

@rearden-grok rearden-grok Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

An IBD peer's 30s stall clock now covers one open getdata window.

  • The clock starts when the first getdata of an empty window is written. Time the peer spent idle while we were not asking does not count.
  • A later getdata while any hash from that window is still outstanding does not move the deadline.
  • Draining the last outstanding hash disarms the clock. The next write starts a new 30s.
  • Relative-slow still ages from the last solicited block. This does not change that score.

Test

cargo test -p rbitcoin-net --lib (disconnect stall pins, the assign window pins, and the rest of the lib suite), cargo clippy -p rbitcoin-net --all-targets -- -D warnings, cargo fmt --all, ./scripts/ast-grep.sh.

Idle time between batches was still on the clock, so the first ask after a
confirm pause looked like a 30s stall. The window now opens when the first
getdata of an empty window is written, and it disarms when the peer owes
nothing. A later getdata in that same window does not move the deadline.
@reardencode
reardencode merged commit 778ef27 into master Oct 16, 2026
18 checks passed
@rearden-grok
rearden-grok Bot deleted the ibd/stall-window-reset branch October 17, 2026 11:09
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.

1 participant