libp2p / libp2p/go-libp2p

host: move routed host into the basic host

Open
#1,994 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

A lot of the convenience of libp2p comes from the fact that you can just use `NewStream(peer.ID)`, and have libp2p figure out how to reach that peer. Finding that peer might involve consulting the DHT to discover the peer’s addresses.

This works fine for users of libp2p, as they’ll be using the `RoutedHost`. It doesn’t work for libp2p internally, since internally libp2p will be working with the `BasicHost` instead.

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 reading the BasicHost and RoutedHost implementations and tracing how NewStream(peer.ID) resolves a peer's addresses. Determine which internal libp2p paths currently use BasicHost and what behavior must move into it. Done means internal users can reach peers through the same address discovery behavior without requiring RoutedHost.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.