Author: Wladimir J. van der Laan 2019-02-18 07:56:38
Published on: 2019-02-18T07:56:38+00:00
This document proposes a new P2P message to gossip longer node addresses over the P2P network. This is necessary to support new-generation Onion addresses, I2P, and potentially other networks that have longer endpoint addresses than fit in the 128 bits of the current addr message. Tor v3 hidden services are part of the stable release of Tor since version 0.3.2.9. They have various advantages compared to the old hidden services and these services have 256 bit addresses and thus do not fit in the existing addr message. Other transport-layer protocols such as I2P have always used longer addresses. The addrv2 message is defined as a message where pchCommand == "addrv2". It is serialized in the standard encoding for P2P messages. Its format is similar to the current addr message format with the difference that the fixed 16-byte IP address is replaced by a network ID and a variable-length address, and the time and services format has been changed to VARINT. One message can contain up to 1,000 addresses. Clients SHOULD reject messages with more addresses. Field addr has a variable length, with a maximum of 32 bytes (256 bits). Clients SHOULD reject longer addresses.The list of reserved network IDs include IPV4, IPV6, TORV2, TORV3, I2P, and CJDNS. To allow for future extensibility, clients MUST ignore address types that they do not know about. Client MAY store and gossip address formats that they do not know about. Clients SHOULD reject addresses that have a different length than specified in this table for a specific address ID. Send addrv2 messages only, and exclusively, when the peer has a certain protocol version (or higher): static const int GOSSIP_ADDRV2_VERSION = 70016; For older peers keep sending the legacy addr message, ignoring addresses with the newly introduced address types.The document lists various considerations that need to be discussed such as gossiping addresses outside a certain overlay network, lower precision of the time field, rolling port into addr, or making the port optional. The reference implementation is not yet available.
Updated on: 2023-06-13T17:08:29.481712+00:00