Skip to content

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

Open
tomaka wants to merge 4 commits intosmol-dot:mainfrom
tomaka:proper-peers-selection
Open

Do not send more than one request per peer at a time#779
tomaka wants to merge 4 commits intosmol-dot:mainfrom
tomaka:proper-peers-selection

Conversation

@tomaka
Copy link
Copy Markdown
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
Copy Markdown
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