List all peers having a file

Hi! I’m new to ipfs. I need to somehow get details on which nodes are carrying the file. I need to get a list of all the nodes (or almost all the nodes), not just some part of them. If some of the nodes are offline its ok, my goal is to know who have downloaded the file. I have tried dht/findprovs, but I am not sure if it can return all of the nodes? It is also kinda slow, is that possible to make it faster maybe specifying some parameter (I suspect that it tries to check availability of the peers, which makes it slow)? Is that possible in ipfs?

Thanks for help!

As far as I know, this is not really possible. The number of node “addressed” in IPFS space is way too large to search every possible node ID, even one had a few decades of time to do so…

The dht information is about as deep as it’s practical to search using your own local node. You could check:

…for whatever you are looking for… which may include a wider node selection.

I am not looking for files. My goal is to understand how many people and who have downloaded the file I uploaded. I there a way to somehow obtain that information from ipfs (I have some ideas of how to do it, at least partly, outside of ipfs)?

The only way I see is repeatedly ask the DHT for providers of the multihash.
It will be hard to see peers whose peerId are not between yours and the file multihash so you may want to manage several identities.

On the long run, IPFS will sooner or later adopt more privacy and it will be more and more difficult. But for now, that’s what I would do.

Also, if you’re doing this to estimate if the content is popular, you can run a bunch of findprov, and estimate how many hops you had to make before reaching a provider. If you want all their identities, there’s no cheap way of doing it I’m aware of.

That is what I suspected, just had to verify :slight_smile: