-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
#15471 added a lot of improvements related to peers discovery.
However, there is still a lot of room for improvement:
Peer discovery can be launched at different places in the code:
- When searching for general peers until the target count is reached.
- When searching for peers in a given subnet, until the target count is reached.
- When broadcasting a message on a given subnet, if no peer is subscribed to this subnet.
Each peer discovery looks for a different types of peers, and each peer discovery consumes quite a bunch of CPU resources.
To optimize that, we could create a background service which takes as an input all constraints of peers to be researched. Only this service should crawl the network.