Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1379 closed Enhancement (fixed)

Support partial seeds extension (BEP21)

Reported by: tiennou Owned by: charles
Priority: Normal Milestone: 1.41
Component: Transmission Version: 1.34
Severity: Normal Keywords: patch


Here's a patch implementing partial seed at the tracker/peer-msgs level. See the spec here :

Attachments (1)

partial-seeds.diff (17.1 KB) - added by tiennou 13 years ago.
Patch v2

Download all attachments as: .zip

Change History (14)

comment:1 Changed 13 years ago by charles

  • Keywords patch added

comment:2 Changed 13 years ago by charles

  • Milestone changed from None Set to 1.50
  • Version changed from 1.34+ to 1.34

comment:3 Changed 13 years ago by charles

  • Owner changed from tiennou to charles
  • Status changed from new to assigned

comment:4 Changed 13 years ago by Waldorf

Note: It may be interesting to announce ourselves as partial seed, when download set to "0" since T will be handling this as a special case in v1.40. tr_torrentIsPieceTransferAllowed( t->tor, TR_PEER_TO_CLIENT )

comment:5 Changed 13 years ago by charles

  • Milestone changed from 1.50 to None Set

After a little digging: it seems neither libtorrent library supports this yet, and I can't find any tracker that does either. I'm a little concerned that we could shoot ourselves in the foot by adding support for this before trackers do, since we'd apparently be sending a different `event' argument in our annnounce that older trackers couldn't handle.

In order to implement the current draft of the spec in a backwards compatible way, we'd have to defer announcing until after we'd had a successful tracker scrape. The results of the scrape could be used to determine whether or not the tracker implements BEP 21.

Maybe the spec should be changed to make backwards compatibility easier. For example, instead of changing the behavior of announce's event' field, maybe the upload_only' field could be added to the announce string.

comment:6 Changed 13 years ago by livings124

Have you brought this issue up with the writers of the BEP? Also, do you know of any clients that implement this?

comment:7 Changed 13 years ago by charles

Now, on the separate issue of this patch:

  1. This extra information never makes it into the unchoke and new-connection code, which is the entire point of the BEP
  1. You can't send two "event" fields in the announce string
  1. The PARTIAL_SEED_ enum is defined but never used.
  1. The "upload_only" extension is not implemented in peer-msgs' pex
  1. The extra informaion should probably be saved in the resume file
  1. We would want a new "downloaders" field in tr_stat, populated from trackers.c
  1. The "downloaders" field would need to be added to rpc's "torrent-get" method
  1. (Minor) do not use C++-style comments

comment:8 Changed 13 years ago by charles

  • Milestone changed from None Set to 1.50

regarding comment 5, Arvid has schooled me in the error of my ways: if the tracker doesn't recognize the `event' value, it's simply ignored, but will still return a set of peers anyway.

For example, opentracker ignores everything except "stopped" and "completed".

comment:9 Changed 13 years ago by tiennou

Sorry, I was just thinking that this could have been a nice addition, and you were having problems with giving ETAs when the seeds in a swarm were incomplete. And, no, I have no example of another client using this.

I'm currently trying to start a disscussion in the forums to give a heads up on the issue you pointed out w.r.t backward compatibility ("trying" because I'm on satellite connection and it doesn't work well). I'll post a link when done ;-).

comment:10 Changed 13 years ago by tiennou

Okay, I got it ! Just don't refer to comment number, since it's not showing up here ;-). I actually had to count, I thought you were talking about your concerns about my patch ;-). I'll try to make it work then !

Changed 13 years ago by tiennou

Patch v2

comment:11 Changed 13 years ago by charles

wrt seeing this in the field... uTorrent is definitely using this now.

comment:12 Changed 13 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

added to trunk in r7238.

comment:13 Changed 13 years ago by charles

  • Milestone changed from 1.50 to 1.41
Note: See TracTickets for help on using tickets.