Expand description

The ConnectivityManager actor is responsible for ensuring that we are connected to a node if and only if it is an eligible node.

A list of eligible nodes is received at initialization, and updates are received on changes to system membership. In our current system design, the Consensus actor informs the ConnectivityManager of eligible nodes.

Different discovery sources notify the ConnectivityManager of updates to peers’ addresses. Currently, there are 2 discovery sources (ordered by decreasing dial priority, i.e., first is highest priority):

  1. Onchain discovery protocol
  2. Seed peers from config

In other words, if a we have some addresses discovered via onchain discovery and some seed addresses from our local config, we will try the onchain discovery addresses first and the local seed addresses after.

When dialing a peer with a given list of addresses, we attempt each address in order with a capped exponential backoff delay until we eventually connect to the peer. The backoff is capped since, for validators specifically, it is absolutely important that we maintain connectivity with all peers and heal any partitions asap, as we aren’t currently gossiping consensus messages or using a relay protocol.

Modules

Structs

Enums