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

network/swarm.py and transport/tcp is not smart enough to detect that peerstore multiaddress is not reachable #391

Open
ShadowJonathan opened this issue Dec 21, 2019 · 0 comments

Comments

@ShadowJonathan
Copy link
Contributor

What was wrong?

In py-libp2p, as of right now, there only exists one network implementation, and one
transport implementation: Swarm and TCP.

When the swarm would encounter a multiaddress in it's peerstore with values like udp/9090 or tcp/9090/quic, it would not detect those, and instead fail with multiaddr.exceptions.ProtocolLookupError over here.

How can it be fixed?

Add a generic function under transport/ which iterates over all registered ITransport classes, and add a function to ITransport that accepts one Multiaddr, and returns True when that multiaddress is supported by that transport.

Make Swarm try to acquire that ITransport upon trying a Multiaddr, and fail with SwarmException when there is no ITransport that supports that MultiAddr.

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

1 participant