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

#29 in #connected

Download history 560/week @ 2024-10-20 797/week @ 2024-10-27 668/week @ 2024-11-03 129/week @ 2024-11-10 358/week @ 2024-11-17 735/week @ 2024-11-24 837/week @ 2024-12-01 1331/week @ 2024-12-08 1472/week @ 2024-12-15 403/week @ 2024-12-22 288/week @ 2024-12-29 1227/week @ 2025-01-05 1999/week @ 2025-01-12 1643/week @ 2025-01-19 556/week @ 2025-01-26 1355/week @ 2025-02-02

5,849 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

~13–23MB
~331K SLoC