Non Random DHT ID

Hi everyone,

Hope you all are doing well.
Since DHT IDs are generated randomly to have hash space uniform. I am wondering if it is possible to have known information inside the DHT ID of each node. Rather than generating random IDs, if its possible to put location information. Main idea is to cluster the nodes which are nearby in terms of location. Is this kind of functionality is possible in libp2p?

Regards,
Malik

Hi @anjumm,

That’s a great question. I’m curious what effect you’re trying to achieve by clustering? There are layers higher up in the stack such as gossipsub that tries to minimize latency and maximize throughput using a heuristic for building the minimum spanning tree. That effectively clusters peers according to round trip latency times which means they are likely physically close to each other (but not always).

I think I could point you in the correct directly to find an answer if you gave me some more information in why you want clustering in the peer ids.

Cheers! :beers: