Skip to content

Commit 42ee3f5

Browse files
committed
BIP155: include changes from followup discussions
* Increase the maximum length of an address from 32 to 512 bytes and clarify that the entire message should be rejected if it contains a longer address. (from bitcoin#766 (comment)) * Remove a contradiction about unknown address types - "MUST ignore" VS "MAY store and gossip". * Recommend gossiping addresses for networks to which the node is not currently connected to. (from bitcoin#766 (comment)) * Clarify that the entire message should be rejected if it contains an address with unexpected size (e.g. IPv4 address with length 5).
1 parent cb071df commit 42ee3f5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

bip-0155.mediawiki

Lines changed: 8 additions & 5 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,10 +120,13 @@ 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

0 commit comments

Comments
 (0)