Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify client announce behavior when joining both swarms of a hybrid… #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions beps/bep_0052.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ <h1><a href="../index.html">BitTorrent<span>.org</span></a></h1>
<tr class="title field"><th class="docinfo-name">Title:</th><td class="field-body">The BitTorrent Protocol Specification v2</td>
</tr>
<tr><th class="docinfo-name">Version:</th>
<td>7392d83f374b071ca9601728c27be2d05e199e0c</td></tr>
<tr class="last-modified field"><th class="docinfo-name">Last-Modified:</th><td class="field-body">Thu Aug 31 15:47:00 2017 -0700</td>
<td>7e04e217f50e2900e7ac84ba7e3c9fc8466d7fc3</td></tr>
<tr class="last-modified field"><th class="docinfo-name">Last-Modified:</th><td class="field-body">Sat Jan 4 00:26:19 2020 +0100</td>
</tr>
<tr><th class="docinfo-name">Author:</th>
<td>Bram Cohen &lt;<a class="reference external" href="mailto:bram&#37;&#52;&#48;bittorrent&#46;com">bram<span>&#64;</span>bittorrent<span>&#46;</span>com</a>&gt;</td></tr>
Expand Down Expand Up @@ -522,6 +522,10 @@ <h1>Upgrade Path</h1>
is identical. During the download they must also verify that pieces match both piece
hash formats. If any inconsistency is detected they may either abort or fall back to
downloading one of the two formats as if the other were not present.</p>
<p>Implementations supporting both formats which joined both swarms of a hybrid torrent
MUST announce by making two requests (one for each swarm/<tt class="docutils literal">info_hash</tt>). For each request
the <tt class="docutils literal">downloaded</tt> and <tt class="docutils literal">uploaded</tt> parameters MUST contain the sum amount
that was respectively done in both swarms together.</p>
<p>When initiating a connection and sending the sha1 infohash of such a hybrid torrent
a peer can set the 4th most significant bit in the last byte of the reserved bitfield
to indicate that it also supports the new format. The remote peer may then respond
Expand Down
5 changes: 5 additions & 0 deletions beps/bep_0052.rst
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,11 @@ is identical. During the download they must also verify that pieces match both p
hash formats. If any inconsistency is detected they may either abort or fall back to
downloading one of the two formats as if the other were not present.

Implementations supporting both formats which joined both swarms of a hybrid torrent
MUST announce by making two requests (one for each swarm/``info_hash``). For each request
the ``downloaded`` and ``uploaded`` parameters MUST contain the sum amount
that was respectively done in both swarms together.

When initiating a connection and sending the sha1 infohash of such a hybrid torrent
a peer can set the 4th most significant bit in the last byte of the reserved bitfield
to indicate that it also supports the new format. The remote peer may then respond
Expand Down