go-ethereum/eth
Csaba Kiraly c82be6827f eth: add request-latency peer protection category
Adds a third protection category to the dropper, scoring peers by
per-peer tx-request response latency. Fast peers are harder to drop;
peers that chronically time out (their EMA drifts toward the 5s
timeout sample) score low and are normal drop candidates.

PeerInclusionStats gains RequestLatencyEMA (time.Duration) and
RequestSamples (int64). The stats adapter in backend.go copies them
from txtracker.PeerStats. The scoring function returns 1/EMA once
the peer has >= MinLatencySamples (10) recorded samples — an
under-sampled peer scores 0 and is filtered by the existing
"score <= 0" rule, preventing a single lucky-fast reply from
displacing established peers.

Adds three unit tests via protectedPeersByPool for the basic
top-N selection, the bootstrap guard, and per-pool independence.
2026-04-20 09:07:04 +02:00
..
catalyst miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
downloader core, eth, ethclient, triedb: report trienode index progress (#34633) 2026-04-04 21:00:07 +08:00
ethconfig cmd/utils, eth/ethconfig: change default cache settings (#33975) 2026-03-09 23:18:18 +08:00
fetcher eth/fetcher: add onRequestLatency callback to tx fetcher 2026-04-20 09:07:04 +02:00
filters eth/filters: return -32602 when exceeding the block range limit (#34647) 2026-04-08 12:57:29 +02:00
gasestimator eth/gasestimator: fix block overrides in estimate gas (#34081) 2026-04-01 20:32:17 +02:00
gasprice eth/gasprice: reduce allocations (#33698) 2026-01-28 20:33:04 +01:00
protocols eth/protocols/snap: fix block accessList encoding rule (#34644) 2026-04-07 20:13:19 +08:00
syncer eth/downloader: keep current syncmode in downloader only (#33157) 2025-12-08 22:49:57 +01:00
tracers eth/tracers/logger: conform structLog tracing to spec (#34093) 2026-03-31 16:02:40 +02:00
txtracker eth/txtracker: track per-peer tx-request response latency 2026-04-20 09:07:04 +02:00
api_admin.go eth: ignore genesis block on importChain (#27956) 2023-08-21 13:32:34 -04:00
api_backend.go core, eth, ethclient, triedb: report trienode index progress (#34633) 2026-04-04 21:00:07 +08:00
api_backend_test.go core/txpool: add eip2681 check for incoming transactions (#32726) 2025-09-25 13:15:12 +02:00
api_debug.go core/state: introduce state iterator interface (#33102) 2026-04-03 10:35:32 +08:00
api_debug_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
api_miner.go miner: refactor the miner, make the pending block on demand (#28623) 2024-03-06 14:45:03 +02:00
backend.go eth: drop PeerInclusionStats wrapper and use txtracker.PeerStats directly 2026-04-15 14:35:37 +02:00
dropper.go eth: add request-latency peer protection category 2026-04-20 09:07:04 +02:00
dropper_test.go eth: add request-latency peer protection category 2026-04-20 09:07:04 +02:00
handler.go eth: wire txTracker.NotifyRequestLatency into tx fetcher 2026-04-20 09:07:04 +02:00
handler_eth.go eth/fetcher: add onAccepted callback to fix attribution race 2026-04-10 12:18:56 +02:00
handler_eth_test.go eth: implement EIP-7975 (eth/70 - partial block receipt lists) (#33153) 2026-03-30 15:17:37 +02:00
handler_snap.go eth: check snap satelliteness, delegate drop to eth (#22235) 2021-02-02 10:44:36 +02:00
handler_test.go eth: implement EIP-7975 (eth/70 - partial block receipt lists) (#33153) 2026-03-30 15:17:37 +02:00
peer.go eth/protocols/eth: implement eth/69 (#29158) 2025-05-16 17:10:47 +02:00
peerset.go eth: stabilize tx relay peer selection (#31714) 2025-08-28 16:05:54 +02:00
state_accessor.go eth/tracers/logger: conform structLog tracing to spec (#34093) 2026-03-31 16:02:40 +02:00
sync.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
sync_test.go eth: implement EIP-7975 (eth/70 - partial block receipt lists) (#33153) 2026-03-30 15:17:37 +02:00