← Back to all projects

KADEMLIA DHT DEEP DIVE MASTERY

In the early days of the internet, finding data required knowing exactly where it lived (a specific server). If that server went down, the data vanished. Distributed Hash Tables changed the game. They allowed the creation of systems like **BitTorrent**, **IPFS**, and **Ethereum**—networks where thousands of nodes coordinate to store and find information without a single point of failure.

Learn Kademlia DHT: From Zero to Decentralized Mastery

Goal: Deeply understand the mechanics of Distributed Hash Tables (DHTs) by building the Kademlia protocol from first principles. You will master the XOR distance metric, k-bucket routing, iterative lookups, and decentralized data persistence, eventually building a serverless peer discovery network that functions without any central authority.


Why Distributed Hash Tables Matter

In the early days of the internet, finding data required knowing exactly where it lived (a specific server). If that server went down, the data vanished. Distributed Hash Tables changed the game. They allowed the creation of systems like BitTorrent, IPFS, and Ethereum—networks where thousands of nodes coordinate to store and find information without a single point of failure.

Kademlia, designed in 2002 by Petar Maymounkov and David Mazières, is the most successful DHT protocol because of its elegant use of the XOR metric. It provides a way to find any node in a network of millions using only $\log_2(n)$ steps, while remaining incredibly resilient to “churn” (nodes constantly joining and leaving).

After completing these projects, you will:

  • Understand how to map a massive ID space (160-bit) into a searchable structure.
  • Master the XOR metric and why it’s superior to simple numerical distance.
  • Build resilient routing tables that self-heal.
  • Implement complex asynchronous recursive search algorithms.
  • Understand the foundation of modern decentralized web protocols.

Core Concept Analysis

1. The 160-bit ID Space

In Kademlia, both Nodes and Data Keys are treated as points in a 160-bit coordinate system (usually SHA-1 hashes). This space is unfathomably large ($2^{160}$), ensuring that collisions are virtually impossible.

0 ................................................................ 2^160 - 1
|                                                                    |
|--- Node A (0x123...)          |--- Key X (0xabc...)               |
|                               |--- Node B (0x456...)              |

2. The XOR Distance Metric

The “distance” between two nodes (or a node and a key) is calculated using the bitwise XOR operator. distance(A, B) = A XOR B

Why XOR?

  • Symmetry: d(x, y) = d(y, x)
  • Triangle Inequality: d(x, z) ≤ d(x, y) + d(y, z)
  • Unidirectionality: For any point x and distance d > 0, there is exactly one point y such that d(x, y) = d. This is crucial for routing!

3. Routing via K-Buckets

Nodes don’t keep a list of every other node. Instead, they keep detailed information about nodes “near” them and increasingly sparse information about nodes “far” away. This is organized into k-buckets.

Node ID: 110... (Current Node)

[Bucket 0] Distance 2^0 to 2^1: [List of nodes sharing 159 prefix bits]
[Bucket 1] Distance 2^1 to 2^2: [List of nodes sharing 158 prefix bits]
...
[Bucket 159] Distance 2^159 to 2^160: [Nodes that differ in the 1st bit]

4. The 4 Fundamental RPCs

Kademlia communication happens via four simple Remote Procedure Calls:

  1. PING: Check if a node is still alive.
  2. STORE: Tell a node to store a (key, value) pair.
  3. FIND_NODE: Ask a node for the k nodes it knows closest to a target ID.
  4. FIND_VALUE: Same as FIND_NODE, but if the node has the value for the key, it returns that instead.

5. Iterative Lookup (The Engine)

To find a node or value, a node starts an “iterative lookup”. It asks the closest nodes it knows for even closer nodes, narrowing the gap until it finds the target.

Step 1: Ask Node A (Dist 100) -> Returns [B, C, D]
Step 2: Ask Node B (Dist 50)  -> Returns [E, F, G]
Step 3: Ask Node E (Dist 10)  -> Found Target!

Concept Summary Table

Concept Cluster What You Need to Internalize
XOR Distance Distance is bitwise XOR. It’s symmetric and unidirectional, making routing predictable.
K-Buckets A way to store more nodes that are “close” and fewer that are “far”, ensuring $O(\log N)$ routing.
Iterative Lookup The recursive process of querying nodes to find those even closer to a target.
Node IDs 160-bit identifiers (usually SHA-1) that determine a node’s position in the network.
RPCs PING, STORE, FIND_NODE, and FIND_VALUE—the binary vocabulary of the network.

Deep Dive Reading by Concept

This section maps each concept to specific book chapters. Read these alongside the projects.

Distributed Fundamentals

Concept Book & Chapter
DHT Foundations Distributed Systems by Tanenbaum & Van Steen — Ch. 5: “Naming” (Section on Structured P2P)
Kademlia Protocol Kademlia: A Peer-to-peer Information System by Maymounkov & Mazières (Original Paper)
P2P Networking Computer Networking by Kurose & Ross — Ch. 2: “Peer-to-Peer Applications”

Essential Reading Order

  1. Foundation:
    • Original Kademlia Paper (Sections 1-2.3)
    • Tanenbaum Ch. 5 (Structured Overlays)
  2. Implementation Depth:
    • Original Kademlia Paper (Sections 2.4-3)

Project 1: The XOR Distance Engine

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust, C
  • Coolness Level: Level 3: Genuinely Clever
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 1: Beginner
  • Knowledge Area: Binary Logic
  • Software or Tool: Python int bitwise operators
  • Main Book: “Kademlia: A Peer-to-peer Information System” by Maymounkov & Mazières

What you’ll build: A tool that calculates the XOR distance between two Node IDs and identifies which “bucket” one node would fall into relative to another.

Why it teaches XOR: You cannot understand Kademlia without internalizing that distance isn’t subtraction—it’s XOR. This project forces you to work with 160-bit integers and prefix matching.

Core challenges you’ll face:

  • Handling 160-bit strings → Large integers vs byte arrays.
  • Calculating shared prefix length → Identifying the first bit where two IDs differ.
  • Bucket Indexing → Mapping the distance to a bucket 0-159.

Key Concepts

  • Symmetry of XOR: Original Paper Section 2.1
  • Big-Endian Bit Manipulation: “Computer Systems: A Programmer’s Perspective” Ch 2.

Difficulty: Beginner Time estimate: Weekend Prerequisites: Basic bitwise operations (XOR, shifts).

Section 1: Real World Outcome

You’ll have a CLI tool that proves how Kademlia groups nodes.

Example Output:

$ python xor_engine.py 0x00...01 0x00...02
Distance: 3
Shared Prefix Bits: 158
Bucket Index: 1

Section 2: The Core Question You’re Answering

“Why does Kademlia use XOR instead of numerical subtraction, and how does this create a ‘triangle’ of nodes?”

Before you write any code, sit with this question. In Euclidean space, distance is intuitive. In Kademlia space, $A \oplus B$ defines the topology. Understanding this allows you to see how the search space is halved at every step.


Project 2: The K-Bucket Routing Table

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust
  • Coolness Level: Level 3: Genuinely Clever
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 2: Intermediate
  • Knowledge Area: Data Structures
  • Software or Tool: Python lists and classes
  • Main Book: “Kademlia: A Peer-to-peer Information System” by Maymounkov & Mazières

What you’ll build: A full routing table implementation that manages 160 k-buckets, handles node insertion, and implements the “Least-Recently Seen” replacement policy.

Why it teaches k-buckets: You’ll discover how the routing table stays small ($O(k \log N)$) while providing enough information to reach any node.

Core challenges you’ll face:

  • Bucket Splitting → Knowing when and how to split the ID space.
  • Node Replacement Policy → Managing the PING logic for full buckets.
  • Finding Closest Nodes → Efficiently gathering $k$ nodes from multiple buckets.

Key Concepts

  • LRU Policy: Paper Section 2.3
  • k-bucket structure: Paper Section 2.2

Difficulty: Intermediate Time estimate: 1 week Prerequisites: Project 1 (XOR Engine).

Section 1: Real World Outcome

A data structure where you can add 1,000 random Node IDs and then query “Give me the 20 IDs closest to X”.

Example Output:

>>> table.add_node(Node("0xabc..."))
>>> table.get_closest("0x123...", k=20)
[Node("0x124..."), Node("0x125..."), ...]

Section 2: The Core Question You’re Answering

“How can I find a needle in a haystack of a billion nodes while only knowing about 200 of them?”


Project 3: The RPC Layer (Simulation)

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust
  • Coolness Level: Level 3: Genuinely Clever
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 2: Intermediate
  • Knowledge Area: Networking (Simulation)
  • Software or Tool: Python Classes
  • Main Book: “Kademlia: A Peer-to-peer Information System” by Maymounkov & Mazières

What you’ll build: A simulated network where Node objects can “call” methods on each other (PING, STORE, FIND_NODE).

Why it teaches RPCs: This forces you to define a standard interface for node communication before you worry about actual UDP sockets.

Core challenges you’ll face:

  • Defining the Interface → What exactly should FIND_NODE return?
  • Updating Routing on Every Contact → Every time you hear from a node, you must refresh it in your table.
  • Simulating Latency → Adding artificial delays to see how lookups perform.

Difficulty: Intermediate Time estimate: 1 week Prerequisites: Project 2 (Routing Table).

Section 1: Real World Outcome

A test script that initializes 5 nodes and has them “PING” each other, with their routing tables correctly updating.

Example Output:

Node A -> PING -> Node B
[DEBUG] Node B added Node A to Bucket 159
[DEBUG] Node A added Node B to Bucket 159

Section 2: The Core Question You’re Answering

“How does every single communication in Kademlia double as a routing table update?”

Before you write any code, sit with this question. Kademlia doesn’t have a separate “discovery” or “keep-alive” protocol. It piggybacks routing information onto every single request. This is why it’s so efficient.


Project 4: The Iterative Lookup (The Heart)

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust, Elixir
  • Coolness Level: Level 4: Hardcore Tech Flex
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 3: Advanced
  • Knowledge Area: Algorithms
  • Software or Tool: Python Asyncio (optional) or Loop
  • Main Book: “Kademlia: A Peer-to-peer Information System” by Maymounkov & Mazières

What you’ll build: The recursive lookup algorithm that searches the network for a target ID by querying the closest known nodes in parallel.

Why it teaches Routing: You will see how $O(\log N)$ routing actually works. You’ll watch your “search radius” shrink exponentially.

Core challenges you’ll face:

  • Concurrency (Alpha parameter) → Sending $\alpha$ queries at a time.
  • Tracking Queried Nodes → Preventing infinite loops and redundant work.
  • The “Shortlisting” Logic → Maintaining a sorted list of the best candidates found so far.

Difficulty: Advanced Time estimate: 1-2 weeks Prerequisites: Project 3 (RPC Layer).

Section 1: Real World Outcome

A simulation where a node finds a specific target ID in a network of 1,000 nodes using only ~10 steps.

Example Output:

Looking for 0x456...
Querying [0x123, 0x124, 0x125]
Nodes returned: [0x400, 0x401, 0x402]
Querying [0x400, 0x401, 0x402]
Success! Found Target.

Section 2: Thinking Exercise

Imagine you are looking for a house. You have 3 friends ($\alpha = 3$). You ask them for the address. They don’t know, but they give you the names of 3 people who might.

Questions:

  • How many people do you know about after 1 step?
  • How do you decide which 3 people to ask next?
  • When do you stop?

Project 5: The Key-Value Store

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust
  • Coolness Level: Level 3: Genuinely Clever
  • Business Potential: 2. The “Micro-SaaS / Pro Tool”
  • Difficulty: Level 2: Intermediate
  • Knowledge Area: Data Persistence
  • Software or Tool: Local SQLite or Dictionary
  • Main Book: “Designing Data-Intensive Applications” by Martin Kleppmann

What you’ll build: The persistence layer where nodes actually store data.

Why it teaches DHTs: You’ll learn the difference between “finding a node” and “finding a value”.

Core challenges you’ll face:

  • Value Expiration (TTL) → Implementing the 24-hour republish rule.
  • FIND_VALUE vs FIND_NODE → Handling the “early exit” when data is found.

Difficulty: Intermediate Time estimate: 1 week Prerequisites: Project 4 (Lookup).

Section 1: Real World Outcome

A node that can respond to FIND_VALUE with the actual data instead of just more node pointers.

Example Output:

Querying Node B for Key 0xABC
Node B: "I have it! Here is the value: 'Hello DHT'"

Project 6: Networked Kademlia (UDP Sockets)

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust, C
  • Coolness Level: Level 4: Hardcore Tech Flex
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 3: Advanced
  • Knowledge Area: Network Programming
  • Software or Tool: Python socket library
  • Main Book: “TCP/IP Illustrated” by W. Richard Stevens

What you’ll build: A real UDP server that listens for Kademlia packets and dispatches them to your logic layer.

Why it teaches Distributed Systems: You move from “method calls” to “packets”. You’ll deal with packet loss and timeouts.

Core challenges you’ll face:

  • Asynchronous Listening → Handling requests while your lookup is still running.
  • Serialization → Converting your Node objects to bytes and back.
  • Handling Timeouts → What happens when Node B never responds?

Difficulty: Advanced Time estimate: 2 weeks Prerequisites: Project 5 (KV Store).

Section 1: Real World Outcome

Two separate processes on your computer talking to each other over UDP.

Example Output:

[NODE A] Received PING from 127.0.0.1:8001
[NODE A] Sending PONG to 127.0.0.1:8001

Project 7: The Bootstrap Process

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust
  • Coolness Level: Level 3: Genuinely Clever
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 2: Intermediate
  • Knowledge Area: Networking
  • Software or Tool: Networked Node (Project 6)
  • Main Book: “Kademlia: A Peer-to-peer Information System” by Maymounkov & Mazières

What you’ll build: A “Self-Lookup” routine that a node runs when it first connects to a single bootstrap node to populate its k-buckets.

Why it teaches Networking: You’ll see how a node goes from knowing one peer to knowing many peers across the entire ID space.

Core challenges you’ll face:

  • Initial Discovery → Querying the bootstrap node for your own ID.
  • Filling Distant Buckets → Performing “refresh” lookups for random IDs in empty buckets.

Difficulty: Intermediate Time estimate: Weekend Prerequisites: Project 6.

Section 1: Real World Outcome

A node that connects to node-bootstrap.net and, within seconds, has a populated routing table with 50+ nodes.


Project 8: Content-Addressable Storage (Mini-IPFS)

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust, C++
  • Coolness Level: Level 5: Pure Magic (Super Cool)
  • Business Potential: 4. The “Open Core” Infrastructure
  • Difficulty: Level 4: Expert
  • Knowledge Area: Filesystems / Cryptography
  • Software or Tool: hashlib (SHA-1)
  • Main Book: “Kademlia: A Peer-to-peer Information System” by Maymounkov & Mazières

What you’ll build: A tool that hashes files, chunks them, and stores their locations in the DHT.

Why it teaches DHTs: This is the real-world utility of a DHT. You’ll understand how IPFS uses Kademlia to map content hashes to provider IDs.

Core challenges you’ll face:

  • Metadata Management → Storing the “map” of chunks in the DHT.
  • Provider Records → Storing who has the file, not just the file itself.

Difficulty: Expert Time estimate: 2 weeks Prerequisites: Project 7.


Project 9: The Sybil Attack Simulator

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust
  • Coolness Level: Level 4: Hardcore Tech Flex
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 4: Expert
  • Knowledge Area: Security
  • Software or Tool: Your existing Kademlia Node
  • Main Book: “Foundations of Information Security” by Jason Andress

What you’ll build: A malicious script that generates 100 fake Node IDs to surround a specific target ID, effectively “eclipsing” it from the network.

Why it teaches Security: You’ll discover Kademlia’s biggest weakness—it’s cheap to create identities.

Core challenges you’ll face:

  • Targeting the ID Space → Generating IDs that share a long prefix with the target.
  • Poisoning Buckets → Convincing the target to add your malicious nodes to its table.

Difficulty: Expert Time estimate: 1 week Prerequisites: Project 6.


Project 10: Proof-of-Work Node IDs (The Defense)

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust
  • Coolness Level: Level 4: Hardcore Tech Flex
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 3: Advanced
  • Knowledge Area: Security / Cryptography
  • Software or Tool: SHA-256
  • Main Book: “Kademlia: A Peer-to-peer Information System” by Maymounkov & Mazières

What you’ll build: A defense mechanism where a Node ID is only valid if it satisfies a hash difficulty (e.g., first 20 bits are zero).

Why it teaches Security: You’ll see how making identities “expensive” stops the Sybil attack you built in Project 9.

Core challenges you’ll face:

  • Verification Logic → Checking the PoW of every incoming node before updating the bucket.
  • Difficulty Scaling → Deciding how many bits are “enough” to stop an attacker without burning too much CPU.

Difficulty: Advanced Time estimate: Weekend Prerequisites: Project 9.


Project 11: Decentralized Chat Discovery

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust
  • Coolness Level: Level 4: Hardcore Tech Flex
  • Business Potential: 3. The “Service & Support” Model
  • Difficulty: Level 3: Advanced
  • Knowledge Area: P2P Applications
  • Software or Tool: Your Kademlia Node
  • Main Book: “Distributed Systems” by Tanenbaum

What you’ll build: A chat app where users find each other by hashing their usernames into the DHT.

Why it teaches Identity: You’ll understand how to bridge human names to binary Node IDs.

Core challenges you’ll face:

  • Presence Management → Keeping your “Online” status alive in the DHT.
  • Direct Messaging → Switching from DHT lookups to direct UDP chat packets.

Difficulty: Advanced Time estimate: 1 week Prerequisites: Project 6.


Project 12: NAT Traversal (Hole Punching)

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, C, Rust
  • Coolness Level: Level 4: Hardcore Tech Flex
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 5: Master
  • Knowledge Area: Networking (L4)
  • Software or Tool: UDP Sockets
  • Main Book: “UNIX Network Programming” by W. Richard Stevens

What you’ll build: A system that allows two nodes behind different home routers to talk directly.

Why it teaches Networking: This is the “secret sauce” of P2P. Without NAT traversal, DHTs only work in local networks or data centers.

Core challenges you’ll face:

  • STUN Logic → Discovering your public IP/Port.
  • UDP Hole Punching → Coordinating simultaneous outgoing packets to “open” the firewall.

Difficulty: Master Time estimate: 2 weeks Prerequisites: Project 8.


Project 13: Churn Stress Tester

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust
  • Coolness Level: Level 2: Practical but Forgettable
  • Business Potential: 3. The “Service & Support” Model
  • Difficulty: Level 3: Advanced
  • Knowledge Area: Reliability Engineering
  • Software or Tool: Python scripts
  • Main Book: “Distributed Systems” by Tanenbaum

What you’ll build: A script that launches 50 nodes and then kills 20 of them at random to see if the data and routing survive.

Why it teaches Resilience: Kademlia’s k-buckets were designed specifically to handle “churn”. This project proves it.

Core challenges you’ll face:

  • Measuring Availability → Can I still find the file I stored before the nodes died?
  • Routing Table Recovery → Watching the PING logic clear out dead nodes.

Difficulty: Advanced Time estimate: 1 week Prerequisites: Project 10.


Project 14: Kademlia Network Visualizer

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: JavaScript (D3.js)
  • Coolness Level: Level 5: Pure Magic (Super Cool)
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 3: Advanced
  • Knowledge Area: Visualization
  • Software or Tool: networkx and matplotlib
  • Main Book: “Graph Algorithms the Fun Way” by Jeremy Kubica

What you’ll build: A tool that crawls the DHT (starting from one node) and builds a visual graph of the network topology.

Why it teaches Topology: You’ll see the “small world” property of Kademlia. You’ll see how most nodes are just a few hops away.

Core challenges you’ll face:

  • Crawling the Graph → Using FIND_NODE recursively to discover every node.
  • Rendering 160-bit space → Mapping large IDs to 2D coordinates.

Difficulty: Advanced Time estimate: 1 week Prerequisites: Project 9.


Project 15: Secure Routing (Signed RPCs)

  • File: KADEMLIA_DHT_DEEP_DIVE_MASTERY.md
  • Main Programming Language: Python
  • Alternative Programming Languages: Go, Rust
  • Coolness Level: Level 4: Hardcore Tech Flex
  • Business Potential: 1. The “Resume Gold”
  • Difficulty: Level 4: Expert
  • Knowledge Area: Cryptography
  • Software or Tool: Ed25519 (Cryptography library)
  • Main Book: “Serious Cryptography” by Jean-Philippe Aumasson

What you’ll build: A version of the node where every RPC is signed by a private key, and the public key is the Node ID (or part of it).

Why it teaches Authenticity: You’ll learn how to prevent “Node ID spoofing” where someone claims to be a node they are not.

Core challenges you’ll face:

  • Key-ID Binding → Ensuring the Node ID is a hash of the Public Key.
  • Signature Overhead → Measuring the impact on latency.

Difficulty: Expert Time estimate: 2 weeks Prerequisites: Project 10.


Project Comparison Table

Project Difficulty Time Depth of Understanding Fun Factor
1. XOR Engine Beginner Weekend High 3/5
4. Iterative Lookup Advanced 2 weeks Very High 5/5
6. Networked Node Advanced 2 weeks High 4/5
12. NAT Traversal Master 2 weeks Very High 4/5
14. Visualizer Advanced 1 week High 5/5

Recommendation

If you are a beginner, start with Project 1 and Project 2. Mastery of the XOR metric is the barrier to entry. If you already know networking, jump straight to Project 6 (Networked Node) but use the logic from Project 1.


Final Overall Project: Decentralized File Sharing System

What you’ll build

A complete, serverless file sharing system where users can “seed” files and others can “search” and “download” them using only a DHT. It combines content-addressing, DHT search, and direct P2P transfer.

Real World Outcome

A terminal app where you type seed my_movie.mp4 and get a “Magnet Link” (the hash). Your friend types get <hash> and the file is discovered and downloaded without any central server.


Summary

This learning path covers Kademlia through 15 hands-on projects. Here’s the complete list:

# Project Name Main Language Difficulty Time Estimate
1 XOR Engine Python Beginner Weekend
2 K-Bucket Table Python Intermediate 1 week
3 RPC Simulation Python Intermediate 1 week
4 Iterative Lookup Python Advanced 1-2 weeks
5 KV Store Python Intermediate 1 week
6 Networked Node Python Advanced 2 weeks
7 Bootstrap Python Intermediate Weekend
8 Mini-IPFS Python Expert 2 weeks
9 Sybil Simulator Python Expert 1 week
10 PoW Defense Python Advanced Weekend
11 Chat Discovery Python Advanced 1 week
12 NAT Traversal Python Master 2 weeks
13 Churn Tester Python Advanced 1 week
14 Visualizer Python Advanced 1 week
15 Secure Routing Python Expert 2 weeks

Expected Outcomes

After completing these projects, you will:

  • Understand every bit of the Kademlia wire protocol.
  • Be able to build decentralized systems from scratch.
  • Master the XOR metric and its routing implications.
  • Understand the security threats of open P2P networks.

You’ll have built a working P2P ecosystem that proves you understand the “Dark Arts” of distributed systems.