Skip to content

Commit 350189a

Browse files
committed
BIP155: use a dedicated message for signalling
Change signaling of support for the new `addrv2` messages to be done via a dedicated message `sendaddrv2` instead of protocol bump. The drawback of using a protocol bump is that the protocol version is not a bitmask and if a node wants to announce support for `addrv2` this would imply support for all prior features included in that protocol version.
1 parent 42ee3f5 commit 350189a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

bip-0155.mediawiki

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,13 @@ Clients SHOULD reject messages that contain addresses that have a different leng
130130

131131
See the appendices for the address encodings to be used for the various networks.
132132

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

142141
==Reference implementation==
143142

0 commit comments

Comments
 (0)