Solo: suppress NEW_ROUND recovery GET_BLOCK at timer fire when PUSH is in transit#705
Merged
Merged
Conversation
…e time Agent-Logs-Url: https://github.com/NamecoinGithub/NexusMiner/sessions/0201af9c-d4ec-4229-b8b8-2f4c23158ea5 Co-authored-by: NamecoinGithub <130555019+NamecoinGithub@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
NamecoinGithub
May 25, 2026 07:22
View session
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.
The "Cancelling pending NEW_ROUND recovery GET_BLOCK" log was firing but the deferred
GET_BLOCKstill went out, producing duplicateBLOCK_DATAthat only the miner-side 10s same-unified-height feed guard was eating. Root cause: when a PUSH arrives within ~1ms of timer expiry,asio::steady_timer::cancel()returns 0 because the wait is already queued on the io_context — the cancel log fires from elsewhere, but the queued callback still runs and sends.Change
Solo::schedule_recovery_get_block(src/protocol/src/protocol/solo.cpp): captureunified_heightin theasync_waitlambda and re-evaluatepush_implies_block_data_in_transit(snap, unified_height, push_in_transit_guard_for_channel())immediately before the GET_BLOCK send, after the existinghas_valid_templateshort-circuit. If a PUSH ≥unified_heightlanded within the channel-aware in-transit window (Prime 6000ms / Hash 3000ms), clearm_recovery_deferred_at, log[NEW_ROUND] Recovery GET_BLOCK suppressed at fire time: ..., and return.Scope