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).


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.

Browse other questions tagged or ask your own question.