Skip to content

Smarter selection of peers to connect to #743

@dknopik

Description

@dknopik

We currently connect to peers like this:

For each subnet, if the currently connected peers is below 6, calculate (6 - count) * 2 as the need.

Shuffle list of peers in the peer store, filter out connected and blocked peers.

Inspect each peer in the list, if the peer is on a subnet where we have a remaining need, connect to it and reduce the need of the subnets it is in by one.


This is not ideal.

We should additionally evaluate peers for their value to be connected to with the following factors:

What Why Rough weight
Time of last connection attempt It does not make sense to keep trying to connect to a peer if we cant. High
Subnet overlap A peer with many overlapping peers is more valuable to us Medium
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions