You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
27f260a net: remove now unused global 'g_initial_block_download_completed' (furszy)
aff7d92 test: add coverage for peerman adaptive connections service flags (furszy)
6ed5360 net: peer manager, dynamically adjust desirable services flag (furszy)
9f36e59 net: move state dependent peer services flags (furszy)
f9ac96b net: decouple state independent service flags from desirable ones (furszy)
97df4e3 net: store best block tip time inside PeerManager (furszy)
Pull request description:
Derived from bitcoin#28120 discussion.
By relocating the peer desirable services flags into the peer manager, we
allow the connections acceptance process to handle post-IBD potential
stalling scenarios.
The peer manager will be able to dynamically adjust the services flags
based on the node's proximity to the tip (back and forth). Allowing the node
to recover from the following post-IBD scenario:
Suppose the node has successfully synced the chain, but later experienced
dropped connections and remained inactive for a duration longer than the limited
peers threshold (the timeframe within which limited peers can provide blocks). In
such cases, upon reconnecting to the network, the node might only establish
connections with limited peers, filling up all available outbound slots. Resulting
in an inability to synchronize the chain (because limited peers will not provide
blocks older than the `NODE_NETWORK_LIMITED_MIN_BLOCKS` threshold).
ACKs for top commit:
achow101:
ACK 27f260a
vasild:
ACK 27f260a
naumenkogs:
ACK 27f260a
mzumsande:
Light Code Review ACK 27f260a
andrewtoth:
ACK 27f260a
Tree-SHA512: 07befb9bcd0b60a4e7c45e4429c02e7b6c66244f0910f4b2ad97c9b98258b6f46c914660a717b5ed4ef4814d0dbfae6e18e6559fe9bec7d0fbc2034109200953
* Increment peer's misbehavior score. If the new value surpasses DISCOURAGEMENT_THRESHOLD (specified on startup or by default), mark node to be discouraged, meaning the peer might be disconnected & added to the discouragement filter.
@@ -192,6 +192,28 @@ class PeerManager : public CValidationInterface, public NetEventsInterface, publ
static_assert(std::size(p2p_name_str) <= CMessageHeader::COMMAND_SIZE + 1, "p2p_name_str cannot be greater than COMMAND_SIZE"); // Includes +1 for null termination character.
0 commit comments