libp2p / libp2p/specs

IP over libp2p

Open
#626 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
1.8k
Forks
320
Avg merge
11d 15h
Merged PRs (30d)
1

Description

I want to gauge interest for developing protocols/specs for implementing IP over libp2p tunneling.

Motivation

There are use cases where private overlay networks are implemented using libp2p, yet there is a need to provide an IP network abstraction (e.g. using a tun interface) to processes running in the overlay network's userland.

For an example, in the nunet network the substrate is built using libp2p, but the applications running on top of this substrate are note aware of libp2p and instead rely on the (usual) TCP/IP interface abstractions.
Unfortunately, with the current suite of libp2p protocols is quite hard to get acceptable performance because IP packets have to go over reliable transport with multiplexing.
See https://gitlab.com/nunet/device-management-service/-/merge_requests/362#note_2040757665 for performance analysis of the PoC in nunet. In short, it is to say politely not great -- at best "only" a 2x slower, which could well be 10x slower in many cases.

Call For Action

So what do we need to do? I want to specifically implement and specify protocol integrations for IP over libp2p.
I am pretty sure other projects are interested in this too, but let's get the discussion started.

I think the main difficulty is the lack of packet transports in libp2p; we end up sending IP packets over reliable transport, with mulitplexing, which completely defeats the purpose as the protocols running on top in userspace are prepared to handle packet loss and expect an unreliable network mechanism underneath.

So in order to resolve the problem of "IP over libp2p" we also need to develop appropriate packet transports, that let you send unreliable datagrams over a connection. QUIC already supports such functionality, so in a sense it is a matter of exposing it. This will also allows to use a plain UDP based protocol without QUIC complexity, but we still need to resolve encryption and authentication, possible with DTLS.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the current libp2p protocol suite and the linked nunet performance analysis. Done would require agreed protocols and specifications for IP tunneling and packet transports, including the encryption and authentication concerns described in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.