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

core/transport: Extend MultiaddrNotSupported error #2980

Open
mxinden opened this issue Oct 4, 2022 · 1 comment
Open

core/transport: Extend MultiaddrNotSupported error #2980

mxinden opened this issue Oct 4, 2022 · 1 comment
Labels
difficulty:moderate getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted

Comments

@mxinden
Copy link
Member

mxinden commented Oct 4, 2022

I have had the problem multiple times where I pass a malformed Multiaddr to a hierarchy of Transport implementations (e.g. relayed addresses are tricky) and my Multiaddr is being denied via MutliaddrNotSupported.

Say I have the following address: /dns6/xxx/tcp/xxx/p2p/xxx/p2p-circuit/p2p/xxx. When I get a MultiaddrNotSupported I don't know whether this is due to:

  • The address being malformed for libp2p-relay.
  • The address being malformed for libp2p-dns.
  • The addresses resolved by libp2p-dns being malformed for libp2p-tcp.

In addition to not knowing where it has been denied, I don't know what the reason for denial was.

Extending MultiaddrNotSupported with something implementign Error would allow Transport implementations to add details to the error.

Originally posted by @mxinden in #2289 (comment)

@mxinden mxinden added difficulty:moderate help wanted getting-started Issues that can be tackled if you don't know the internals of libp2p very well labels Oct 4, 2022
@thomaseizinger
Copy link
Contributor

Perhaps it might be worth picking up #1533 again.

If we were to integrate with tracing, you would be able to see the span-stack of each message.

So instead of extending the error, we could add more logs which would allow you to see what happened. There are also crates like tracing-error which allow you to carry the span trace as a value.

Tools like jaeger allow you to visualise these span trees: Jaeger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:moderate getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted
Projects
None yet
Development

No branches or pull requests

2 participants