DHT implementation

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

DHT implementation

Post by jch »

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: 175
Joined: Wed May 13, 2009 12:08 am

Re: DHT implementation

Post by jch »

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

Post by bollywood »

youre a legend, cant wait to see this in an official release!
jch
Posts: 175
Joined: Wed May 13, 2009 12:08 am

Re: DHT implementation

Post by jch »

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: 62
Joined: Wed Sep 26, 2007 12:31 pm

Re: DHT implementation

Post by Exp »

That's a big one for the team jch! KUDOS!!!
Yada
Posts: 273
Joined: Sat Apr 01, 2006 8:53 am
Location: Netherlands

Re: DHT implementation

Post by Yada »

That's very good news. This will please a lot of people. Nice work!
jh
Posts: 62
Joined: Fri Apr 04, 2008 6:11 pm

Re: DHT implementation

Post by jh »

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: 175
Joined: Wed May 13, 2009 12:08 am

Re: DHT implementation

Post by jch »

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: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: DHT implementation

Post by Jordan »

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: 62
Joined: Wed Sep 26, 2007 12:31 pm

Re: DHT implementation

Post by Exp »

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.
Yada
Posts: 273
Joined: Sat Apr 01, 2006 8:53 am
Location: Netherlands

Re: DHT implementation

Post by Yada »

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?
Exp
Posts: 62
Joined: Wed Sep 26, 2007 12:31 pm

Re: DHT implementation

Post by Exp »

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"
jch
Posts: 175
Joined: Wed May 13, 2009 12:08 am

Re: DHT implementation

Post by jch »

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

Post by Weaselboy »

Nice works guys. Thanks to Jordan and JCH!
jah
Posts: 941
Joined: Thu Jan 26, 2006 10:14 am

Re: DHT implementation

Post by jah »

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...
Post Reply