You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/routing/kad-dht.md
+29-15
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,9 @@
2
2
title: Kademlia DHT
3
3
description: >
4
4
The IPFS Distributed Hash Table (DHT) specification defines a structured
5
-
overlay network used for peer routing and content routing in the
6
-
InterPlanetary File System (IPFS). It extends the libp2p Kademlia DHT
7
-
specification, adapting and adding features to support IPFS-specific
8
-
requirements.
5
+
overlay network used for peer and content routing in the InterPlanetary File
6
+
System (IPFS). It extends the libp2p Kademlia DHT specification, adapting and
7
+
adding features to support IPFS-specific requirements.
9
8
date: 2025-03-18
10
9
maturity: reliable
11
10
editors:
@@ -20,10 +19,9 @@ order: 1
20
19
---
21
20
22
21
The IPFS Distributed Hash Table (DHT) specification defines a structured
23
-
overlay network used for peer routing and content routing in the
24
-
InterPlanetary File System (IPFS). It extends the libp2p Kademlia DHT
25
-
specification, adapting and adding features to support IPFS-specific
26
-
requirements.
22
+
overlay network used for peer and content routing in the InterPlanetary File
23
+
System (IPFS). It extends the libp2p Kademlia DHT specification, adapting and
24
+
adding features to support IPFS-specific requirements.
27
25
28
26
## Introduction
29
27
@@ -36,8 +34,8 @@ Goal of DHT is to find the closest peers to some key (in a specific geometry). O
36
34
### DHT Operations
37
35
38
36
* Peer Routing
37
+
* Content provider advertisement and discovery
39
38
* Value storage and retrieval
40
-
* Content provider advertisement and dsicovery
41
39
42
40
### Relation to [libp2p kad-dht](https://github.com/libp2p/specs/tree/master/kad-dht)
43
41
@@ -58,7 +56,10 @@ used in other DHT swarms as well.
58
56
59
57
## DHT Swarms
60
58
61
-
A DHT swarm is a group of interconnected nodes running the IPFS Kademlia DHT protocol, collectively identified by a unique protocol identifier. IPFS nodes MAY participate in multiple DHT swarms simultaneously. DHT swarms can be either public or private.
59
+
A DHT swarm is a group of interconnected nodes running the IPFS Kademlia DHT
60
+
protocol, collectively identified by a unique protocol identifier. IPFS nodes
61
+
MAY participate in multiple DHT swarms simultaneously. DHT swarms can be either
62
+
public or private.
62
63
63
64
### Protocol Identifier
64
65
@@ -639,13 +640,26 @@ TBD
639
640
640
641
### LAN DHT Swarms
641
642
642
-
Fine to store private multiaddresses in the routing table and serve them to
643
-
other nodes in the same LAN DHT swarm.
643
+
Implementations MAY support private or LAN-specific DHT swarms, which operate
644
+
within a local network and remain isolated from the public DHT. Nodes MAY
645
+
participate in multiple DHT swarms simultaneously, provided that each swarm has
646
+
a unique protocol identifier.
644
647
645
-
### Checking peer behaviour before adding to routing table
648
+
Private DHT swarms MAY store and serve private multiaddresses, as they are not
649
+
exposed to the public network.
646
650
647
-
Make a `FIND_NODE` request and inspect response before adding node to RT.
648
-
Followed https://blog.ipfs.tech/2023-ipfs-unresponsive-nodes/
651
+
### Verifying DHT Server
652
+
653
+
Implementations MAY perform additional checks to ensure that DHT servers behave
654
+
correctly before adding them to the routing table. In the past, misconfigured
655
+
nodes have been added to routing tables, leading to [network
0 commit comments