libp2p / libp2p/specs

Document dialing peer without their peer ID

Open
#458 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

difficulty:easy help wanted
Dominant language
No language data
Stars
1.8k
Forks
320
Avg merge
11d 15h
Merged PRs (30d)
1

Description

The discussion on whether one should be able to dial a peer without knowing their peer ID has come up many times.

Today two implementations (nim-libp2p and rust-libp2p) support dialing a peer without knowing their peer ID.

Copying use-cases from @Menduist from a recent discussion on Slack:

  • Connecting to a peer with a trusted IP & port combo, without having to know his PeerId. For instance, in eth2 you can have one / multiple public facing nodes, and one hidden node in your network actually doing the validation, to prevent ddos attacks on that node. Since this is in a private / secure network, you can trust peers by IP & port without validating their PeerId. And allowing them to change PeerId regularly is a bit more secure

  • Assuming dnssec, dialing multiple peers a dnsaddr provides you without having to know their PeerId before-hand. For instance, in eth devp2p, they have a nice DHT crawler which puts every peer it finds into a dnsaddr like recursive record, allowing to bootstrap without dedicated servers. More infos here

  • Random crawling with a nmap, but that seems unlikely to me

While I don't think we have nor will find consensus on whether an implementation supports dialing a peer without their peer ID, I do think there is value documenting that implementations may support this and the rational for it.

I think a short paragraph in https://github.com/libp2p/specs/blob/master/connections/README.md would suffice.

@Menduist would you want to tackle this?

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

The target is connections/README.md; start by reading the existing connection and dialing guidance and the issue's linked use cases. Document that implementations may support dialing without a peer ID and preserve the stated rationale, with a short paragraph in that file as the definition of done.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation, networking
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.