Table of Contents
- Introduction
- Recap of talks
- Intro to libp2p: helping with real world application problems
- A month in PL EngRes libp2p Development and how you can be involved
- Browser connectivity state of the union and demo
- WebTransport Transport
- Why WebRTC
- Decentralized NAT Hole Punching
- libp2p in Nim
- libp2p Interoperability Testing with Testground
- WebRTC signaling data over QR Codes
- Formal Analysis of GossipSub
- Introducing Quiet - Encrypted P2P team chat without servers, just Tor
- How Pyrsia is Using libp2p To Take Over the World
- Decentralized Chat with IPFS & libp2p
- DOS Defense - Do’s and Dont’s
- Intro to Lodestar
- The power of two choices: Why the Kademlia binary tree isn’t balanced and what we can do about it
- Get Involved/Stay Tuned
# Introduction
Last month, on October 30th 2022, libp2p users and contributors gathered together for the first ever libp2p Day!
The day included talks from maintainers, contributors, community members, and users. Topics included latest libp2p updates, preview of future roadmap items, bleeding-edge demos on browser connectivity using new transport protocols, and much more.
Speakers shared new, exciting developments built on libp2p and represented organizations like Little Bear Labs (opens new window), ChainSafe Systems (opens new window), Status.im (opens new window), Gather (opens new window), Quiet (opens new window), Pyrsia (opens new window), Satellite.im (opens new window), and Protocol Labs (opens new window).
In the larger context, libp2p Day was hosted at IPFS Camp 2022 (opens new window) as a part of a diverse lineup where speakers covered topics across domains such as libp2p, IPFS, content routing, decentralized computation, and more!
🎥 3 days of #IPFSCamp in one short video. 23 tracks, 100+ speakers, and the IPFS community.
— IPFS (@IPFS) October 31, 2022
Watch the recap and relive the fun.⛺️️
🎉 Who is ready for next year? pic.twitter.com/IolaZZduIB
# Goals
The goals of libp2p Day were to:
- Share updates on libp2p and highlight new developments through demos
- Gather the libp2p ecosystem, give a spotlight to projects building on libp2p, and energize the community
- Empower newcomers and existing users to become contributors and spec authors
# Takeaways
Some highlights and learnings from libp2p Day and IPFS Camp were:
# Browser Connectivity Unlocked
First-class support for WebTransport enables libp2p nodes running in the browser (currently limited to Chromium (opens new window)) to connect directly with peers on a host machine. WebTransport support was first added as an experimental feature in go-libp2p v0.23.0 (opens new window) and Kubo v0.16.0 (opens new window). The remaining WebTransport work is tracked here (opens new window).
WebRTC browser-to-server has also made significant progress. Since libp2p Day, the specification been merged (opens new window), and the rust-libp2p implementation (opens new window) has shipped! The Go and JS implementations are also tracking closely.
Check out the WebTransport and WebRTC demos below, as well as the new libp2p connectivity site (opens new window).
# libp2p Interoperability
The libp2p ecosystem continues to flourish with several implementations, each with its own set of supported features. It’s paramount to ensure these features and implementations are compatible and that new releases don’t introduce regressions. libp2p teams are spending the tail end of 2022 and much of 2023 focusing on testing libp2p interoperability.
Checkout libp2p Interoperability Testing with Testground to learn more.
# Demand for libp2p + HTTP
With the growing demand for libp2p + HTTP, especially by Protocol Labs ProductDev (opens new window) teams like Bedrock and dag.house (opens new window)), the team has started drafting an HTTP specification (opens new window), with plans to make this a top priority going into 2023. libp2p + HTTP will enable use cases like integrating directly with CDN infrastructure or allowing a static HTTP cache to respond to requests from a libp2p node.
# Recap of talks
Below is list of all talks alongside a brief outline:
# Intro to libp2p: helping with real world application problems
Max Inden (rust-libp2p maintainer, Software Engineer at Protocol Labs)
Max introduced libp2p by giving an overview of the supported transport protocols, secure channels, multiplexing mechanisms, how libp2p traverses NATs (opens new window), how libp2p discovers peers, how libp2p uses Kademlia (opens new window) for peer-to-peer routing, GossipSub (opens new window) for publishing and subscribing messages, and how libp2p exchanges data using BitSwap (opens new window). He briefly reviewed the different implementations and projects using libp2p and previewed libp2p’s future focus.
# A month in PL EngRes libp2p Development and how you can be involved
Steve Loeppky (Engineering Manager of libp2p team at Protocol Labs)
Steve outlined a typical month of libp2p development for implementations like Go, JS, and Rust and the work done to support the wider community. He showcased recent work to improve the libp2p documentation (opens new window), the implementation roadmaps (opens new window) and their planned features, and highlighted the team structure, project values (opens new window) and core tenets (opens new window).
# Browser connectivity state of the union and demo
Marten Seemann (go-libp2p maintainer, Software Engineer at Protocol Labs)
Marten gave an updated version of a P2P Paris talk (opens new window) covering the intricacies of browser communication with other nodes and discussed recent breakthroughs. He outlined the current capabilities with libp2p in the browser and gave an overview of WebSockets, WebTransport (opens new window), and WebRTC (opens new window), and future next steps. To top it off, Marten linked to the brand new libp2p connectivity website (opens new window), a site he put together to make the libp2p connectivity story easier to understand!
# WebTransport Transport
Alex Potsides (js-libp2p maintainer, Software Engineer at Protocol Labs)
Alex demoed WebTransport using the browser to fetch a file from Kubo directly (opens new window).
Alex underscored the incredible accomplishment in his talk: browsers can leverage WebTransport to talk directly to a distributed network. He described WebTransport availability in browsers today and how it compares to WebRTC concerning application performance.
# Why WebRTC
Ryan Plauche (Software Engineer at Little Bear Labs (opens new window))
Max Inden ( rust-libp2p maintainer, Software Engineer at Protocol Labs)
Later, Max dove deeper into WebRTC by offering an overview of its history and describing its advantages, namely, how WebRTC enables connections between peers using self-signed certificates (opens new window) and allows for hole punching in the browser. He then described the Browser to Server specification (opens new window) in greater detail and previewed Browser-to-Browser connectivity.
From Little Bear Labs (opens new window), Ryan presented the work he and his colleagues John (opens new window) & Chinmay (opens new window) accomplished to support WebRTC in libp2p. He gave a fantastic demo of WebRTC browser-to-server using one browser client (a react app with a js-libp2p dialer) and two servers (two go-libp2p listeners). He also verified the demo in real-time using Chrome’s chrome://webrtc-internals page to observe the data channels and prove that the intended messages were passed using WebRTC!
# Decentralized NAT Hole Punching
Dennis Trautwein (Research Engineer at ProbeLab (opens new window))
Dennis presented his project on measuring the success rates of the novel decentralized hole-punching mechanism. He described the hole-punching mechanism and gave an overview of the Direct Connection Upgrade through Relay (DCUtR) protocol (opens new window). He then discussed how measurements are made and the findings on success rates. Dennis ended the presentation with a call to action: participate in the NAT Hole Punching Measurement Campaign (opens new window)!
# libp2p in Nim
Tanguy (nim-libp2p maintainer, Software Engineer at Status.im (opens new window))
Tanguy spoke about the Nim programming language (opens new window) and drew contrasts between the features and goals of Nim, Go, and Rust. He focused on nim-libp2p (opens new window) which underpins applications like Codex (opens new window), Waku (opens new window), and Nimbus (opens new window). Tanguy detailed currently supported features in nim-libp2p, what it’s missing, and outlined plans for incoming features (GossipSub improvements, Tor transport, C bindings, running in the browser, and Bluetooth transport.)
Fun fact: nim-libp2p recently became the first libp2p implementation to cut a 1.0 release 🥳
# libp2p Interoperability Testing with Testground
Laurent Senta (Productivity Engineer at Protocol Labs)
Laurent gave a talk introducing Testground (opens new window) and how it helps achieve libp2p’s interoperability goal (as mentioned in Steve’s presentation (opens new window).) He explained the importance of interop testing between libp2p implementations and how Testground’s language & runtime agnostic framework is a perfect fit for this use case. In the overview, Laurent described a ping test, how to make a test runnable in Testground, and how build and runtime parameters are specified in test configurations. Notably, he shared how Testground and interop testing has already caught bugs (within a month of tests being enabled)!
Laurent also previewed upcoming features (support for complex test suites, Node JS and Browser JS tests, etc.) and plans for quality of life improvements (simplify debugging, documentation, and stability improvements.)
# WebRTC signaling data over QR Codes
Gorka (Tech lead at Gather (opens new window))
Gorka demonstrated a novel experiment: WebRTC data exchange over QR codes. He described how it’s possible to share any data using QR codes and explained how this method could be used to exchange signaling data to establish a WebRTC connection between two devices on the same network.
# Formal Analysis of GossipSub
Ankit Kumar (PhD student at Northeastern University)
Ankit presented on work he and his colleagues at Northeastern University did to formally specify the GossipSub protocol. This critical work cross validated the prose specification (opens new window) against GossipSub implementations in the Filecoin and Ethereum networks. Ankit detailed how the team at Northeastern used the ACL2S theorem prover (opens new window) as a part of the formalization effort and arrived at a scoring function (used to determine good peers vs. bad peers) with four essentials properties needed to prevent Sybil attacks. He shared findings and discussed which properties were satisfied on Filecoin and Ethereum, and outlined future directions to develop a verified network stack.
# Introducing Quiet - Encrypted P2P team chat without servers, just Tor
Holmes Wilson (Founder of Fight for the Future (opens new window))
Holmes presented Quiet (opens new window), a slack alternative focused on privacy, built on IPFS, OrbitDB, and Tor .onion services. Quiet teams operate in private libp2p and IPFS networks (over Tor) which use a modified libp2p WebSockets transport combined with Tor, as well as BitSwap and PubSub for messaging. Holmes also provided contrasts between Quiet and other privacy focused (Signal) and non-privacy focused team messaging apps (e.g. Matrix and Mattermost.)
# How Pyrsia is Using libp2p To Take Over the World
Elliot Frisch (Blockchain Developer at JFrog (opens new window))
Elliot introduced and gave a demo of Pyrsia (opens new window), a binary build & distribution system written in Rust and built on top of libp2p for messaging (instead of HTTP or SSH.) He detailed how Pyrsia seeks to provide provenance when distributing binaries with the aim to prevent known exploits like the SolarWinds hack (opens new window), Log4Shell exploit (opens new window), malicious crates in rust (opens new window), and domain takeovers (opens new window).
# Decentralized Chat with IPFS & libp2p
Drew Ewing (CTO at Satellite.im (opens new window))
Drew introduced Satellite, a decentralized video, voice, and chat application that utilizes libp2p and IPFS. He described Iridium (opens new window), an abstraction layer that bootstraps both IPFS and libp2p and uses DIDs (opens new window) for user identity. He ended the presentation with a demo where he generated a DID, created a new user account, and sent messages. You can play with a demo here: https://core.satellite.im/ (opens new window)
# DOS Defense - Do’s and Dont’s
Max Inden ( rust-libp2p maintainer, Software Engineer at Protocol Labs)
Max’s third talk of the day outlined how to prevent DoS attacks by explaining what an application should do (bound resources, enforce backpressure, etc.) and what an app should avoid. This was a fun, interactive session where Max presented code snippets and had participants point out how an attacker could take advantage of flaws in the code.
# Intro to Lodestar
Cayman Nava (js-libp2p & Lodestar (opens new window) maintainer, Blockchain Engineer at ChainSafe Systems (opens new window))
Cayman gave an overview of Lodestar (opens new window), an Ethereum consensus client implemented in TypeScript and its use of js-libp2p. He described the unique challenges of writing high performance TypeScript/JavaScript, and explained how the ChainSafe team uses metrics and CPU profiling to test js-libp2p and Lodestar in production.
# The power of two choices: Why the Kademlia binary tree isn’t balanced and what we can do about it
Petar Maymounkov (co-author of Kademlia (opens new window), Senior Research Engineer at Protocol Labs)
The final talk by Petar was a great way to cap off libp2p Day. Petar discussed peer ID distribution in the Kademlia DHT - existing problems and solutions to those problems. In the first half of the talk, he showed that in an experiment (run many times over) of picking a thousand random numbers and inserting them into a binary tree, the distribution of leaf depths is always going to be the same, even though the tree is different in each experiment. Furthermore, Petar described how a theorem that looks at distribution of depths in the tree can be used to summarize the imbalance/non-uniformity of the Kademlia binary tree.
The second half of the talk provided a solution and described the power of two choices, an algorithm for picking peer IDs results in an overall more balanced binary tree with a shallower depth distribution. Petar explains that a well-balanced tree can give us a better inference of network size.
# Get Involved/Stay Tuned
A big thank you to the attendees, speakers, and organizers of libp2p Day! 🤩 It was a pleasure to have everyone together for the first libp2p Day and we hope to see you at the next one. To those who couldn’t make it this time around, we hope you can make it next time. Until then, these recordings will help you get up to speed.
- If you’d like to get involved and contribute to libp2p, you can reach out to us using these means: https://libp2p.io/#community (opens new window)
- If you’re a self-starter and want to start pushing code immediately, feel free to ping the maintainers in any of these help wanted/good first issues: go-libp2p (opens new window), js-libp2p (opens new window), and rust-libp2p (opens new window).
- If you want to work in and around libp2p full-time, there are various teams hiring including the implementation teams. See https://jobs.protocol.ai/jobs?q=libp2p (opens new window) for opportunities across the Protocol Labs Network (opens new window).
- There is a call for participants in the NAT Hole Punching Measurement Campaign (opens new window). Please check it out, any help is appreciated!
To learn more about libp2p generally, checkout:
- The libp2p documentation portal (opens new window)
- The libp2p connectivity website (opens new window)
- The libp2p curriculum put together by the Protocol Labs Launchpad program (opens new window)
You can reach out to us and stay tuned for our next event announcement by joining our various communication channels (opens new window), joining the discussion forum (opens new window), following us on Twitter (opens new window), or saying hi in the #libp2p-implementers channel in the Filecoin public Slack (opens new window).
Cheers!