Ethereum from scratch - Part 1: Ping

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

Subscribe

Comments


This is a single comment thread.
0 nsubrahm 10 months, 2 weeks ago

There is a Ping message in ÐΞVp2p (https://github.com/ethereum/wiki/wiki/%C3%90%CE%9EVp2p-Wire-Protocol) and a Ping payload in RLPx (https://github.com/ethereum/devp2p/blob/master/rlpx.md). What is the relationship between the two?

0 mikejf 10 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 10 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 10 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.