Recursive dialing can block
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.9k
- Forks
- 1.3k
- Avg merge
- 13d 21h
- Merged PRs (30d)
- 1
Description
If two peers advertise each other as, e.g., relays and a third peer tries to dial both of these peers at the same time, the dial will bock.
* Thread 1: Start dial to peer A
* Thread 2: Start dial to peer B
* Thread 1: Try to dial the relay (B) for peer A.
* Thread 2: Try to dial the relay (A) for peer B.
Now, given that we allow 8 parallel dials per peer (default), this shouldn't be the end of the world. In most cases, we'll _also_ try dialing peer A and B directly, if we have the appropriate addresses.
Also note, each peer will timeout dialing the relay after _60_ seconds because that's the default _transport_ dial timeout.
However, we should still provide a solution for this.
~Initially reported in https://github.com/libp2p/go-libp2p-swarm/issues/161.~
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the two-peer relay-dial scenario described in the issue, including the 8-parallel-dials-per-peer limit and the 60-second transport timeout. Reproduce simultaneous dials to peers A and B, then identify how recursive relay attempts become mutually blocked. Done should provide a solution that prevents this blocking behavior without relying on timeouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100