Crate sc_authority_discovery

Source
Expand description

Substrate authority discovery.

This crate enables Substrate authorities to discover and directly connect to other authorities. It is split into two components the Worker and the Service.

See Worker and Service for more documentation.

Structs§

Service
Service to interact with the crate::Worker.
Worker
An authority discovery Worker can publish the local node’s addresses as well as discover those of other nodes via a Kademlia DHT.
WorkerConfig
Configuration of Worker.

Enums§

Error
Error type for the authority discovery module.
Role
Role an authority discovery Worker can run as.

Traits§

AuthorityDiscovery
Wrapper for AuthorityDiscoveryApi. Can be be implemented by any struct without dependency on the runtime.
NetworkProvider
NetworkProvider provides Worker with all necessary hooks into the underlying Substrate networking. Using this trait abstraction instead of sc_network::NetworkService directly is necessary to unit test Worker.

Functions§

new_worker_and_service
Create a new authority discovery Worker and Service.
new_worker_and_service_with_config
Same as new_worker_and_service but with support for providing the config.