-
Notifications
You must be signed in to change notification settings - Fork 835
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
litep2p: Provide partial results to speedup GetRecord queries (#7099)
This PR provides the partial results of the `GetRecord` kademlia query. This significantly improves the authority discovery records, from ~37 minutes to ~2/3 minutes. In contrast, libp2p discovers authority records in around ~10 minutes. The authority discovery was slow because litep2p provided the records only after the Kademlia query was completed. A normal Kademlia query completes in around 40 seconds to a few minutes. In this PR, partial records are provided as soon as they are discovered from the network. ### Testing Done Started a node in Kusama with `--validator` and litep2p backend. The node discovered 996/1000 authority records in ~ 1 minute 45 seconds.  ### Before & After In this image, on the left side is libp2p, in the middle litep2p without this PR, on the right litep2p with this PR  Closes: #7077 cc @paritytech/networking --------- Signed-off-by: Alexandru Vasile <[email protected]>
Showing
5 changed files
with
79 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
title: Provide partial results to speedup GetRecord queries | ||
|
||
doc: | ||
- audience: Node Dev | ||
description: | | ||
This PR provides the partial results of the GetRecord kademlia query. | ||
|
||
This significantly improves the authority discovery records, from ~37 minutes to ~2/3 minutes. | ||
In contrast, libp2p discovers authority records in around ~10 minutes. | ||
|
||
The authority discovery was slow because litep2p provided the records only after the Kademlia query was completed. A normal Kademlia query completes in around 40 seconds to a few minutes. | ||
In this PR, partial records are provided as soon as they are discovered from the network. | ||
|
||
crates: | ||
- name: sc-network | ||
bump: patch |
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