top | item 40048319

(no title)

pigpang | 1 year ago

How you will calculate hash of file, when it broken, to lookup for?

discuss

order

rakoo|1 year ago

You have all the hashes in the .torrent file. All you need is a regular check with it

(but then the .torrent file itself has to be stored on a storage that resists bit flipping)

arijun|1 year ago

If you’re worried about bit-flipping, you could just store multiple copies of the hash and then do voting, since it’s small. If you’re worried about correlated sources of error that helps less, though.

Dibby053|1 year ago

>storage [...] bit flipping

As someone with no storage expertise I'm curious, does anyone know the likelyhood of an error resulting in a bit flip rather than an unreadable sector? Memory bit flips during I/O are another thing but I'd expect a modern HDD/SSD to return an error if it isn't sure about what it's reading.

everfree|1 year ago

Just hash it before it's broken.

jonhohle|1 year ago

Maybe this is a joke that’s over my head, but the OP wants a system where damaged media can be repaired. They have the damaged media so there’s no way to make a hash of the content they want.

alex_duf|1 year ago

if you store the merkle tree that was used to download it, you'll be able to know exactly which chunk of the file got a bit flip.

01HNNWZ0MV43FF|1 year ago

You could do a rolling hash and say that a chunk with a given hash should appear between two other chunks of certain hashes

arijun|1 year ago

That seems like a recipe for nefarious code insertion.

selcuka|1 year ago

Just use the sector number(s) of the damaged parts.