ibd: race a tip gap only when the body queue is a quarter full - #799
Merged
Merged
Conversation
rearden-grok
Bot
force-pushed
the
ibd/tip-gap-soft-quarter
branch
2 times, most recently
from
September 28, 2026 13:43
7a4bab7 to
3ae10b7
Compare
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
Bot
force-pushed
the
ibd/tip-gap-soft-quarter
branch
from
September 28, 2026 14:37
3ae10b7 to
a436e1b
Compare
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.
Summary
hole=8193,bq soft=0catch-up in Mainnet catch-up ~20x below available bandwidth: all stages idle ~24s per 25s window at hole=8193 #790. The 100 MiB free floor stays the densify horizon only.assign.rs.Fixes #790
Test plan
cargo test -p rbitcoin-query --lib quarter_fullcargo test -p rbitcoin-net --lib ibd::assign::testscargo clippy -p rbitcoin-net -p rbitcoin-query --all-targets -- -D warningsqc,test,windows,macos,coverage