[mnet-devel] notes from IRC -- who to hello

Zooko zooko at zooko.com
Wed Jan 7 15:36:39 GMT 2004


<arnowa_> and somehow tweak the choice of which MT to hello at

In v0.6 currently it uses the following scheme.  The source is in 
MojoTransaction.py in "__announce_self_to_meta_trackers()".

1. Don't send a new hello with the same old contact info more often than every 
   10 minutes.

2. Don't send hello more often than every 45 seconds even if your contact info 
   changes more often than every 45 seconds.

3. If you don't have a routeable IP address and haven't located a relay server, 
   then you don't have a contact info, so don't send hello.

4. Okay, now when it *is* time to send a hello, do the following:

4.a. Ask peerman for a list of known metatrackers.  Peerman will give you all 
     "liveness-level-0" metatrackers, plus with 50% probability he will give 
     you all "liveness-level-1" metatrackers, plus with 25% probability he will 
     give you all "liveness-level-2" metatrackers, etc.  Whichever ones he 
     chooses to give you, they all arrive in one list and you can't tell what 
     their liveness levels are.

     Note that peerman never allows liveness-level-0 to be empty.  If all MTs 
     have failed and been demoted to worse liveness levels, then all MTs get 
     promoted until at least one is in liveness-level-0.  Therefore asking 
     peerman for MTs will always result in at least one MT.

4.b. Choose the Chordish fingers from that list, i.e. choose the MT whose Id is 
     closest to your Id + 1, plus the MT whose Id is closest to your Id + 2, 
     plus the MT whose Id is closest to your Id + 4, etc.

4.c. If the resulting set of MTs is smaller than log(n), where n is the number 
     of MTs that peerman told you about, then choose enough Chordish successors 
     (that is: MTs whose Ids are closest to yours and greater than yours) to 
     make it equal to log(n).

4.d. Send "hello" to each of the chosen MTs.

Regards,

Zooko



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel




More information about the Mnet-devel mailing list