erigon-pulse/p2p/discover
Mark Holt 509a7af26a
Discovery zero refresh timer (#8661)
This fixes an issue where the mumbai testnet node struggle to find
peers. Before this fix in general test peer numbers are typically around
20 in total between eth66, eth67 and eth68. For new peers some can
struggle to find even a single peer after days of operation.

These are the numbers after 12 hours or running on a node which
previously could not find any peers: eth66=13, eth67=76, eth68=91.

The root cause of this issue is the following:

- A significant number of mumbai peers around the boot node return
network ids which are different from those currently available in the
DHT
- The available nodes are all consequently busy and return 'too many
peers' for long periods

These issues case a significant number of discovery timeouts, some of
the queries will never receive a response.

This causes the discovery read loop to enter a channel deadlock - which
means that no responses are processed, nor timeouts fired. This causes
the discovery process in the node to stop. From then on it just
re-requests handshakes from a relatively small number of peers.

This check in fixes this situation with the following changes:

- Remove the deadlock by running the timer in a separate go-routine so
it can run independently of the main request processing.
- Allow the discovery process matcher to match on port if no id match
can be established on initial ping. This allows subsequent node
validation to proceed and if the node proves to be valid via the
remainder of the look-up and handshake process it us used as a valid
peer.
- Completely unsolicited responses, i.e. those which come from a
completely unknown ip:port combination continue to be ignored.
-
2023-11-07 08:48:58 +00:00
..
v4wire p2p/discover/v4wire: use optional RLP field for EIP-868 seq (#3963) 2022-04-26 15:37:00 +01:00
v5wire Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
common.go Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
lookup_util_test.go up linter version (#4108) 2022-05-10 10:14:09 +07:00
lookup.go Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
node.go Discovery: refactor public key to node ID conversions. (#3634) 2022-03-03 21:58:31 +07:00
ntp.go Bor span testing (#7897) 2023-07-18 09:47:04 +01:00
table_integration_test.go Use go:build lines and remove obsolete +build lines (#4175) 2022-05-17 14:46:53 +07:00
table_test.go CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829) 2023-02-11 20:44:51 +00:00
table_util_test.go Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
table.go Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
v4_lookup_test.go [devnet] separate logging p2p (#7549) 2023-05-19 23:08:45 +01:00
v4_udp_test.go Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
v4_udp.go Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
v5_lookup_test.go [devnet] separare logging - headers download (#7551) 2023-05-20 07:00:19 +01:00
v5_udp_integration_test.go move TestUDPv5_callResend to integration suite (#7845) 2023-07-05 10:45:20 +07:00
v5_udp_test.go Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
v5_udp.go Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00