Jump to content

bt.use_ban_ratio in 1.7 b3353


5618

Recommended Posts

Smoovius mentioned to me that bt.ban_threshold wasn't triggering when bt.use_ban_ratio was disabled. So I tried to test this and started a large torrent that I knew was going to give me hashfails.

I set bt.use_ban_ratio to false and kept bt.ban_threshold on my own value of 6 to see if peers would get banned. The per-torrent connection limit is 100 peers. I let the torrent download for a while, which resulted in 22 hashfails (but no bans). Then I set bt.use_ban_ratio to true (bt.ban_ratio is at 128), expecting some peers to maybe get banned but upon the next hashfail, 77 peers were banned immediately, almost all peers. This is (should) of course be impossible with a bt.ban_threshold of 6 and 22 hashfails. bt.use_rangeblock is set to false by the way, but peers don't seem to fall in the same /24 anyway.

Edit: Note, this is a wild guess. Looking at the hashfails that took place shortly afterwards before I got to stop the torrent, the hashfails seem to have happened very quickly in a row. 15 in 1m30s (9 unique pieces) as opposed to 22 in 14m (12 unique). Could this perhaps mean all peer that hadn't sent me a bad piece up until then were banned whereas the ones that did weren't? Wild guess and seems strange, but maybe helpful.

Link to comment
Share on other sites

  • 2 months later...

Well, for 77 peers to be blamed 6 times, they need to participate in 6 pieces each, or 462 chunks total. With a large torrent I imagine the piece size could be 512kB or more, which is 32 chunks per piece. At 512kB, that's only 15 pieces for 480 chunks.

Once you enabled use_ban_ratio, the ban_ratio of 128 ensured no peer over %0.78 bad data was allowed to stay connected to you.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...