Skip to content
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

NetworkImpl can't handle relayed addresses #339

Open
ianopolous opened this issue Oct 16, 2023 · 2 comments
Open

NetworkImpl can't handle relayed addresses #339

ianopolous opened this issue Oct 16, 2023 · 2 comments

Comments

@ianopolous
Copy link
Contributor

If you try and dial an address that is relayed, e.g. /ip6/2a03:b0c0:3:d0::f5b:2001/tcp/4001/p2p/12D3KooWAYhKPvH8JrBT7oTiY69LY2QksfvPH2sY8ECvR1KD9ZTo/p2p-circuit/p2p/12D3KooWHci62Skj6sC6c2ASXARBnBMmUuM7kuHqtgi5mVQdJ6Gf

Then you get an error trying to set the peerid, because there are two p2p elements in relayed addresses. We want to append in the p2p-circuit case.

java.lang.IllegalArgumentException: Value (12D3KooWHci62Skj6sC6c2ASXARBnBMmUuM7kuHqtgi5mVQdJ6Gf) for P2P doesn't match existing value in /ip6/2a03:b0c0:3:d0::f5b:2001/tcp/4001/p2p/12D3KooWAYhKPvH8JrBT7oTiY69LY2QksfvPH2sY8ECvR1KD9ZTo/p2p-circuit
at io.libp2p.core.multiformats.Multiaddr.withComponentImpl(Multiaddr.kt:68)
at io.libp2p.core.multiformats.Multiaddr.withComponent(Multiaddr.kt:78)
at io.libp2p.core.multiformats.Multiaddr.withP2P(Multiaddr.kt:57)
at io.libp2p.network.NetworkImpl.connect(NetworkImpl.kt:72)
at io.libp2p.core.Network.connect(Network.kt:75)
at io.libp2p.host.HostImpl.newStream(HostImpl.kt:94)
at io.libp2p.core.multistream.ProtocolBinding.dial(ProtocolBinding.kt:37)

@Nashatyrev
Copy link
Collaborator

I don't think we support /p2p-circuit at the moment

@ianopolous
Copy link
Contributor Author

Exactly, I'm implementing circuit relaying at the moment. But The Tcp transport shouldn't say it can dial them because it has ip4 etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants