-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Share peers between syncing strategies #2814
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
Closed
Closed
Changes from 26 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
796112d
Defer new peer actions in `ChainSync`
dmitry-markin 125f9a7
Introduce `PeerPool` for per-strategy peer allocation
dmitry-markin be88848
Prepare `SyncingStrategy` for parallel strategies
dmitry-markin 6ed85cd
Reserve peers for `WarpSync` strategy in `PeerPool`
dmitry-markin 3aaa9ef
Reserve peers for `StateStrategy` in `PeerPool`
dmitry-markin 02259bc
WIP: Reserve peers for `ChainSync` in `PeerPool`
dmitry-markin 264723b
minor: fix compilation + rustfmt
dmitry-markin 4bb9a7b
Apply suggestions from code review
dmitry-markin a1cec8c
Partially revert "Apply suggestions from code review"
dmitry-markin e6c2b3a
minor: docs
dmitry-markin 1db2ad1
Apply review suggestions
dmitry-markin 17f6bbe
Simplify peer allocation from `PeerPool` for requests
dmitry-markin fd53c44
Update `WarpStrategy` and `StateStrategy` tests
dmitry-markin fa64365
WIP: fix `ChainSync` tests
dmitry-markin 272fbc6
Fix sync restart and `ChainSync` tests
dmitry-markin d8008e6
Respect `PeerPool` when making extra justification requests
dmitry-markin 06295e2
Cancel a stale state request when restarting the sync
dmitry-markin 4913702
Merge remote-tracking branch 'origin/master' into dm-gap-sync-strategy
dmitry-markin d4edc3f
Merge remote-tracking branch 'origin/master' into dm-gap-sync-strategy
dmitry-markin cf93e7f
Simplify startegy actions conversion into top-level `SyncingAction`
dmitry-markin 0add17e
Add PRDoc
dmitry-markin 9800af8
Test peers reservation in `WarpSync`
dmitry-markin 56f92a8
Test peers reservation by `StateStrategy`
dmitry-markin cd6cfe3
Test `PeerPool`
dmitry-markin 7d7f936
WIP: test peer reservation by `ChainSync`
dmitry-markin 2605f2a
Test peer reservation in `PeerPool` by `ChainSync`
dmitry-markin acc7a76
Apply suggestions from code review
dmitry-markin da9dd82
Apply suggestions from code review
dmitry-markin 94a07a6
Apply review suggestions
dmitry-markin 646f0a5
Merge remote-tracking branch 'origin/master' into dm-gap-sync-strategy
dmitry-markin 7aa59a3
minor: log message
dmitry-markin 8d6a6d7
Rename `extra_requests.rs` -> `justification_requests.rs`, add docs
dmitry-markin 0254680
Hide mutex behind `PeerPool` interface
dmitry-markin 62dea92
Simplify `schedule_next_peer()`
dmitry-markin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
| # See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
|
||
| title: Share peers between syncing strategies | ||
|
|
||
| doc: | ||
| - audience: Node Dev | ||
| description: | | ||
| New struct `PeerPool` is added to `SyncingStrategy` to allow running syncing strategies | ||
| in parellel and sharing peers. Available peers (with no active requests) are retrieved by | ||
| calling `PeerPool::available_peers()`, and a peer is reserved for a request by a syncing | ||
| strategy using `AvailablePeer::reserve()`. | ||
|
|
||
| crates: | ||
| - name: sc-network-sync |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.