go-ethereum/p2p/discover
timcooijmans 7b5107b73f
p2p/discover: avoid dropping unverified nodes when table is almost empty (#21396)
This change improves discovery behavior in small networks. Very small
networks would often fail to bootstrap because all member nodes were
dropping table content due to findnode failure. The check is now changed
to avoid dropping nodes on findnode failure when their bucket is almost
empty. It also relaxes the liveness check requirement for FINDNODE/v4
response nodes, returning unverified nodes as results when there aren't
any verified nodes yet.

The "findnode failed" log now reports whether the node was dropped
instead of the number of results. The value of the "results" was
always zero by definition.

Co-authored-by: Felix Lange <fjl@twurst.com>
2020-08-24 14:42:39 +02:00
..
v4wire p2p/discover: move discv4 encoding to new 'v4wire' package (#21147) 2020-06-02 13:20:19 +02:00
common.go p2p/discover: add initial discovery v5 implementation (#20750) 2020-04-08 09:57:23 +02:00
lookup.go p2p/discover: avoid dropping unverified nodes when table is almost empty (#21396) 2020-08-24 14:42:39 +02:00
node.go p2p/discover: move discv4 encoding to new 'v4wire' package (#21147) 2020-06-02 13:20:19 +02:00
ntp.go p2p, p2p/discover, p2p/nat: rework logging using context keys 2017-02-28 10:20:29 +01:00
table_test.go p2p/discover: avoid dropping unverified nodes when table is almost empty (#21396) 2020-08-24 14:42:39 +02:00
table_util_test.go p2p/discover: add initial discovery v5 implementation (#20750) 2020-04-08 09:57:23 +02:00
table.go p2p/discover: avoid dropping unverified nodes when table is almost empty (#21396) 2020-08-24 14:42:39 +02:00
v4_lookup_test.go p2p/discover: move discv4 encoding to new 'v4wire' package (#21147) 2020-06-02 13:20:19 +02:00
v4_udp_test.go p2p/discover: avoid dropping unverified nodes when table is almost empty (#21396) 2020-08-24 14:42:39 +02:00
v4_udp.go p2p/discover: avoid dropping unverified nodes when table is almost empty (#21396) 2020-08-24 14:42:39 +02:00
v5_encoding_test.go p2p/discover: add initial discovery v5 implementation (#20750) 2020-04-08 09:57:23 +02:00
v5_encoding.go p2p/discover: add initial discovery v5 implementation (#20750) 2020-04-08 09:57:23 +02:00
v5_session.go p2p/discover: add initial discovery v5 implementation (#20750) 2020-04-08 09:57:23 +02:00
v5_udp_test.go p2p/discover: add helper methods to UDPv5 (#20918) 2020-04-16 15:58:37 +02:00
v5_udp.go p2p/discover: add helper methods to UDPv5 (#20918) 2020-04-16 15:58:37 +02:00