erigon-pulse/eth
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
..
calltracer evm: no interface (#8376) 2023-10-05 12:23:08 +07:00
ethconfig Bumps down Bodies Timeout from 30 secs to 2 secs (#8619) 2023-11-03 21:44:35 +01:00
ethconsensusconfig rpcdaemon: must not create db - because doesn't know right parameters (#8445) 2023-10-12 14:11:46 +07:00
ethutils reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
filters Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
gasprice EthereumExecutionService in MockSentry (#8373) 2023-10-05 18:30:19 +02:00
integrity Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
protocols/eth Simplify RLP size calculations (#8506) 2023-10-18 09:28:11 +02:00
stagedsync Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
tracers Fix null ptr in debug_traceTx (#8585) 2023-10-26 12:56:27 +07:00
api_backend.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
api.go Embed rpcdaemon: prepared direct clients (#3492) 2022-02-12 19:47:19 +07:00
backend.go Add arguments (no-op) (#8653) 2023-11-04 17:44:34 +00:00
bloombits.go remove database field from Ethereum object (#1750) 2021-04-19 14:56:44 +07:00
discovery.go rename (#1978) 2021-05-20 19:25:53 +01:00