btc(v36): complete twin-parity — think-independent 10s re-advert timer leg (follow-up to merged #105) - #110
Merged
Merged
Conversation
Mirror the LTC timer leg from #104/e01c1606. The event leg (readvertise_best on think work-refresh + clean_tracker best-change) goes dead exactly when think() wedges -- the livelock-adjacent scenario this fix family targets. Arm a one-shot core::Timer(10s) -> readvertise_best() in the run_think IO-phase, fired exactly once when the verified chain first becomes non-empty, so a peer that handshook during the empty window can still ingest our chain even if a later think() cycle wedges. Composes with the merged #97 think-watchdog: timer runs on the IO thread, pure reads, broadcast stays try_to_lock, no new mutex.
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.
Follow-up to #105, which merged at 11:06:55Z carrying only the event-leg half-fix (659b95c) — one minute before integrator froze the merge tap. Master therefore currently has the timer-LESS half-fix (the same shape disavowed for LTC, #103). This PR lands the orphaned timer leg
f3539c16to complete twin-parity with #104/e01c1606.Adds
m_readvert_timer(one-shot core::Timer, 10s -> readvertise_best()), armed lazily in the run_think IO-phase, fired exactly once when the verified chain first becomes non-empty. The event leg dies when think() wedges; this think-independent leg survives a wedged think() (composes with merged #97 watchdog). Livelock-safe by construction: pure reads, broadcast stays try_to_lock, no new mutex.Gate: ctest + twin-parity re-confirm by claudecode before merge tap.