Repository navigation
Development - #638
Merged
Merged
Development#638
Conversation
…ove-apply-timeouts
fix: move apply timeouts to the correct place
This branch was successfully deployed
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.
Fix: expire block requests on sync ticker
Problem
During the praxis (committee 30) rollout, a validator that fell one block behind after a restart could get wedged for ~30 minutes, logging repeated
wrong view height(code 65) /wrong certificate height(code 11) while the committee advanced without it. The missing block was valid and available — the node just never re-requested it, and only a full restart (which rebuilds the sync queue) recovered it.Root cause
Sync()only expired timed-out block requests at the end of theBlockinbox case, i.e. only when a block response happened to arrive. A node that was behind and whose outstanding request had timed out received no inbound blocks, so the dead request was never cleared or re-issued — the queue stayed stuck. (Introduced by the revert of the originalexpire block requests on sync tickerfix.)Change
Move
applyTimeouts(queue)to the top of each sync tick (requestTicker.C), before the queue is refilled, and remove it from theBlockinbox case. Expired requests are now cleared and re-requested every tick regardless of whether a block response arrives, so a behind node self-heals without a restart. This restores the behavior of the original fix (5cb9a248).Impact
controller/consensus.goonly; no consensus/state-root changes — block validation is untouched.