Commit Graph

272 Commits

Author SHA1 Message Date
Brian Warner
db71bdae9c offloaded: early code: most of client-side, defined the RemoteInterfaces 2008-01-08 21:18:54 -07:00
robk-tahoe
08c3ee73a2 reinstate creation of node.url files upon startup
a recent purge of the start.html code also took away the logic that wrote
'node.url' into the node root.  this is required for the tahoe cli tool to 
find the node.  this puts back a limited fraction of that code, so that the
node writes out a node.url file upon startup.
2008-01-07 18:04:56 -07:00
Zooko O'Whielacronx
5995d11a3c remove automatic private dir
* rename my_private_dir.cap to root_dir.cap
 * move it into the private subdir
 * change the cmdline argument "--root-uri=[private]" to "--dir-uri=[root]"
2008-01-03 17:02:05 -07:00
Zooko O'Whielacronx
eb373c0001 add human-encodings of caps, refactor encodings of caps, tighten checks, fix unit tests to use values of the right size 2008-01-03 16:55:43 -07:00
Brian Warner
b8d77fbb46 move my_private_dir.cap into private/ 2007-12-17 20:57:40 -07:00
Brian Warner
a592551ccf my_private_dir.cap: add newline for readability, open with mode 'w' not 'w+' since we don't need to read from this filehandle 2007-12-17 20:48:48 -07:00
Zooko O'Whielacronx
a983f6d60c rename "my_private_dir.uri" to "my_private_dir.cap" 2007-12-17 18:35:25 -07:00
Zooko O'Whielacronx
08a64c3a2b rename "secret" to "lease_secret" and change its size from 16 to 32 bytes 2007-12-17 18:34:11 -07:00
Zooko O'Whielacronx
8c65bdcf9d put all private state in $BASEDIR/private
fixes #219

The only part of #219 that this doesn't include is the part about 
logpublisher, which has been moved out of tahoe into foolscap.
2007-12-17 16:39:54 -07:00
Brian Warner
0dc84963f1 the wait_for_numpeers= argument to client.upload() is optional: make both the code and the Interface reflect this 2007-12-06 18:36:58 -07:00
Brian Warner
cca166a4f5 rename dirnode2.py to dirnode.py 2007-12-04 11:45:20 -07:00
Brian Warner
955bd5383d remove PyCrypto, now we only use pycrypto++ 2007-12-03 18:10:01 -07:00
Brian Warner
87e6ccbd4a remove leftover defer.setDebugging(), to speed up tests from 200s to 83s 2007-12-03 17:10:02 -07:00
Zooko O'Whielacronx
3605354a95 fix several bugs and warnings -- thanks, pyflakes 2007-12-03 15:42:35 -07:00
Zooko O'Whielacronx
59d6c3c822 decentralized directories: integration and testing
* use new decentralized directories everywhere instead of old centralized directories
 * provide UI to them through the web server
 * provide UI to them through the CLI
 * update unit tests to simulate decentralized mutable directories in order to test other components that rely on them
 * remove the notion of a "vdrive server" and a client thereof
 * remove the notion of a "public vdrive", which was a directory that was centrally published/subscribed automatically by the tahoe node (you can accomplish this manually by making a directory and posting the URL to it on your web site, for example)
 * add a notion of "wait_for_numpeers" when you need to publish data to peers, which is how many peers should be attached before you start.  The default is 1.
 * add __repr__ for filesystem nodes (note: these reprs contain a few bits of the secret key!)
 * fix a few bugs where we used to equate "mutable" with "not read-only".  Nowadays all directories are mutable, but some might be read-only (to you).
 * fix a few bugs where code wasn't aware of the new general-purpose metadata dict the comes with each filesystem edge
 * sundry fixes to unit tests to adjust to the new directories, e.g. don't assume that every share on disk belongs to a chk file.
