-
Notifications
You must be signed in to change notification settings - Fork 18
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
Bug: failing with invalid multiaddr on quic-v1 webtransport #147
Comments
Currently bypassing this with a very very hacky patch diff --git a/node_modules/@libp2p/bootstrap/dist/src/index.js b/node_modules/@libp2p/bootstrap/dist/src/index.js
index 1386e3c..ca83bf0 100644
--- a/node_modules/@libp2p/bootstrap/dist/src/index.js
+++ b/node_modules/@libp2p/bootstrap/dist/src/index.js
@@ -22,8 +22,8 @@ class Bootstrap extends EventEmitter {
this.timeout = options.timeout ?? DEFAULT_BOOTSTRAP_DISCOVERY_TIMEOUT;
this.list = [];
for (const candidate of options.list) {
- if (!P2P.matches(candidate)) {
- log.error('Invalid multiaddr');
+ if (!P2P.matches(candidate) && !candidate.toString().includes('webtransport')) {
+ log.error('Invalid multiaddr', candidate);
continue;
}
const ma = multiaddr(candidate); |
Have a look at how WebRTCDirect is done, it's got a very similar structure to WebTransport as it includes the I think you'll need to add a |
Thanks for the guidance. will look into this later today |
This is being called from @libp2p/bootstrap at https://github.com/libp2p/js-libp2p-bootstrap/blob/6d1b65aaa8ff770443f9df92baba6cd588d41a65/src/index.ts#L73-L76 and blocking DHT functionality when trying to talk to my own node, bootstrapping it.
I looked at the source(https://github.com/multiformats/js-mafmt/blob/master/src/index.ts) and am not sure how to add a support for a new multiaddr format
cc @achingbrain @aschmahmann @BigLep
The text was updated successfully, but these errors were encountered: