Skip to content

Commit b90263a

Browse files
committed
add dht configuration
1 parent 19c1f0f commit b90263a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

specs/src/shrex/discovery.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ This specification defines the peer discovery mechanism for the SHREX protocol i
3434
The discovery service REQUIRES the libp2p DHT (Distributed Hash Table) to enable nodes to find peers capable of serving specific data types. The service handles both peer advertisement (announcing capabilities) and peer discovery (finding peers with required capabilities) while maintaining an active set of connected peers.
3535
The discovery service maintains a set in which all peers MUST have active connections with the host service. When connectedness changes from active to any other state, the peer MUST be immediately dropped and replaced through new discovery. The dropped peer SHOULD be added to a cache with backoff, so it will not be prematurely re-connected to through discovery.
3636

37+
DHT Configuration: The kad-dht is configured with default libp2p parameters and operates in different modes based on node type:
38+
39+
Light Nodes: dht.ModeClient - consume DHT services without serving DHT queries
40+
Bridge/Full Nodes: dht.ModeServer - both consume and serve DHT queries to support network infrastructure
41+
3742
## Sequence Diagrams
3843

3944
### Advertisement

0 commit comments

Comments
 (0)