2007-12-03 14:52:42 -07:00
Brian Warner
63233ecf37 consolidate dirnode/filenode-creation code into Client 2007-11-09 02:54:51 -07:00
Brian Warner
d772ea850d mutable: split dirnode stuff out to dirnode2.py, will be renamed later 2007-11-01 23:46:47 -07:00
Brian Warner
97f4d8c524 Client.tub_ready: upcall to Node 2007-11-01 17:27:12 -07:00
Brian Warner
1d8a4cdfe7 mutable: first pass at dirnodes, filenodes, new URIs. Some test coverage.
The URI typenames need revision, and only a few dirnode methods are
implemented. Filenodes are non-functional, but URI/key-management is in
place. There are a lot of classes with names like "NewDirectoryNode" that
will need to be rename once we decide what (if any) backwards compatibility
want to retain.
2007-11-01 15:15:29 -07:00
Brian Warner
9da1d70676 add a simple checker, for both files and directories 2007-10-15 16:16:39 -07:00
Brian Warner
a29ab33379 webish: write node.url, for the benefit of CLI tools 2007-10-11 01:38:04 -07:00
Brian Warner
c10da1e1ef client.py: add the missing remote_get_nodeid() method claimed in interfaces.py 2007-09-26 12:20:48 -07:00
Brian Warner
e05311f69a client.py: increase hotline timeout, the check_memory test is failing 2007-09-25 19:22:33 -07:00
Brian Warner
3774ce59ea check_memory: fix race condition for startup of in-process server nodes 2007-09-20 15:33:58 -07:00
Brian Warner
2b93164a03 test_runner: try harder to work on slow buildslaves and cygwin 2007-09-19 13:56:00 -07:00
Brian Warner
77394da447 client.py: only import webish.py if 'webport' is set, to save 3MB of footprint 2007-09-04 16:33:06 -07:00
Brian Warner
850bc9da02 deletion phase2b: create renew/cancel secrets for real. 2007-08-27 19:30:26 -07:00
Brian Warner
89ceb49309 node.py: change get_or_create_config() to accept a function 2007-08-27 19:07:12 -07:00
Brian Warner
56afda11d1 deletion phase2a: improve creation of renew/cancel secrets. Still fake though. 2007-08-27 19:00:18 -07:00
Brian Warner
77a7232867 node.py: refactor config-file getting and setting 2007-08-27 18:58:39 -07:00
tahoe
f49194cb5e trying to introduce old style humanreadablied logs hopefully without breaking the existing ones 2007-08-11 14:52:37 -07:00
Brian Warner
4de5767c98 web: remove /vdrive/private, replace with a start.html file that points at the /uri/PRIVATE_URI, to prevent XSRF attacks 2007-08-22 14:54:34 -07:00
Zooko O'Whielacronx
8717905e35 refactor reading of configuration files in client.py
This makes it so that an optional file which is unreadable or is rm'ed 
at the wrong moment will be ignored instead of raising an exception.   
It also bums out a couple of unnecessary lines of code (the explicit  
".close()" call).
2007-08-22 10:29:57 -07:00
Brian Warner
d5262ec7e1 client.py: add a newline to "myself.furl" contents 2007-08-17 23:28:22 -07:00
Brian Warner
a0c16f1a36 client.py: make a note in the logs when the auto-shutdown feature is in use 2007-08-14 02:12:30 -07:00
Brian Warner
6c6c62037d fix pyflakes warnings from recent b32decode change 2007-08-12 16:33:51 -07:00
Brian Warner
1ac83637a6 Client.get_permuted_peers: use self.nodeid now that it's fixed 2007-08-12 16:24:51 -07:00
Brian Warner
2f5a27316f webish: localfile=/localdir= are now disabled by default, a special switch is required to enable them 2007-08-10 18:21:22 -07:00
Brian Warner
998802fd6d #96: add flag to enable pushing data to ourselves, defaulting to False 2007-08-09 18:30:24 -07:00
Brian Warner
0826b1bd34 introducer.py: minor rearrangement of methods 2007-07-16 19:47:42 -07:00
Brian Warner
1aa22b9abd client.py: add a 'debug_no_storage' option to throw out all share data 2007-07-16 18:07:03 -07:00
Brian Warner
e91288d9ed client.py: write control.furl in the right place 2007-07-16 18:06:27 -07:00
Brian Warner
c6f52e379a rename storageserver.py to just storage.py, since it has both server and client sides now 2007-07-13 17:25:45 -07:00
Brian Warner
5399395c27 allow the introducer to set default encoding parameters. Closes #84.
By writing something like "25 75 100" into a file named 'encoding_parameters'
in the central Introducer's base directory, all clients which use that
introducer will be advised to use 25-out-of-100 encoding for files (i.e.
100 shares will be produced, 25 are required to reconstruct, and the upload
process will be happy if it can find homes for at least 75 shares). The
default values are "3 7 10". For small meshes, the defaults are probably
good, but for larger ones it may be appropriate to increase the number of
shares.
2007-07-12 15:33:30 -07:00
Brian Warner
94e6e6160b activate storage size limits in the client. Closes #34.
To use this, write a number like 10MB or 5Gb or 5000000000 to a file
named 'sizelimit' in the client's base directory. The node will not grant
leases for shares that would take it much beyond this many bytes of
storage. Note that metadata is not included in the allocation count until
a restart, so the actual space consumed may grow beyond the limit if
the node is not restarted very frequently and the amount of metadata is
significant.
2007-07-03 17:27:07 -07:00
Brian Warner
5ffc66ad7b client.py: remove unused import 2007-06-28 18:01:00 -07:00
Brian Warner
4196c9ff66 client.py: remove unused code 2007-06-28 17:55:13 -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
b11fa20191 merge vdrive.py and filetable.py into a single dirnode.py 2007-06-26 17:16:58 -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
20dcda4ca7 create a personal (non-shared) vdrive, in addition to the global shared one 2007-06-15 01:33:24 -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
363ed1264a webish: show vdrive and introducer connectedness separately
Also don't offer a link to the vdrive webpages if we don't have a vdrive.furl
2007-06-09 21:03:57 -07:00
Brian Warner
8907e04ef5 client.py: allow operation without vdrive.furl, for storage-only no-UI nodes 2007-06-07 17:55:49 -07:00
Brian Warner
59f4a5abe8 client.py: use persistent FURLs for our Node, to reduce spurious connection attempts (#26) 2007-06-07 15:32:21 -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
Brian Warner
c405c6117f check_memory.py: finish the failsafe-shutdown code 2007-05-24 17:34:42 -07:00
Brian Warner
f9e45391f6 node.py: use 'node.pem' for all nodes
Rather than use separate client.pem and introducer.pem files, use 'node.pem'
for all nodes regardless of what type it is. This is slightly cleaner, but
introduces a compatibility. Users who upgrade to this change should do
'mv client.pem node.pem' to avoid generating a new certificate and thus
changing their TubID.
2007-05-23 12:48:52 -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
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
Zooko O'Whielacronx
17299fc96e new upload and storage server 2007-03-29 20:19:52 -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
78d19c271c rearrange service startup a bit, now Node.startService() returns a Deferred that fires when the tub is actually ready, and there is also a Node.when_tub_ready() hook. This allows get_local_addresses() to be slow and not break everything. Changed all necessary test cases to accomodate this slow startup. 2007-03-08 15:10:36 -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
8e03d19ccc webish: add PBURL to the all-peers table on the welcome page 2007-01-16 21:01:18 -07:00
Brian Warner
56cf2dbd7e now that foolscap-0.0.7 accepts connect-to-self, allow peers to know about themselves. We now require foolscap-0.0.7 2007-01-16 15:12:49 -07:00
Brian Warner
3209fd5e09 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.
2007-01-15 21:22:22 -07:00
Brian Warner
3490378551 move all packages into src/, fix allmydata.Crypto build. Now you must perform a 'setup.py build' before using anything, and you must add the build directory (build/lib.linux-i686-2.4) to your PYTHONPATH before doing anything 2006-12-14 03:39:50 -07:00