sc-authority-discovery 0.8.0-alpha.8

Substrate authority discovery.
Documentation

Substrate authority discovery.

This crate enables Substrate authorities to directly connect to other authorities. [AuthorityDiscovery] implements the Future trait. By polling [AuthorityDiscovery] an authority:

  1. Makes itself discoverable

  2. Retrieves its external addresses (including peer id) or the ones of its sentry nodes.

  3. Signs the above.

  4. Puts the signature and the addresses on the libp2p Kademlia DHT.

  5. Discovers other authorities

  6. Retrieves the current set of authorities.

  7. Starts DHT queries for the ids of the authorities.

  8. Validates the signatures of the retrieved key value pairs.

  9. Adds the retrieved external addresses as priority nodes to the peerset.

When run as a sentry node, the authority discovery module does not publish any addresses to the DHT but still discovers validators and sentry nodes of validators, i.e. only step 2 (Discovers other authorities) is executed.