[bittorrent] Protocol Deviation in Mainline

Elliott Mitchell ehem at m5p.com
Thu Mar 2 17:41:15 EST 2006


>From: Bram Cohen <bram at bitconjurer.org>
> Elliott Mitchell wrote:
> >The official specification continues to state:
> >
> >	"'request' messages contain an index, begin, and length. The last
> >	two are byte offsets. Length is generally a power of two unless
> >	it gets truncated by the end of the file. All current
> >	implementations use 2^15, and close connections which request an
> >	amount greater than 2^17."
> >
> >Sometime between 3.4 and 3.9 the mainline changed so that it would
> >request 2^14 (16KB) and drop peers which requested more.
> >
> Umm, 'oops'. It's been 2^14 for quite a while (like, years) but I didn't 
> update the spec. I believe that all major clients currently use 2^14, 
> mostly to avoid granularity issues.
> 
> I'll make sure the spec gets updated.

Then it comes to the questions: First, what is the benefit? Second, is
that benefit sufficient to break older clients by disallowing 2^17 block
requests?

To the first, I don't see any benefit at all. It very slightly raises the
protocol overhead, though 30B per 32KB isn't significant. There is a
significant performance drain due to having to keep track of a much
greater number of 'in flight' blocks. What possible benefit is there?

Approximately one year. Version 3.4.2 used 32KB requests and allowed
128KB requests. Version 3.9.1 used 16KB requests and only allowed 16KB
requests. The stable version of the Debian distribution ships with
version 3.4.2 and will likely continue to do so for a year or two.

I think it best to designate this a client bug, and change the client to
meet the protocol (by allowing 128KB requests, even if it doesn't utilize
them); rather than changing the protocol to fix the client. Though
certainly, a warning of this is due in the protocol spec.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         EHeM at gremlin.m5p.com PGP 8881EF59         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
    \___\_|_/82 04 A1 3C C7 B1 37 2A*E3 6E 84 DA 97 4C 40 E6\_|_/___/





More information about the BitTorrent mailing list