diff options
author | Gleb Naumenko <naumenko.gs@gmail.com> | 2020-09-15 10:29:20 +0300 |
---|---|---|
committer | Gleb Naumenko <naumenko.gs@gmail.com> | 2020-09-24 08:52:25 +0300 |
commit | 2ea62cae483b764e30f61c06d8ac65755bbd864c (patch) | |
tree | 92cd369458e7b61adcc30340ad62b1c629841f35 /src/net.h | |
parent | 25839661305ec9fe8c25d171e31270d95311a4e4 (diff) |
Improve docs about feeler connections
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -143,10 +143,19 @@ enum class ConnectionType { MANUAL, /** - * Feeler connections are short lived connections used to increase the - * number of connectable addresses in our AddrMan. Approximately every - * FEELER_INTERVAL, we attempt to connect to a random address from the new - * table. If successful, we add it to the tried table. + * Feeler connections are short-lived connections made to check that a node + * is alive. They can be useful for: + * - test-before-evict: if one of the peers is considered for eviction from + * our AddrMan because another peer is mapped to the same slot in the tried table, + * evict only if this longer-known peer is offline. + * - move node addresses from New to Tried table, so that we have more + * connectable addresses in our AddrMan. + * Note that in the literature ("Eclipse Attacks on Bitcoin’s Peer-to-Peer Network") + * only the latter feature is referred to as "feeler connections", + * although in our codebase feeler connections encompass test-before-evict as well. + * We make these connections approximately every FEELER_INTERVAL: + * first we resolve previously found collisions if they exist (test-before-evict), + * otherwise connect to a node from the new table. */ FEELER, |