[tahoe-dev] doubts regarding node_id creation
shawn at willden.org
Fri Oct 8 16:17:16 UTC 2010
On Fri, Oct 8, 2010 at 10:02 AM, sreenivasulu velpula <v.sreenu at gmail.com>wrote:
> when any node(client/server/storage) is started in Tahoe LAFS, one
> unique id(my_nodeid) is getting created.
> i have following doubts regarding node id creation. can any one please
> clear these doubts?
> 1.How can tahoe ensures that, every node id is unique ?
The node ID is randomly-generated, so there is no way to guarantee its
uniqueness. However, the ID is long enough that the probability of two
randomly-generated IDs colliding is negligible.
2. If upload the same file again and again, tahoe will give the same
> capability string. How is tahoe identifies that the client is same, when i
> upload files mutiple times, is it based on node id ?
For immutable files this is true. The capability string is derived from two
pieces of information: The content of the file and the "convergence
secret". By default, the convergence secret is randomly generated by the
node when it first starts up, then stored and re-used after that. So the
same file content uploaded from the same node will always have the same cap
string. Uploading the file from a different node with a different
convergence secret would result in a different cap string -- and a second
copy of the file's contents stored in the grid, though there's no way to
tell that the two stored files are the same, because they're encrypted with
On my grid, I set the nodes up to all use the same convergence secret, so a
given file is only stored once no matter how many nodes try to upload it.
The convergence secret is stored in private/convergence.
> 3. When i stop a node and start it again, will the node have the same node
> id as of previous node start ?
Yes. The node ID is stored in the my_nodeid file in your tahoe directory.
> 4. If i move the client node base directory to different maching and start
> the client there again, will the node have the same node id as of previous
> machine start ?
Yes, as long as you move that my_nodeid file.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the tahoe-dev