I am aware of the advantages of UDP, but why not allow a choice? Since since Tor requires the use of TCP, why have Ethereum developers elected not to support TCP for discovery?


UDP-based discovery is one of the main paradigms of peer discovery.

For example, Universal Plug and Play (UPnP) uses the UDP-based Simple Service Discovery Protocol (SSDP), and BitTorrent has a UDP-based Local Peer Discovery protocol.

The general method is to multicast (broadcast?) over UDP and see who responds. The fact that UDP is unreliable - i.e. in short, it doesn't care about responses, in contrast to TCP - means it's not waiting around for responses from peers that don't exist, or which had previously existed but which are no longer online.

If we poke around a little closer in Ethereum's RPLx specification - where "RLPx is a cryptographic peer-to-peer network and protocol suite" - we see that Ethereum's node discovery is based on Kademlia, "a distributed hash table for decentralized peer-to-peer computer networks", which... uses UDP.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.