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
1 answer

npm installation failure libp2p-websockets

I'm currently working on an IPFS project. While installing the dependencies - When I run npm i libp2p-websockets I get the following error message: npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t…
zx238
  • 39
  • 3
1
vote
1 answer

Connect browser to NodeJS IPFS node

I'm trying to connect a browser js-ipfs node to a my NodeJS server that is running an js-ipfs node as well. I understand that I need to add in the server's Multiaddr to the browser's bootstrap config in order to connect the two nodes. However, since…
now_world
  • 940
  • 7
  • 21
  • 56
1
vote
0 answers

Getting invalid version number error when connecting to peer

I'm getting an error when trying to connect to a node. The IPFS instance is created in a class, with a JavaScript factory function. The connect function looks like this: async connectToPeer(multiaddr, protocol = "/p2p-circuit/ipfs/") { try { …
Imestin
  • 49
  • 5
1
vote
1 answer

How to get IP address of WebRTC peer in IPFS / libp2p?

I'm using this code to play around with IPFS in the browser. I'm wondering how I can access the ip addresses of the webRTC peers? or even know if the peers are actually webRTC, or http peers?
cooldude101
  • 1,215
  • 2
  • 14
  • 29
1
vote
1 answer

What should my expectations be regarding IPFS response times?

IPFS-SERVER I have a go-ipfs daemon, configured with the standard ipfs "server" profile, running on a linux server, hosted by a large cloud provider . IPFS-CLIENT I have an go-ipfs daemon, configured with the ipfs "default" profile, running on a…
1
vote
1 answer

How can I emit a SwarmEvent::Behaviour from a derived NetworkBehaviour?

I'm looking to write a network behavior that utilizes mDNS, floodsub, and a kademlia DHT. So far, I've gotten each of these services to work, but haven't been able to use the responses from these services for anything meaningful. Ideally, I'd be…
Dowland Aiello
  • 440
  • 8
  • 18
1
vote
3 answers

Pubsub between two nodes in IPFS

I'm trying to send messages between two IPFS nodes. The daemon that I'm running is based on go-ipfs, and is running with the flag: ipfs daemon --enable-pubsub-experiment I've coded two .js files, one is for the subscriber: const IPFS =…
Flamel
  • 23
  • 6
1
vote
1 answer

How to handle buffered Read-Write Stream(s) to peers in golang using libp2p?

I am following this tutorial: https://github.com/libp2p/go-libp2p-examples/tree/master/chat-with-mdns In a short form, it: configures a p2p host sets a default handler function for incoming connections (3. not necessary) and opens a stream to the…
Chris
  • 45
  • 8
1
vote
0 answers

Why am I getting a type-error in this libp2p code?

I'm trying to initialize a connection between two libp2p.Host instances. For this I need to get a peerstore.PeerInfo. The obvious way to do this is to take a multiaddr.Multiaddr instance returned by Host.Addrs and pass it to…
Louis Thibault
  • 20,240
  • 25
  • 83
  • 152
0
votes
0 answers

libp2p Rust sending file gets stuff in loop

I am trying to send file from one terminal to other terminal by using the filesharing example. libp2p 0.52.2 version but the code keeps on running and doesn't give error on receiver side Sender code let secretkeyseed:…
0
votes
0 answers

Kademlia get_providers() fails to find nodes that start_providing() in Rust libp2p

I tried to combine two Rust examples (ipfs-kad, https://github.com/mxinden/libp2p-lookup and chat-example) that use Kademlia to locate their peers to create a shared message channel. However when I run 2 nodes that try to locate each other, they…
Petr
  • 62,528
  • 13
  • 153
  • 317
0
votes
1 answer

How may one generate IPFS PeerID in Python without involving a working IPFS node?

I need to find a clue about all steps of generation of the PeerID used to identify the IPFS node, and then to generate the third-party PeerID using Python script. Does someone have a working example or a link to a good explanation? I am interested…
Andrei Vukolov
  • 118
  • 1
  • 10
0
votes
1 answer

Error while building rust with libp2p-0.53.1

I am trying to upgrade a project, that has vendored crates, from using libp2p 0.46 to 0.53.1 but I am getting an error when I try to build it. error[E0599]: no method named `as_pin_mut` found for struct `Pin<&mut either::Either>` in the…
0
votes
0 answers

How to pipe strings through a stream?

I want to send messages received from a front-end through a stream object representing the TCP connection of a libp2p node to another node. I am trying to use the pipe() function from it-pipe npm module, as used in the chat example available in…
De-J
  • 1
  • 2
0
votes
0 answers

libp2p-rust: How to implement fire-and-forget pattern

Some sub-protocols in my application require sending to concrete peers just a single message. Does libp2p-rust allow to send a message to some PeerId without negotiating a substream? If there is a way to do this with libp2p-rust I would be happy to…