Skip to content

ibd: race a tip gap only when the body queue is a quarter full - #799

Merged
reardencode merged 3 commits into
masterfrom
ibd/tip-gap-soft-quarter
Sep 28, 2026
Merged

reardencode merged 3 commits into
masterfrom
ibd/tip-gap-soft-quarter

Conversation

@rearden-grok

@rearden-grok rearden-grok Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #790

Test plan

  • cargo test -p rbitcoin-query --lib quarter_full
  • cargo test -p rbitcoin-net --lib ibd::assign::tests
  • cargo clippy -p rbitcoin-net -p rbitcoin-query --all-targets -- -D warnings
  • CI qc, test, windows, macos, coverage

@rearden-grok
rearden-grok Bot force-pushed the ibd/tip-gap-soft-quarter branch 2 times, most recently from 7a4bab7 to 3ae10b7 Compare September 28, 2026 13:43
reardencode and others added 3 commits September 28, 2026 06:59
A missing tip+1 with a thin queue is the download frontier, not a hole.
Racing it and stopping densify left catch-up on 32-block bursts. The
quarter is the smaller of the confirm-time block window and the 100 MiB
soft floor, counting every queued body.

Co-authored-by: Cursor <cursoragent@cursor.com>
The byte side of the hole gate was the 100 MiB densify floor. It is a
quarter of the configured assign-stop (default 1 GiB). A cold rate also
races once 1000 bodies are queued, so early small blocks are not stuck
behind a 256 MiB cap. Any one of the rate window, that byte quarter, or
the block floor is enough.

Co-authored-by: Cursor <cursoragent@cursor.com>
A full window used three separate room checks, and the outer one returned
before looking at a retired hash, so a window of one never reissued.
Whether a hash may be sent is now one predicate: a free slot, or a racer
for a retired holder. The duplicate pending-release pin in assign is
covered by dial's release test.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rearden-grok
rearden-grok Bot force-pushed the ibd/tip-gap-soft-quarter branch from 3ae10b7 to a436e1b Compare September 28, 2026 14:37
@reardencode
reardencode merged commit 3168cdb into master Sep 28, 2026
18 checks passed
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.

Mainnet catch-up ~20x below available bandwidth: all stages idle ~24s per 25s window at hole=8193

1 participant