This is joint work with @stratospher.
From April 2026 to July 2026, there was a period of increased address relay caused by some entity spamming the network. In this post, we will discuss what consequences it had on the network, together with some ideas to improve the resilience of address relay against such periods of spam. See this post for a more detailed analysis of the data.
The spam
As can be seen from the KIT monitoring website (“Observed Addresses”), the number of addresses being relayed increased by a factor of 10, until it got back to its previous level. Most of these addresses were random IPv4, not belonging to any real bitcoin node. A similar period of spam already happened in 2021. The rate limiting of addresses that was implemented as a response in 2021 reduces the amount of spam that is possible, but it cannot prevent the spam entirely.
Consequences for the network
On a high level, we believe that the following happened during the spam period:
-
Nothing broke immediately
There were no major disturbances. Most node operators didn’t notice that anything was different than usual. However, there were still various unwanted effects. -
Most connections are made to peers from the Tried table
The Address Manager of Bitcoin Core (AddrMan) consists of two tables, the New table for unverified addresses, and the Tried table for addresses we have successfully connected to in the past. When the New table is congested with spam, almost all successful outgoing connections (that are made with a 50% chance per selection attempt from new or tried) will be made from the Tried table, which is unaffected by the spam. -
Address relay becomes ineffective
When spam addresses fill up large parts of the New table, legitimate addresses (i.e., self-announcements from actual nodes) have only a low chance of being accepted because their potential spot in AddrMan is already taken. So while addresses are still being relayed to other peers as usual via gossip relay, most of the nodes will not accept them but only send them further along, which defeats the point of the relay mechanism. -
Feelers become ineffective
Feelers are a mechanism to move addresses from New to Tried by verifying they belong to real bitcoin nodes. Since most addresses from New do not belong to real nodes, feelers have a very low success rate. Therefore, it is hard for nodes (especially new ones) to build up a Tried table with good candidates. -
New nodes will get inbound peers more slowly
Since address relay has become ineffective, fewer nodes will learn about actual new nodes and connect to them. A new node that we started up had only ~20 real inbound peers (discounting spy nodes) after 2 weeks, which is much slower than under normal network conditions.
In summary, even though there are no immediate major disturbances, the spam has a negative long-term impact on various important p2p mechanisms, especially if it is sustained for an extended period.
Mitigation ideas
Since address relay, unlike transaction or block relay, does not come with a significant intrinsic cost, it is hard to prevent the spam itself. So the goal should be to improve things so that even in periods of spam, address relay and acceptance of legitimate addresses is effective.
1. Relax IsTerrible rules
A candidate for the new table only replaces an existing entry in its slot if that entry is deemed Terrible. Whether an address is Terrible is decided by various criteria, among them that we failed 3 times to connect to an address that we never connected to before.
We suggest reducing this number from 3 to 1. With a full new table, a count of 3 retries is effectively unreachable, since there are ~65k other candidates.
With that change, non-reachable addresses would be replaceable faster. Since Terrible also excludes nodes from being part of GETADDR answers, we would also send less low-quality addres that way.
This mitigation measure would be simple to implement, but on its own it likely won’t have a big impact since we don’t make enough new connections that bad addresses would become terrible fast.
2. Increase the feeler rate
We currently make a feeler connection every 2 minutes. This results in 720 attempts per day, compared to a maximum of 65536 possible entries in the New table, so that it would take >90 days to probe every address. Raising the rate, to e.g. once every 30s could be helpful, and comes at a negligible cost, at least for clearnet addresses. Moreover, it could make sense to couple the rate to the network of the address since I2P/Tor connections are more expensive.
3. Relay some quality addresses with priority
We could consider filling the first N slots of a GetAddr response with addresses from Tried. The receiving node could then treat these addresses with a higher priority, i.e. always accept them to AddrMan in case of a collision, and possibly schedule them for a feeler connection with a higher priority.
Because we only send GetAddr to peers we connect to, a spammer cannot easily influence these preferred addresses. However, this idea still has to be evaluated very carefully because it has a downside: While it helps against spam attacks, it could also help an eclipse attacker (i.e. someone running a number of nodes with the goal of making the victim pick all of their outbound connections to them): Especially with a larger N, there could be an amplifying effect in which a new node would quickly fill a large percentage of its Tried table with attacker-controlled nodes. However, choosing a small N, maybe just N=1, could be beneficial.
Revealing addresses to belong to the Tried table also has privacy implications, which are reduced by the fact that GetAddr answers are cached for 24h.