Skip to content

BIP nounsolicitedaddr

Vasil Dimov edited this page Jun 30, 2021 · 3 revisions
BIP:
Layer: Peer Services
Title: nounsolicitedaddr message
Authors: Vasil Dimov <[email protected]>
Comments-Summary: No comments yet.
Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-nounsolicitedaddr
Status: Draft
Type: Standards Track
Created: 2021-06-30
License: BSD-2-Clause

Table of Contents

Introduction

Abstract

This document proposes a new P2P message to avoid relay of addresses to peers that don't make any use of them.

Copyright

This BIP is licensed under the 2-clause BSD license.

Motivation

The propagation of nodes' addresses in the Bitcoin network works in two ways:

1. A node may explicitly request another node to send it a bunch of addresses, using the getaddr message.

2. Nodes occasionally send unsolicited address messages to other nodes which in turn send them to other nodes.

The second point relies on the assumption that a node which receives unsolicited address message will further relay it to others, eventually, or at least do something useful with it (maybe add it to its own local address database). However, that is not true for some nodes which just ignore such messages (for example SPV nodes, or block-only connections of Bitcoin Core), acting as black holes and impeding address propagation. This BIP aims to address the problem by having those nodes announce themselves as such.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

The nounsolicitedaddr message is defined as a message where pchCommand == "nounsolicitedaddr". It has no payload, is serialized in the standard encoding for P2P messages and has the following meaning: the node that emitted it wishes to not receive unsolicited address messages (either addr or addrv2).

Nodes are RECOMMENDED to send nounsolicitedaddr to their peers if they do not further relay addresses to other nodes or do anything useful with the unsolicited address messages they receive. This way they will improve address propagation network-wise and will reduce incoming traffic to themselves.

Nodes that receive nounsolicitedaddr are RECOMMENDED to not send unsolicited address messages to the nodes from which they received nounsolicitedaddr.

Signaling

The nounsolicitedaddr message can be sent at any time during the communication. This would allow a node to "switch off" after some time or after it has accumulated sufficient addresses.

Compatibility

Nodes that don't support nounsolicitedaddr SHOULD ignore it.

Nodes SHOULD NOT treat for misbehavior other nodes that have ignored their nounsolicitedaddr message and send unsolicited address messages nevertheless.

Acknowledgements

Clone this wiki locally