What is the use of ethereum's RLPx and how do they use it in ethereum ecosystem
Asked Answered
G

1

8

I understand that RLPx is a protocol based on Kademlia DHT but one thing i'm not sure about is what's the need for this protocol or the problem that it is trying to solve ?

Further it says it's objective is to allow multiple protocols over single connection what does that mean ??

and also what does this part means

RLPx is a cryptographic peer-to-peer network and protocol suite which provides a general-purpose transport and interface for applications to communicate via a p2p network.

Galleon answered 28/2, 2018 at 12:12 Comment(0)
C
4

I'm trying to understand the same thing, I will explain what I did understand so far (in the hope that if I'm wrong someone will correct me):

First of all RLPx is a protocol suite and not a single protocol. On the one hand it maintains the p2p overlay network with the means of a modified version of the kademlia node discovery protocol (using UDP messages). We could name it RLPx node discovery protocol.

The first time two peers meet each other they should perform a two-phase handshake (i.e. two different handshakes). In the first handshake they exchange some cryptographic secrets (the details are explained here (in the rlpx specification)) that are used for the subsequent communications between them. The subsequent messages are therefore encrypted and authenticated.

In the second handshake they exchange their capabilities, i.e. which devp2p subprotocols they support (the peers can support multiple protocols). This second handshake could be considered already part of devp2p wire protocol (the Hello message). The documentation says that:

the ÐΞVp2p nodes communicate by sending messages using RLPx

(this time using TCP messages). I list some devp2p wire subprotocols that are widely used:

Therefore RLPx messages are encrypted and authenticated and on top of them you can communicate with different protocols. We can say that RLPx is the transport layer protocol and devp2p and its subprotocols are the application level protocols.

Chilli answered 15/4, 2018 at 9:56 Comment(2)
Do you maybe know if they are using the encryption feature in any of their main protocol?Plural
Hi, I cannot really understand your question.. What do you mean exactly with main protocol? BTW they use an end-to-end encryption as explained Here and Here. Practically, each communication between the peers with DEVP2P and the subprotocols are encrypted.Chilli

© 2022 - 2024 — McMap. All rights reserved.