-
Notifications
You must be signed in to change notification settings - Fork 684
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(state-sync): implement peer selection for state part requests (#…
…10441) This implements the ideas laid out here: #10213, and implements a select_host() function for the SnapshotHostsCache. This function selects a peer to request the part from based on the up-to-date SnapshotHostInfos we've seen, and sorts them by a priority score calculated from the Peer Id and Part Id, remembering who we've requested from so we can try different peers on subsequent calls A goal of the implementation is to have as little impact as possible on nodes not running state sync, which will be most nodes. So here we lazily only store data associated with peer selection for a given part after select_host() has been called for that part, and the added part_received() function is meant to serve as a signal that we can free this data
- Loading branch information
1 parent
64e11a5
commit b0df7f6
Showing
5 changed files
with
420 additions
and
9 deletions.
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 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 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 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.