mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Fix stuck data column lookups by improving peer selection and retry logic (#8005)
Fixes the issue described in #7980 where Lighthouse repeatedly sends `DataColumnsByRoot` requests to the same peers that return empty responses, causing sync to get stuck. The root cause was we don't count empty responses as failures, leading to excessive retries to unresponsive peers. - Track per peer attempts to limit retry attempts per peer (`MAX_CUSTODY_PEER_ATTEMPTS = 3`) - Replaced random peer selection with hashing within each lookup to prevent splitting lookup into too many small requests and improve request batching efficiency. - Added `single_block_lookup` root span to track all lookups created and added more debug logs: <img width="1264" height="501" alt="image" src="https://github.com/user-attachments/assets/983629ba-b6d0-41cf-8e93-88a5b96c2f31" /> Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com> Co-Authored-By: Jimmy Chen <jimmy@sigmaprime.io>
This commit is contained in:
@@ -17,6 +17,8 @@ pub const SPAN_PROCESS_GOSSIP_BLOCK: &str = "process_gossip_block";
|
||||
/// Sync methods root spans
|
||||
pub const SPAN_SYNCING_CHAIN: &str = "syncing_chain";
|
||||
pub const SPAN_OUTGOING_RANGE_REQUEST: &str = "outgoing_range_request";
|
||||
pub const SPAN_SINGLE_BLOCK_LOOKUP: &str = "single_block_lookup";
|
||||
pub const SPAN_OUTGOING_BLOCK_BY_ROOT_REQUEST: &str = "outgoing_block_by_root_request";
|
||||
pub const SPAN_OUTGOING_CUSTODY_REQUEST: &str = "outgoing_custody_request";
|
||||
pub const SPAN_PROCESS_RPC_BLOCK: &str = "process_rpc_block";
|
||||
pub const SPAN_PROCESS_RPC_BLOBS: &str = "process_rpc_blobs";
|
||||
@@ -46,7 +48,7 @@ pub const LH_BN_ROOT_SPAN_NAMES: &[&str] = &[
|
||||
SPAN_PROCESS_GOSSIP_BLOB,
|
||||
SPAN_PROCESS_GOSSIP_BLOCK,
|
||||
SPAN_OUTGOING_RANGE_REQUEST,
|
||||
SPAN_OUTGOING_CUSTODY_REQUEST,
|
||||
SPAN_SINGLE_BLOCK_LOOKUP,
|
||||
SPAN_PROCESS_RPC_BLOCK,
|
||||
SPAN_PROCESS_RPC_BLOBS,
|
||||
SPAN_PROCESS_RPC_CUSTODY_COLUMNS,
|
||||
|
||||
Reference in New Issue
Block a user