Browse Source

add notes on using DHT... this is on hold and should be developed

later..
main
John-Mark Gurney 5 years ago
parent
commit
375755eb3c
1 changed files with 49 additions and 0 deletions
  1. +49
    -0
      dht/NOTES.TXT

+ 49
- 0
dht/NOTES.TXT View File

@@ -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': <txid>,
'a': { 'h': <self-identifying hash> }
}

response:
{ 'y': 'r',
't': <txid>,
'r': { 'k': [ <list of p255 keys> ] }
}

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

Loading…
Cancel
Save