Ethereum from scratch - Part 1: Ping

by mikejf, July 20, 2017, 8:47 a.m., 8 comments



0 nsubrahm 2 months, 2 weeks ago

There is a Ping message in ÐΞVp2p ( and a Ping payload in RLPx ( What is the relationship between the two?

0 mikejf 2 months, 2 weeks ago

They are the same type of message, but are for different protocols. The Ping in the first link is for the "wire protocol", for sending data over the network, and the Ping in the second link is that for the "discovery protocol", for locating peers. Here I focus on the discovery protocol and after that is implemented I will implement the wire protocol.

0 nsubrahm 2 months, 2 weeks ago

Ok. And, so the sequence is to do a RLPx Ping followed by a ÐΞVp2p Ping (of course, after successful Pong from RLPx)?

0 mikejf 2 months, 2 weeks ago

RLPx is a subset of DEVp2p. If you are referring to the handshake then yes, you are correct. It goes [You: PING, Them: Pong, Them: Ping, You: Pong] and then you have an established relationship.

0 nsubrahm 3 months ago

I am yet to test this. But, shouldn't you start up a `their_endpoint` instance with a running `udp_listen()` thread - ideally on a different machine?

0 mikejf 3 months ago

I could do that, it was just easier with this set up to have `their_endpoint` be the same machine . In later parts I communicate with different machines using this protocol - in part 2 actually!

0 bikeshrestha 6 months, 1 week ago

Traceback (most recent call last):
File "", line 1, in <module>
from discovery import EndPoint, PingNode, PingServer
File "/home/gori/PyEthTutorial/pyethtutorial/", line 5, in <module>
import rlp
ImportError: No module named rlp

0 mikejf 3 months ago

I think you forgot to do

pip install rlp