Opened 11 years ago

Closed 11 years ago

#3457 closed Enhancement (duplicate)

[PATCH] Report DHT torrent status in the Trackers pane

Reported by: gnu Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.03
Severity: Normal Keywords: DHT tracker status


While seeding torrents whose trackers are dead, I was curious how many peers were out there and how they were finding me. I added code to Transmission to report the status of the IPv4 and IPv6 DHT's in the Trackers pane. For example, for a Fedora-12 DVD, it reports:


Got a list of 80 peers 21 minutes ago

Asking for more peers in 8 minutes

Tracker had 236 seeders and 12 leechers 22 minutes ago

Asking for peer counts in 7 minutes

  • DHT for IPv4

Got a list of 905 peers 25 minutes ago

  • DHT for IPv6

Got a list of 13 peers 26 minutes ago

Patches against svn version 11009 enclosed.

The most intrusive change pulls some structures out of announcer.c into announcer.h so they're visible to the DHT code. The rest are spot patches, including two that avoid a coredump when a tracker has no URL or favicon.

This is only tested in the gtk GUI. The other GUIs may need spot patches to avoid assuming that every tracker has a non-null URL.

I would be interested in extending this work to make the DHTs use more of the internal infrastructure for trackers, which would improve the reporting and would eliminate a lot of the "if (AF_INET6)" constructs in the code. I'd possibly make peer exchange also report to the user in a similar way. But those code changes would be more extensive and intrusive, and I figured it's better to see if you-all care about this feature, or have suggestions, before I do that work.

Note that the peer counts reported for the DHTs seem high, probably because the same peers are being retrieved from several different DHT nodes as a result of the same query. I would also consider writing code to avoid counting the duplicates if you're interested; this too would be more intrusive, requiring new data structures.

Attachments (1)

transmission-dht-report-2.diff (15.7 KB) - added by gnu 11 years ago.
DHT reporting in torrent's tracker panel, patch against svn11009

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by gnu

DHT reporting in torrent's tracker panel, patch against svn11009

comment:1 Changed 11 years ago by Longinus00

Instead of trying to fit DHT into trackerstats and potentially breaking a bunch of stuff, why not expose it via a new data structure?

comment:2 Changed 11 years ago by gnu

The point of trackerstats is to provide a reporting interface to all the different GUIs. So by treating the DHT's like every other tracker, it should work in all GUIs with minimal changes. Otherwise each GUI needs to be able to report two kinds of trackers -- trackerstats type and DHT type. And then when PEX is reported, it becomes three. It's cleaner to centralize on one interface.

If I do the next step, I'd planned to change the DHT code so that it uses the existing HTTP tracker data structures (which have a lot more hooks for recording what goes on). Then the existing tracker-to-trackerstats code would work for both HTTP and DHT trackers. This would also clean up the IPv4 versus IPv6 mess; each torrent would have two copies of the DHT tracker data structure, rather than separate variable names in the torrent structure itself.

comment:3 Changed 11 years ago by Longinus00

Except all the different GUIs are going go need to make sure they can handle these non standards tracker entries in trackerstats, you had to fix a segfault just to make GTK client play nice with the new trackerstats. DHT results won't give you seeder, leecher, or download numbers so the UI will have to have special code to cover that up as well. This is all a non issue if DHT trackers are exposed a different way.

comment:4 Changed 11 years ago by livings124

I'm going to close this in favor of the much older #2147. gnu, could you please post future patches there (I hope this doesn't discourage you, this is just to keep tickets manageable).

comment:5 Changed 11 years ago by livings124

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.