Skip to content

Peers discovery: Optimize #15481

@nalepae

Description

@nalepae

#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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions