20 releases (6 major breaking)

8.0.0 Mar 26, 2023
7.0.0 Feb 26, 2023
6.0.0 Jan 9, 2023
5.0.0 Dec 19, 2022
2.0.0-alpha.5 Mar 24, 2020

#6 in #reputation

Download history 1773/week @ 2025-06-21 736/week @ 2025-06-28 898/week @ 2025-07-05 1943/week @ 2025-07-12 1853/week @ 2025-07-19 1480/week @ 2025-07-26 383/week @ 2025-08-02 1581/week @ 2025-08-09 1525/week @ 2025-08-16 1416/week @ 2025-08-23 1369/week @ 2025-08-30 2096/week @ 2025-09-06 1461/week @ 2025-09-13 2251/week @ 2025-09-20 1706/week @ 2025-09-27 962/week @ 2025-10-04

6,541 downloads per month

GPL-3.0-or-later…

59KB
1K SLoC

Peer Set Manager (PSM). Contains the strategy for choosing which nodes the network should be connected to.

License: GPL-3.0-or-later WITH Classpath-exception-2.0


lib.rs:

Peer Set Manager (PSM). Contains the strategy for choosing which nodes the network should be connected to.

The PSM handles sets of nodes. A set of nodes is defined as the nodes that are believed to support a certain capability, such as handling blocks and transactions of a specific chain, or collating a certain parachain.

For each node in each set, the peerset holds a flag specifying whether the node is connected to us or not.

This connected/disconnected status is specific to the node and set combination, and it is for example possible for a node to be connected through a specific set but not another.

In addition, for each, set, the peerset also holds a list of reserved nodes towards which it will at all time try to maintain a connection with.

Dependencies

~15–21MB
~389K SLoC