Peer Discovery in Blockchain


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.

Further readings:

Peer discovery in the Harmony network:


I’m curious to know who controls the DNS feed for Bitcoin? This sounds as a potential point of centralization/failure.


Great question, Nicolas!

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 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.


try the following command and you will see a list of IPs returned by DNS.

$ dig

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.58.amzn1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57365
;; flags: qr rd ra; QUERY: 1, ANSWER: 25, AUTHORITY: 0, ADDITIONAL: 0

; IN A

;; ANSWER SECTION: 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A 60 IN A