Merge pull request #658 from libp2p/kad/clarify-bootstrap

kad: clarify bootstrap process
This commit is contained in:
Guillaume Michel
2025-02-04 13:30:49 +01:00
committed by GitHub

View File

@@ -368,14 +368,13 @@ the wire format and keep their routing table up-to-date, especially with peers
closest to themselves. closest to themselves.
The process runs once on startup, then periodically with a configurable The process runs once on startup, then periodically with a configurable
frequency (default: 5 minutes). On every run, we generate a random peer ID and frequency (default: 10 minutes). On every run, we generate a random peer ID for
we look it up via the process defined in [peer routing](#peer-routing). Peers every non-empty routing table's k-bucket and we look it up via the process
encountered throughout the search are inserted in the routing table, as per defined in [peer routing](#peer-routing). Peers encountered throughout the
usual business. search are inserted in the routing table, as per usual business.
This is repeated as many times per run as configuration parameter `QueryCount` In addition, to improve awareness of nodes close to oneself, implementations
(default: 1). In addition, to improve awareness of nodes close to oneself, should include a lookup for their own peer ID.
implementations should include a lookup for their own peer ID.
Every repetition is subject to a `QueryTimeout` (default: 10 seconds), which Every repetition is subject to a `QueryTimeout` (default: 10 seconds), which
upon firing, aborts the run. upon firing, aborts the run.