[tahoe-dev] zfec: integrity checking of erasure-coded blocks (+ small bug)

Zooko Wilcox-O'Hearn zooko at zooko.com
Sat Mar 31 16:07:11 UTC 2012


On Sat, Mar 31, 2012 at 8:06 AM, James <james at lab6.com> wrote:
>
> ... in order to help identify corrupted blocks. But then you have to
> store a list of valid sha256sums. To protect this list, you could
> encode it with zfec, but... well, that's a recursive descent into
> madness.

A sha256sum is 32 bytes. If you have N erasure-coded blocks you need N
* 32 bytes to store the sha256sums. Perhaps that is small enough that
you could keep a complete copy of that data in all places where you
will need it?


> Also, I think I found a bug in cmdline_zfec.py (v1.4.22). If you
> specify the input file using an absolute pathname, the --output-dir
> option is ignored. You could fix this by replacing the line:
>
> args.prefix = args.inputfile.name
>
> with
>
> args.prefix = os.path.basename(args.inputfile.name)

Thank you for the bug report! Do you think you could write a unit test
in test_zfec.py  ¹ that goes red due to this bug?

> Otherwise, zfec is awesome - good work! :)

Thank you for the kind words!

Regards,

Zooko

 ¹ https://tahoe-lafs.org/trac/zfec/browser/trunk/zfec/zfec/test/test_zfec.py


More information about the tahoe-dev mailing list