Module address_man

Source
Expand description

Address manager is a module that keeps track of known peer addresses and associated metadata. This module is very important in keeping our node protected against targeted attacks, like eclipse attacks.

ModulesΒ§

dns_proxy
Simple implementation of a DNS-over-HTTPS (DoH) lookup routed through the SOCKS5 proxy

StructsΒ§

AddressMan
A module that keeps track of known addresses and chooses addresses that our node can connect
DiskLocalAddress
LocalAddress
How do we store peers locally

EnumsΒ§

Address
AddressState
A local state for how we see this peer. It helps us during peer selection, by keeping track of our past encounters with this node (if any), helping us to find live peers more easily, and avoid troublesome peers.
ReachableNetworks
All the networks we might receive addresses for

ConstantsΒ§

ASSUME_STALE πŸ”’
If we haven’t heard from a peer in this amount of time, we consider its info stale and add it to the NeverTried bucket
MAX_ADDRESSES πŸ”’
How many addresses we keep in our address manager
MIN_ADDRESSES πŸ”’
The minimum amount of addresses we need to have on the AddressMan.
MIN_ADDRESSES_CBF πŸ”’
The minimum amount of CBF-capable addresses we need to have on the AddressMan.
MIN_ADDRESSES_UTREEXO πŸ”’
The minimum amount of Utreexo-capable addresses we need to have on the AddressMan.
RETRY_TIME πŸ”’
How long we’ll wait before trying to connect to a peer that failed
SUPPORTED_NETWORKS
The ReachableNetworks this implementation currently supports.

Type AliasesΒ§

AddressToSend πŸ”’
A type alias for a list of addresses to send to our peers