<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Raunak Kumar on Medium]]></title>
        <description><![CDATA[Stories by Raunak Kumar on Medium]]></description>
        <link>https://medium.com/@raunakumar.27?source=rss-981ededbdf13------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*L6qqUNgzAEq9hHKerZb2cg.png</url>
            <title>Stories by Raunak Kumar on Medium</title>
            <link>https://medium.com/@raunakumar.27?source=rss-981ededbdf13------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 20:04:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raunakumar.27/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My Summer of Bitcoin Journey: From Curious Developer to Bitcoin Contributor]]></title>
            <link>https://medium.com/@raunakumar.27/my-summer-of-bitcoin-journey-from-curious-developer-to-bitcoin-contributor-1543cd300dc8?source=rss-981ededbdf13------2</link>
            <guid isPermaLink="false">https://medium.com/p/1543cd300dc8</guid>
            <dc:creator><![CDATA[Raunak Kumar]]></dc:creator>
            <pubDate>Mon, 18 Aug 2025 12:15:37 GMT</pubDate>
            <atom:updated>2025-08-18T12:15:37.158Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone! This is Raunak again, and I’m excited to share that I just finished an amazing journey with the Summer of Bitcoin internship program. What started as curiosity about Bitcoin development turned into one of the most rewarding experiences of my coding career.</p><p><strong>How It All Started</strong> <br>As a first-year student, I felt both excited and intimidated when I applied to Summer of Bitcoin. Bitcoin development seemed like a mysterious world only for crypto experts. However, the program is meant for developers like me: passionate learners who are new to the Bitcoin space. <br>Getting matched with P2Pool as my project felt like hitting the jackpot. P2Pool isn’t just another mining pool; it’s a vision of how Bitcoin mining should function: decentralized, trustless, and empowering individual miners instead of concentrating power among a few large operators.</p><p><strong>My Core Contributions: What I Actually Built </strong><br>During my internship, I worked on three major contributions that significantly improved P2Pool’s capabilities:</p><p><strong>1. Adding Tokio Tower Service to P2Pool </strong><br>This was my biggest contribution. I successfully integrated the Tokio Tower service framework directly into P2Pool’s core infrastructure. For those who are unfamiliar with Rust’s async ecosystem, this was like giving P2Pool a total nervous system upgrade: <br>What I built: A full async service layer using Tokio Tower that manages all mining connections. <br>Impact: P2Pool can now handle thousands of simultaneous mining connections efficiently. <br>The challenge: Integrating modern async Rust patterns into existing Bitcoin mining infrastructure. <br>The result: Noticeably better performance and responsiveness across the entire system.</p><p><strong>2. Implementing DoS/DDoS Safety Mechanisms </strong><br>Security in Bitcoin infrastructure is critical, so I built protection systems from the ground up: <br>What I created: Multi-layered DoS/DDoS protection specifically designed for P2Pool nodes. <br>Features: Rate limiting, connection throttling, suspicious pattern detection, and adaptive defense mechanisms. <br>Why it matters: P2Pool nodes can now resist coordinated attacks that could previously take them offline. <br>Testing: I stress-tested these systems against various attack scenarios to ensure they are reliable.</p><p><strong>3. Building the HydraPool Stratum Dashboard </strong><br>This might be my proudest creation, a real-time monitoring dashboard that gives miners clear visibility: <br>What I developed: A complete Stratum dashboard for HydraPool that shows device status and performance. <br>Key features: <br>- Real-time tracking of which devices have passed, failed, or are pending. <br>- Complete monitoring of valid block submissions from each device. <br>- Performance analytics and success rate tracking.</p><p>User impact: Miners finally have insight into their operations instead of operating blindly.</p><p>Each of these contributions addresses key needs in Bitcoin’s mining ecosystem: better performance, stronger security, and greater transparency.</p><p><strong>The Human Side of Bitcoin Development </strong><br>What surprised me most wasn’t the technical challenges (though there were many) but the community. Bitcoin developers are some of the most dedicated, principled people I’ve ever worked with. Everyone truly cares about building something important for humanity’s financial future. <br>There were definitely frustrating moments; debugging async code can make you question your choices, but having a community that believes in the mission makes all the difference.</p><p><strong>My Incredible Mentor </strong><br>I have to give a huge shoutout to Kulpreet Singh, who was my mentor throughout this journey. Kulpreet didn’t just answer my technical questions (though he did that too); he helped me understand the philosophy behind Bitcoin development. <br>When I struggled with implementing the DoS protection and felt overwhelmed, Kulpreet reminded me that every line of code we write helps build a more decentralized world. He has the amazing ability to zoom out and show how your work fits into Bitcoin’s bigger picture. Thank you, Kulpreet, for your patience, wisdom, and for believing in my potential even when I didn’t!</p><p><strong>What This All Means (The Bigger Picture) </strong><br>My contributions might seem technical, but they’re really about empowerment: <br>Better P2Pool performance means more miners can join decentralized mining. <br>Stronger security protects the infrastructure that keeps Bitcoin decentralized. <br>Transparent dashboards give miners the information they need to make informed decisions.</p><p>Every improvement to P2Pool is a vote for a more decentralized Bitcoin network.</p><p><strong>Honest Reflections </strong><br>This internship pushed me far outside my comfort zone. There were days when I felt like I was drowning in async Rust code and moments when the complexity of Bitcoin’s mining protocol made my head spin. But that’s where the growth happened. <br>I learned that Bitcoin development isn’t just about writing code; it’s about understanding economics, game theory, cryptography, and distributed systems all at once. It’s challenging in the best way.</p><p><strong>What’s Next? </strong><br>This internship has completely changed my career path. I’m not just a developer anymore; I’m a Bitcoin developer, and that comes with a sense of responsibility and purpose that I’ve never felt before. <br>I plan to keep contributing to P2Pool and exploring other areas of Bitcoin development. The rabbit hole is deep, and I’m just getting started!</p><p><strong>Want to Join the Revolution? </strong><br>If you’re a developer reading this and feeling curious about Bitcoin, I highly recommend Summer of Bitcoin. The program teaches you technical skills and connects you with a global community of builders working on the most important monetary technology of our time. <br>Don’t worry if you don’t know everything about Bitcoin yet. I certainly didn’t! The willingness to learn and contribute is what matters most.</p><p><em>Thanks again to the entire Summer of Bitcoin team, Kulpreet Singh for the amazing mentorship, the P2Pool community, and everyone who supported me on this journey. Here’s to building a more decentralized future, one commit at a time!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1543cd300dc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Refactoring P2Pool's Networking Stack - My Journey So Far (Summer of Bitcoin '25)]]></title>
            <link>https://medium.com/@raunakumar.27/refactoring-p2pools-networking-stack-my-journey-so-far-summer-of-bitcoin-25-f1ab1e28184c?source=rss-981ededbdf13------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1ab1e28184c</guid>
            <dc:creator><![CDATA[Raunak Kumar]]></dc:creator>
            <pubDate>Mon, 30 Jun 2025 11:38:35 GMT</pubDate>
            <atom:updated>2025-06-30T11:38:35.264Z</atom:updated>
            <content:encoded><![CDATA[<p>Refactoring P2Pool&#39;s Networking Stack - My Journey So Far (Summer of Bitcoin &#39;25)</p><p>Hey! I’m halfway through my Summer of Bitcoin journey, and it’s been a wild ride diving into the internals of P2Pool. Here’s a quick overview of what I’ve been working on so far.</p><p>#Refactoring the Networking Stack</p><p>One of my first big tasks was to refactor P2Pool’s networking code.</p><p>I refactored REQ/REP protocol to use Tokio Tower, as it provides a fair few abstraction that helps to implement dos protection</p><p>So, I refactored it using the tokio-tower stack — a more flexible and composable way of building async networking layers in Rust. It took a good amount of time understanding how everything was wired up, but it’s now merged!</p><p>This change lays the groundwork for better separation of concerns, easier testing, and adding future features more cleanly.</p><p># Implemented tower rate limiter</p><p>After the refactor, I added a rate limiter using Tower layers to help protect against spammy or malicious peers. It’s a small but important step toward making the network more resilient.</p><p># Peer Inactivity Timeout (Work in Progress)</p><p>Right now, I’m working on implementing a timeout mechanism for inactive peers using Tower middleware. The goal is to drop connections that are idle for too long — freeing up resources and keeping things clean.</p><p>This is still under review as I write this.</p><p>Updated the Docs</p><p>Since I basically changed how networking works, I added documentation to explain what’s new and how it all fits together. Hopefully, it helps future contributors jump in more easily.</p><p>💭 What’s Next?</p><p>I plan to finish up the inactivity timeout work, then look into improving connection management further — maybe smarter peer discovery or better error handling. We’ll see how it evolves!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1ab1e28184c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Refactoring P2Pool’s Networking Layer and providing DoS safety— My Summer of Bitcoin Journey Begins]]></title>
            <link>https://medium.com/@raunakumar.27/refactoring-p2pools-networking-layer-and-providing-dos-safety-my-summer-of-bitcoin-journey-begins-1455dfe5549f?source=rss-981ededbdf13------2</link>
            <guid isPermaLink="false">https://medium.com/p/1455dfe5549f</guid>
            <dc:creator><![CDATA[Raunak Kumar]]></dc:creator>
            <pubDate>Mon, 19 May 2025 10:43:58 GMT</pubDate>
            <atom:updated>2025-05-19T11:13:42.261Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi there! I’m Raunak a first year cs undergrad and a contributor in <strong>Summer of Bitcoin 2025</strong>, working on an exciting and technically rich project: enhancing the <strong>P2Pool v2</strong> decentralized mining protocol.</p><p>P2Pool v2 operates a <strong>share chain</strong> — a blockchain of mining shares created by miners, complete with <strong>Uncle blocks</strong>, a <strong>UTXO-based transaction engine</strong>, and <strong>Bitcoin-like P2P protocols</strong> for node communication. Think of it as building a mini version of Bitcoin, purpose-built for decentralized pool mining.</p><p>My project focuses on a critical layer of this infrastructure: <strong>protecting the P2P network from DoS (Denial of Service) attacks</strong>. To achieve this, I’m:</p><ul><li>Studying how Bitcoin Core defends against various DoS threats,</li><li>Evaluating which protections are applicable to P2Pool,</li><li>And most importantly, <strong>refactoring the networking layer to use </strong><strong>Tokio Tower</strong>, which offers better abstractions for managing connections, applying rate limits, timeouts, peer scoring, and more.</li></ul><p>In this blog series, I’ll share weekly updates on what I’m working on, what I’ve learned, and where we’re headed next. This first post captures the <strong>foundation and refactoring work</strong> I tackled in <strong>Week 1</strong>(15–5–2025)</p><h3>What I Set Out to Do</h3><p>This week, my primary goal was to <strong>lay the groundwork for refactoring P2Pool v2’s networking stack</strong> to enable future DoS protection features.</p><p>Specifically, I planned to:</p><ul><li><strong>Understand the existing REQ/REP logic</strong> used in the current libp2p::request_response protocol.</li><li>Explore <strong>how Bitcoin handles DoS attacks</strong> — including connection limits, timeouts, peer scoring, and rate limiting.</li><li>Learn how <strong>Tokio Tower’s </strong><strong>Service trait</strong> can abstract P2P message handling in a modular and testable way.</li><li>Design a modular layout for the new network stack, separating the concerns of decoding, routing, and responding to messages.</li><li>Begin implementing a basic Tower Service (P2PoolService) capable of handling common request types like Ping, Pong, and Share.</li></ul><p>The idea was to decouple message logic from libp2p internals and create an extensible platform for applying DoS protections later — including per-peer throttling, message validation layers, and behavior-based bans.</p><h3>What I Did</h3><p>Over the first week, I focused heavily on understanding the existing network flow and setting up the foundation for the Tower-based refactor.</p><p>Here’s what I accomplished:</p><ul><li><strong>Explored and traced the legacy </strong><strong>handle_request_response logic</strong> in the libp2p::request_response handler. This gave me insight into how P2Pool currently matches and responds to messages from peers.</li><li><strong>Broke down the codebase into more modular components</strong>, moving the network logic into separate files like server.rs, request_response_handler.rs, and p2p_message_handlers/mod.rs.</li><li><strong>Began implementing a </strong><strong>P2PoolService struct</strong>, which wraps the core request-handling logic into a tower::Service&lt;Request&gt; trait implementation. This makes it possible to plug in middlewares like rate limiting, timeouts, or peer bans.</li><li><strong>Reorganized message matching</strong> (e.g. for Ping, Pong, Share) into this Tower service so it can be tested independently of libp2p.</li><li>Started thinking about how to <strong>bridge libp2p’s event-based API</strong> with Tower’s poll_ready + call based model using async wrappers like BoxFuture.</li></ul><p>While this refactor doesn’t add DoS protection yet, it clears the path for it. With this Tower-based architecture, we’ll soon be able to treat things like peer reputation, rate limits, and connection filters as pluggable layers.</p><h3>Challenges Faced</h3><p>As expected with any foundational refactor, there were some tricky parts this week:</p><ul><li><strong>Bridging libp2p with Tower:</strong><br> Libp2p uses an event-driven model, while Tower expects a more service-oriented request/response flow. Translating incoming messages into tower::Service::call invocations in a clean and future-proof way required some design iteration.</li><li><strong>Retaining existing behavior:</strong><br> I had to ensure that basic P2P behavior (like ping-pong liveness checks and share propagation) continued to work during the transition. Preserving constants like AGENT_VERSION and PROTOCOL while swapping out the internal handler took careful testing.</li><li><strong>Managing async complexity:</strong><br> Working with Rust’s async ecosystem (libp2p, tokio, tower, futures) means dealing with lots of lifetimes, traits, and pinned futures. Writing a clean Tower Service that compiles <em>and</em> fits into the event loop wasn’t always straightforward.</li><li><strong>Finding the right file/module structure:</strong><br> Since the existing P2Pool code wasn’t originally modular, I spent time figuring out a sensible directory layout that separates protocol definitions, handler logic, and service plumbing without introducing circular dependencies.</li></ul><p>These challenges slowed me down a bit, but they also gave me a much clearer understanding of the internals — which will help a lot in the coming weeks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1455dfe5549f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>