Hi, glad you found your way here. I'm Yash, a developer who contributes to open source, mostly p2p networking and AI tooling. Each week I write up what I shipped, what broke, and what fixing it taught me.
GitHub · X · LinkedIn · Portfolio
TL;DR
If you've ever had a CI run fail because a test expected a packet to arrive in exactly 200ms, you know my pain this week. I spent most of my time moving away from clock-based testing and toward progress-driven logic, alongside some critical bug fixes in the Python libp2p stack. Across 22 commits and 15 code reviews, it was a heavy week for p2p infrastructure and making sure our networking primitives actually behave when the network gets noisy.
What I Built
Most of my energy went into minip2p, where I’m deep in the weeds of making the Rust implementation more resilient. I pushed 14 commits there, but the real story is in the refactoring.
minip2p: Killing the Flaky Test
There’s nothing that kills developer velocity quite like a flaky test suite. I opened and closed Issue #261 this week because our timing-budgeted tests were falling over whenever the CI runner got too busy. We’ve all been there: you put a sleep in a test, it works on your machine, and then it fails in GitHub Actions because the runner is under-provisioned.
I landed PR #284 to address this. Instead of waiting for the clock, I refactored the tests to be driven by progress. For the TCP transport tests, I stopped waiting for an arbitrary 200ms and started waiting for the socket to actually fill and drain. I also had to isolate the relay reservation and timer-bound tests in nextest to ensure they aren't fighting for resources. It’s the kind of unglamorous work that makes the whole project feel more professional.
Beyond the tests, I landed a pretty significant refactor in PR #260. I wanted to consolidate how we handle framed exchanges. Now, AutoNAT and Identify (two core p2p protocols) share a framed exchange and are properly bounded by their declared lengths. It’s a bit of "defensive networking"—ensuring a peer can't just stream infinite data at us during a handshake.
py-libp2p: Fixing the Leaks
On the Python side of things, I spent some time in py-libp2p. I noticed a gnarly issue where the WebSocket transport was being a bit too generic with its error reporting. Basically, every failure after the initial connection was being swallowed and reported as a "handshake timeout," which is incredibly frustrating when you're trying to debug a real network issue. Even worse, it was leaking the TCP socket in the process.
I closed Issue #1554 by landing PR #1556, which ensures we report the real dial failure and, crucially, close the socket so we don't bleed file descriptors. I also followed up with PR #1555 to make sure we’re actually verifying server certificates on wss:// (secure WebSocket) dials. Security isn't optional, even in p2p.
Trak: Cleaning up the Indexer
I also made a quick pit stop at Trak, a Rust project I've been helping out with. I noticed the indexer was getting distracted by test fixtures. If you have a directory full of mock code for tests, you don't necessarily want your primary code indexer treating those as real declarations. I landed PR #1 by updating the logic to read declarations from source code only and explicitly exclude test fixture trees. It’s a small change (+532/-12), but it makes the tool much more accurate for its users.
Pull Requests
It was a "clean sweep" week for PRs—5 opened, 5 merged.
- [minip2p #284]: The big test overhaul. Moving from
sleep()to actual state-checking. - [minip2p #260]: The core refactor. Sharing framed exchanges between protocols.
- [py-libp2p #1556]: Fixing the WebSocket socket leak and improving error transparency.
- [py-libp2p #1555]: Enforcing WSS certificate verification.
- [Trak #1]: Narrowing the indexer's scope to exclude noise.
Code Reviews
While I only had 22 commits of my own, I spent a massive amount of time in the dotnet-libp2p repository. I provided 15 reviews this week, and honestly, this is where a lot of the "architectural" thinking happens. Helping the C# implementation stay in sync with the wider libp2p spec is a challenge, but the team there is shipping some great stuff.
Some of the highlights from the review pile:
- QUIC on Windows: Reviewed a PR to enable the QUIC transport for Windows users.
- Gossipsub Hardening: Looked at changes for handling partial messages and using
IDONTWANTfor large gossip messages to save bandwidth. - Security: Approved a move to P-256 ephemeral keys for TLS and better validation of gossip signatures before they hit application hooks.
- Reliability: Gave the green light on PRs for preserving Yamux replies and handling segmented writes more gracefully.
Reviewing 15 PRs while only opening 5 of my own definitely made this a "mentorship and alignment" week. It's important to keep the ecosystem moving together, especially when you're working across three different languages.
Tech Stack
This week was a polyglot special:
- Rust: My main focus for the heavy lifting in
minip2pandTrak. - Python: Used for the
py-libp2pmaintenance and bug fixing. - C#: Purely on the review side, ensuring the .NET implementation is solid.
The numbers tell a story of growth: +2,503 / -357. That’s a lot of new code, but a good chunk of that was the test infrastructure and the refactored protocol handlers. I'm okay with a net positive line count when it means the tests are finally stable.
What's Next
Next week, I want to double down on the minip2p transport layer. Now that the tests are stable, I can actually start benchmarking performance without worrying about the CI runner's mood. I'm also keeping an eye on the open PRs in the Python and .NET stacks—there's a lot of momentum right now in the p2p space, and I want to make sure we keep that energy going.
If you're building p2p tools, stop using sleep() in your tests. Your future self (and your CI) will thank you. See you next week!
Generated by DevNotion