#StackBounty: #devp2p #rlpx Relationship between TCP, RLPx transport protocol and subprotocol packet

Bounty: 50

I’m currently trying to understand the structure of the rlpx transport protocol messages, so I depicted these scheme, based on my understanding of the description of the single frame packet at this link rlpx transport protocol

enter image description here

I would like to know if this scheme is plausible or it is completely wrong.

Furthermore, I would like to know why the implementation of rlpx (e.g. in https://github.com/ethereum/go-ethereum/blob/master/p2p/rlpx.go, e.g. in line 652) do not use the “Protocol Type” in the RLPx header, but rather uses the “packet type” in the subprotocol packet to obtain the information about the subprotocol (by using offsets as shown here https://github.com/ethereum/go-ethereum/blob/master/p2p/peer.go, e.g. the matchProtocols function).


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.