Skip to content

Commit 51fe877

Browse files
authored
Merge pull request #59 from the8472/new-hash-algos
Draft: base protocol with merkle trees and new hash algorithms
2 parents 940d1c6 + 9049d0c commit 51fe877

File tree

4 files changed

+877
-2
lines changed

4 files changed

+877
-2
lines changed

beps/bep_0004.rst

+6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Reserved Bit Allocations
3535
0x02 XBT Peer Exchange
3636
0x04 suggest, haveall, havenone, reject request, and allow fast extensions
3737
0x08 NAT Traversal
38+
0x10 hybrid torrent legacy to v2 upgrade
3839

3940
There are known collisions::
4041

@@ -84,6 +85,11 @@ Reserved Message IDs
8485
Additional IDs used in deployed clients:
8586
0x14 LTEP Handshake (implemented in libtorrent, uTorrent,...)
8687

88+
Hash Transfer Protocol:
89+
0x15 hash request
90+
0x16 hashes
91+
0x17 hash reject
92+
8793
References
8894
==========
8995

beps/bep_0009.rst

+11-2
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,26 @@ Example::
114114
{'msg_type': 2, 'piece': 0}
115115
d8:msg_typei1e5:piecei0ee
116116

117+
117118
magnet URI format
118119
=================
119120

120121
The magnet URI format is::
121122

122-
magnet:?xt=urn:btih:<info-hash>&dn=<name>&tr=<tracker-url>&x.pe=<peer-address>
123+
v1: magnet:?xt=urn:btih:<info-hash>&dn=<name>&tr=<tracker-url>&x.pe=<peer-address>
124+
v2: magnet:?xt=urn:btmh:<tagged-info-hash>&dn=<name>&tr=<tracker-url>&x.pe=<peer-address>
123125

124126
<info-hash>
125127
Is the info-hash hex encoded, for a total of 40 characters. For
126128
compatability with existing links in the wild, clients should also
127129
support the 32 character `base32`_ encoded info-hash.
128-
130+
131+
<tagged-info-hash>
132+
Is the `multihash`_ formatted, hex encoded full infohash
133+
for torrents in the new metadata format. 'btmh' and 'btih'
134+
exact topics may exist in the same magnet if they describe
135+
the same hybrid torrent.
136+
129137
<peer-address>
130138
A peer address expressed as ``hostname:port``, ``ipv4-literal:port`` or ``[ipv6-literal]:port``.
131139
This parameter can be included to initiate a direct metadata transfer between two clients while reducing the need for external peer sources.
@@ -148,6 +156,7 @@ References
148156
.. _`base32`: http://www.ietf.org/rfc/rfc3548.txt
149157
.. _`BEP 0010`: http://www.bittorrent.org/beps/bep_0010.html
150158
.. _`BEP 0005`: http://www.bittorrent.org/beps/bep_0005.html
159+
.. _`multihash`: https://github.com/multiformats/multihash
151160

152161

153162
Copyright

0 commit comments

Comments
 (0)
close