Retry custody requests after peer metadata updates (#6975)

Closes https://github.com/sigp/lighthouse/issues/6895

We need sync to retry custody requests when a peer CGC updates. A higher CGC can result in a data column subnet peer count increasing from 0 to 1, allowing requests to happen.


  Add new sync event `SyncMessage::UpdatedPeerCgc`. It's sent by the router when a metadata response updates the known CGC
This commit is contained in:
Lion - dapplion
2025-05-09 05:27:17 -03:00
committed by GitHub
parent 4b9c16fc71
commit a497ec601c
5 changed files with 106 additions and 8 deletions

View File

@@ -485,6 +485,9 @@ impl<T: BeaconChainTypes> NetworkService<T> {
NetworkEvent::PeerDisconnected(peer_id) => {
self.send_to_router(RouterMessage::PeerDisconnected(peer_id));
}
NetworkEvent::PeerUpdatedCustodyGroupCount(peer_id) => {
self.send_to_router(RouterMessage::PeerUpdatedCustodyGroupCount(peer_id));
}
NetworkEvent::RequestReceived {
peer_id,
inbound_request_id,