mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 16:01:36 +00:00
The statelessPeers map permanently blacklists peers that return empty
responses for the entire Sync() cycle. In partial state mode, the faster
account advancement (due to skipping storage/code for non-tracked
contracts) creates bursty request patterns that can trigger transient
empty responses. Combined with the permanent blacklist, this causes a
cascade where all peers get banned and sync stalls permanently.
Replace the permanent map[string]struct{} with map[string]time.Time to
track when each peer was marked. For partial state mode, peers are given
a 30-second cooldown instead of permanent banishment. After the cooldown
expires, the peer is eligible for task assignment again. Full sync mode
behavior is unchanged (permanent blacklist preserved).
|
||
|---|---|---|
| .. | ||
| discovery.go | ||
| gentrie.go | ||
| gentrie_test.go | ||
| handler.go | ||
| handler_fuzzing_test.go | ||
| metrics.go | ||
| peer.go | ||
| progress_test.go | ||
| protocol.go | ||
| range.go | ||
| range_test.go | ||
| sort_test.go | ||
| sync.go | ||
| sync_partial.go | ||
| sync_partial_integration_test.go | ||
| sync_partial_test.go | ||
| sync_test.go | ||