Conversation
| /// For non sampling columns, requirements is lower, but need to ensure there is peer for | ||
| /// publishing. | ||
| pub const MIN_SAMPLING_COLUMN_SUBNET_PEERS: u64 = TARGET_SUBNET_PEERS as u64; | ||
| pub const MIN_NON_SAMPLING_COLUMN_SUBNET_PEERS: u64 = 1; |
There was a problem hiding this comment.
Why do we need 1 peer and not 0 in this subnets?
There was a problem hiding this comment.
I thought it would be useful to have at least one peer per column in the case where we're publishing data columns.
|
Did a first review pass and approach looks solid, just some minor comments |
| err | ||
| ), | ||
| peer_action: Some(PeerAction::LowToleranceError), | ||
| }) |
There was a problem hiding this comment.
@pawanjay176 do we need this change?
This may be due to optimistic EL right?
lighthouse/beacon_node/beacon_chain/src/block_verification.rs
Lines 430 to 432 in 522bd9e
| .filter(move |(_, info)| { | ||
| // We check both the metadata and gossipsub data as we only want to count long-lived subscribed peers | ||
| info.is_connected() | ||
| && info.is_synced_or_advanced() |
There was a problem hiding this comment.
Need to think again about this change - this is used to determine if we have enough good peers when starting discovery query:
lighthouse/beacon_node/lighthouse_network/src/service/mod.rs
Lines 1093 to 1103 in c8bbe47
So the condition to push a PeerManagerEvent::DiscoverSubnetPeers below must also satisfy this
lighthouse/beacon_node/lighthouse_network/src/peer_manager/mod.rs
Lines 969 to 992 in a250daa
Otherwise it might result in pushing a DiscoverSubnetPeers event to network but then it gets ignored by network.
|
Some required checks have failed. Could you please take a look @jimmygchen? 🙏 |
|
@pawanjay176 I've done a bit of clean up, but there's still a bit of mess around maintaining peers & discovery: I'll revisit next week. |
Squashed commit of the following: commit d8b6a99 Author: Jimmy Chen <jchen.tc@gmail.com> Date: Mon Aug 18 23:48:28 2025 +1000 Remove unnecessary test commit 832d862 Author: Jimmy Chen <jchen.tc@gmail.com> Date: Fri Aug 15 16:22:48 2025 +1000 Clippy commit 0437243 Merge: a250daa 317dc0f Author: Jimmy Chen <jimmy@sigmaprime.io> Date: Fri Aug 15 16:22:30 2025 +1000 Merge branch 'unstable' into fusaka-devnet-4-revive commit a250daa Author: Jimmy Chen <jchen.tc@gmail.com> Date: Fri Aug 15 16:02:05 2025 +1000 Clean up and refactor custody peer checks commit ec7956b Author: Jimmy Chen <jchen.tc@gmail.com> Date: Fri Aug 15 14:40:06 2025 +1000 Revert "Increase target peer count to 200." This reverts commit 5f38f31. commit cdc417f Author: Jimmy Chen <jchen.tc@gmail.com> Date: Thu Aug 14 23:39:10 2025 +1000 Prevent sampling subnets from getting pruned if below min target threshold. commit 9ce9318 Author: Jimmy Chen <jchen.tc@gmail.com> Date: Thu Aug 14 17:39:57 2025 +1000 Check for sync status for custody subnet discovery commit 1b8f0e4 Author: Jimmy Chen <jchen.tc@gmail.com> Date: Thu Aug 14 17:30:30 2025 +1000 Fix tests. commit 1465d72 Author: Jimmy Chen <jchen.tc@gmail.com> Date: Thu Aug 14 11:47:33 2025 +1000 Only send lookup requests to peers that are synced or advacned. commit 5f38f31 Author: Jimmy Chen <jchen.tc@gmail.com> Date: Thu Aug 14 11:30:04 2025 +1000 Increase target peer count to 200. commit 56ca5bf Author: Jimmy Chen <jchen.tc@gmail.com> Date: Thu Aug 14 11:14:20 2025 +1000 Remove penalties for block sidecar coupling. commit 8e95a54 Author: Jimmy Chen <jchen.tc@gmail.com> Date: Thu Aug 14 11:07:50 2025 +1000 Revert "Reduce number of head chains we sync to" This reverts commit 1f776a4 commit 0144205 Author: Pawan Dhananjay <pawandhananjay@gmail.com> Date: Wed Aug 13 17:33:47 2025 -0700 Request columns from global peer pool commit a8f6801 Author: Pawan Dhananjay <pawandhananjay@gmail.com> Date: Wed Aug 13 16:37:12 2025 -0700 Priorotize status v2 commit c8bbe47 Author: Pawan Dhananjay <pawandhananjay@gmail.com> Date: Wed Aug 13 16:36:56 2025 -0700 Penalize if invalid EL block commit 1f776a4 Author: Pawan Dhananjay <pawandhananjay@gmail.com> Date: Wed Aug 13 16:36:13 2025 -0700 Reduce number of head chains we sync to
Prioritise `StatusV2` over `StatusV1` RPC protocol. A bug discovered during devnet-4 testing and extracted from the sync fixes PR #7876.
Closes: - #7865 - #7855 Changes extracted from earlier PR #7876 This PR fixes two main things with a few other improvements mentioned below: - Prevent Lighthouse from repeatedly sending `DataColumnByRoot` requests to an unsynced peer, causing lookup sync to get stuck - Allows Lighthouse to send discovery requests if there isn't enough **synced** peers in the required sampling subnets - this fixes the stuck sync scenario where there isn't enough usable peers in sampling subnet but no discovery is attempted. - Make peer discovery queries if custody subnet peer count drops below the minimum threshold - Update peer pruning logic to prioritise uniform distribution across all data column subnets and avoid pruning sampling peers if the count is below the target threshold (2) - Check sync status when making discovery requests, to make sure we don't ignore requests if there isn't enough synced peers in the required sampling subnets - Optimise some of the `PeerDB` functions checking custody peers - Only send lookup requests to peers that are synced or advanced
Closes: - sigp#7865 - sigp#7855 Changes extracted from earlier PR sigp#7876 This PR fixes two main things with a few other improvements mentioned below: - Prevent Lighthouse from repeatedly sending `DataColumnByRoot` requests to an unsynced peer, causing lookup sync to get stuck - Allows Lighthouse to send discovery requests if there isn't enough **synced** peers in the required sampling subnets - this fixes the stuck sync scenario where there isn't enough usable peers in sampling subnet but no discovery is attempted. - Make peer discovery queries if custody subnet peer count drops below the minimum threshold - Update peer pruning logic to prioritise uniform distribution across all data column subnets and avoid pruning sampling peers if the count is below the target threshold (2) - Check sync status when making discovery requests, to make sure we don't ignore requests if there isn't enough synced peers in the required sampling subnets - Optimise some of the `PeerDB` functions checking custody peers - Only send lookup requests to peers that are synced or advanced
Closes: - sigp#7865 - sigp#7855 Changes extracted from earlier PR sigp#7876 This PR fixes two main things with a few other improvements mentioned below: - Prevent Lighthouse from repeatedly sending `DataColumnByRoot` requests to an unsynced peer, causing lookup sync to get stuck - Allows Lighthouse to send discovery requests if there isn't enough **synced** peers in the required sampling subnets - this fixes the stuck sync scenario where there isn't enough usable peers in sampling subnet but no discovery is attempted. - Make peer discovery queries if custody subnet peer count drops below the minimum threshold - Update peer pruning logic to prioritise uniform distribution across all data column subnets and avoid pruning sampling peers if the count is below the target threshold (2) - Check sync status when making discovery requests, to make sure we don't ignore requests if there isn't enough synced peers in the required sampling subnets - Optimise some of the `PeerDB` functions checking custody peers - Only send lookup requests to peers that are synced or advanced
Issue Addressed
StatusV2overStatusV1RPC protocol #7912