# EPF Cohort 6 Final Report ## Project abstract & links eth-p2p-z packages a Zig-first libp2p stack with QUIC transport and a Gossipsub router so Lodestar/Zeam or other Ethereum clients can adopt the upcoming QUIC-based networking path without leaving the Zig toolchain. - Proposal: https://github.com/eth-protocol-fellows/cohort-six/blob/master/projects/zig-libp2p-QUIC+Gossipsub.md - Repository: https://github.com/zen-eth/eth-p2p-z ## Status report ### Delivered - Fully implemented QUIC transport dial/listen on top of [lsquic](https://lsquic.readthedocs.io/en/latest/), completed libp2p TLS [spec](https://github.com/libp2p/specs/blob/master/tls/tls.md) including libp2p TLS handshake, identity verification, multiaddr plumbing. - Built a reusable connection switch, multistream-select negotiator, and semiduplex pubsub stream layer to host higher-level protocols. - Assembled a [Gossipsub v1.0](https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.0.md) router with publish/subscribe APIs, message validation hooks, IHAVE/IWANT/GRAFT/PRUNE control flow, mesh + fanout tracking, heartbeat timer, and arenas to manage allocations safely. - Added the ping protocol and a Dockerised transport interop harness (Redis-backed) to exercise QUIC against other libp2p implementations; passed official [transport interop test](https://github.com/libp2p/test-plans/tree/master/transport-interop/impl/eth-p2p-z). ### Outstanding / pivots - Gossipsub interop harness is still on the roadmap; transport interop test is passed, but gossipsub interop test is not tested. - Intended to improve bootstrapping and protocol attack resistance, [Gossipsub v1.1](https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md) extends a lot of features such as peer scoring, adaptive gossip dissemination, etc, we need to implement them to make eth-p2p-z production-ready. - Try to benchmark eth-p2p-z to identify any performance bottlenecks ### Current impact & future - Provides an Ethereum-focused libp2p core in Zig, unblocking Lodestar’s Zig rewrite and giving other Zig clients such as Zeam a QUIC/Gossipsub foundation. - Accelerates experimentation with Ethereum research protocols that need low-level control over networking and memory management. - Next up: finish Gossipsub v1.1/v1.2/v1.3 extensions, land the gossipsub interop suite, integrate it into Zeam/Lodestar ethereum client. ### Self-evaluation & reflection - Hit the core roadmap (QUIC transport, Gossipsub router, interop harness) though each milestone cost more time in TLS/lsquic debugging and allocator hygiene than planned. - Proud of interop test with low latency and the way arenas simplified Gossipsub memory safety; equally, I underestimated the work required for memory management with eventloop callback approach. - Main personal improvement: I now have a much deeper grasp of libp2p protocol stack and eventloop based IO programming model, but I want to tighten eth-p2p-z stability while improve API user-friendliness. ### Feedback on EPF & takeaways - Weekly Lodestar syncs, Zeam syncs and EPF syncs are very useful for progress tracking and feadback, huge thanks @philknows @wemeetagain @spiral-ladder and all Lodestar team, @g11tech @gballet and all Zeam team, @Mario @Josh and all fellows. - Office Hour has given us a better understanding of how Ethereum researchers and core developers work, and the latest developments in Ethereum, which is very meaningful, huge thanks all the speakers. - Biggest takeaway: building protocol stacks in Zig is viable today, but it demands disciplined memory accounting and precise FFI boundaries; the cohort’s feedback loop made that learning curve far smoother.