BiglySoftware / BiglyBT

Feature-filled Bittorrent client based on the Azureus open source project
https://www.biglybt.com
GNU General Public License v2.0
1.55k stars 153 forks source link

[Feature Request] Add option to skip hash check #2351

Closed ghost closed 2 years ago

ghost commented 2 years ago

Description

When you are the first seeder for a torrent or you already have the data from somewhere else, BiglyBT will normally have to hash-check all files even if you just created the torrent file from them and thus know that they are correct. To eliminate this step, this feature can skip hash check.

There are three use cases where this would be extremely useful, and not at all a legitimate risk of sending bad data.

**1. For loading a torrent into BiglyBT after creating it with some utility like transmission-create

  1. For cross-seeding known equivalent torrents between trackers
  2. For transfering a known torrent from another BitTorrent client to BiglyBT, or for loading a known torrent after reinstallation of BiglyBT**

The first case is rather obvious, you just created that torrent, and now you're putting it into BiglyBT. The odds of a bitflip in that next 30 seconds you take to add it to BiglyBT should be nil. There should be no need to hash the data again, it's just wasting CPU/Disk I/O.

The second case is a bit niche, but I believe it is legitimate. On private trackers, where you cannot add new trackers to a torrent, there are sometimes overlaps in the data that can be shared; so adding the same torrent twice to your client, one for each tracker, is a way to share the data with multiple trackers. Sometimes piece sizes are different, and it would probably be best to ensure you rehash in that case, but other times trackers use the source field of the infodict to create a unique hash so that two identical torrents can be added to clients. If you know the piece hashes are the same, what is the point of rehashing the data?

The third case is also obvious, after a refresh installation of BitTorrent client, seeding a known torrent does not need rehashing. This is very useful after reinstallation of operating system or moving to another BitTorrent client.

Hashing large files in low performance hard drive can take several hours and significantly reduce hard drive life.

Last but not least, almost all mainstream BitTorrent clients support this feature, such as qBittorrent, µTorrent, BitTorrent, rTorrent and Deluge.

related issues

https://github.com/BiglySoftware/BiglyBT/issues/716 does not resolve this issue.

parg commented 2 years ago

Right-click on the torrent, select "Advanced" and "Set Resume Complete (Skip Recheck)"

as-muncher commented 2 years ago

Yeah, I've seen it though, where seeders think the data is correct, but it's not, because they save with no extension, so incomplete .mp4's are saved as .mp4 instead of .mp4.!qB or .mp4.!bT or whatever it is. Plus, what if BiglyBT is just hashing the file, but says it is checking it? Maybe it's just a simple naming change.

ghost commented 2 years ago

I just found out that I had to set "User Proficiency" to "Advanced" in Options first.

Right-click on the torrent, select "Advanced" and "Set Resume Complete (Skip Recheck)"

However, what you said doesn't work. When BiglyBT is checking files, the menu item "Set Resume Complete (Skip Recheck)" is greyed out, and it's not clickable.

Screenshot 2021-12-04 064948

as-muncher commented 2 years ago

@waynon If you pause or stop the file while it's checking, then I think you can choose that option to set resume complete. You'd better not be seeding files that are incomplete, though. That would piss me off lol

ghost commented 2 years ago

@waynon If you pause or stop the file while it's checking, then I think you can choose that option to set resume complete. You'd better not be seeding files that are incomplete, though. That would piss me off lol

That does work.

ghost commented 2 years ago

I think the procedure is more complex compared to other BitTorrent clients like µTorrent, qBittorrent and Deluge, because they can skip hash check directly when adding a torrent. To skip hash check in BiglyBT, I have to

  1. Set "User Proficiency" to "Advanced" in Options
  2. Pause or stop the torrent
  3. Right-click on the torrent, select "Advanced" and "Set Resume Complete (Skip Recheck)"
  4. Resume the torrent

I think adding another button "skip hash check" in the "File(s) already exists!" dialog will make this much easier.

Screenshot 2021-12-04 065127

as-muncher commented 2 years ago

@waynon I had written to you that you had to stop or pause the torrent before selecting to set resume complete (skip recheck), and you told me that it did not work. It does work?

as-muncher commented 2 years ago

@waynon Oh, my mistake, that it DOES work. Bad on me for not looking carefully.

parg commented 2 years ago

I could use it to earn seeding points on a private tracker whilst sending crap to downloaders.

Seems like a pretty dangerous feature that would only legitimately used by a tiny fraction of users and having it somewhat hidden is a good thing.