Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

sync: only restart peers not doing finality related requests #7322

Merged
merged 3 commits into from
Oct 16, 2020

Conversation

andresilva
Copy link
Contributor

@andresilva andresilva commented Oct 14, 2020

When performing block import we might refuse to import a block until some previous block justifications are imported (#7321). With the current implementation we will restart the sync process after getting a block import error. In this case, we will drop all in-flight sync requests and figure out new block requests for each peer. This leads to a situation where we are constantly restarting sync and are unable to download the justifications that would eventually fix the block import error. This PR changes the sync logic so that when restarting it peers that were doing any kind of finality related request (downloading justifications or finality proofs) keep their existing state.

@andresilva andresilva added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Oct 14, 2020
Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a test? 🙈

@andresilva
Copy link
Contributor Author

@bkchr Both done 👍

@bkchr bkchr requested a review from arkpar October 16, 2020 08:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants