Skip to content

Commit 7464b35

Browse files
author
“ramfox”
committed
chore: blog dht1 - link to published code
1 parent 91f014b commit 7464b35

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/blog/lets-write-a-dht-1/page.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ export const post = {
55
draft: false,
66
author: 'Rüdiger Klaehn',
77
date: '2025-09-26',
8-
title: 'A DHT for iroh',
8+
title: 'A DHT for iroh - The Protocol',
99
description:
10-
"Let's write a DHT for iroh - protocol",
10+
"Let's write a DHT for iroh - Part 1, The Protocol",
1111
}
1212

1313
export const metadata = {
@@ -233,3 +233,5 @@ An implementation detail: the routing table does not have to contain discovery i
233233
You might ask why this is not a streaming response but rather a single Vec. The number of nodes a node will return in response to a FindNode query is very small (at most ~20) and is immediately available after querying the routing table. So there is no point in streaming this - 20 NodeAddrs with some discovery info will fit into 1 or 2 MTUs, so it is more efficient to send them all at once.
234234

235235
And that's it. That is the entire RPC protocol. Many DHT implementations also add a `Ping` call, but since querying the routing table is so cheap, if you want to know if a node is alive, you might as well ask it for the closest nodes to some random key and get some extra information for free.
236+
237+
Please checkout our published DHT code under [`iroh-dht-experiment`](https://github.com/n0-computer/iroh-dht-experiment), but we will explore actually implementing and testing the DHT in later blog posts! Stay tuned.

0 commit comments

Comments
 (0)