-
Notifications
You must be signed in to change notification settings - Fork 42
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
chore: ensure that we can dial tls
multiaddrs
#1580
Conversation
size-limit report 📦
|
d200013
to
65731f0
Compare
13e51f9
to
b9e7e9a
Compare
// dummy multiaddr, doesn't have to be valid | ||
await waku.dial(multiaddr(`/ip4/127.0.0.1/tcp/30303/tls/ws`)); | ||
} catch (error) { | ||
if (error instanceof Error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it always instance of Error
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessarily; Error
is the most common way of throw
ing but one can throw literally anything
- number:
throw 404
- boolean:
throw false
- string:
throw "this is an error message"
- object:
{error: "this is an error message"}
- ...
I still didn't debug it but it seems that |
Problem
js-waku is currently unable to dial a new format of secure websocket multiaddrs denoted by
/tls/ws
instead ofwss
it was seen that js-libp2p supports these multiaddrs and that the bug actually came from an older version of
@multiformats/multiaddr-to-uri
which is specified in@libp2p/websockets
relevant issue on js-libp2p: libp2p/js-libp2p#2024
a PR was opened to upgrade the version of the faulty dependency which did not support
tls
format multiaddrs at the time but was discarded as the solution given was to update the lockfile: libp2p/js-libp2p#2059 (comment)Solution
tls
mutliaddrsNotes
with the old lockfile, it can be seen that when the test is added, it actually fails (https://github.com/waku-org/js-waku/actions/runs/6237429056/job/16931018217?pr=1580)
when a fresh lockfile is generated, the test passes https://github.com/waku-org/js-waku/actions/runs/6272635285/job/17034532746?pr=1580
Related to peer-exchange: investigate p2p-circuit address discovery & connection #1527