plugeth/p2p
Martin Holst Swende 06151eb581
p2p/msgrate: be more lenient when calculating 'mean' (#25653)
The p2p msgrate tracker is a thing which tries to estimate some mean round-trip times. However, it did so in a very curious way: if a node had 200 peers, it would sort their 200 respective rtt estimates, and then it would pick item number 2 as the mean. So effectively taking third fastest and calling it mean. This probably works "ok" when the number of peers are low (there are other factors too, such as ttlScaling which takes some of the edge off this) -- however when the number of peers is high, it becomes very skewed.

This PR instead bases the 'mean' on the square root of the length of the list. Still pretty harsh, but a bit more lenient.
2022-09-09 10:47:30 +02:00
..
discover all: remove duplicate word in comments (#25618) 2022-08-29 11:16:34 +03:00
dnsdisc p2p: use errors.Is for error comparison (#24882) 2022-06-07 17:27:21 +02:00
enode all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
enr p2p: use errors.Is for error comparison (#24882) 2022-06-07 17:27:21 +02:00
msgrate p2p/msgrate: be more lenient when calculating 'mean' (#25653) 2022-09-09 10:47:30 +02:00
nat all: more linters (#24783) 2022-06-13 16:24:45 +02:00
netutil p2p/netutil: minor code cosmetic 2022-07-25 12:52:49 +03:00
nodestate les/vflux/client, p2p/nodestate: fix data races (#24058) 2021-12-14 11:34:50 +01:00
rlpx all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
simulations all: add whitespace linter (#25312) 2022-07-25 13:14:03 +03:00
tracker all: fix some typos (#25551) 2022-08-19 09:00:21 +03:00
dial_test.go p2p: new dial scheduler (#20592) 2020-02-13 11:10:03 +01:00
dial.go p2p, p2p/enode: fix data races (#23434) 2021-08-24 12:22:56 +02:00
message_test.go p2p: move rlpx into separate package (#21464) 2020-09-22 10:17:39 +02:00
message.go all: replace uses of ioutil with io and os (#24869) 2022-05-16 11:59:35 +02:00
metrics.go eth/protocols, prp/tracker: add support for req/rep rtt tracking (#22608) 2021-04-22 11:42:46 +03:00
peer_error.go p2p: use errors.Is for error comparison (#24882) 2022-06-07 17:27:21 +02:00
peer_test.go p2p: move rlpx into separate package (#21464) 2020-09-22 10:17:39 +02:00
peer.go p2p: use errors.Is for error comparison (#24882) 2022-06-07 17:27:21 +02:00
protocol.go cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) 2019-10-29 17:08:57 +02:00
server_test.go all: fix warning flagging the use of DeepEqual on error (#23624) 2021-10-19 17:06:47 +02:00
server.go cmd/geth, p2p: add support for custom discovery UDP port (#24979) 2022-06-28 17:25:47 +02:00
transport_test.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
transport.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
util_test.go p2p: new dial scheduler (#20592) 2020-02-13 11:10:03 +01:00
util.go p2p: new dial scheduler (#20592) 2020-02-13 11:10:03 +01:00