Closed vyzo closed 7 years ago
Looks good 😄
Should we be keeping a cache of discovered peers, or is that handled for us by the DHT layer? Although perhaps we don't really want to, since we don't want stale results from nodes that have gone offline.
Anyway, it's great that this works. With this + manifests it seems like we're on our way to becoming less dependent on the directories.
There is no caching at the DHT client, but there is caching (with a hefty ttl) in full DHT nodes.
We could perhaps cache the provider addresses in the peerstore to avoid a subsequent lookup for a peer returned in the result set.
The gist: ue use DHT provider records as a rendezvous mechanism:
/net/find
api allows us to discover peers though a provider queryExample: