<p>A <strong>feeler connection</strong> is a short-lived outbound connection that only starts up after your node has established the required 8 outbound connections and 2 <a href="https://bitcoin.stackexchange.com/questions/112828/what-is-a-block-relay-only-connection-what-is-it-used-for">block-relay-only</a> outbound connections. The purpose of a feeler connection is to regularly test addresses from the &quot;new&quot; table to see if they are connectable bitcoin nodes. Essentially, the feeler connection cleans the trash out of &quot;new&quot; and populates the &quot;tried&quot; table with valid addresses.</p>
<ul>
<li>The &quot;new&quot; table contains untested addresses that the node has learned about from the gossip network.</li>
<li>The &quot;tried&quot; table contains addresses that the node has successfully connected to.</li>
</ul>
<p>Every 2 minutes the feeler connection will do one of two things:</p>
<ul>
<li>Pull a random peer from the eviction buffer (list of addresses considered for eviction because a new peer is mapped to the same slot in &quot;tried&quot;). Test the address by trying to connect to it and, if successful, remove that entry from the buffer. If this address is not connectable, evict it from &quot;tried&quot; and replace with a different address (previously pulled from &quot;new&quot;).</li>
<li>If the eviction buffer is empty, test a random connection from &quot;new&quot; and, if successful, move it to &quot;tried&quot;. If unsuccessful, update the address connection statistics accordingly. Tangentially, if an address fails to connect enough times (among other criteria) it will be labelled &quot;terrible&quot;. If an incoming address collides with a terrible address, the terrible address will be evicted from the &quot;new&quot; table.</li>
</ul>
<p>Feeler connections are disabled when no new blocks have been received for 30 minutes. In this case, the feeler connection is turned off and its connection slot is used every 10 minutes to try to find a node that knows about a new block. This is to try to detect and circumvent a network partition without overloading the number of inbound connection slots available on the network. Once a new block is discovered, the feeler connection reverts to cleaning out the eviction buffer and the &quot;new&quot; table.</p>
<p><strong>History</strong></p>
<p>Feeler connections are one of the suggested countermeasures of the paper <a href="https://eprint.iacr.org/2015/263.pdf" rel="nofollow noreferrer">&quot;Eclipse Attacks on Bitcoin’s Peer-to-Peer Network&quot;</a> and were introduced with <a href="https://github.com/bitcoin/bitcoin/pull/8282" rel="nofollow noreferrer">PR#8282</a> to increase the number of online addresses in the tried table and later <a href="https://github.com/bitcoin/bitcoin/pull/9037" rel="nofollow noreferrer">PR#9037</a> implemented the test-before-evict functionality.</p>

CC BY-SA 4.0
2022-03-10T20:13:55.060Z
One addendum to your otherwise great answer: If we try a feeler connection and the attempt is unsuccessful, the address is not immediately evicted from new. Instead, its statistics are updated similar to non-feeler connection attempts (by calling Attempt() in addrman), which may lead to it being "Terrible" and evicted at some later point in time - but only in the case of a collision with another added address that would occupy the same position in addrman. In the absence of collisions, it will stay addrman, no matter how often we fail to connect to it.
Lightlike
CC BY-SA 4.0
2022-03-15T15:10:01.820Z
Thanks for the feedback, @Lightlike! I have updated my answer accordingly. :)
vnprc
CC BY-SA 4.0
2022-02-04T15:21:37.203Z
2022-03-15T15:08:28.863Z
2022-03-15T15:08:28.863Z
vnprc
<p>The inspiration for feeler connections (and related eclipse mitigation techniques) comes from botnet designs observed in the wild.</p>
<p>From the original eclipse attack paper (Ethan Heilman):</p>
<blockquote>
<p>.. many botnets, like bitcoin, use unstructured peer-to-peer networks and gossip (i.e., ADDR messages), and describes how botnets defend against attacks that flood local address tables with bogus information. The Sality botnet refuses to evict “high-reputation” addresses; our anchor countermeasure is similar (Section 7). Storm uses test-before-evict [30], which we have also recommended for bitcoin. Zeus [12] disallows connections from multiple IP in the same /20, and regularly clean tables by testing if peers are online; our feeler connections are similar.</p>
</blockquote>

CC BY-SA 4.0
2023-10-01T17:04:56.130Z
2023-10-01T17:04:56.130Z
gimballock
<p>The bitcoin client hard codes a limit of 8 outbound connections and 2 block-only connections. Your node will try to always maintain these 10 outbound connections with reliable peers as a defense against network attacks. But there is an ephemeral 11th outbound connection called a feeler connection. What is the purpose of a feeler connection and how does it work?</p>

