11

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?

1 Answer 1

12

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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