Dark Shikari Posted May 6, 2007 Report Share Posted May 6, 2007 I guess you didn't anticipate "wasted" going over 2^32 did you? But after spending days trying to download from a torrent that appears to be being poisoned and finally finishing it, I have well over 4 gigabytes in hash fails... and I watched it roll over to zero and keep going.I guess you might want to replace that with a long Also to be specific, the build is the 1.7 BETA, 1355. The number is yyyyy, as in Wasted: yyyyyy (xxxx hashfails). Link to comment Share on other sites More sharing options...
Switeck Posted May 7, 2007 Report Share Posted May 7, 2007 You also might want to block the hostile ip ranges using ipfilter.dat in the future.It would probably reduce your download times to a fraction. Link to comment Share on other sites More sharing options...
Dark Shikari Posted May 7, 2007 Author Report Share Posted May 7, 2007 They seemed to be all over the place; utorrent was blocking clients left and right with no obvious IP pattern but it didn't seem to solve anything. Must have been a bugged torrent of some sort; I have never seen anything like it before.It worked though in the end, after about 4.6GB of hash fails out of an 8GB download... Link to comment Share on other sites More sharing options...
Firon Posted May 7, 2007 Report Share Posted May 7, 2007 1.7 has a function to help deal with that, actually. bt.use_rangeblock Link to comment Share on other sites More sharing options...
Greg Hazel Posted May 7, 2007 Report Share Posted May 7, 2007 Well, I could replace it with a 64 bit uint, but that would eventually roll over as well (just much later...). Link to comment Share on other sites More sharing options...
Computer Guru Posted May 7, 2007 Report Share Posted May 7, 2007 Everything will rollover sooner or later Only bug-proof way of doing it would be to create a list of unsigned 64-bit integers, each time an index is about to overflow, start using the next index. Total wasted is the sum of all used indexes in the list (if that makes any sense).But I'd assume that would be a huge waste of resources..... Link to comment Share on other sites More sharing options...
Dark Shikari Posted May 7, 2007 Author Report Share Posted May 7, 2007 @Computer GuruWell of course, that would be stupid.The main reason this looks a bit odd to me is that "Total Downloaded", "Total Uploaded", and so forth are all 64-bit ints, but Wasted is a 32-bit int; it seems inconsistent. Link to comment Share on other sites More sharing options...
Switeck Posted May 7, 2007 Report Share Posted May 7, 2007 Why not just let it roll over without trying to retain the exact value. Just reset it to 0 anytime it exceeds like 30000 hash fails...and maybe put a warning in the LOGGER that 'excessive hashfails' have occurred on that torrent. Link to comment Share on other sites More sharing options...
Dark Shikari Posted May 7, 2007 Author Report Share Posted May 7, 2007 @SwiteckThe number of hash fails isn't rolling over; its the total byte value.I don't see why the user shouldn't be able to tell how much total data has been lost to hash fails; its not as if its hard to use 64-bit values. It would probably be a single change in the code assuming the variable is only declared in one place. Link to comment Share on other sites More sharing options...
Switeck Posted May 9, 2007 Report Share Posted May 9, 2007 Oh, then it is really silly to use such a small number. 2^32 power is only about 4 billion if UNsigned or 2 billion SIGNed. It's surprising someone didn't have this problem sooner with torrents over 100 GB in size and pieces of 4 MB (or more) each. One fast D-Link DMZ data destroyer just might set a new record hashfails in just a few hours. EDIT: Corrected my post to correct signed/unsigned mistake. Link to comment Share on other sites More sharing options...
Saribro Posted May 9, 2007 Report Share Posted May 9, 2007 Well, I could replace it with a 64 bit uint, but that would eventually roll over as well (just much later...).True, but who here has a connection that could transfer 16 exabytes in a lifetime? 2^32 power is only about 4 billion if signed or 2 billion unsigned.No, it's the other way around, 4 billion unsigned, 2 billion signed (well, -2 (hence the "signed" through +2). Link to comment Share on other sites More sharing options...
Greg Hazel Posted May 10, 2007 Report Share Posted May 10, 2007 Ok. Easy enough to migrate to a uint64, and I agree that it makes sense to match uploaded and downloaded in size. Added for the next build Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.