libp2p / libp2p/go-libp2p-daemon

Unexpected behavior when trying to connect to bootstrap nodes

Open
#245 11 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
95
Forks
41
PR merge metrics
No merged PRs in 30d

Description

We want to set up our custom network so that machines under NAT can still connect to each other. We tried providing our bootstrap nodes, but they didn't return the public address of our under-NAT machines.

Then we tried providing nodes from [this](https://github.com/libp2p/go-libp2p-examples/blob/d4f3f358ab266fa2a1c3788dd8086929fb6bbf50/routed-echo/bootstrap.go#L21) go-libp2p example and encountered some strange behavior: when providing only one of the peers nothing works (either we can't connect, or the peer doesn't return the public IP), but when providing both everything works just fine.

What could be the issue? Could the issue be with how we configure our nodes? If yes, what options do we need to specify, so the peers return the public addresses of other nodes?

![photo_2021-03-12_21-27-20](https://user-images.githubusercontent.com/22542643/110982593-c4be0100-8379-11eb-878f-d5c549c9ef20.jpg)

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 reviewing the linked go-libp2p example at routed-echo/bootstrap.go and reproducing the behavior with one bootstrap peer versus both. Compare the node configuration and NAT connectivity in each case; done means identifying whether the behavior is configuration-related and documenting the required options or a reproducible defect.

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
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.