What are the most recent bittorrent DHT implementation recommendations?

爷,独闯天下 提交于 2019-12-01 13:25:53

the spec says (emphasis mine):

When a node receives a find_node query, it should respond with a key "nodes" and value of a string containing the compact node info for [...]

Further down:

Contact information for nodes is encoded as a 26-byte string. Also known as "Compact node info" the 20-byte Node ID in network byte order has the compact IP-address/port info concatenated to the end.


Additionally you should read the original Kademlia paper since the bittorrent BEP builds on the concepts described therein and omits deeper explanations of those concepts.

You might also want to read for a few few extensions that are more or less de-facto standard for most implementations now http://libtorrent.org/dht_extensions.html

And read the other DHT-related BEPs, some are fairly widely adopted and modify/clarify BEP-5-specified behavior, but generally in a backward-compatible way.


For example, find_node is supposed to return either target node info or 8 closest nodes

Nodes will return a variable amount of entries. Could be more than 8. Or fewer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!