What is the distinction between libp2p and devp2p? Do they refer to the same thing? How are they related to RLPx?

In the libp2p whitepaper, dated Nov 2014, they appear to be the same thing:

libp2p (aka ÐΞVp2p) aims to provide a lightweight abstraction layer that provides these low-level algorithms, protocols and services in a transparent framework without predetermining the eventual transmission-use-cases of the protocols.

In the Devcon 2 presentation "libp2p ❤ devp2p":

libp2p is the modular secure networking suite that powers IPFS....


devp2p is the secure networking suite that powers Ethereum....

I'm guessing the second link is more up-to-date and that the whole thing is evolving as I type. Perhaps the IPFS libp2p was born out of the Ethereum one linked above (or vice versa). Can anyone give summaries of libp2p and devp2p, including where they came from, what they are used for and what the main differences are, along with links to their official specifications?

Finally, how does RLPx fit in with devp2p? The docs describe it like this...

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. RLPx is designed to meet the requirements of decentralized applications and is used by Ethereum.

... which sounds like what I had imagined devp2p to be doing. Is there a high level description of what libp2p, devp2p and RLPx are and how they fit together?

Other links:




RLP versions (Jul 16) https://ethereum.stackexchange.com/a/7221/820

Ethereum protocols mapped to OSI https://ethereum.stackexchange.com/a/9923/820

What underlying protocols are used to send packets between nodes, and how are messages encrypted?

3 Answers 3


LIBP2P is a protocol implementation toolset or library that allows you to build software for different P2P networks and scenarios.

DEVP2P and RLPx are presented in the Ethereum documentation as something separate, but in fact:

  • They are the same thing if you are talking about a protocol
  • They are different things if you are talking about message formats

The naming and conceptual model is confused and very poorly communicated. In my opinion the entire P2P layer of Ethereum could really use a lot of clarification:

  • The RLPx wire protocol requires that each 'packet' specify its 'protocol type,' a ushort (unsigned short).
  • But the 'protocol type' is based on a commonly agreed numbering system established only after the peer handshake completes, and that peer handshake to establish the numbering system is carried out using 'devp2p,' which the designers seem to have intended as being a super-protocol over the rlpx transport.
  • So in terms of protocol the RLPx and DEVp2p handshake steps can be considered one thing. The RLPx protocol is meaningless without the DEVp2p handshake step. The protocol RLPx+DEVp2p is one thing and needs to be renamed by the community to show that that is actually the case.
  • DevP2P messages are basically of the format "Message Type" + "Payload". The message type is a number within the space agreed by the commonly agreed protocol. The problem is that DEVP2P, despite intending to support multiple protocols, does not have a "protocol" id. The protocol id is left to the RLPx subprotocol/transport. So DEVP2P cannot fulfill its design goal without a transport that cooperates.

In short it is best to see DEVP2P and RLPx as one thing.

  • 3
    Finally I found this <3 ... It explains also, why in the go ethereum client there is a file rlpx.go and not a devp2p one ... THANK YOU!!!
    – Briomkez
    Aug 20, 2018 at 15:33
  • @Sentinel check out Ethereum Foundation grant Aug 29, 2018 at 3:32
  • @Sentinel +1 sounds like a good idea...
    – Lee
    Sep 7, 2018 at 18:20

I can only answer for libp2p coming from the IPFS project (and not devp2p coming from Ethereum).

libp2p is a modular P2P networking stack used to connect to other peers, finding and transferring content. You can see it as a collection of protocol that can use different routing, discovery and transports, depending on your needs.

It began its development inside IPFS but we quickly realized that we should make it general for our own sake (might need to switch out the transport in IPFS for example, or use multiple ones), and also for others to reuse it.

Mainly, libp2p is used by IPFS but there are other projects using libp2p as well, when a full stack is not needed and they just need a quick and reliable way of connecting to other peers.

You can find all the specifications related to libp2p over here: https://github.com/libp2p/specs Note: the specifications are WIP, but please leave and input/feedback if you come across something weird/unreasonable


According to Ethereum's github documentation devp2p is not a specific protocol but rather a number of protocols. One of those protocols is RLPx. The documentation mentions the following: " This repository contains specifications for the peer-to-peer networking protocols used by Ethereum.

  • Ethereum Node Records, our node metadata format.
  • Node Discovery Protocol v4
  • Node Discovery Protocol v5 (Draft Specification)
  • RLPx transport protocol (version 5) and several RLPx-based capabilities:
    • Ethereum Wire Protocol (version 63)
    • Light Ethereum Subprotocol (version 2)
    • Parity Light Protocol (version 1) "

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.