In the interest of content preservation, I’m curious if there’s done sort of way to query the network for a file to determine basically how many instances of the file are out there, sort of the equivalent of bittorrent’s “seeds” count. After a brief search I was unable to find anything that resembled that.
Yeah I’m curious about some of the basic workings of IPFS like this too. Let me know what you find out.
You can use
ipfs dht findprovs CID to find peers claiming to provide the content in question. Note: that query will stop at 10 peers by default, IIRC.
That should work well enough for now. Is that in the documentation somewhere or did you just happen to be familiar with a bit of the code?
I’m just familiar with that bit of the code. Really, that feature isn’t supposed to be used that way.
- The providers system exists so IPFS can find content, not count how many peers have it.
- The DHT commands (
ipfs dht) exist mostly for debugging (and some advanced use-cases).