-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
We should also look into fixing our backoff logic. Ideally:
That way, if we learn new addresses, we'll dial those. |
test/exchange-files.js
Outdated
MDNS: { | ||
Enabled: false | ||
}, | ||
webRTCStar: { |
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.
go-ipfs will just ignore this, IIRC.
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.
correct, and we don't really need it for js for this, lazy copy paste on my part, i've removed it from both.
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.
All fixed! Thanks!
That's a good point, we're doing it at the peer level now and not doing any reseting when addresses are updated. This shouldn't take much to transition to for js.
What were your thoughts for this, not sure I follow? |
My thinking is that we should completely drop the per-peer logic. The point of the backoff is to avoid repeatedly doing something that fails over and over. So, we can:
But you're right, the simple solution is to just remove the backoff when we learn a new address. In go-ipfs, we reset the backoff when the user calls the |
Ah, yeah caching the DHT query would be helpful. I created an issue to transition to a multiaddr based backoff for js, https://github.com/libp2p/js-libp2p-switch/issues/339. If it becomes a more prevalent issue before I can get it fixed we could replicate the same backoff reset behavior of go-ipfs pretty easily for js-ipfs. |
The test failures are unrelated to this and exist in master. I created an issue to track that failure, #71. |
The tests are failing against the latest go-ipfs rc candidate (0.4.21-rc.3), ipfs/kubo#6389. This is due to an issue with go announcing its address over MDNS with port 4001 even though the port is actually different. Since the MDNS discovery occurs before dial in the test and fails, the connect attempt will subsequently fail due to JS doing a blacklisting backoff on failed connection attempts.
While this doesn't solve the underlying issue, we shouldn't have MDNS turned on for these tests. My recommendation is: