<div dir="ltr"><div>Dear Leif,</div><div>Thanks for the reply! I still have one question.</div><div>Iv'e installed the current code you commited, since i don't have so many servers i am using the public test grid of tahoe to test it, that means i have to go to localhost:3456 to get the server ids to be setup, however, when i start the tahoe client node at my local computer the web ui directly showed an exception <type 'exceptions.AttributeError'>: Client instance has no attribute '_node_key'. I've read about the node key link you provided, and that means a node id is encrypted by this key, but does this error suggests i should set it up somewhere in the cfg file?</div>
<div> </div><div>Thanks for your help! I really appreciate it!</div><div> </div><div>Best,</div><div>Yu</div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 13, 2013 at 2:24 AM, Leif Ryge <span dir="ltr"><<a href="mailto:leif@synthesize.us" target="_blank">leif@synthesize.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Jun 12, 2013 at 10:09:01PM -0400, Yu Xiang wrote:<br>
> Dear leif,<br>
> i am recently trying to set chunks to be sent to prefered servers in<br>
> tahoe-lafs, and i came across your code in<br>
> <a href="https://github.com/tahoe-lafs/tahoe-lafs/pull/39" target="_blank">https://github.com/tahoe-lafs/tahoe-lafs/pull/39</a>, which is really what i<br>
> need. However, there are something that i don't fully understand in the<br>
> code, hopefully you can help me with this, since it's really urgent and<br>
> i've tried many methods and spent plenty of time on this before i met this<br>
> perfectly matched code. I really need this help.<br>
><br>
> First it seems that i have to type in preferred peers in tahoe.cfg file,<br>
> but in which format? from the code it should be peers.prefered , pstrip()?<br>
> but in this case i am not able to compile the code successfully for now, i<br>
> did the changes in the files in your commit, are there anything else i need<br>
> to change?<br>
><br>
> Thanks in advance! Your help will be highly appreciated since i really need<br>
> this!<br>
><br>
> Best,<br>
> Yu<br>
<br>
</div></div>Thanks for asking! You've caused me to discover a problem with the<br>
preferred peers code and/or documentation.<br>
<br>
I've been using a comma-seperated list of node IDs (you can find the<br>
nodeid in the my_nodeid file in the storage node's directory). But, it<br>
appears that the method I'm using to obtain it - the storage_client<br>
object's get_longname method - now (as of 1.10) returns the new node<br>
key instead! This is displayed in the web ui in the same place as the<br>
nodeid was, but is prefixed with v0- which I *think* should not go in<br>
the preferred peers list.<br>
<br>
So, I *think* the current code should work if you list whatever you see<br>
in the web ui under a node's nickname, except if it starts with v0- you<br>
should remove that part. But I'm going to do some more testing now, and<br>
will push updated docs (and possibly code) in the near future.<br>
<br>
Btw, would you mind CC'ing the tahoe-dev list? I'm not sure if anyone<br>
else is using this code, but I'd like to keep information about it there<br>
just in case.<br>
<span class="HOEnZb"><font color="#888888"><br>
~leif<br>
</font></span><br>
ps: you can read about the new node keys here:<br>
<a href="https://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/docs/nodekeys.rst" target="_blank">https://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/docs/nodekeys.rst</a><br>
</blockquote></div><br></div>