anthony-joal
10.08.17, 17:56
Since we most likely be multiple contributors to this sub-section, we should agree on the same terminology. This thread is a non-exhaustive proposal for this concern.
Concerning key types:
This section define which types of keys are used by BitTorrent clients (which characters sets).
hash: The key is an HASH containing only hexadecimal characters [0-9a-z].
hash_no_leading_zero: The key is an HASH containing only hexadecimal characters [0-9a-z] (can be lower-cased or upper-cased), but the key will never start with a 0, if it does the leading 0 MUST be removed (0AB92E9F will become AB92E9F).
numeric: The key must be a random number [0-9]{x}.
digit_range_transformed_to_hex: A random digit that is transmited as it's hexadecimal representation, without leading zeroes.
Concerning peerid types:
Each client use his own subset of characters. Characters set will be defined in clients thread.
Concerning PeerId or Key refresh trigger:
There are a plenty of generation algorithm that refresh key / peerId. The below list explicitly give a name to each of these algorithms. (In the below list, subject refers to either a key or a peerid)
NEVER: The subject MUST NOT be refreshed until application restarts.
ALWAYS: The subject MUST be refresh on each announces.
TIMED: The subject MUST be refresh every X seconds.
TIMED_OR_AFTER_STARTED_ANNOUNCE: The subject MUST be refreshed every X seconds OR immediatly after an announce with type STARTED has been fired.
TORRENT_VOLATILE: Given a torrent, the subject will always be the same, MUST be refreshed when a STOPPED announce has been fired for this particular torrent. Two torrents MUST have two different subjects.
TORRENT_PERSISTENT: Given a torrent, the subject will always be the same, MUST NOT be refreshed when a STOPPED announce has been fired for this particular torrent, however if the application is restarted the subject MUST be refreshed. Two torrents MUST have two different subjects.
Fell free to comment for improvements or missing types.
Concerning key types:
This section define which types of keys are used by BitTorrent clients (which characters sets).
hash: The key is an HASH containing only hexadecimal characters [0-9a-z].
hash_no_leading_zero: The key is an HASH containing only hexadecimal characters [0-9a-z] (can be lower-cased or upper-cased), but the key will never start with a 0, if it does the leading 0 MUST be removed (0AB92E9F will become AB92E9F).
numeric: The key must be a random number [0-9]{x}.
digit_range_transformed_to_hex: A random digit that is transmited as it's hexadecimal representation, without leading zeroes.
Concerning peerid types:
Each client use his own subset of characters. Characters set will be defined in clients thread.
Concerning PeerId or Key refresh trigger:
There are a plenty of generation algorithm that refresh key / peerId. The below list explicitly give a name to each of these algorithms. (In the below list, subject refers to either a key or a peerid)
NEVER: The subject MUST NOT be refreshed until application restarts.
ALWAYS: The subject MUST be refresh on each announces.
TIMED: The subject MUST be refresh every X seconds.
TIMED_OR_AFTER_STARTED_ANNOUNCE: The subject MUST be refreshed every X seconds OR immediatly after an announce with type STARTED has been fired.
TORRENT_VOLATILE: Given a torrent, the subject will always be the same, MUST be refreshed when a STOPPED announce has been fired for this particular torrent. Two torrents MUST have two different subjects.
TORRENT_PERSISTENT: Given a torrent, the subject will always be the same, MUST NOT be refreshed when a STOPPED announce has been fired for this particular torrent, however if the application is restarted the subject MUST be refreshed. Two torrents MUST have two different subjects.
Fell free to comment for improvements or missing types.