5

Looking through the source code for java ethereum I see UDPListener is part of the org.ethereum.net.rlpx.discover package and that this seems to use NioDatagramChannel (Netty's way of handling UDP datagrams) to handle Ping, Pong, FindNode and Neighbours messages and do the kademia DHT stuff. However the Devp2p specs say it is TCP only and indeed TCP is used for communication once nodes are discovered.

So I'm slightly confused; is UDP officially used for node discovery and then TCP for communication and if so where is this node discovery protocol documented?

2

Q: is UDP officially used for node discovery and then TCP for communication?

Yes.

You can see the 30301 UDP discovery port in the enode URL format (from enode url format):

enode://6f8a...d92a0@10.3.58.6:30303?discport=30301


Q: if so where is this node discovery protocol documented?

At https://github.com/ethereum/devp2p/blob/master/rlpx.md .

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.