Index of IPFS root blocks

I’m sorry if this is a dumb question, I’m fairly new to IPFS. Is there a way to get a list of all IPFS root blocks/hashes? If not directly, is it possible to fetch a list of the hashes shared by connected peers, and create a list of the peers they are connected to, so we can index their hashes and so on…? I’m curious because I was thinking about how this could be handy to create a search engine for IPFS and index content.

1 Like

There is no such index. But ipfs name publish publishes to the name that matches the peer id (by default). So you can list your peers via ipfs swerm peers and try to resolve the hashes in them and hope to find something useful.

If the nodes publish using key from the key store this won’t work of course.

But you can still crawl hyperlinked content the same way search engines does.

3 Likes

thank you for the clarification

I’m new to IPFS and still reading up. In addition to jestersimpps question. So is there no centralized hash table available to resolve the correct peer to connect to? So f.e., in case I request a file through one of the ipfs gateway’s, but the file sits on my own node. Does that gateway have to scan all peers on the network to find the correct peer to retrieve the file or has it an index?

1 Like

I was wondering the same. I found the following: https://www.cs.rutgers.edu/~pxk/417/notes/23-lookup.html

No the the gateway don’t need to scan everyone.

Your peer id describes your “location” in the network. The hash of the file is a location too.

When peers looking for a file they will ask the peer whose peer id is the closest to the file hash and the asked peer will do the same until the closest peer is found which is supposed to know which peer/peers to ask for the file.

When storing tracking data into the DHT the same lookup process happens and the closest peer is supposed to keep track of the hashes and the corresponding seeders closest to him.

Lot of variants of this possible, but the basic idea is the same.

That’s what I was looking for. Thanks jestersimpps.

It seems at a central lookup table existed named IPFS search, but I found the service to be down.
http://ipfs-search.com/

A backup of the index is available: https://gateway.ipfs.io/ipfs/QmXA1Wiy3Ko29Q54Sq7pkyu8yTa7JmPokvgx4CXtQBWirt