eth, p2p/msgrate: move peer QoS tracking to its own package and use it for snap (#22876)
This change extracts the peer QoS tracking logic from eth/downloader, moving it into the new package p2p/msgrate. The job of msgrate.Tracker is determining suitable timeout values and request sizes per peer. The snap sync scheduler now uses msgrate.Tracker instead of the hard-coded 15s timeout. This should make the sync work better on network links with high latency.
Showing
- eth/downloader/downloader.go 11 additions, 108 deletionseth/downloader/downloader.go
- eth/downloader/peer.go 45 additions, 126 deletionseth/downloader/peer.go
- eth/downloader/peer_test.go 0 additions, 53 deletionseth/downloader/peer_test.go
- eth/downloader/statesync.go 2 additions, 2 deletionseth/downloader/statesync.go
- eth/protocols/snap/sync.go 221 additions, 110 deletionseth/protocols/snap/sync.go
- eth/protocols/snap/sync_test.go 8 additions, 10 deletionseth/protocols/snap/sync_test.go
- p2p/msgrate/msgrate.go 458 additions, 0 deletionsp2p/msgrate/msgrate.go
Loading
Please register or sign in to comment