mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-04 22:18:40 +00:00
eth: improve dropper description
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
ecfdaa69c6
commit
803ac3c641
1 changed files with 11 additions and 6 deletions
|
|
@ -85,17 +85,22 @@ var protectionCategories = []protectionCategory{
|
||||||
|
|
||||||
// dropper monitors the state of the peer pool and introduces churn by
|
// dropper monitors the state of the peer pool and introduces churn by
|
||||||
// periodically disconnecting a random peer to make room for new connections.
|
// periodically disconnecting a random peer to make room for new connections.
|
||||||
|
// The main goal is to allow new peers to join the network and to facilitate
|
||||||
|
// continuous topology adaptation.
|
||||||
//
|
//
|
||||||
// Behavior:
|
// Behavior:
|
||||||
// - During sync the Downloader handles peer connections, so dropper is disabled.
|
// - During sync the Downloader handles peer connections, so dropper is disabled.
|
||||||
// - When not syncing and a peer category (inbound or dialed) is close to its
|
// - When not syncing and a peer category (inbound or dialed) is close to its
|
||||||
// limit, a random peer from that category is disconnected every 3–7 minutes.
|
// limit, a random peer from that category is disconnected every 3–7 minutes.
|
||||||
// - Trusted, static, and recently connected peers are never dropped.
|
// - Trusted and static peers are never dropped.
|
||||||
// - Peers that contribute the most on-chain transaction inclusions are
|
// - Recently connected peers are also protected from dropping to give them time
|
||||||
// protected from dropping. Two scoring categories are used (total finalized
|
// to prove their value before being at risk of disconnection.
|
||||||
// inclusions and recent inclusion EMA), each protecting the top 10% of
|
// - Some peers are protected from dropping based on their role. This is not based
|
||||||
// inbound and dialed peers independently. The union of all protected sets
|
// on a unified score function, but rather on the concept of protected peer pools.
|
||||||
// is shielded; the drop target is chosen randomly from the remainder.
|
// Each pool independently selects its top fraction of peers by a specific score
|
||||||
|
// (e.g. total finalized inclusions, recent inclusion EMA); the union of all
|
||||||
|
// protected sets is shielded from random dropping, and the drop target is chosen
|
||||||
|
// randomly from the remainder.
|
||||||
type dropper struct {
|
type dropper struct {
|
||||||
maxDialPeers int // maximum number of dialed peers
|
maxDialPeers int // maximum number of dialed peers
|
||||||
maxInboundPeers int // maximum number of inbound peers
|
maxInboundPeers int // maximum number of inbound peers
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue