erigon-pulse/cl
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
..
abstract Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
antiquary Same range parallel downloader (#8554) 2023-10-22 17:30:27 +02:00
beacon Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
clparams move chainname and snapcfg packages to erigon-lib (#8508) 2023-10-18 13:37:39 +07:00
clstages Fixed accidental chain gap (#8222) 2023-09-17 16:25:17 +02:00
cltypes Added functional beacon snapshots reader and generator to Caplin (#8570) 2023-10-24 21:32:29 +02:00
domino Better caplin logging and logic (#7992) 2023-08-10 22:34:58 +02:00
fork Remove useless printlns (#8542) 2023-10-21 23:44:56 +02:00
freezer Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
merkle_tree fixed deneb for devnet 6 (#7650) 2023-06-04 00:36:16 +02:00
persistence Updated go.sum and go.mod for snapshots (#8664) 2023-11-06 23:39:44 +01:00
phase1 Compress snapshots for Caplin with lz4 level=1 (#8609) 2023-10-30 13:48:14 +01:00
pool Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
rpc Same range parallel downloader (#8554) 2023-10-22 17:30:27 +02:00
sentinel Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
spectest Caplin: Bumbed down snapshots from 500 to 100k (#8657) 2023-11-06 15:41:19 +01:00
ssz Better caplin logging and logic (#7992) 2023-08-10 22:34:58 +02:00
transition Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
utils Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
coverage Added coverage checker for caplin packages (#7609) 2023-05-31 18:12:18 +02:00
readme.md Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00

cl

all code under this directory and subdirectories falls under apache 2.0 license, seen in ./LICENSE