Module sn_interface::network_knowledge
source · Re-exports
pub use self::node_state::MembershipState;
pub use self::node_state::NodeState;
pub use self::section_authority_provider::SapCandidate;
pub use self::section_authority_provider::SectionAuthUtils;
pub use self::section_authority_provider::SectionAuthorityProvider;
pub use self::section_keys::SectionKeysProvider;
Modules
Structs
- Information and state of our node
- Container for storing information about the network, including our own section.
- We are relocating to the section that matches the contained XorName.
- The relocation info contains the dst (in
NodeState
), the old name, the new name and the source section signature over the fact that the section considered the node to be relocated. - A relocation proof proves that a section started a relocation of one of its nodes, and that the new name provided was created by that node.
- The relocation trigger is sent by the elder nodes to the relocating nodes. This is then used by the relocating nodes to request the Section to propose a relocation membership change.
- Container for storing information about other sections in the network.
- The update to our
NetworkKnowledge
containing the section’sSectionAuthorityProvider
signed by the section and the proof chain to validate the it. - A Merkle DAG of BLS keys where every key is signed by its parent key, except the genesis one.
Enums
- Internal error.
- The current state of a relocating node
Constants
- Number of elders per section.
- The secret key for the genesis DBC.
- The minimum age a node becomes an adult node.
Functions
- Get the expected elder count for our network. Defaults to
DEFAULT_ELDER_COUNT
, but can be overridden by the env varSN_ELDER_COUNT
. - Recommended section size. The section will keep adding nodes when requested by the upper layers, until it can split. A split happens if both post-split sections would have at least this number of nodes.
SuperMajority
of a given group (i.e. > 2/3)Threshold
of a given group
Type Definitions
- The type returned by the
sn_routing
message handling methods.