CC BY-SA 4.0
2022-02-04T15:52:50.943Z
I think it's 8 regular outbound, 2 blocks-only and a feeler connection. :)
Murch
<network><attack><peers><peer-discovery><eclipse-attack>
What is a Feeler Connection? When is it used?
vnprc
# What is a Feeler Connection? When is it used?

(Asked by: username_0 on 2022-02-04)

The bitcoin client hard codes a limit of 8 outbound connections and 2 block-only connections. Your node will try to always maintain these 10 outbound connections with reliable peers as a defense against network attacks. But there is an ephemeral 11th outbound connection called a feeler connection. What is the purpose of a feeler connection and how does it work?

**Tags:** network, attack, peers, peer-discovery, eclipse-attack

> **Comments:**
> **username_1**: I think it's 8 regular outbound, 2 blocks-only and a feeler connection. :)  

---

## 2 answers

### Answer by username_0 on 2022-02-04. Score: 11

A **feeler connection** is a short-lived outbound connection that only starts up after your node has established the required 8 outbound connections and 2 [block-relay-only](https://bitcoin.stackexchange.com/questions/112828/what-is-a-block-relay-only-connection-what-is-it-used-for) outbound connections. The purpose of a feeler connection is to regularly test addresses from the "new" table to see if they are connectable bitcoin nodes. Essentially, the feeler connection cleans the trash out of "new" and populates the "tried" table with valid addresses.

* The "new" table contains untested addresses that the node has learned about from the gossip network.
* The "tried" table contains addresses that the node has successfully connected to.

Every 2 minutes the feeler connection will do one of two things:

* Pull a random peer from the eviction buffer (list of addresses considered for eviction because a new peer is mapped to the same slot in "tried"). Test the address by trying to connect to it and, if successful, remove that entry from the buffer. If this address is not connectable, evict it from "tried" and replace with a different address (previously pulled from "new").
* If the eviction buffer is empty, test a random connection from "new" and, if successful, move it to "tried". If unsuccessful, update the address connection statistics accordingly. Tangentially, if an address fails to connect enough times (among other criteria) it will be labelled "terrible". If an incoming address collides with a terrible address, the terrible address will be evicted from the "new" table.

Feeler connections are disabled when no new blocks have been received for 30 minutes. In this case, the feeler connection is turned off and its connection slot is used every 10 minutes to try to find a node that knows about a new block. This is to try to detect and circumvent a network partition without overloading the number of inbound connection slots available on the network. Once a new block is discovered, the feeler connection reverts to cleaning out the eviction buffer and the "new" table.

**History**

Feeler connections are one of the suggested countermeasures of the paper ["Eclipse Attacks on Bitcoin’s Peer-to-Peer Network"](https://eprint.iacr.org/2015/263.pdf) and were introduced with [PR#8282](https://github.com/bitcoin/bitcoin/pull/8282) to increase the number of online addresses in the tried table and later [PR#9037](https://github.com/bitcoin/bitcoin/pull/9037) implemented the test-before-evict functionality.

> **Comments:**
> **username_2**: One addendum to your otherwise great answer: If we try a feeler connection and the attempt is unsuccessful, the address is not immediately evicted from new. Instead, its statistics are updated similar to non-feeler connection attempts (by calling Attempt() in addrman), which may lead to it being "Terrible" and evicted at some later point in time - but only in the case of a collision with another added address that would occupy the same position in addrman. In the absence of collisions, it will stay addrman, no matter how often we fail to connect to it.  
> **username_0**: Thanks for the feedback, @username_2! I have updated my answer accordingly. :)  

---

### Answer by username_3 on 2023-10-01. Score: 1

The inspiration for feeler connections (and related eclipse mitigation techniques) comes from botnet designs observed in the wild.

From the original eclipse attack paper (Ethan Heilman):

> .. many botnets, like bitcoin, use unstructured peer-to-peer networks and gossip (i.e., ADDR messages), and describes how botnets defend against attacks that flood local address tables with bogus information. The Sality botnet refuses to evict “high-reputation” addresses; our anchor countermeasure is similar (Section 7). Storm uses test-before-evict [30], which we have also recommended for bitcoin. Zeus [12] disallows connections from multiple IP in the same /20, and regularly clean tables by testing if peers are online; our feeler connections are similar.


---

