-
Notifications
You must be signed in to change notification settings - Fork 971
Retry custody requests after peer metadata updates #6975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
4894cc2
0428fbb
120b8db
ba0b62b
28e64fa
666a8fa
e21590a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,6 +106,9 @@ pub enum SyncMessage<E: EthSpec> { | |
| head_slot: Option<Slot>, | ||
| }, | ||
|
|
||
| /// Peer manager has received a MetaData of a peer with a new or updated CGC value. | ||
| UpdatedPeerCgc(PeerId), | ||
|
|
||
| /// A block has been received from the RPC. | ||
| RpcBlock { | ||
| sync_request_id: SyncRequestId, | ||
|
|
@@ -476,6 +479,16 @@ impl<T: BeaconChainTypes> SyncManager<T> { | |
| } | ||
| } | ||
|
|
||
| fn updated_peer_cgc(&mut self, _peer_id: PeerId) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we want to resume by range request as well?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed, I resume range sync aswell
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, I'll run some tests today to confirm this fixes the issue.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't look like this fixes the issue. I still don't see range requests until a few minutes later until we add a new finalized chain. Right after startup, waiting for custody peers Got peer metadata response after 15s No range requests until ~5 mins later
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you saw this log?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't recall seeing this. I think I was using the right locally-built image, but can be worth re-testing to confirm if you have time.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dapplion could you retest this change?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've retested this, and it doesn't seem to trigger retry after obtaining the peers metadata, and the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #6975 (comment) |
||
| // Try to make progress on custody requests that are waiting for peers | ||
| for (id, result) in self.network.continue_custody_by_root_requests() { | ||
| self.on_custody_by_root_result(id, result); | ||
| } | ||
|
|
||
| // Attempt to resume range sync too | ||
| self.range_sync.resume(&mut self.network); | ||
| } | ||
|
|
||
| /// Handles RPC errors related to requests that were emitted from the sync manager. | ||
| fn inject_error(&mut self, peer_id: PeerId, sync_request_id: SyncRequestId, error: RPCError) { | ||
| trace!("Sync manager received a failed RPC"); | ||
|
|
@@ -750,6 +763,13 @@ impl<T: BeaconChainTypes> SyncManager<T> { | |
| } => { | ||
| self.add_peers_force_range_sync(&peers, head_root, head_slot); | ||
| } | ||
| SyncMessage::UpdatedPeerCgc(peer_id) => { | ||
| debug!( | ||
| peer_id = ?peer_id, | ||
| "Received updated peer CGC message" | ||
| ); | ||
| self.updated_peer_cgc(peer_id); | ||
| } | ||
| SyncMessage::RpcBlock { | ||
| sync_request_id, | ||
| peer_id, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.