20 releases (6 major breaking)

new 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

#1005 in Magic Beans

Download history 1492/week @ 2022-12-09 895/week @ 2022-12-16 981/week @ 2022-12-23 287/week @ 2022-12-30 586/week @ 2023-01-06 429/week @ 2023-01-13 1132/week @ 2023-01-20 765/week @ 2023-01-27 1263/week @ 2023-02-03 489/week @ 2023-02-10 1521/week @ 2023-02-17 850/week @ 2023-02-24 1118/week @ 2023-03-03 735/week @ 2023-03-10 745/week @ 2023-03-17 442/week @ 2023-03-24

3,063 downloads per month
Used in 50 crates (7 directly)

GPL-3.0-or-later…

105KB
2K 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

~12–19MB
~380K SLoC