{ "title":"ADDR", "related":["/protocol","/protocol/network/messages/getaddr.html"] }

Response: Addresses ("addr")

Provide information about other prospective P2P protocol peers. This message is sent in response to a getaddr request, and may also be sent unsolicited (e.g. a node periodically advertising its own address, or relaying newly learned addresses).

A single addr message MUST NOT contain more than 1000 entries; peers sending larger messages are penalized as misbehaving. To help prevent eclipse and partitioning attacks, where an attacker aggressively seeds peer connection tables with its own nodes, receivers SHOULD rate-limit the processing of unsolicited addresses (Bitcoin Cash Node uses a per-peer token bucket refilled at 0.1 addresses per second, with an additional allowance of 1000 addresses after sending a getaddr). Addresses with a timestamp more than 10 minutes in the future, or at or before 100000000 (1973-03-03), are treated as if they were last seen 5 days ago. Such a timestamp is obviously bogus, so the node does not trust it: the address is still kept (5 days is well within the 30 days after which an address is considered stale and may be evicted), but it is too old to be relayed onward as fresh, and a later announcement with a real timestamp will replace it. Unsolicited messages with at most 10 entries have their recently seen (within the last 10 minutes), routable addresses relayed to a limited number of other peers.

Message Format

Field Length Format Description
peer count variable variable length integer The number of peers whose connection information is being sent in this message.
peer network addresses peer_count * 30 peer_count network addresses The peer information for each of the peers being transmitted.