Qbittorrent: [Feature Request] Improve "Force Reannounce" feature by letting the user send it to a specific peer in qBittorrent.

Created on 4 Nov 2019  ·  3Comments  ·  Source: qbittorrent/qBittorrent

Suppose your connection starts and a few peers are visible. How can we do "Force Reannounce" to a specific peer in the list?

It would be nice to have this option in this menu to send force reannounce to a specific peer for a torrent: https://pasteboard.co/IGinL8w.png

Is it possible?

Invalid

Most helpful comment

@roboirc

I think you are misunderstanding what "Force reannounce" is and does.
In the Bittorrent protocol, there are 2 main ways to discover peers: via DHT and via tracker.
"Announcing" is only related to the tracker approach, so we can ignore the DHT for the purposes of this discussion.

In a nutshell, you don't announce to peers directly, you announce to trackers (that's why your question does not make sense). Whether or not that results in more peer connections depends on the health of the "swarm" (set of peers distributing the torrent).

A tracker is basically a server that stores (IP address, infohash) pairs. When you start a torrent, the torrent client sends your (IP address, infohash) to the tracker, basically saying "hey I am at announce.

The tracker then sends you the (IP address, infohash) pairs of the other peers and your client attempts to connect to them to start exchanging data (seeding and downloading, in other words). Normally, clients will reannounce to the tracker periodically (anything from 30 to 60 minutes is common, I think qBIttorrent does it every 45 minutes). This is because since the last announce, new peers could have joined the swarm and old ones left. Your client uses that information to manage its connections.

So, force reannounce basically means you are overriding the 30-60 minute timeout and reannouncing to the tracker _now_.

Either way, it might be the case that since _your_ last announce, a lot of new and fast peers have also announced themselves to the tracker, and thus your new announce will let your client know about this and benefit from the new connections. It also might not be the case, if no one else joined the swarm in the meantime, or if for some reason your client fails to connect to the new peers that joined in.

In general, "force reannounce" is useful:

  • When you first add a torrent and the first announce fails, you can force reannounce to try to contact the tracker immediately instead of waiting 30-60 minutes (the initial announce could have failed due to some spurious networking error).
  • For determining whether or not something might be wrong with a tracker - if you force reannounce several times and the tracker keeps giving you an error, you can be confident that this was not some spurious error and that there is in fact a problem. For example, the tracker could be offline, your ISP could be blocking connections to the tracker, etc.
  • For "racing", provided the client has the capability of force announcing repeatedly and in quick succession in the first few minutes/seconds after the torrent is added. Currently, qBittorrent is not capable of this (so you can't automate it), but you can always emulate it manually. See the last 2 paragraphs of this comment for more info on racing.

Finally, take care not to abuse force reannounce. Some trackers might ban or rate limit you if you spam announces. Also, in practice, thanks to the DHT, for the vast majority of public torrents it is not even a big deal if none of the trackers specified in the torrent work. You will still connect to other peers pretty fast.

More info on the bittorrent protocol in general:
https://en.wikipedia.org/wiki/BitTorrent (overview and history)
http://bittorrent.org/beps/bep_0000.html (BEP 3 is the actual specifiaction)
https://wiki.theory.org/index.php/Main_Page (FAQ, some other info about the spec)
https://libtorrent.org/index.html (the BIttorrent protocol implementaion in C++ that qBIttorrent uses)

If you to get more "hands on", see either/all of these:
http://www.kristenwidman.com/blog/33/how-to-write-a-bittorrent-client-part-1/
https://www.seanjoflynn.com/research/bittorrent.html
https://www.cs.swarthmore.edu/~aviv/classes/f12/cs43/labs/lab5/lab5.pdf

All 3 comments

@roboirc

I think you are misunderstanding what "Force reannounce" is and does.
In the Bittorrent protocol, there are 2 main ways to discover peers: via DHT and via tracker.
"Announcing" is only related to the tracker approach, so we can ignore the DHT for the purposes of this discussion.

In a nutshell, you don't announce to peers directly, you announce to trackers (that's why your question does not make sense). Whether or not that results in more peer connections depends on the health of the "swarm" (set of peers distributing the torrent).

A tracker is basically a server that stores (IP address, infohash) pairs. When you start a torrent, the torrent client sends your (IP address, infohash) to the tracker, basically saying "hey I am at announce.

The tracker then sends you the (IP address, infohash) pairs of the other peers and your client attempts to connect to them to start exchanging data (seeding and downloading, in other words). Normally, clients will reannounce to the tracker periodically (anything from 30 to 60 minutes is common, I think qBIttorrent does it every 45 minutes). This is because since the last announce, new peers could have joined the swarm and old ones left. Your client uses that information to manage its connections.

So, force reannounce basically means you are overriding the 30-60 minute timeout and reannouncing to the tracker _now_.

Either way, it might be the case that since _your_ last announce, a lot of new and fast peers have also announced themselves to the tracker, and thus your new announce will let your client know about this and benefit from the new connections. It also might not be the case, if no one else joined the swarm in the meantime, or if for some reason your client fails to connect to the new peers that joined in.

In general, "force reannounce" is useful:

  • When you first add a torrent and the first announce fails, you can force reannounce to try to contact the tracker immediately instead of waiting 30-60 minutes (the initial announce could have failed due to some spurious networking error).
  • For determining whether or not something might be wrong with a tracker - if you force reannounce several times and the tracker keeps giving you an error, you can be confident that this was not some spurious error and that there is in fact a problem. For example, the tracker could be offline, your ISP could be blocking connections to the tracker, etc.
  • For "racing", provided the client has the capability of force announcing repeatedly and in quick succession in the first few minutes/seconds after the torrent is added. Currently, qBittorrent is not capable of this (so you can't automate it), but you can always emulate it manually. See the last 2 paragraphs of this comment for more info on racing.

Finally, take care not to abuse force reannounce. Some trackers might ban or rate limit you if you spam announces. Also, in practice, thanks to the DHT, for the vast majority of public torrents it is not even a big deal if none of the trackers specified in the torrent work. You will still connect to other peers pretty fast.

More info on the bittorrent protocol in general:
https://en.wikipedia.org/wiki/BitTorrent (overview and history)
http://bittorrent.org/beps/bep_0000.html (BEP 3 is the actual specifiaction)
https://wiki.theory.org/index.php/Main_Page (FAQ, some other info about the spec)
https://libtorrent.org/index.html (the BIttorrent protocol implementaion in C++ that qBIttorrent uses)

If you to get more "hands on", see either/all of these:
http://www.kristenwidman.com/blog/33/how-to-write-a-bittorrent-client-part-1/
https://www.seanjoflynn.com/research/bittorrent.html
https://www.cs.swarthmore.edu/~aviv/classes/f12/cs43/labs/lab5/lab5.pdf

Francisco thanks for the great explanation. I am experiencing a situation where the tracker I use is showing only some of my seeded torrents as connectable (announced). Is there a situation where QB may only announce some torrents to the tracker? Will the force reannounce resolve this?

@infin0 Can you post a new issue with more details? This one is invalid anyway and should have been closed long ago.

@thalieht close please

Was this page helpful?
0 / 5 - 0 ratings