[bittorrent] Questions related to mainline DHT specs...
pmoor at student.ethz.ch
Wed Aug 16 02:08:40 EDT 2006
> Running ethereal is far more enlightening...
jup, that's your best bet :-(
> So who do you send the find_node against - the central server (ie;
> router.bittorrent.com)? It seems somewhat redundant to do it against
> itself, ping would seem to be more appropriate.
I send find_node requests to my closest neighbours in the routing table
as well as to a couple of random peers every once in a while. The
peer_id I'm querying them for is my own ID with the last bit flipped,
i.e. a node very very close to me.
> From my interpretation of the docs, this returns it returns a list
> of the nodes close to the node you're interested in - it seems like
> this would just fill up your routing table with irrelevant entries.
> What am I missing here?
If you query the other peers for a node id close to yours you'll receive
a lot of peer information for peers very close to your own node ->
exactly what you want in your routing table.
> This is one of the examples of something that should be simple, but
> because the docs are inconsistent and confusing it isn't. It says in
> the docs "single character string value", somewhat vague, which let
> to my first question. After hearing your implementation, I looked
> more closely at the docs; in the example for ping, it's encoded as:
> no problem, it's a 1 character string value, that supports the
> concept that it's really just a character blob... But wait, there's
> more, check out the find_node example:
> Ok, so now it's encoded as an integer? All the other queries encode
> it as an integer also, so is it a bug in the docs or spec? The
> problem now is that when I check out what uTorrent sends, it does a 4
> byte binary blob, probably much like you're doing, but if this is
> supposed to be an integer, then it's obviously not correct.
True, indeed. I remember that now as well, the documentation is
seriously broken there...
> Which central routers do you work against (such as
> router.bittorrent.com:6881)? Right now it doesn't seem to be
> responding, so I'm testing against utorrent's, but any others that
> are consistently up would be helpful...
I usually start with router.bittorrent.com, as you mentioned. It seems
to be up and working almost always.
More information about the BitTorrent