You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a dial to a given peer is performed, if a dial to the same peer is currently in progress, this dial will just wait on the first to finish and return its connection.
A tricky scenario can happen with this flow. If the second dial uses an address that was not included in the first one, it will not be used. For instance, by using libp2p.dial(ma1) ... libp2p.dial(ma2), or by getting the multiaddrs from AddressBook and then dial from a not known multiaddr of a peer, the second multiaddrs will not be used.
Steps to reproduce the error:
libp2p.dial(serverMultiaddr)
(exchanged identify addresses (that do not announce the serverMultiaddr))
this is where multiaddr confidence would be really nice. Maybe in the interim we could add on identify and prune known addresses when they fail a dial? This wouldn't be great for intermittent failures but we need a way to avoid storing hundreds of multiaddrs for a peer until we get confidence in place
vasco-santos
changed the title
Subsequent dial with multiaddr not in the PeerStore
Subsequent dial with multiaddr not in the previous dialTarget
Nov 20, 2020
Since #1498 when passed a multiaddr, only that multiaddr is dialed so this is no longer possible.
There's a possible edge case where if you dial a peer id, then add a new address to the address book, then dial the peer id again it may join on the first dial promise rather than adding the new address to the dial target but this needs further investigation.
Type: Bug
Description:
When a dial to a given peer is performed, if a dial to the same peer is currently in progress, this dial will just wait on the first to finish and return its connection.
A tricky scenario can happen with this flow. If the second dial uses an address that was not included in the first one, it will not be used. For instance, by using
libp2p.dial(ma1)
...libp2p.dial(ma2)
, or by getting the multiaddrs from AddressBook and then dial from a not known multiaddr of a peer, the second multiaddrs will not be used.Steps to reproduce the error:
libp2p.dial(serverMultiaddr)
libp2p.dial(serverMultiaddr)
Reference: ipfs/js-ipfs#3400
The text was updated successfully, but these errors were encountered: