Commit Graph

3268 Commits

Author SHA1 Message Date
Zooko O'Whielacronx
dd834cf7e9 web: fix moreinfo link 2008-12-05 15:29:39 -07:00
Zooko O'Whielacronx
93cd0f58a9 web: "More Info" link describes the same file that the "file" link points to, rather than to the file under the same name in this directory
It's a subtle but real difference.
Fixes #553 -- "More Info" link should point to a file/dir, not a dir+childname .
2008-12-05 15:05:02 -07:00
Zooko O'Whielacronx
60bbc46a53 minor: fix unused imports -- thanks, pyflakes 2008-12-05 13:07:23 -07:00
Zooko O'Whielacronx
b315619d6b download: refactor handling of URI Extension Block and crypttext hash tree, simplify things
Refactor into a class the logic of asking each server in turn until one of them gives an answer 
that validates.  It is called ValidatedThingObtainer.

Refactor the downloading and verification of the URI Extension Block into a class named 
ValidatedExtendedURIProxy.

The new logic of validating UEBs is minimalist: it doesn't require the UEB to contain any 
unncessary information, but of course it still accepts such information for backwards 
compatibility (so that this new download code is able to download files uploaded with old, and 
for that matter with current, upload code).

The new logic of validating UEBs follows the practice of doing all validation up front.  This 
practice advises one to isolate the validation of incoming data into one place, so that all of 
the rest of the code can assume only valid data.

If any redundant information is present in the UEB+URI, the new code cross-checks and asserts 
that it is all fully consistent.  This closes some issues where the uploader could have 
uploaded inconsistent redundant data, which would probably have caused the old downloader to 
simply reject that download after getting a Python exception, but perhaps could have caused 
greater harm to the old downloader.

I removed the notion of selecting an erasure codec from codec.py based on the string that was 
passed in the UEB.  Currently "crs" is the only such string that works, so 
"_assert(codec_name == 'crs')" is simpler and more explicit.  This is also in keeping with the 
"validate up front" strategy -- now if someone sets a different string than "crs" in their UEB, 
the downloader will reject the download in the "validate this UEB" function instead of in a 
separate "select the codec instance" function.

I removed the code to check plaintext hashes and plaintext Merkle Trees.  Uploaders do not 
produce this information any more (since it potentially exposes confidential information about 
the file), and the unit tests for it were disabled.  The downloader before this patch would 
check that plaintext hash or plaintext merkle tree if they were present, but not complain if 
they were absent.  The new downloader in this patch complains if they are present and doesn't 
check them.  (We might in the future re-introduce such hashes over the plaintext, but encrypt 
the hashes which are stored in the UEB to preserve confidentiality.  This would be a double-
check on the correctness of our own source code -- the current Merkle Tree over the ciphertext 
is already sufficient to guarantee the integrity of the download unless there is a bug in our 
Merkle Tree or AES implementation.) 

This patch increases the lines-of-code count by 8 (from 17,770 to 17,778), and reduces the 
uncovered-by-tests lines-of-code count by 24 (from 1408 to 1384).  Those numbers would be more 
meaningful if we omitted src/allmydata/util/ from the test-coverage statistics.
2008-12-05 08:17:54 -07:00
Brian Warner
a0b5b5ab2b test_web: add get_permuted_peers, to unbreak recent checker_results change 2008-12-05 02:12:10 -07:00
Brian Warner
42f8aece05 web checker_results: include a table of servers in permuted order, so you can see the places where new servers have been inserted 2008-12-05 02:03:09 -07:00
Brian Warner
e942ab141b test_system.py: assert less about the stats we get, since shares (and thus allocate() calls) are distributed randomly 2008-12-04 17:27:04 -07:00
Brian Warner
7c4edac582 stats: don't return booleans: it violates the schema. Add a test. 2008-12-04 15:01:24 -07:00
Brian Warner
7cfc74bcc9 test_system.py: don't ask the stats-gatherer to poll: it tolerates failures, so it isn't really giving us enough test coverage. Removing the call will make it more clear that we need to improve the tests later 2008-12-04 15:00:53 -07:00
Peter Secor
a8e515a8bb confwiz.py - removing hardcoded version number 2008-12-02 20:38:31 -07:00
Brian Warner
a2ce315074 CLI: check for pre-existing aliases in 'tahoe create-alias' and 'tahoe add-alias' 2008-12-02 20:20:22 -07:00
Brian Warner
cdbb72d5ff test_cli: pass rc out of do_cli() too 2008-12-02 20:08:28 -07:00
Zooko O'Whielacronx
c43d7dd5f0 setup: one more address to send release announcements to 2008-12-02 19:50:40 -07:00
Zooko O'Whielacronx
f436b8cd88 setup: another note about the process of making a tahoe release: mail to duplicity-talk@nongnu.org 2008-12-02 19:44:14 -07:00
Brian Warner
6958b7fa90 test_storage.py: more windows-vs-readonly-storage fixes 2008-12-02 19:41:02 -07:00
Brian Warner
2a640af485 docs/webapi.txt: update helper section to discuss tahoe.cfg 2008-12-02 19:07:26 -07:00
Brian Warner
ed211e8574 docs/webapi.txt: update to discuss tahoe.cfg, not BASEDIR/webport 2008-12-02 19:06:12 -07:00
Brian Warner
fe9c3e9529 storage.py: oops, fix windows again, readonly_storage wasn't getting picked up properly 2008-12-02 19:03:17 -07:00
Brian Warner
d3783475b4 test_download.py: remove extra base32 import 2008-12-02 18:31:26 -07:00
Brian Warner
b997e6ca7c test_download: test both mutable and immutable pre-generated shares 2008-12-02 18:30:07 -07:00
Brian Warner
2d70f7fc0b test_download.py: added 'known-answer-tests', to make sure current code can download a file that was created by earlier code 2008-12-02 18:22:08 -07:00
Brian Warner
83993ae579 docs/configuration.txt: fix minor typo 2008-12-02 15:51:01 -07:00
Brian Warner
d295a7afb9 storage.py: unbreak readonly_storage=True on windows 2008-12-01 19:49:46 -07:00
Brian Warner
71c62f8fcb #542 'tahoe create-key-generator': fix the .tac file this creates to be compatible with modern code, add a test 2008-12-01 17:47:21 -07:00
Brian Warner
c5222558f4 storage.py: fix minor typo in comment 2008-12-01 17:25:40 -07:00
Brian Warner
cfba882b30 storage: replace sizelimit with reserved_space, make the stats 'disk_avail' number incorporate this reservation 2008-12-01 17:24:21 -07:00
Brian Warner
39a41f1d85 util/abbreviate: add abbreviated-size parser 2008-12-01 17:24:12 -07:00
Zooko O'Whielacronx
fe6abac87b wui/wapi: change the default port number from 8123 to 3456 to avoid conflict with TorButton
See ticket #536 for details.
2008-11-25 17:57:37 -07:00
Zooko O'Whielacronx
5ebd731982 setup: move the requirement on simplejson from setup.py to _auto_deps.py, and loosen it from >= 2.0.5 to > 1.8.1
We'll see if this fixes the tests on all of our current buildslaves, and if it does then I'll be happy to leave it at "> 1.8.1" for now, even though I don't know exactly what versions of simplejson changed exactly what behavior that interacts with exactly what environment.  See http://allmydata.org/trac/tahoe/ticket/534 for uncertainties.
2008-11-25 14:37:51 -07:00
francois
8c5a0f1efc setup.py: Require simplejson version >= 2.0.5 2008-11-25 11:17:27 -07:00
Brian Warner
7ea0a1316a mutable publish: reinstate the foolscap-reference-token-bug workaround, both for the original reasons and because of an apparent new foolscap bug that's triggered by reference tokens. See #541 for details. 2008-11-25 14:27:35 -07:00
Zooko O'Whielacronx
51c7580fc8 setup: fix missing import -- thanks, pyflakes 2008-11-25 09:55:28 -07:00
Zooko O'Whielacronx
de9edde8f5 setup: correctly detect Arch Linux in platform description 2008-11-25 09:51:18 -07:00
Brian Warner
bc53c24003 dirnode manifest: add verifycaps, both to internal API and to webapi. This will give the manual-GC tools more to work with, so they can estimate how much space will be freed. 2008-11-24 14:40:46 -07:00
Brian Warner
2308440fb6 control.py: use get_buckets() instead of get_version() to measure ping time, because the latter changed recently 2008-11-22 23:13:23 -07:00
Brian Warner
3e25efc010 upload: when using a Helper, insist that it provide protocols/helper/v1 . Related to #538. 2008-11-21 20:29:32 -07:00
Brian Warner
0fab511be5 upload: don't use servers which can't support the share size we need. This ought to avoid #439 problems. Some day we'll have a storage server which advertises support for a larger share size. No tests yet. 2008-11-21 20:28:12 -07:00
Brian Warner
bf06492a90 #538: fetch version and attach to the rref. Make IntroducerClient demand v1 support. 2008-11-21 20:07:27 -07:00
Brian Warner
0eb6b324a4 #538: add remote_get_version() to four main Referenceable objects: Introducer Service, Storage Server, Helper, CHK Upload Helper. Remove unused storage-server get_versions(). 2008-11-21 17:43:52 -07:00
Zooko O'Whielacronx
1d377cc2d9 setup: turn off --multi-version until I can figure out why it breaks test_runner 2008-11-20 22:36:45 -07:00
Zooko O'Whielacronx
83b5f5ad52 setup: require setuptools >= 0.6c7 to run 2008-11-20 22:36:11 -07:00
Zooko O'Whielacronx
0de6e616e0 setup: use "setup.py develop --multi-version" so that if there is a too-old version of a dependency installed this doesn't prevent Tahoe's "develop" and run-in-place from working 2008-11-20 14:15:45 -07:00
Zooko O'Whielacronx
68f38f241b setup: we require setuptools > 0.6a9 in order to parse requirements that have a dot in them such as "zope.interface"
In the near future we might start actually relying on setuptools's pkg_resources's "require()" function to make modules importable, so we can't just skip zope.interface.
2008-11-20 09:15:03 -07:00
Brian Warner
4ada26101b test_dirnode: add an explainError call 2008-11-19 16:02:12 -07:00
Brian Warner
b84c2c6541 manifest: add storage-index strings to the json results 2008-11-19 16:00:27 -07:00
Brian Warner
815e0673e6 manifest: include stats in results. webapi is unchanged. 2008-11-19 15:03:47 -07:00
Brian Warner
995a16e3b1 misc/spacetime/diskwatcher.tac: remove dead code 2008-11-19 14:05:52 -07:00
Brian Warner
6f6556da22 mutable: respect the new tahoe.cfg 'shares.needed' and 'shares.total' settings 2008-11-19 14:05:01 -07:00
Brian Warner
82fe7ba360 oops, update tests to match 'tahoe stats' change 2008-11-18 20:32:59 -07:00
Brian Warner
677928a1da cli: tahoe stats: abbreviate total sizes too 2008-11-18 20:28:16 -07:00