mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
All five `revert*Request` functions (account, bytecode, storage, trienode heal, bytecode heal) remove the request from the tracked set but never restore the peer to its corresponding idle pool. When a request times out and no response arrives, the peer is permanently lost from the idle pool, preventing new work from being assigned to it. In normal operation mode (snap-sync full state) this bug is masked by pivot movement (which resets idle pools via new Sync() cycles every ~15 minutes) and peer churn (reconnections re-add peers via Register()). However in scenarios like the one I have running my (partial-stateful node)[https://github.com/ethereum/go-ethereum/pull/33764] with long-running sync cycles and few peers, all peers can eventually leak out of the idle pools, stalling sync entirely. Fix: after deleting from the request map, restore the peer to its idle pool if it is still registered (guards against the peer-drop path where Unregister already removed the peer). This mirrors the pattern used in all five On* response handlers. This only seems to manifest in peer-thirstly scenarios as where I find myself when testing snapsync for the partial-statefull node). Still, thought was at least good to raise this point. Unsure if required to discuss or not |
||
|---|---|---|
| .. | ||
| catalyst | ||
| downloader | ||
| ethconfig | ||
| fetcher | ||
| filters | ||
| gasestimator | ||
| gasprice | ||
| protocols | ||
| syncer | ||
| tracers | ||
| api_admin.go | ||
| api_backend.go | ||
| api_backend_test.go | ||
| api_debug.go | ||
| api_debug_test.go | ||
| api_miner.go | ||
| backend.go | ||
| dropper.go | ||
| handler.go | ||
| handler_eth.go | ||
| handler_eth_test.go | ||
| handler_snap.go | ||
| handler_test.go | ||
| peer.go | ||
| peerset.go | ||
| state_accessor.go | ||
| sync.go | ||
| sync_test.go | ||