plugeth/p2p
Felix Lange d36276d85e
p2p/dnsdisc: fix hot-spin when all trees are empty (#22313)
In the random sync algorithm used by the DNS node iterator, we first pick a random
tree and then perform one sync action on that tree. This happens in a loop until any
node is found. If no trees contain any nodes, the iterator will enter a hot loop spinning
at 100% CPU.

The fix is complicated. The iterator now checks if a meaningful sync action can
be performed on any tree. If there is nothing to do, it waits for the next root record
recheck time to arrive and then tries again.

Fixes #22306
2021-02-19 09:54:46 +01:00
..
discover p2p/discover: fix deadlock in discv5 message dispatch (#21858) 2020-11-25 22:16:36 +01:00
dnsdisc p2p/dnsdisc: fix hot-spin when all trees are empty (#22313) 2021-02-19 09:54:46 +01:00
enode p2p/enode: avoid crashing for invalid IP (#21981) 2020-12-09 20:21:31 +01:00
enr core/forkid: implement the forkid EIP, announce via ENR (#19738) 2019-07-08 18:53:47 +03:00
nat all: simplify nested complexity and if blocks ending with a return statement (#21854) 2020-11-25 09:24:50 +01:00
netutil p2p/discover: implement v5.1 wire protocol (#21647) 2020-10-14 12:28:17 +02:00
nodestate p2p/nodestate: fix deadlock during shutdown of les server (#21927) 2020-11-30 18:58:47 +01:00
rlpx p2p: move rlpx into separate package (#21464) 2020-09-22 10:17:39 +02:00
simulations cmd/utils: don't enumerate USB unless --usb is set (#22130) 2021-01-13 11:14:36 +01:00
dial_test.go p2p: new dial scheduler (#20592) 2020-02-13 11:10:03 +01:00
dial.go p2p: add 0 port check in dialer (#21008) 2020-05-11 18:11:17 +03:00
message_test.go p2p: move rlpx into separate package (#21464) 2020-09-22 10:17:39 +02:00
message.go eth: implement eth66 (#22241) 2021-02-18 18:54:29 +02:00
metrics.go p2p: remove MeteredPeerEvent (#20679) 2020-02-17 13:22:14 +02:00
peer_error.go p2p: fix some golint warnings (#16577) 2018-05-08 13:08:43 +02:00
peer_test.go p2p: move rlpx into separate package (#21464) 2020-09-22 10:17:39 +02:00
peer.go eth: don't wait for snap registration if we're not running snap (#22272) 2021-02-05 14:15:22 +01:00
protocol.go cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) 2019-10-29 17:08:57 +02:00
server_test.go p2p: move rlpx into separate package (#21464) 2020-09-22 10:17:39 +02:00
server.go les: switch to new discv5 (#21940) 2021-01-26 21:41:35 +01:00
transport_test.go p2p: move rlpx into separate package (#21464) 2020-09-22 10:17:39 +02:00
transport.go p2p: move rlpx into separate package (#21464) 2020-09-22 10:17:39 +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