libp2p / libp2p/go-libp2p

Improve Dialing

Open
#781 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Epic kind/enhancement
Dominant language
Go
Stars
6.9k
Forks
1.3k
Avg merge
13d 21h
Merged PRs (30d)
1

Description

## Design notes

We have a couple of warts in our dialing system that may cause issues with the new DHT, especially while testing.
- [ ] We should fix the simultaneous dial issue and just eat the extra connections. The fact that two nodes can't dial each other at the same time is making testing painful.
- [ ] Corollary: the connection manager should trim duplicate unused connections.
- [ ] The dialer should really prefer faster transports like QUIC.
- [ ] Connections should backoff based on addresses instead of peerIDs.

## Testing mechanics

Unit tests.

## Success Criteria
- When reuseport is disabled, two peers dialing each other at the same time should succeed.
- Multiple connections should eventually be trimmed.
- If most of the network supports both QUIC and TCP, most connections should be QUIC.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the dialing and connection-manager entry points and the existing unit tests; the issue does not name specific files. Break the work into simultaneous dialing, duplicate-connection trimming, transport preference, and address-based backoff. Done means the listed success criteria are covered by unit tests, including concurrent dialing with reuseport disabled and QUIC preference.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.