Skip to content

Commit 60bfc4b

Browse files
authored
Merge pull request bitcoin#907 from vasild/bip155_clarifications
BIP155: include changes from followup discussions
2 parents 68bb026 + 350189a commit 60bfc4b

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

bip-0155.mediawiki

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ This means that the message contains a serialized <code>std::vector</code> of th
7878

7979
One message can contain up to 1,000 addresses. Clients SHOULD reject messages with more addresses.
8080

81-
Field <code>addr</code> has a variable length, with a maximum of 32 bytes (256 bits). Clients SHOULD reject
82-
longer addresses.
81+
Field <code>addr</code> has a variable length, with a maximum of 512 bytes (4096 bits).
82+
Clients SHOULD reject messages with longer addresses, irrespective of the network ID.
8383

8484
The list of reserved network IDs is as follows:
8585

@@ -120,21 +120,23 @@ The list of reserved network IDs is as follows:
120120
| Cjdns overlay network address
121121
|}
122122

123-
To allow for future extensibility, clients MUST ignore address types that they do not know about.
124-
Client MAY store and gossip address formats that they do not know about. Further network ID numbers MUST be reserved in a new BIP document.
123+
Clients are RECOMMENDED to gossip addresses from all known networks even if they are currently not connected to some of them. That could help multi-homed nodes and make it more difficult for an observer to tell which networks a node is connected to.
125124

126-
Clients SHOULD reject addresses that have a different length than specified in this table for a specific address ID, as these are meaningless.
125+
Clients SHOULD NOT gossip addresses from unknown networks because they have no means to validate those addresses and so can be tricked to gossip invalid addresses.
126+
127+
Further network ID numbers MUST be reserved in a new BIP document.
128+
129+
Clients SHOULD reject messages that contain addresses that have a different length than specified in this table for a specific network ID, as these are meaningless.
127130

128131
See the appendices for the address encodings to be used for the various networks.
129132

130-
==Compatibility==
133+
==Signaling support and compatibility==
134+
135+
Introduce a new message type <code>sendaddrv2</code>. Sending such a message indicates that a node can understand and prefers to receive <code>addrv2</code> messages instead of <code>addr</code> messages. I.e. "Send me addrv2".
136+
137+
<code>sendaddrv2</code> SHOULD be sent after receiving the <code>verack</code> message from the peer.
131138

132-
Send <code>addrv2</code> messages only, and exclusively, when the peer has a certain protocol version (or higher):
133-
<source lang="c++">
134-
//! gossiping using `addrv2` messages starts with this version
135-
static const int GOSSIP_ADDRV2_VERSION = 70016;
136-
</source>
137-
For older peers keep sending the legacy <code>addr</code> message, ignoring addresses with the newly introduced address types.
139+
For older peers, that did not emit <code>sendaddrv2</code>, keep sending the legacy <code>addr</code> message, ignoring addresses with the newly introduced address types.
138140

139141
==Reference implementation==
140142

0 commit comments

Comments
 (0)