onflow / flow-go

A fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them.
GNU Affero General Public License v3.0
532 stars 176 forks source link

[Access] Support configuring initial topology for public network #3031

Open peterargue opened 2 years ago

peterargue commented 2 years ago

Problem Definition

Access nodes that support public Observer nodes internally create a separate network for public traffic. They also serve a DHT which is used by ANs and Observers to discover other nodes on the public network.

Currently, ANs start with an empty network topology, which means they each use a separate DHT. Observers connecting to a given AN as its bootstrap node would effectively be on a separate network from an observer connecting to a different AN.

To improve network stability, ANs should share a public network DHT so there are a large number of ANs and Observer participating in block sync.

Proposed Solution

ANs setup their public network topology here: https://github.com/onflow/flow-go/blob/master/cmd/access/node_builder/access_node_builder.go#L930

AN operators could then publish their public network address so other operators that wanted to support observers and participate on the main public network could do so by including it in their startup configs.

AN operators that wanted to have a private (public) network could do so by only including their own set of ANs in the start config.

Definition of Done

The public network's DHT is connected across Access nodes, forming a large connected network. There are integration tests that validate the correct behavior. e.g. given a network with 3 ANs and 3 ONs:

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.