Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not send more than one request per peer at a time #779

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Jun 19, 2023

This PR introduces a "request lock" system to the NetworkService of the light client.
When a "request lock" is held, no other request lock with the same PeerId can be created. A "request lock" can then be used to start an actual request.

This causes the sync_service (and all parts of the node) to only start one request per peer at a time.
This effectively implements an existing requirement of the Polkadot networking protocol that isn't enforced by Substrate.

There are some caveats and further PRs will further refine this system:

@tomaka
Copy link
Contributor Author

tomaka commented Sep 25, 2023

Just tried rebasing this PR, and I think that it's easier to restart it from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant