Peer discovery is the process in which new nodes discover other nodes in the network and join the network. In Bitcoin, new nodes contact a DNS feed that uses DNS record to get IPs of a few well-known nodes. The new node contacts the peer nodes and the peers send up to 2500 random IP addresses to the new node. Each node may have up to 8 outgoing links and 125 links in total. All messages are broadcast to 8 peers, and each peer broadcasts to 8 more peers. In Ethereum, the well-known nodes are hardcoded into the Ethereum client software. Peers use a distributed hash table (DHT) to return a list of nodes, based on XOR-metrics distance as the method for discovering other nodes. The DHT is based on the Kademlia paper.
For Harmony, new nodes contact the beacon chain to submit a proof of stake. Once the proof of stake is validated, the new node will receive a list of IPs.The new node waits to join at the next epoch and we use a bounded cuckoo rule to phase in/out new and old nodes. A new node can contact any node in the list supplied by beacon chain. The new node will need to figure out which shard it is in and the peers in the same shard may return a list of peers based on Kademlia DHT.
My understanding was that “seed addresses” are hard-coded in by the software developers, but my readings suggest that this method is secondary to a primary method: “several host names (such as dnsseed.bluematt.me) are maintained that resolve to a list of IP addresses known to be running nodes.”
An operator of one of the DNS seeds answered this question on Stackoverflow–read more here.
Thanks Gavin. The combination of static IPs in the client and DNS seed is interesting. Also that make sense to have several DNS to reduce the attack vector on this side.