Repository navigation
fix(node): recover sync state after outbound request failure - #147
Open
zjubiology wants to merge 1 commit into
Open
zjubiology wants to merge 1 commit into
zjubiology wants to merge 1 commit into
Conversation
Signed-off-by: zjubiology <zjubiology@outlook.com>
This branch has not been 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.
Description
Fix a sync liveness failure where an outbound
GetBlockserror could leave the orchestrator permanently stuck within_flight = true.The P2P layer now tracks outbound block-range request IDs and emits the internal-only
SyncEvent::RequestFailedevent when one of those requests fails.GetHeightfailures are deliberately excluded so they cannot clear an unrelated block request.The sync orchestrator clears
in_flighton that event, allowing a later height response or block-gap announcement to restart synchronization.request_next_batch()now returnstrueonly when theSyncCommandwas successfully accepted by the command channel.Regression tests cover:
GetBlocksoutbound failure;GetHeightfailure as a block-request failure;RequestFailed;in_flightfalse when the command receiver has been dropped.No locked surfaces affected. This changes only in-process request tracking and node orchestration.
SyncRequest,SyncResponse,SyncNotification, SCALE encodings, protocol strings,MAX_RANGE, consensus, storage semantics, and RPC contracts are unchanged.Linked Issue
Closes #146
Scope Confirmation
Determinism Checklist
Security Checklist
Testing