Skip to content
Commit 43dcd64b authored by Rahul Subramaniyam's avatar Rahul Subramaniyam
Browse files

Changes to handling partial responses

Context: https://github.com/paritytech/polkadot-sdk/issues/493#issuecomment-1728917139

Problem: When downloading from a fork, the peer may send a partial response
that extends the current chain. Even though the response starts at a block
number after the current best number, the parent block from the fork is not
yet downloaded/imported. We currently try to import the partial response
in this scenario, which causes import to fail as parent is not found in the
backend. This causes sync to be aborted/restarted which may not converge.

Fix: when we receive a partial response in this scenario, hold on to the
partial blocks and try to download the missing blocks. And import when the
full range is downloaded.
parent 6a897f06
Pipeline #393775 passed with stages
in 54 minutes and 32 seconds