Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I mean, magnet links are the same thing—with the exception that they aren't widely used between users, to my knowledge, i.e. people aren't too familiar with them and go to search sites instead. (Not to say that the same won't happen in IPFS if it ever gets popular.)


They're not the same thing which is why they're not as useful.

Magnet links apply to an entire collection of files, as snapshotted by the creator. There is no way to pick a single file and refer to it, immutably. It's all or nothing. Additionally, metadata besides the file contents will change the hash. This includes filenames, directory structure and piece length (chosen at snapshot time, by the creator).

All of these limitations are enough in practice to make magnets useless for widespread per-file distribution.


Do magnet links work across torrents? Do two different torrents of the same file have the same magnet URI?


The infohash (which identifies the torrent, and thus the magnet link) is a hash of the following structure:

http://bittorrent.org/beps/bep_0003.html#info-dictionary

There are some things, beyond the content of the file, that will change the hash:

- Path of the file (nature_documentary.avi vs root/nature_documentary.avi)

- Name of the file (nature_documentary.avi vs nature_doc.avi)

- The pieces length


Ah, if it's the entire dictionary and not filtered by the clients to just those fields, then presumably additional data may be shoved in—specifically the trackers to contact.


No, look at the content of the dictionary: trackers are not part of the "info" dict, so you can add all the trackers you want, it won't change the identity of the torrent. Identity is defined by the infohash.

Trackers are added in the magnet link by adding parameters to the URI: see http://bittorrent.org/beps/bep_0009.html


Not sure if any metadata other than the file name affects the hash—e.g. modification times. Chunk sizes likely do. Otherwise, I'd expect the hash to address actual content, though frankly I haven't checked.

Edit: in fact, my hasty, belated and superficial skimming suggests that IPFS is an implementation of just a DHT (presumably with some metadata and chunking built in)—i.e. it keeps data itself in about the same way that Bittorrent stores torrent descriptions in the Mainline DHT.


magnets are just hashes of the contents




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: