[bittorrent] Questions related to mainline DHT specs...
pmoor at student.ethz.ch
Mon Aug 14 17:51:07 EDT 2006
I'm not an expert at all, but here's what I assumed for my implementation:
> First, under what circumstances do you make a call to find_node as
> opposed to get_peer? The reason I ask is that find_node obviously
> returns a list of nodes either close to the infohash, or that have
> announced the infohash. Now find_node returns either the node info
> for the node (if known), or up to 8 of the closest peers. Why would I
> want to perform a find_node? Doesn't pretty much everything get
> handled by get_peer?
I do find_node queries when I want to refresh my neighbourhood, i.e.
searching for new peers I could include in my routing table.
> Next, it says "Node IDs are chosen at random from the same 160-bit
> space as BitTorrent infohashes." What exactly does this mean? Is he
> just trying to say that it's a 160-bit random value, or is it derived
> somehow from the infohash?
I assumed that they're drawn from pure randomness.
> Finally (for now), it says that the transaction ID is "a single
> character string value", is this an alpha-numeric value (a-z, hex,
> whatever), or is it really just a one-digit integers (ie; 0-9)?
Again, I'm using random 4-byte values, which seems to work fine. If I
remember the mainline code right, there aren't any assumptions about the
content of this byte-"string".
More information about the BitTorrent