update interfaces and docs for codec
It now takes a sequence of buffers instead of a single string for both encode and decode, and it also takes a separate sequence of shareids for decode instead of a sequence of tuples, and it returns a sequence of buffers instead of a single string.
Here is the change history from the first darcs era, in reverse chronological
order:
Mon Jan 22 16:12:56 MST 2007 "Zooko O'Whielacronx <zooko@zooko.com>"
* move everything into a subdirectory so that I can merge this darcs repo with the tahoe darcs repo
./fec -> ./pyfec/fec
./setup.py -> ./pyfec/setup.py
A ./pyfec/
Mon Jan 22 16:10:17 MST 2007 "Zooko O'Whielacronx <zooko@zooko.com>"
* clean up and minimize fec.c
* strip out unused code
* hard-code GF_BITS to 8
* reindent and reformat curly bracket placement
M ./fec/fec.c -655 +324
M ./fec/fec.h -25
Mon Jan 22 14:24:32 MST 2007 "Zooko O'Whielacronx <zooko@zooko.com>"
* change API to allow a subset of the shares to be produced, and to just pass back pointers to primary shares instead of copying them
M ./fec/fec.c -24 +40
M ./fec/fec.h -5 +17
M ./fec/fecmodule.c -63 +144
M ./fec/test/test_pyfec.py -16 +25
M ./setup.py -2 +27
Tue Jan 16 23:01:44 MST 2007 "Zooko O'Whielacronx <zooko@zooko.com>"
* split encoder from decoder
M ./fec/fecmodule.c -48 +161
M ./fec/test/test_pyfec.py -3 +4
Tue Jan 16 14:35:25 MST 2007 "Zooko O'Whielacronx <zooko@zooko.com>"
* it compiles now!
./fec.c -> ./pyfec/fec.c
./fec.h -> ./pyfec/fec.h
./fecmodule.c -> ./pyfec/fecmodule.c
./pyfec -> ./fec
M ./fec/fec.c -109 +85 r13
M ./fec/fec.h -3 +2 r13
M ./fec/fecmodule.c -23 +241 r13
A ./fec/test/
A ./fec/test/test_pyfec.py
A ./pyfec/
A ./setup.py
Tue Jan 9 10:47:58 MST 2007 zooko@zooko.com
* start of new fecmodule.c
A ./fecmodule.c
Mon Jan 1 15:00:04 MST 2007 zooko@zooko.com
* tidy up error handling
M ./fec.c -26 +16
Mon Jan 1 14:06:30 MST 2007 zooko@zooko.com
* remove the on-the-fly encoding option
We don't currently need it.
M ./fec.c -68
M ./fec.h -22
Mon Jan 1 13:53:28 MST 2007 zooko@zooko.com
* original import from Mnet project
Brian Warner [Mon, 22 Jan 2007 08:06:09 +0000 (01:06 -0700)]
filetree: change the way addpath works, now we add workqueue steps for all involved subtrees at about the same time, rather than letting one step add the next when it runs. Finally add a (passing) test for uploading files to CHK-based directories
Brian Warner [Tue, 16 Jan 2007 22:15:26 +0000 (15:15 -0700)]
change upload to push 2 shares instead of 3
Now that peers can talk to themselves, the 5-node system test won't fail
just because one of the shares was hosted on the downloader (and thus
inaccessible until recently). The 3-share push was there to avoid this
problem.
Brian Warner [Tue, 16 Jan 2007 04:22:22 +0000 (21:22 -0700)]
rearrange encode/upload, add URIs, switch to ReplicatingEncoder
Added metadata to the bucket store, which is used to hold the share number
(but the bucket doesn't know that, it just gets a string).
Modified the codec interfaces a bit.
Try to pass around URIs to/from download/upload instead of verifierids.
URI format is still in flux.
Change the current (primitive) file encoder to use a ReplicatingEncoder
because it provides ICodecEncoder. We will be moving to the (less primitive)
file encoder (currently in allmydata.encode_new) eventually, but for now
this change lets us test out PyRS or zooko's upcoming C-based RS codec in
something larger than a single unit test. This primitive file encoder only
uses a single segment, and has no merkle trees.
Also added allmydata.util.deferredutil for a DeferredList wrapper that
errbacks (but only when all component Deferreds have fired) if there were
any errors, which unfortunately is not a behavior available from the standard
DeferredList.
Brian Warner [Tue, 9 Jan 2007 04:29:03 +0000 (21:29 -0700)]
figleaf.el: when converting to the elisp-readable format, use our in-tree version of figleaf rather than one found on the system. Also change the keybinding to toggle annotations to C-cC-a, which is easier to type
Brian Warner [Mon, 8 Jan 2007 23:29:14 +0000 (16:29 -0700)]
rename the new filetable code to 'filetree', since robk astutely pointed out that 'table' is misleading and implies a flat list of files in a single directory
Brian Warner [Sat, 6 Jan 2007 04:12:26 +0000 (21:12 -0700)]
use absolute import of 'allmydata.Crypto' rather than a relative import of just 'Crypto', to make it clear that we're using our own form rather than relying upon the system version
add padding to segments and convert type from string to list of integers before passing to py_ecc
But then I get an error that I don't understand about ECC math...
make encode_new use py_ecc for real live erasure coding
(This patch is not tested -- I'm working on a Mac which doesn't have gcc
installed... (gcc is necessary for the crypto module.) I will now attempt to
connect to a better development computer over my mom's staticy, failure-prone,
14.4 K modem...)
import py_ecc, a pure python fec by Emin Martinian, which is under a permissive licence
It is too slow for a real product, but is a quick way to get a working prototype, and also is freely redistributable by us...