Commit Graph

62 Commits

Author SHA1 Message Date
Brian Warner
c4a8db3eb2 webish: provide a valid Content-Length header on downloads 2007-07-03 15:09:00 -07:00
Brian Warner
622acc690a webish: improve reporting of web download errors that occur early enough
If the error occurs before any data has been sent, we can give a sensible
error message (code 500, stack trace, etc). This will cover most of the error
cases. The ones that aren't covered are when we run out of good peers after
successfully decoding the first segment, either because they go away or
because their shares are corrupt.
2007-07-03 13:47:37 -07:00
Brian Warner
f15bb302a1 webish.py: handle errors during download better. Addresses #65.
Previously, exceptions during a web download caused a hang rather than some
kind of exception or error message. This patch improves the situation by
terminating the HTTP download rather than letting it hang forever. The
behavior still isn't ideal, however, because the error can occur too late to
abort the HTTP request cleanly (i.e. with an error code). In fact, the
Content-Type header and response code have already been set by the time any
download errors have been detected, so the browser is committed to displaying
an image or whatever (thus any error message we put into the stream is
unlikely to be displayed in a meaningful way).
2007-07-03 13:18:14 -07:00
Brian Warner
a8bf0645dc interfaces.py: remove some unused 'pass' lines 2007-06-29 00:50:00 -07:00
Brian Warner
efb99078b6 change IVirtualDrive.get_node_at_path to accept either a list or a single slash-separated string 2007-06-28 17:46:14 -07:00
Brian Warner
d6e732b65f vdrive: add get_node_at_path(pathlist) 2007-06-28 11:00:03 -07:00
Brian Warner
b06c74c2a1 Add the 'vdrive' service, for clients to access the public/private root dirs.
These allow client-side code to conveniently retrieve the IDirectoryNode
instances for both the global shared public root directory, and the per-user
private root directory.
2007-06-27 17:11:06 -07:00
Brian Warner
18ab5ce837 dirnode: add build_manifest() and introduce 'refresh capabilities' 2007-06-26 19:41:20 -07:00
Brian Warner
2766b7988b remove unused/obsoleted workqueue.py 2007-06-26 17:25:23 -07:00
Brian Warner
fb02488a8e vdrive: switch to URI:DIR and URI:DIR-RO, providing transitive readonlyness 2007-06-25 13:23:51 -07:00
Brian Warner
82c38d370a make new vdrive work, implement convenience wrapper, passes all tests 2007-06-15 00:37:32 -07:00
Brian Warner
ec77a227be revamp vdrive: nodes with furls. tests still fail. 2007-06-14 20:14:34 -07:00
Brian Warner
956d5ae256 rename fileid/verifierid to plaintext_hash/crypttext_hash 2007-06-09 20:46:04 -07:00
Brian Warner
584dc4ae94 handle uri_extension with a non-bencode serialization scheme 2007-06-08 16:17:54 -07:00
Brian Warner
c9ef291c02 rename thingA to 'uri extension' 2007-06-08 15:59:16 -07:00
Brian Warner
c049941529 move almost all hashing to SHA256, consolidate into hashutil.py
The only SHA-1 hash that remains is used in the permutation of nodeids,
where we need to decide if we care about performance or long-term security.
I suspect that we could use a much weaker hash (and faster) hash for
this purpose. In the long run, we'll be doing thousands of such hashes
for each file uploaded or downloaded (one per known peer).
2007-06-07 21:47:21 -07:00
Brian Warner
e04ff3adac fetch plaintext/crypttext merkle trees during download, but don't check the segments against them yet 2007-06-07 00:15:41 -07:00
Brian Warner
5cbdc240e2 encode: add plaintext/crypttext merkle trees to the shares, and the thingA block. Still needs tests and download-side verification. 2007-06-06 19:40:20 -07:00
Brian Warner
3dfd26970b move validation data to thingA, URI has storage_index plus thingA hash
This (compatibility-breaking) change moves much of the validation data and
encoding parameters out of the URI and into the so-called "thingA" block
(which will get a better name as soon as we find one we're comfortable with).
The URI retains the "storage_index" (a generalized term for the role that
we're currently using the verifierid for, the unique index for each file
that gets used by storage servers to decide which shares to return), the
decryption key, the needed_shares/total_shares counts (since they affect
peer selection), and the hash of the thingA block.

This shortens the URI and lets us add more kinds of validation data without
growing the URI (like plaintext merkle trees, to enable strong incremental
plaintext validation), at the cost of maybe 150 bytes of alacrity. Each
storage server holds an identical copy of the thingA block.

This is an incompatible change: new messages have been added to the storage
server interface, and the URI format has changed drastically.
2007-06-01 18:48:01 -07:00
Brian Warner
ea78b4b605 check_memory: getting closer, now we have memusage numbers for uploads of 10kB and 10MB files 2007-05-29 17:39:39 -07:00
Zooko O'Whielacronx
3872e94da2 rename all "*PBURL*" to "*FURL*"
This breaks backwards compatibility with Tahoe v0.2 -- the first public release of Tahoe.
2007-05-22 14:08:30 -07:00
Zooko O'Whielacronx
10df6fac02 raise constraint on FURLs from 150 chars to 1000 chars 2007-05-22 13:59:17 -07:00
Brian Warner
82ba0f8540 UNDO: forget about old peers (closes #26)
Add a new method to RIIntroducer, to allow the central introducer node to
remove peers from the active set after they've gone away. Without this,
client nodes accumulate stale peer FURLs forever. This introduces a
compatibility break, as old introducers won't know about the 'lost_peers'
message, although the errors produced are probably harmless.
2007-05-07 19:10:24 -07:00
Brian Warner
04af4a48b5 forget about old peers (closes #26)
Add a new method to RIIntroducer, to allow the central introducer node to
remove peers from the active set after they've gone away. Without this,
client nodes accumulate stale peer FURLs forever. This introduces a
compatibility break, as old introducers won't know about the 'lost_peers'
message, although the errors produced are probably harmless.
2007-05-07 19:10:24 -07:00
Zooko O'Whielacronx
e0a18d12af globally search and replace "mesh" with "grid" and adjust description of the effect of NAT on the topology 2007-04-30 13:06:09 -07:00
Zooko O'Whielacronx
d19d1058e0 extirpate all references the "queen" and "metatracker"
This is a potentially disruptive and potentially ugly change to the code base,
because I renamed the object that serves in both roles from "Queen" to
"IntroducerAndVdrive", which is a bit of an ugly name.

However, I think that clarity is important enough in this release to make this
change.  All unit tests pass.  I'm now darcs recording this patch in order to
pull it to other machines for more testing.
2007-04-30 09:57:52 -07:00
Zooko O'Whielacronx
a61178f425 raise the limit on the number of hashes when retrieving them, too 2007-04-30 06:00:10 -07:00
Zooko O'Whielacronx
8e4aa3e1fb raise the limit on block hashes and share hashes from 30 to 2**20 2007-04-29 23:51:15 -07:00
Brian Warner
db2caf58d4 interfaces: allow URIs to be up to 300 chars long, we're just crossing over the edge now 2007-04-26 18:08:29 -07:00
Brian Warner
5ceeaaea6a add RIClient.get_versions, in the hopes of enabling backwards-compatibility code in the future 2007-04-26 12:01:25 -07:00
Brian Warner
bc8ff33cd1 interfaces.py: remove spurious 'pass' statements (which, incidentally, were counted as uncovered code) 2007-04-18 15:46:37 -07:00
Brian Warner
652e8a735f interfaces: use explicit TupleOf and ChoiceOf constraints, since the upcoming version of Foolscap changes the meaning of bare tuples (from ChoiceOf to TupleOf) 2007-04-13 19:04:38 -07:00
Brian Warner
92ba8dc8d2 allmydata.interfaces: remove some of the placeholders now that we require foolscap-0.1.2 2007-04-04 15:59:36 -07:00
Brian Warner
7cd9ef3bbf finish making the new encoder/decoder/upload/download work 2007-03-30 16:50:50 -07:00
Brian Warner
9a2e0cf28e switch upload to use encode_new, fix a few things (but not nearly all of them) 2007-03-30 11:53:03 -07:00
Zooko O'Whielacronx
f4a718c5b6 finish storage server and write new download 2007-03-30 10:52:19 -07:00
Zooko O'Whielacronx
17299fc96e new upload and storage server 2007-03-29 20:19:52 -07:00
Brian Warner
74d0839980 update memory-footprint and share-size docs in ICodecEncoder 2007-03-28 12:52:44 -07:00
Brian Warner
dc25f327a3 document a proposed IDecoder interface, still pretty bare-bones 2007-03-28 11:31:31 -07:00
Brian Warner
c4f09833f5 document IEncoder, add Encoder.set_landlords() 2007-03-28 11:24:53 -07:00
Brian Warner
2b2e0fc0d4 ICodecEncoder: resolve some questions about the API, still more to examine 2007-03-27 20:14:45 -07:00
Brian Warner
59201843b6 update the docs on ICodecEncoder and ICodecDecoder 2007-03-27 19:05:09 -07:00
Brian Warner
25ff9e1f97 complete the Introducer changes, separate out vdrive access, make everything work again 2007-03-27 16:12:11 -07:00
Zooko O'Whielacronx
b58aa3c371 merge incomplete stuff with other patches 2007-03-23 16:20:26 -07:00
Zooko O'Whielacronx
e48a8b8e66 incomplete work to be finished elsewhere 2007-03-23 16:15:57 -07:00
Zooko O'Whielacronx
c77eace162 separate queen's service of introduction-to-the-network from queen's service of providing-access-to-the-vdrive 2007-03-22 14:39:30 -07:00
Brian Warner
a71d83bd8e add a local foolscap control interface, to upload/download files and check memory usage 2007-03-07 19:16:06 -07:00
Brian Warner
61760047cf add some questions to allmydata.interfaces 2007-03-05 20:57:38 -07:00
Zooko O'Whielacronx
dd4ad3d542 use pyfec instead of py_ecc for erasure coding and update API to codec 2007-02-01 16:07:00 -07:00
Brian Warner
e4870a432c fix some of the filetree/workqueue interface definitions 2007-01-26 17:31:24 -07:00