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

[switch] Have dial backoffs be multiaddr specific instead of peer specific #426

Closed
jacobheun opened this issue May 30, 2019 · 4 comments
Closed

Comments

@jacobheun
Copy link
Contributor

Currently when we are not able to dial a peer we blacklist the peer with an exponential backoff. Really we should be backing off on multiaddrs. It's very possible that we can learn new, dialable multiaddrs for a peer after they've been blacklisted and we should be able to immediately attempt those dials.

Context: ipfs/interop#70 (comment)

@dirkmc
Copy link
Contributor

dirkmc commented Jun 6, 2019

Seeing the PR for clearing a blacklist when a connection is established made me wonder if we should also do blacklist removal by multiaddr?

@jacobheun
Copy link
Contributor Author

If we observe a connection on that multiaddr then yes we should remove it from the blacklist.

@vasco-santos
Copy link
Member

We also had an issue with IPFS interop trying to dial a peer several times ipfs/interop#77.

@jacobheun jacobheun changed the title Have dial backoffs (blacklisting) be multiaddr specific instead of peer specific Have dial backoffs be multiaddr specific instead of peer specific Aug 8, 2019
@daviddias daviddias changed the title Have dial backoffs be multiaddr specific instead of peer specific [switch] Have dial backoffs be multiaddr specific instead of peer specific Aug 22, 2019
@daviddias daviddias transferred this issue from libp2p/js-libp2p-switch Aug 22, 2019
maschad pushed a commit to maschad/js-libp2p that referenced this issue Jun 21, 2023
As the `k-bucket` documentation [here](https://github.com/tristanls/k-bucket/blob/master/README.md#kbuckettoiterable) indicates, `toIterable` yields contact objects, **not** `KBucket` objects. Here, the contact objects are `KBucketPeer` objects.

You can check this in the code [here](https://github.com/tristanls/k-bucket/blob/3aa5b4f1dacb835752995a25409ab319d2070b9e/index.js#L413) - the delegated yield `yield * node.contacts` will yield each of the elements of the `node.contacts` array in order.

Co-authored-by: Alex Potsides <alex@achingbrain.net>
maschad pushed a commit to maschad/js-libp2p that referenced this issue Jun 21, 2023
## [7.0.1](libp2p/js-libp2p-kad-dht@v7.0.0...v7.0.1) (2023-03-10)

### Bug Fixes

* correct `KBucketTree` types ([libp2p#426](libp2p/js-libp2p-kad-dht#426)) ([ea8e6d0](libp2p/js-libp2p-kad-dht@ea8e6d0)), closes [/github.com/tristanls/k-bucket/blob/3aa5b4f1dacb835752995a25409ab319d2070b9e/index.js#L413](https://github.com/libp2p//github.com/tristanls/k-bucket/blob/3aa5b4f1dacb835752995a25409ab319d2070b9e/index.js/issues/L413)
* update p-queue types ([libp2p#428](libp2p/js-libp2p-kad-dht#428)) ([f5b85fc](libp2p/js-libp2p-kad-dht@f5b85fc))

### Trivial Changes

* replace err-code with CodeError ([libp2p#413](libp2p/js-libp2p-kad-dht#413)) ([e05d2a0](libp2p/js-libp2p-kad-dht@e05d2a0)), closes [js-libp2p#1269](libp2p#1269)
* Update .github/workflows/semantic-pull-request.yml [skip ci] ([a70ab3f](libp2p/js-libp2p-kad-dht@a70ab3f))
* Update .github/workflows/semantic-pull-request.yml [skip ci] ([1652c6c](libp2p/js-libp2p-kad-dht@1652c6c))
* Update .github/workflows/semantic-pull-request.yml [skip ci] ([ea13c2a](libp2p/js-libp2p-kad-dht@ea13c2a))
@maschad maschad moved this to 🥞Weekly Candidates/Discuss🎙 in js-libp2p Jul 20, 2023
@maschad
Copy link
Member

maschad commented Aug 29, 2023

Closing due to staleness

@maschad maschad closed this as completed Aug 29, 2023
@github-project-automation github-project-automation bot moved this from 🥞Weekly Candidates/Discuss🎙 to 🎉Done in js-libp2p Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants