Skip to content

Commit 5379a8d

Browse files
committed
feat: clarify transport requirements for DHT nodes
require TCP+Yamux as MUST, QUIC as SHOULD. require both TLS and Noise for DHT servers to ensure maximum interoperability. both go-libp2p and js-libp2p support both security protocols by default. #497 (comment)
1 parent bc7ad50 commit 5379a8d

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/routing/kad-dht.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ DHT Servers MUST support the [libp2p ping
160160
protocol](https://github.com/libp2p/specs/blob/master/ping/ping.md) to allow
161161
probing by other DHT nodes.
162162

163-
DHT Servers MUST support both
164-
[`QUIC`](https://github.com/libp2p/specs/blob/master/quic/README.md) and
165-
`TCP`+[`Yamux`](https://github.com/libp2p/specs/blob/master/yamux/README.md)+[`Noise`](https://github.com/libp2p/specs/blob/master/noise/README.md).
163+
DHT Servers MUST support `TCP` with [`Yamux`](https://github.com/libp2p/specs/blob/master/yamux/README.md) multiplexing
164+
and SHOULD support [`QUIC`](https://github.com/libp2p/specs/blob/master/quic/README.md) over UDP as a modern alternative to TCP.
165+
For secure communication, DHT Servers MUST support both
166+
[`TLS`](https://github.com/libp2p/specs/blob/master/tls/tls.md) and
167+
[`Noise`](https://github.com/libp2p/specs/blob/master/noise/README.md).
166168
It is essential that all DHT Servers are able to open a connection to each
167-
other. Additionally, DHT Servers SHOULD support
168-
[`TLS`](https://github.com/libp2p/specs/blob/master/tls/tls.md) as an
169-
alternative to Noise, [`WebRTC
169+
other. Additionally, DHT Servers SHOULD support [`WebRTC
170170
direct`](https://github.com/libp2p/specs/blob/master/webrtc/webrtc-direct.md),
171171
[Secure
172172
`WebSockets`](https://github.com/libp2p/specs/blob/master/websockets/README.md)
@@ -175,14 +175,16 @@ and
175175
DHT Servers adoption of browser-based transports is encouraged to allow for
176176
browser-based DHT Clients to interact with the DHT.
177177

178-
DHT Clients SHOULD support
179-
[`QUIC`](https://github.com/libp2p/specs/blob/master/quic/README.md) and
180-
`TCP`+[`Yamux`](https://github.com/libp2p/specs/blob/master/yamux/README.md)+[`Noise`](https://github.com/libp2p/specs/blob/master/noise/README.md)
181-
whenever possible. They MAY also support additional libp2p transports. However,
178+
DHT Clients SHOULD support `TCP` with [`Yamux`](https://github.com/libp2p/specs/blob/master/yamux/README.md) multiplexing
179+
and [`QUIC`](https://github.com/libp2p/specs/blob/master/quic/README.md) over UDP whenever possible. For secure communication, clients SHOULD support both
180+
[`TLS`](https://github.com/libp2p/specs/blob/master/tls/tls.md) and
181+
[`Noise`](https://github.com/libp2p/specs/blob/master/noise/README.md).
182+
They MAY also support additional libp2p transports. However,
182183
to guarantee discovery of existing records in the DHT, a client MUST implement
183-
at least one of these: `QUIC` or `TCP`+`Yamux`+`Noise`.
184+
at least one transport (`QUIC` or `TCP`+`Yamux`) with at least one security
185+
protocol (`TLS` or `Noise`).
184186

185-
Clients that cannot support either `QUIC` or `TCP`+`Yamux`+`Noise` (e.g.,
187+
Clients that cannot support the required transports and security protocols (e.g.,
186188
browser-based nodes) MAY still act as DHT Clients, but their ability to find
187189
records in the DHT will be limited.
188190

0 commit comments

Comments
 (0)