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?

1 Answer 1

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://[email protected]: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 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.