Parthib Dutta
2016-05-27 05:21:49 UTC
Hi everyone,
My name is Parthib and I'm currently doing a project where I have to implement the Bittorrent DHT. I have gone through the specs and understood almost all of it. But the traversal algorithm is the one I'm finding very challenging to understand. According to my understanding suppose I'm downloading a torrent and I have a few nodes in my routing table. Say 3. So i send find_node query to the nodes in my routing table including the target key as my own node id. I will recursively call this to find nodes closest to my node id.
After that I send get_peers query to the nodes that are closest to the info hash. If i get a list of peers i will send announce to the peers else if i receive a list compact node info list i will recursively call get_peers on them.
Is my reasoning correct? The part I'm not understanding is why we have to use find_node when get_peers request already returns us the node info of closest nodes to the info hash? I hope someone will help me clarify this doubt.
Sent from Yahoo Mail on Android
My name is Parthib and I'm currently doing a project where I have to implement the Bittorrent DHT. I have gone through the specs and understood almost all of it. But the traversal algorithm is the one I'm finding very challenging to understand. According to my understanding suppose I'm downloading a torrent and I have a few nodes in my routing table. Say 3. So i send find_node query to the nodes in my routing table including the target key as my own node id. I will recursively call this to find nodes closest to my node id.
After that I send get_peers query to the nodes that are closest to the info hash. If i get a list of peers i will send announce to the peers else if i receive a list compact node info list i will recursively call get_peers on them.
Is my reasoning correct? The part I'm not understanding is why we have to use find_node when get_peers request already returns us the node info of closest nodes to the info hash? I hope someone will help me clarify this doubt.
Sent from Yahoo Mail on Android