DHT implementation

Discussion of Transmission that doesn't fit in the other categories
jch
Posts: 174
Joined: Wed May 13, 2009 12:08 am

DHT implementation

Postby jch » Wed May 13, 2009 2:49 pm

I've just hacked together a patch to add DHT support to transmission. Here's a screenshot:

http://www.pps.jussieu.fr/~jch/software ... on-dht.png

Build instructions and a pointer to the sources are on

http://www.pps.jussieu.fr/~jch/software ... dht.README

I'll be grateful for help with the transmission side of things (I'll take care of the DHT side).

--Juliusz

jch
Posts: 174
Joined: Wed May 13, 2009 12:08 am

Re: DHT implementation

Postby jch » Sun May 17, 2009 6:35 am

A new version of the DHT code is available. Again, please see

http://www.pps.jussieu.fr/~jch/software ... dht.README

--Juliusz

bollywood
Posts: 141
Joined: Sun Jan 14, 2007 11:12 pm

Re: DHT implementation

Postby bollywood » Sun May 17, 2009 9:20 am

youre a legend, cant wait to see this in an official release!

jch
Posts: 174
Joined: Wed May 13, 2009 12:08 am

Re: DHT implementation

Postby jch » Tue May 19, 2009 8:21 pm

Just to let you know that my code has been merged into what will become transmission 1.70. So unless something goes catastrophically wrong, 1.70 should have DHT support.

Exp
Posts: 61
Joined: Wed Sep 26, 2007 12:31 pm

Re: DHT implementation

Postby Exp » Wed May 20, 2009 2:43 am

That's a big one for the team jch! KUDOS!!!
20"iMac intel 2.66 Duo: 4GB RAM : OSX 10.10.3

Yada
Posts: 273
Joined: Sat Apr 01, 2006 8:53 am
Location: Netherlands

Re: DHT implementation

Postby Yada » Wed May 20, 2009 6:31 am

That's very good news. This will please a lot of people. Nice work!
Please remember to not stare at your torrents' progress all day!

jh
Posts: 62
Joined: Fri Apr 04, 2008 6:11 pm

Re: DHT implementation

Postby jh » Wed May 20, 2009 11:20 am

DHT is working fine on 8450. I have tested it on two different DHT only torrents (tracker is dead and gone).
Nice work.

jch
Posts: 174
Joined: Wed May 13, 2009 12:08 am

Re: DHT implementation

Postby jch » Wed May 20, 2009 7:11 pm

Thanks for the kind words, to all of you. Here's some comments and news.

One user has reported an unexplained crash in the DHT code. It only happened in the morning, after a whole night of seeding.

What I've implemented is a pretty nice citizen of the DHT: it plays by all the rules, and tries not to hammer the DHT too hard. In particular, if any of you are worried about the FUD about DHT and private trackers: I am quite positive that my code will not get you banned, as we obey the ``private'' flag, and don't use DHT peers in private torrents. (The downside of being nice is that we're slow: my code takes between 1 and 3 minutes to perform a trackerless announce, which is somewhat slower than some more aggressive implementations. Of course, you can have as many simultaneous announces as you have torrents.)

What is missing is the user-interface code: there's no easy way to disable the DHT, which may be useful for people behind broken routers, and there's also no easy way to monitor the DHT.

We're working on all of that, and I'm fairly confident we'll have a complete implementation within a couple of weeks.

--Juliusz

Jordan
Transmission Developer
Posts: 2311
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: DHT implementation

Postby Jordan » Thu May 21, 2009 2:07 am

Enabling / disabling DHT is supported in the gtk, qt, and transmission-remote clients now.

I'm really not sure what DHT monitoring is needed / possible other than the per-torrent node count and the TR_DHT_{STOPPED,BROKEN,POOR,FIREWALLED,GOOD} status...

Exp
Posts: 61
Joined: Wed Sep 26, 2007 12:31 pm

Re: DHT implementation

Postby Exp » Thu May 21, 2009 2:29 pm

I was using the latest svn build this morning. I had to revert back to an earlier build because Transmission was maxing out one of my cpu's.
Back to 1.60 and is good again.
20"iMac intel 2.66 Duo: 4GB RAM : OSX 10.10.3

Yada
Posts: 273
Joined: Sat Apr 01, 2006 8:53 am
Location: Netherlands

Re: DHT implementation

Postby Yada » Fri May 22, 2009 9:57 am

Exp wrote:I was using the latest svn build this morning. I had to revert back to an earlier build because Transmission was maxing out one of my cpu's.
Back to 1.60 and is good again.


Did you try disabling DHT to see if the problem lies in that code?
Please remember to not stare at your torrents' progress all day!

Exp
Posts: 61
Joined: Wed Sep 26, 2007 12:31 pm

Re: DHT implementation

Postby Exp » Fri May 22, 2009 12:10 pm

Yada wrote:
Exp wrote:I was using the latest svn build this morning. I had to revert back to an earlier build because Transmission was maxing out one of my cpu's.
Back to 1.60 and is good again.


Did you try disabling DHT to see if the problem lies in that code?


Yes I did and it did not fix the cpu problem.
I just updated to svn 1.61+ (8478) and the problem with my cpu appears to be fixed.

UPDATE : Transmission has been stable for 3 hours.

Jordan wrote this : "(trunk) dht seems to be crashing in bcmp() on the mac, so I suspect the homegrown implementation of memmem() is buggy... test this out by replacing memmem()'s implementation"
20"iMac intel 2.66 Duo: 4GB RAM : OSX 10.10.3

jch
Posts: 174
Joined: Wed May 13, 2009 12:08 am

Re: DHT implementation

Postby jch » Fri May 22, 2009 3:54 pm

Jordan wrote:I'm really not sure what DHT monitoring is needed / possible other than the per-torrent node count and the TR_DHT_{STOPPED,BROKEN,POOR,FIREWALLED,GOOD} status...


Information in the trackers details window on whether a DHT announce is in progress for this particular torrent right now, and the time since the last announce. A button to allow manually triggerring a DHT announce for this particular torrent.

We also need to check whether the libtransmission code or any GUI code assumes that the number of tracker URLs in a .torrent is at least 1 -- with the DHT, torrents with 0 such URLs have become perfectly legitimate.

The possibility in the torrent creation code to add a ``nodes'' field. It should default to empty, at least until we set up a ``router.transmissionbt.com''

--Juliusz

Weaselboy
Posts: 121
Joined: Sat Jan 12, 2008 3:50 pm

Re: DHT implementation

Postby Weaselboy » Sun May 24, 2009 7:06 pm

Nice works guys. Thanks to Jordan and JCH!

jah
Posts: 941
Joined: Thu Jan 26, 2006 10:14 am

Re: DHT implementation

Postby jah » Sun May 31, 2009 2:41 pm

I have a few questions about the DHT? (most of them aimed at the Mac version of T)
1. how do I know if I have successfully 'connected' to the DHT?
2. Does each torrent have its own DHT, or is there just one DHT for all torrents?
3. Do DHT peers show up as coming from the DHT in the 'peers' tab of the inspector?

I have been downloading a couple of public torrents with a nightly, and I haven't been connecting to any DHT peers. I suppose this could either mean a) T doesn't specify DHT peers, b) i just coincidentally haven't connected to any, c) i am having problems connecting to the DHT itself.

The problem is I don't know which of these 3 options it is...


Return to “General”