hs-libp2p: A Haskell Implementation of the libp2p Stack
Every Ethereum node reaches peers through libp2p: multiaddr, Noise, Yamux, Identify, Kademlia DHT, GossipSub. Yet this layer rests on a few implementations; when two read an underspecified spec corner differently, peers fail to connect or silently drop messages — a systemic risk with no owner.
I built the full libp2p stack independently in Haskell — TCP, Noise XX, Yamux, multistream-select, Switch, Identify, Ping, Kademlia DHT, GossipSub — with 547 unit, property, and end-to-end tests, and joined libp2p/unified-testing to interop with other libp2p implementations.
A layer-by-layer tour of Ethereum's p2p stack; the concrete spec ambiguities a fresh, strongly-typed implementation surfaces that incumbents absorbed as folklore; how cross-client interop keeps the network coherent; and why implementation diversity at the networking layer — not just the client layer — is a resilience and censorship-resistance property.
Speakers: Shouki Tsuda
Track: Permissionless Networks