Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 387
Ankit Singh Avatar asked Feb 28 '18 12:02

Ankit Singh


People also ask

What is Ethereum and how does it work?

The transactions are processed and stored on the Ethereum network. The Ethereum network can also be used to store data and run decentralized applications. Rather than hosting software on a server owned and operated by Google or Amazon, where the one company controls the data, people can host applications on the Ethereum blockchain.

What is Ethereum (ETH) blockchain?

The Ethereum blockchain is powered by its native cryptocurrency — ether (ETH) — and enables developers to create new types of ETH-based tokens that power dApps through the use of smart contracts. The most common ETH-based cryptocurrencies are built on the ERC-20 token standard.

Is Ethereum a good settlement layer for smart contracts?

One aspect of Ethereum’s suitability as a settlement layer is its capability for creating and executing smart contracts. What are Smart Contracts? How Ethereum Works Ethereum’s smart contracts have been famously explained by Nick Szabo as being similar to a vending machine.

What is Ethereum layer 2 (L2)?

Layer 2 (L2) is a collective term to describe a specific set of Ethereum scaling solutions. A layer 2 is separate blockchain that extends Ethereum and inherits the security guarantees of Ethereum. Now let’s dig into it a bit more, and to do this we need to explain layer 1 (L1).


1 Answers

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:

  • eth, the ethereum wire subprotocol used to exchange the information about the blockchain
  • whisper
  • les the light ethereum subprotocol is the protocol designed for the light clients
  • ...If you want you can write your own subprotocol https://github.com/ethereum/go-ethereum/wiki/Peer-to-Peer.

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.

like image 81
Briomkez Avatar answered Oct 08 '22 10:10

Briomkez