fix: Handle missing blocks to prevent sync stall#257
Merged
quake merged 3 commits intonervosnetwork:developfrom Dec 30, 2025
Merged
Conversation
Contributor
Author
|
Request for @Officeyutong @driftluo @zhangsoledad @quake @chenyukang @gpBlockchain 's review. |
033eace to
9a14f1c
Compare
Signed-off-by: Eval EXEC <execvy@gmail.com>
9a14f1c to
657a0ce
Compare
72087ed to
a8c2c94
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #257 +/- ##
===========================================
- Coverage 72.04% 72.01% -0.04%
===========================================
Files 28 28
Lines 6937 7042 +105
===========================================
+ Hits 4998 5071 +73
- Misses 1939 1971 +32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
driftluo
reviewed
Dec 30, 2025
a8c2c94 to
a33c23d
Compare
Signed-off-by: Eval EXEC <execvy@gmail.com>
a33c23d to
7835653
Compare
quake
approved these changes
Dec 30, 2025
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.
This PR want to fix a bug:
When the filter protocol matches blocks, they're added to
matched_blocksand we request their proofs/data. The batch waits until all blocks are downloaded before processing. However, some matched blocks may be uncle blocks (orphaned from old forks) or blocks peers don't have. When peers respond withmissing_block_hashes, these blocks remain inmatched_blocks, causing the batch to stall indefinitely waiting for blocks that will never arrive.Changes:
send_blocks_proof.rs, remove them from matched_blocksfetching_headers