[tahoe-lafs-trac-stream] [tahoe-lafs] #280: get_hash method in webapi for extension caching logic.

tahoe-lafs trac at tahoe-lafs.org
Tue Feb 21 21:23:13 UTC 2012


#280: get_hash method in webapi for extension caching logic.
------------------------------+--------------------------------------------
     Reporter:  nejucomo      |      Owner:
         Type:  enhancement   |     Status:  new
     Priority:  minor         |  Milestone:  undecided
    Component:  code-         |    Version:  0.7.0
  frontend-web                |   Keywords:  webapi cache extension newcaps
   Resolution:                |
Launchpad Bug:                |
------------------------------+--------------------------------------------

Comment (by nejucomo):

 Replying to [comment:11 zooko]:
 > I still don't understand why the use case for this isn't satisfied by
 verify caps.

 Here's a use case I advocate:

 * I have a large file called {{{myblob.bin}}} and a capability, {{{$C}}}
 (of any kind) which I believe is associated with some revision of
 {{{myblob.bin}}}.
 * I use a commandline tool to calculate a cryptographic-hash-like value.
 Example alternatives:
  * {{{$ md5sum myblob.bin > local_hash}}}
  * {{{$ pyeval 'hashlib.sha256(ri).hexdigest()' < myblob.bin >
 local_hash}}}
  * {{{$ tahoe calculate_hashlike_thingy --input-file myblob.bin >
 local_hash}}}
 * I then ask tahoe for the hash-like value given the capability:
  * {{{$ tahoe calculate_hashlike_thingy --input-uri $C > lafs_hash}}}
  * ''NOTE'': For my use case, I want this command to not do any
 networking, if possible.
 * Compare the results for equality:
  * {{{$ if diff -q local_hash lafs_hash ; then echo 'This revision of
 myblob.bin is not stored at that capability.' ; fi}}}

 So for this use case to be satisfied by verify caps I need this command:

 {{{ $ tahoe spit_out_verify_cap < myblob.bin }}}

 This command should only read {{{myblob.bin}}} but should not do any
 networking or use any state other than the cap and {{{myblob.bin}}} (so
 that any tahoe user on any grid can run it).

 Is it feasible to make this command?  That would satisfy my goal for this
 ticket.

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/280#comment:12>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list