Files
core/dht
Kleissner c44e57a0a0 Add information request list to DHT structure. It keeps track of requests and matches responses.
Break up SendRequest into individual functions SendRequestStore and SendRequestFindNode, which improves readability.
Alpha parameter must be now passed. MarkNodeAsSeen is exported.
Breaking up dht.iterate and embedding into 3 functions Get, FindNode, and FindValue.
2021-04-09 16:07:20 +02:00
..
2021-03-16 22:19:15 +01:00

DHT Lite

This code is a fork from https://github.com/james-lawrence/kademlia and https://github.com/prettymuchbryce/kademlia with modifications for proper abstraction. All networking code was removed from the original one. This package shall only provide DHT fuctionality.

The following functions are not handled here and must be done by the caller, if desired:

  • Remove nodes that are deemed inactive via dht.RemoveNode
  • Provide a function ShouldEvict to determine if a node shall be evicted in favor of another one
  • Refreshing buckets: Pick random node in the unrefreshed bucket, ask closest alpha neighbors. This makes sure the bucket remains accessible?
  • The actual store data functions (and associated replication/expiration) are not provided, only the functionality to traverse through the network.