-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discovery mechanisms example: Pubsub-Peer-Discovery not discovering peers. #1229
Comments
I believe the issue is in the In versions prior to 5 (<= 4), As of version 5 it is doing:
In v5, And
|
@sneaker1 We think it's fixed in the latest libp2p version, can you try using latest version? |
I tested that but exist this problem yet :((
I am running the most recent versions. Here are the dependencies from my package.json: "dependencies": {
"@chainsafe/libp2p-noise": "^8.0.1",
"@libp2p/bootstrap": "^2.0.0",
"@libp2p/floodsub": "^3.0.5",
"@libp2p/mplex": "^5.0.0",
"@libp2p/pubsub-peer-discovery": "^6.0.1",
"@libp2p/tcp": "^3.0.4",
"execa": "^6.1.0",
"libp2p": "0.38.0",
"p-defer": "^4.0.0",
"uint8arrays": "^3.1.0"
}
|
Co-authored-by: achingbrain <[email protected]>- fixed tests that were passing even though the example isn't working - added timeouts to avoid infinite wait Fixes #1229
In the discovery mechanism example Part 3 Pubsub based Peer Discovery is a problem.
https://github.com/libp2p/js-libp2p/tree/master/examples/discovery-mechanisms#3-pubsub-based-peer-discovery
If i run the 3.js i can not discover other peers.
Here is my output:
> node 3.js libp2p relay starting with id: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Node 0 starting with id: 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg Node 1 starting with id: 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWSiExtrTywWfj3xoFFqSPV7kJqwkBQaxJuwB4m9BEntQg discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3 Peer 12D3KooWDgxwvf5p6BCmyYL3Srzff9FhPWLGJeq7w97d4nsERfFm discovered: 12D3KooWNZcrYfNvQ5kkbMZnPJVwQ28R4LkdH34pJsDuUFMWpXg3
As you can see only the bootstrap peer-id is discovered.
The peer-ids of node 0 and node 1 are not discovered.
According to the example the output should be like this. (Node 0 and Node 1 are discovered)
> node 3.js libp2p relay starting with id: QmW6FqVV6RsyoGC5zaeFGW9gSWA3LcBRVZrjkKMruh38Bo Node 0 starting with id: QmezqDTmEjZ5BfMgVqjSpLY19mVVLTQ9bE9mRpZwtGxL8N Node 1 starting with id: QmYWeom2odTkm79DzB68NHULqVHDaNDqHhoyqLdcV1fqdv Peer QmezqDTmEjZ5BfMgVqjSpLY19mVVLTQ9bE9mRpZwtGxL8N discovered: QmW6FqVV6RsyoGC5zaeFGW9gSWA3LcBRVZrjkKMruh38Bo Peer QmYWeom2odTkm79DzB68NHULqVHDaNDqHhoyqLdcV1fqdv discovered: QmW6FqVV6RsyoGC5zaeFGW9gSWA3LcBRVZrjkKMruh38Bo Peer QmYWeom2odTkm79DzB68NHULqVHDaNDqHhoyqLdcV1fqdv discovered: QmezqDTmEjZ5BfMgVqjSpLY19mVVLTQ9bE9mRpZwtGxL8N Peer QmezqDTmEjZ5BfMgVqjSpLY19mVVLTQ9bE9mRpZwtGxL8N discovered: QmYWeom2odTkm79DzB68NHULqVHDaNDqHhoyqLdcV1fqdv
I assume the example has worked before. So maybe there is a problem in the current versions of libp2p.
I am running the most recent versions. Here are the dependencies from my package.json:
The text was updated successfully, but these errors were encountered: