Rewind the download window and bump validation on regression. - #1142
Open
echennells wants to merge 1 commit into
Open
echennells wants to merge 1 commit into
echennells wants to merge 1 commit into
Conversation
After a reorganization the node can stop making progress while headers continue to arrive; a restart clears it. Two chasers are left waiting on events that never come. `chaser_check::do_regressed` rewinds the position and purges outstanding work, but leaves `requested_` and `advanced_` where they were, and ignores a regression that falls above the position but inside the requested window. `set_unassociated` then defers new requests while `position() < requested_`, waiting on work that was just purged, so the heights between the position and the old request are never requested. The guard now considers the window as well as the position, and both are rewound with it, as at start. `chaser_validate` advances on the checked event for the block above its position, or on a bump. When a reorganization returns to a branch whose next block is already downloaded, neither arrives. The organizer now bumps validation on regression as it does once at start. Reproduced on regtest against bitcoind and on replays of recorded testnet3 reorganizations, and observed handled on live testnet3. A regression organized while not current does not stall, so the bump stays within the currency gate.
echennells
force-pushed
the
reorg-window-rewind
branch
from
September 22, 2026 15:56
6754931 to
de756d8
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.
After a reorganization the node can stop making progress while headers continue to arrive; a restart clears it. Two chasers are left waiting on events that never come.
chaser_check::do_regressedrewinds the position and purges outstanding work, but leavesrequested_andadvanced_where they were, and ignores a regression that falls above the position but inside the requested window.set_unassociatedthen defers new requests whileposition() < requested_, waiting on work that was just purged, so the heights between the position and the old request are never requested. The guard now considers the window as well as the position, and both are rewound with it, as at start.chaser_validateadvances on the checked event for the block above its position, or on a bump. When a reorganization returns to a branch whose next block is already downloaded, neither arrives. The organizer now bumps validation on regression as it does once at start.Reproduced on regtest against bitcoind and on replays of recorded testnet3 reorganizations, and observed handled on live testnet3. A regression organized while not current does not stall, so the bump stays within the currency gate.