libp2p / libp2p/go-libp2p

Dial worker loop simplification. Move backoff filtering together with other filters.

Open
#2,380 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This is a small simplification that I believe will fix tricky points in the worker loop.

We should do backoff filtering along with other address filtering in swarm.filterKnownUndialables
This will clean up some of the awkward error handling here and here

see https://github.com/libp2p/go-libp2p/pull/2320#issuecomment-1597009229
for how black hole detection can be made to work with this.

As a follow up I'd like to change the worker loop interface to just take the list of addresses to dial with the ranking and the address filtering and ranking all happens before the worker loop.

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 with swarm.filterKnownUndialables in p2p/net/swarm/swarm_dial.go and the worker-loop error handling in p2p/net/swarm/dial_worker.go, especially the referenced lines. Read the linked PR comment for the black hole detection implications. Done means backoff filtering is handled with the other address filters and the awkward error handling is simplified without breaking that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.