Module safe_network::node::routing
source · [−]Expand description
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
Routing configuration.
Bound name of elders and section_key, section_prefix info together.
Stream of routing node events
QuicP2p configurations
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.
Interface for sending and receiving messages to and from other nodes, in the role of a full routing node.
The sending API for a QUIC stream.
A 256-bit number, viewed as a point in XOR space.
Enums
An Event raised by a Node
or Client
via its event sender.
Type of messages that are received from a peer
A flag in EldersChanged event, indicating whether the node got promoted, demoted or did not change.
Constants
Defines the higher bound of this range.
During the first section, nodes can start at a range of age to avoid too many nodes having the same time get relocated at the same time. Defines the lower bound of this range.
The minimum age a node becomes an adult node.
Constant byte length of XorName
.