From 375755eb3c607253842aff9d2681ce233d722ffc Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Mon, 2 Sep 2019 10:56:43 -0700 Subject: [PATCH] add notes on using DHT... this is on hold and should be developed later.. --- dht/NOTES.TXT | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 dht/NOTES.TXT diff --git a/dht/NOTES.TXT b/dht/NOTES.TXT new file mode 100644 index 0000000..67050cc --- /dev/null +++ b/dht/NOTES.TXT @@ -0,0 +1,49 @@ +entangled looks promising, but appears to have been abandoned. SF doesn't have code, but did find: +https://github.com/nandajavarma/entangled + +Appears to be using an older version of twisted. + +DHT: +https://www.bittorrent.org/beps/bep_0005.html + +btdht looks like a great option. +https://btdht.readthedocs.io/en/latest/README.html + +Design for using bep44 and bep46. +https://www.bittorrent.org/beps/bep_0044.html +https://www.bittorrent.org/beps/bep_0046.html + +for what I need, bep44 isn't enough for me, need to "register" that a key applies to the hash... + +idea: user needs to look up where a hash came from. does a query for the hash of the file, and gets back a list of keys. +the key + the hash of the file as the salt gives you the torrent of the metadata that the person is publishing for info about that hash.. + +Publish data on a file: + +Looking up file: +1. hash file +2. dht query_keys request: + { 'y': 'q', + 'q': 'query_keys', + 't': , + 'a': { 'h': } + } + + response: + { 'y': 'r', + 't': , + 'r': { 'k': [ ] } + } + +So, there needs to be another add_array(infohash, key) or something similar. + +BEP46 is interesting for FreeBSD, there can be a salt for each branch (stable/head), which gets updated +to point to the latest release of each. Or even snapshots. This can be done to always get the latest +release of FreeBSD + +https://github.com/webtorrent/webtorrent/issues/886 + +Python 3 only +https://github.com/bmuller/kademlia + +https://github.com/isaaczafuta/pydht