Questions tagged [libp2p]

Libp2p is a modular peer-to-peer networking stack used by IPFS and others.

Libp2p is a modular peer-to-peer networking stack used by and others. It is the result of the collective experience of building a distributed system (IPFS). In essence, a peer using libp2p will be able to communicate with another peer utilizing a variety of different transports, including connection relay, and talk over various protocols, negotiated on demand.

71 questions
1
vote
0 answers

Connect libp2p with bootstrap and kad-dht

I am trying to get a libp2p client to connect to other peers, however the code I have used, which uses bootstrap and kad-dht, doesn't connect to any peers other than the bootstrap node. I have tried the following code: import { noise } from…
1
vote
0 answers

Error: The dial request has no valid addresses

When I run js-libp2p, I got this error, it seems to have found the peerid, but multiaddr is not right. I don't know why the multiaddr has two peerid like…
tobebetter
  • 11
  • 2
1
vote
0 answers

Effective relayed / hole-punching connection between NAT-ed hosts

I want to connect two hosts (libp2p nodes), each of them behind a home router (thus, NAT). The relay example in the official Go implementation repo simulates two undialable hosts and spawns a relay node, which is used to establish the connection…
Fabio B.
  • 9,138
  • 25
  • 105
  • 177
1
vote
0 answers

Is there a way to do IPFS pubsub message forwarding if the intermediate node does not subscrive to the topic?

Is there a way to do IPFS pubsub message forwarding if the intermediate node does not subscrive to the topic? し A <-> B <-> C As above, there are configurations where A and C are not directly connected but A and B or B and C are connected. *A, B and…
shuxxx
  • 11
  • 1
1
vote
1 answer

js-libp2p doesn't create a new stream

My full source code is available here: https://github.com/Gbr22/p2ptunnel listener: $ node listener.js Listener ready, listening on: /ip4/192.168.0.101/tcp/10333/p2p/QmcrQZ6RJdpYuGvZqD5QEHAv6qX4BrQLJLQPQUrTrzdcgm …
kess
  • 1,204
  • 8
  • 19
1
vote
2 answers

Point to point Request-Response Behavior with libp2p

Using libp2p, is there a way to write a network behavior that doesn’t hit the entire swarm, but goes directly to a peer and only that peer? More generally, is there a way within libp2p to communicate exclusively (request/response) to particular peer…
kimon
  • 2,481
  • 2
  • 23
  • 33
1
vote
0 answers

Gossipsub scalability in terms of topic size

I am currently developing an experimental identity protocol on top libp2p gossipsub(https://idp2p.github.io/). The protocol assumes each identity is a topic to subsribe. Whenever an identity is created, a topic should be created for that…
adem caglin
  • 22,700
  • 10
  • 58
  • 78
1
vote
0 answers

How can I play a m3u8 file in Http.fileSever() system

I use Http.fileSever() to upload a m3u8 file and some ts file to a server.Now,I request them and read them by ioutil.ReadAll.What should I do to play the m3u8 file. I tried to only request the m3u8 file,but I found I can not play it by ffplay. This…
kou
  • 31
  • 3
1
vote
1 answer

Troubles on constructing HLS using libp2p-http

I intend to implement a classic HLS example with libp2p, which is as follows https://hackernoon.com/building-a-media-streaming-server-using-go-and-hls-protocol-j85h3wem But I encountered the following errors: 404 page not found My code…
kou
  • 31
  • 3
1
vote
1 answer

Whats the difference between WebRTC and libp2p?

I'm trying to build a p2p terminal sharing utility where PCs behind a NAT can share their terminals to other PCs behind a NAT through the public internet. (both PCs are on different private network basically). Another requirement is to provide a web…
D.B.K
  • 410
  • 2
  • 15
1
vote
1 answer

Why do nodes only discover each other but do not connect when run from different computer on the same network

I am trying to get up to speed with js-libp2p and I am poking around with this code snippet: const Libp2p = require("libp2p") const WebSockets = require('libp2p-websockets') const Tcp = require('libp2p-tcp') const { NOISE } =…
Finlay Weber
  • 2,989
  • 3
  • 17
  • 37
1
vote
0 answers

Cannot resolve “node:http” when using libp2p with create-react-app

I am new to libp2p, so please excuse me if this is something that’s been asked/discussed elsewhere. I am trying to set up in a newly created project made with create-react-app. The app currently has one component with the following: import React,…
tutiplain
  • 1,427
  • 4
  • 19
  • 37
1
vote
1 answer

Put record into DHT

I'm trying to insert a simple /pk record to the IFPS DHT using Rust and rust-libp2p Here's my code (Rust 1.55, libp2p-rust 0.39.1): let mut key = "/pk/".bytes().collect::>(); key.append(&mut local_key.public().into_peer_id().to_bytes()); let…
fygesser
  • 73
  • 9
1
vote
1 answer

How do you manually flush Write in a direct p2p connection with libp2p-go?

I cannot find an API to flush Write in a direct connection with a peer in libp2p (it works fine in pubsub). I create a direct libp2p connection in Go using libp2p-go using host.NewStream. The stream is used by the wrapper below. The problem is that…
1
vote
0 answers

Issues running the js Ipfs bitswap benchmarks

I'm trying to do some performance testing of the js implementation of IPFSs bitswap. I've followed the instructions in the git repo here: https://github.com/ipfs/js-ipfs-bitswap But if I do an npm run benchmarks or 0x test/benchmarks/get-many I just…
BobC
  • 11
  • 2