Move dialing to the Peer manager#3495
Merged
AgeManning merged 1 commit intosigp:libp2p-v0.47.0-upgradefrom Aug 30, 2022
Merged
Conversation
AgeManning
approved these changes
Aug 30, 2022
Member
AgeManning
left a comment
There was a problem hiding this comment.
Yeah cool. We push the dialing down a layer in the PM. Seems equivalent to me.
5 tasks
Woodpile37
pushed a commit
to Woodpile37/lighthouse
that referenced
this pull request
Jan 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Addressed
libp2p's latest release forces a quite big refactor on our lighthouse network crate mainly because of the deprecation of the
NetworkBehaviourEventProcess. While doing this, I'll need to removeInternalBehaviourMessage. This PR removes one of the variants:DialPeermoving dialing from the mainBehaviourto thePeerManager.Proposed Changes
This change should maintain essentially the same over-all behaviour:
Before we would tell the peer manager to set a peer as dialing and queue an internal behaviour event to emit the Dial
NBAction. The way the derive macro forNetworkBehaviourworks is by polling each sub-behaviour in the order they are defined and then calling the custom poll function. Since the peer manager is the last behaviour, having the dial at the beginning of the custom poll function and at the end of the poll for the peer manager should be equivalent.Additional Info
na