Comments (6)
@achingbrain could you take a look at this ? Most auto dials are failing because of it
from js-libp2p.
Although sorting and filtering addresses is a good option, as a user I would still expect the dial function to attempt dialing all provided addresses.
Why not give users the option to choose a maxParallelDialsPerPeer parameter with a default value of 1 ?
from js-libp2p.
@achingbrain can you please look into it?
from js-libp2p.
@akim-bow what kind of addresses are you having problems with?
The example you gave was [/dns/nox-1, /ip4/10.50.10.10, /ip4/127.0.0.1]
- DNS addresses take time to resolve, so that can be bad, fair enough, but the other two are private local addresses so assuming TCP, they should be fast to fail?
If you know certain addresses are going to be unreliable or slow, you can also pass an addressSorter as part of the connectionManager
config to ensure they are dialled last, or a connectionGater to ensure they are not dialled at all.
from js-libp2p.
@achingbrain I'm having the same issue when running nodes in local environment.
When dialing a peer, these are the addresses found in the peer store:
[/ip4/10.2.0.2/tcp/9106, /ip4/127.0.0.1/tcp/9106, /ip4/172.20.5.94/tcp/9106]
The first address is not reachable, while the other two are. The dialer fails after dialTimeout
milliseconds because of the first address, without ever attempting to dial the other two. All auto dials are also failing for the same reason.
from js-libp2p.
My concern with the proposed solution is that having separate timeouts for individual addresses could lead to very long dial times.
I wonder if we could be smarter with the dialling, for example if the IP address of the target multiaddr is a class A private network address, deprioritise or entirely skip dialling it unless the current node also has a class A private network address in the same logical network?
from js-libp2p.
Related Issues (20)
- `notifyOnTransient` also ignore disconnection events?
- @libp2p/webtransport Correct multiaddr format HOT 4
- Restarting a node quickly and connecting will not emit `onConnect`events in registrar HOT 2
- dht: kadDHT() causes TypeError: Cannot destructure property 'kBucketSize' of 'init' as it is undefined HOT 4
- Example returns empty object. HOT 4
- Unhandled error: ERR_SDP_HANDSHAKE_ABORTED HOT 2
- Make identify-push autodial smarter
- Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in \node_modules\libp2p\package.json HOT 1
- Docs for `peer-record` are referencing PR i.s.o RFC
- Circuit relay drops connection after minute. HOT 1
- Add documentation for crypto.supportedKeys HOT 1
- AutoDial retries creeps up CPU usage over time
- TypeScript compilation errors within @libp2p/interface/src/event-target.ts
- 30+ Broken links in readme. HOT 3
- WebRTC transport apparently broken in the NodeJS environment HOT 10
- TypeError: peer[0].getPeerId is not a function HOT 4
- Lacking Documentation: certhash for webRTC? HOT 1
- Race Condition on opening a Stream over a DataChannel HOT 3
- ERR_ENCRYPTION_FAILED tryng to connect to go-ipfs HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-libp2p.