Skip to content

Commit dd1b73e

Browse files
dmitry-markinalvicsam
authored andcommitted
Add doc for DHT bootnodes mechanism (#8865)
Add description of the RFC-8 "DHT bootnodes" implementation. Rendered: https://github.com/paritytech/polkadot-sdk/blob/dm-dht-bootnodes-doc/docs/sdk/src/guides/dht_bootnodes.md
1 parent 21d822c commit dd1b73e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# DHT Bootnodes (RFC-8)
2+
3+
The "DHT bootnodes" mechanism, as defined in [RFC-0008: Store parachain bootnodes in relay chain
4+
DHT](https://polkadot-fellows.github.io/RFCs/approved/0008-parachain-bootnodes-dht.html)
5+
and implemented in Polkadot, enables parachain nodes to bootstrap without requiring hardcoded
6+
bootnode addresses in the chainspec.
7+
8+
## How It Works
9+
10+
This mechanism, enabled by default, allows any parachain node to serve as a bootnode. In each
11+
epoch, 20 parachain nodes are selected as bootnodes based on the proximity of their relay chain
12+
peer IDs to the parachain key for that epoch. These selected nodes register themselves in the relay
13+
chain's Kademlia DHT as [_content providers._](
14+
https://github.com/libp2p/specs/tree/master/kad-dht#content-provider-advertisement-and-discovery)
15+
Other nodes can then discover and query them to obtain the multiaddresses of their parachain
16+
instances.
17+
18+
## Information for Parachain Operators
19+
20+
The DHT bootnode mechanism simplifies parachain deployment by removing the need for dedicated
21+
bootnodes and hardcoded addresses in the chainspec. It also reduces the risk of single points
22+
of failure if predefined bootnodes become unreachable.
23+
24+
However, since this feature is relatively new, high-value parachains are still advised to include
25+
a set of dedicated bootnodes in the chainspec as a fallback mechanism. Also, the bootnodes
26+
specified via the `--bootnodes` command-line option are always used.
27+
28+
## Command-Line Options
29+
30+
There are two independent CLI options controlling the mechanism:
31+
32+
- `--no-dht-bootnode` prevents a node from acting as a DHT bootnode.
33+
- `--no-dht-bootnode-discovery` disables discovery of other parachain nodes via the DHT bootnode
34+
mechanism.
35+

0 commit comments

Comments
 (0)