[−][src]Crate sn_routing
Peer implementation for a resilient decentralised network infrastructure.
This is the "engine room" of a hybrid p2p network, where the p2p nodes are built on top of this library. The features this library gives us is:
- Sybil resistant p2p nodes
- Sharded network with up to approx 200 p2p nodes per shard
- All data encrypted at network level with TLS 1.3
- Network level
quic
compatibility, satisfying industry standards and further obfuscating the p2p network data. - Upgrade capable nodes.
- All network messages signed via ED25519 and/or BLS
- Section consensus via an ABFT algorithm (PARSEC)
Structs
Config | Routing configuration. |
EventStream | Stream of routing node events |
Prefix | A section prefix, i.e. a sequence of bits specifying the part of the network's name space consisting of all names that start with this sequence. |
Routing | Interface for sending and receiving messages to and from other nodes, in the role of a full routing node. |
SectionProofChain | Chain of section BLS keys where every key is proven (signed) by the previous key, except the first one. |
SendStream | Stream of outgoing messages |
TransportConfig | QuicP2p configurations |
XorName | A 256-bit number, viewed as a point in XOR space. |
Enums
DstLocation | Message destination location. |
Error | Internal error. |
Event | An Event raised by a |
SrcLocation | Message source location. |
Constants
ELDER_SIZE | Number of elders per section. |
MIN_AGE | The minimum age a node can have. The Infants will start at age 4. This is to prevent frequent relocations during the beginning of a node's lifetime. |
RECOMMENDED_SECTION_SIZE | Recommended section size. sn_routing will keep adding nodes until the section reaches this size. More nodes might be added if requested by the upper layers. This number also detemines when split happens - if both post-split sections would have at least this number of nodes. |
XOR_NAME_LEN | Constant byte length of |
Type Definitions
Result | The type returned by the sn_routing message handling methods. |