<div dir="ltr"><div>Dear Leif,</div><div>Also I would like you to check if this is the correct format of preferred peers setting in tahoe.cfg.</div><div>Since i think this is what i got from the code, but i am not sure about it. should the string to the left of the equal sign be "peers.preferred p"?</div>
<div> </div><div>[client]<br>introducer.furl = pb://<a href="http://hckqqn4vq5ggzuukfztpuu4wykwefa6d@publictestgrid.dnsd.info:50213/introducer">hckqqn4vq5ggzuukfztpuu4wykwefa6d@publictestgrid.dnsd.info:50213/introducer</a><br>
peers.preferred p = 7ncac2wflv5hmmkcqnlcmnturdlojuxz, 9ncac2wflv5hmmkcqnlcmnturdlojuwy</div><div>[storage]<br>enabled = true</div><div> </div><div>Thanks for your kindly help!</div><div> </div><div>Best,</div><div>Yu</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>