Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

peering: support seeds, seed_mode, and private_peer_ids #408

Closed
jchappelow opened this issue Dec 4, 2023 · 1 comment
Closed

peering: support seeds, seed_mode, and private_peer_ids #408

jchappelow opened this issue Dec 4, 2023 · 1 comment

Comments

@jchappelow
Copy link
Member

jchappelow commented Dec 4, 2023

For simplicity, we are relying on the persistent_peers setting to form a network, where the validators point to each other. This is not the recommended approach, but it is simple.

While we do expose the pex setting to enable the "peer exchange reactor" we have not yet used it afaik. I think we might want to enable it by default so that non-validator nodes can discover each other and form a network that is less centralized around the validators.

There is also the seed_mode setting, which dramatically changes the function of the node. It only crawls the network looking for peers, and when another node connects and asks it for addresses it will respond and disconnect. These are what you would think of as the bootstrap nodes if you were starting a fresh non-validator node and wanted to sync the chain, and they are specified with the seeds setting. seed_mode requires pex enabled. We currently expose neither seeds or seed_mode.

I think we should do the following for this release (or a patch shortly after) to avoid an overly centralized network:

  • Enable pex by default.
  • Expose seed_mode so that we can have proper bootstrap nodes that: (a) are not validators, and (b) do not maintain persistent connections that would cause them to quickly reach their max inbound limit.
  • Expose seeds setting, so that joining nodes can specify these seed nodes.

Other networks like eth have bootstrap nodes like this. Bitcoin and other conventional utxo chains typically have DNS seeders that crawl the network and return a list of active nodes on a DNS server interface. It's a lot less important in a controlled PoA network, but still good for network health.

We can probably get by for a while with the persistent_peers-only approach, but it is likely that those nodes will reach their inbound limits quickly. Enabling pex seems like a good idea as well so that other nodes can at least discover the rest of the network from the persistent peers.

@jchappelow
Copy link
Member Author

Resolved by #424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant