节点的Kademlia树如何与种子文件的信息哈希相关? [英] How Kademlia tree of nodes relates to the infohash of a torrent file?

查看:159
本文介绍了节点的Kademlia树如何与种子文件的信息哈希相关?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解Kademlia在寻找资源方面的工作方式.现在有很好的描述来构建最接近自身节点的节点树,如何查找节点之间的距离,如何启动过程等.我不了解的是文件infohash如何适合此图片.所有描述都告诉我们如何发挥作用,并构建自己的分布式哈希表部分,但事实并非如此.我们这样做是为了实际找到资源,即具有特定信息哈希值的文件.它是如何存储在此节点树中的?或者有单独的树?查找具有此信息哈希并因此具有文件的节点的工作原理.

I'm trying to understand how Kademlia works in regards to finding a resource. There is pretty good description of now to build a node tree which is closest to the self node, how to find the distance between nodes, how to initiate the process etc. What I don't understand is how the file infohash fits into this picture. All descriptions tell us how to get into the play and build your own part of the distributed hash table but it is not it. We are doing this to actually find a resource, a file with a certain infohash. How it is stored in this node tree or there is a separate one? How is it works to find nodes which have this infohash, consequently having the file.

这里简短地提到了一个事实,即节点id和infohash具有相同的20字节长度代码,而节点id XOR infohash就是节点与资源之间的距离,但是我无法想象这是如何以及如何帮助的找到资源?毕竟,实际拥有资源的节点ID可以与该资源具有最大的XOR距离.

There is brief mentioning of the fact that the node id and infohash having the same 20 bytes length codes and something that node id XOR infohash is the distance between the node and the resource but I cannot imagine how is that and how it helps to find the resource? After all a node id actually having the resource can have the greatest XOR distance to the resource.

谢谢你, 亚历克斯

推荐答案

我建议您不要只阅读原始的卡德里亚纸,因为前者相当简洁,只顺便提及了一些东西.

I recommend that you don't just read the bittorrent DHT specification but also the original kademlia paper, since the former is fairly concise and only mentions some things in passing.

Bittorrent的get_peers查找与本文中所述的find_value操作等效.

Bittorrent's get_peers lookup is equivalent to the find_value operation described in the paper.

简而言之:就像您可以进行迭代查找一样,根据相对于目标键的xor距离找到K-最接近节点集-最接近-对于您自己的节点ID可以为任何其他ID做到这一点.

In short: just like you can do an iterative lookup to find the K-closest-node-set - closest based on xor-distance relative to the target key - for your own node's ID you can do so for any other ID.

对于get_peers,您只需使用infohash作为目标密钥即可.

For get_peers you simply use the infohash as target key.

特定infohash的K-最近节点集是被认为负责存储所述infohash数据的节点集.尽管由于实现和节点搅动的不准确性,目标密钥周围的K个以上的节点可能正在存储感兴趣的数据.

The K-closest-node-set for a particular infohash is the set of nodes considered responsible to store the data for said infohash. Although due to inaccuracies of implementations and node churn more than K nodes around the target key may be storing data of interest.

这篇关于节点的Kademlia树如何与种子文件的信息哈希相关?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