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

AddressBook with multiaddr confidence #593

Closed
vasco-santos opened this issue Mar 25, 2020 · 1 comment
Closed

AddressBook with multiaddr confidence #593

vasco-santos opened this issue Mar 25, 2020 · 1 comment
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/enhancement A net-new feature or improvement to an existing feature kind/stale

Comments

@vasco-santos
Copy link
Member

As part of the PeerStore improvements epic, we intend to add multiaddr confidence into the AddressBook.

Background

When js-libp2p dials a peer, it tries to dial several known addresses of a peer in parallel. We use a token based dialer to not use a lot of resources to a single connection. However, we don't have a good way of deciding which subset of addresses we should try first. If we gather metrics from peer addresses stored in the PeerStore, we can create a scoring function for the addresses.

Goals

  • Know when multiaddrs are successful and when they fail so we can keep track of their confidence (take aborted dials into account)
  • Understand the confidence in each multiaddr of a peer so we can manage addresses we store/use/exchange

WIP Notes

  • If we dial multiple addrs, and we abort the slower addrs, take into account the confidence of the fastest address
    • Update on success, update on failure, aborts are no ops
    • When the Abort is a timeout abort, treat as a failure for all addresses that were tried
      • Need to account for low dial timeouts poisoning potentially valid address confidence
        • Potentialy weight low dial timeout confidence adjustments
  • Parameters: latency, availability, last connection timestamp
  • Score function

Relevant Issues

@vasco-santos vasco-santos added exp/expert Having worked on the specific codebase is important kind/enhancement A net-new feature or improvement to an existing feature exp/wizard Extensive knowledge (implications, ramifications) required and removed exp/expert Having worked on the specific codebase is important labels Mar 25, 2020
@maschad
Copy link
Member

maschad commented Oct 1, 2023

This is no longer relevant as we no longer dial peers in parallel #2090 and we also sort multiaddrs per peer to be dialled via smart dialling #2010

@maschad maschad closed this as completed Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/enhancement A net-new feature or improvement to an existing feature kind/stale
Projects
None yet
Development

No branches or pull requests

3 participants