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

Advertise additional information with Substrates Libp2p?

Substrate uses libp2p to do peer discovery and transport. Is there functionality to advertise additional information from peers using this layer? Or alternatively, use substrate to advertise information without needing to sink that information to…
0
votes
1 answer

JS-libp2p Tutorial Doc "Error: Cannot find module 'libp2p'"

I wanted to start learning to use libp2p and so started up the tutorial documentation and have hit a problem right away. The Docs: https://docs.libp2p.io/tutorials/getting-started/javascript/ Following along I got to the "Run Libp2p" header. Running…
AustinFoss
  • 385
  • 5
  • 13
0
votes
1 answer

The use of Buffer before saving to IPFS

I am following an IPFS github example to save to IPFS: 'use strict' const IPFS = require('ipfs') const all = require('it-all') async function main () { const node = await IPFS.create() const version = await node.version() …
user938363
  • 9,990
  • 38
  • 137
  • 303
0
votes
1 answer

Can IPFS app hide the CID when presenting content to requester?

Assume there is a IPFS app serving as a middleman to retrieve a content from IPFS network and present it to the requester. When the IPFS app receive an request (with no CID), then it finds the CID according to the request, retrieve with the CID and…
user938363
  • 9,990
  • 38
  • 137
  • 303
0
votes
0 answers

Some questions about start a new stream in libp2p host

First question is: When a host try to start a new stream to a remote with some streamhandler in libp2p, it seems the remote peer would automatically start a goroutine to handle this stream, while the local peer need to manually start this handler.…
zcsama
  • 1
0
votes
1 answer

How to send data to multiple hosts using golang libp2p streams?

my question refers to the libp2p library in golang: https://github.com/libp2p/go-libp2p This video explains the background: https://www.youtube.com/watch?v=hP0hSZ7E7_Y The peers in the network communicate via buffered streams rw. For each new…
Chris
  • 45
  • 8
0
votes
1 answer

How can I get a PeerInfo from a Host?

I'm trying to get a PeerInfo from a libp2p.Host instance. I'm able to get a list of multiaddr.Multiaddrs by calling Host.Addrs(), but I'm unable to convert these into a valid peerstore.PeerInfo. Here is my attempt, which panics with the error…
Louis Thibault
  • 20,240
  • 25
  • 83
  • 152
0
votes
1 answer

How can I get a libp2p rendezvous server running?

I'm trying to get a libp2p rendezvous server working. Has anybody been able to do this here? I would love some help. I installed the docker version, as they suggest: docker pull libp2p/websocket-star-rendezvous:release docker run -d -p 9090:9090…
user142951
-2
votes
0 answers

i am using the libp2p-kad in rust ,how to implement it?

pub async fn creat_kademlia_network() -> Result<(), Box> { let local_key = identity::Keypair::generate_ed25519(); let public_key = local_key.public(); let local_peer_id = PeerId::from_public_key(&public_key); let mut…
Hakeen
  • 1
-2
votes
2 answers

Bugs when running the example of go-libp2p-http

The problem lies in go func. The error message is expression in go must be function call listener, _ := gostream.Listen(host1, p2phttp.DefaultP2PProtocol) defer listener.Close() go func() { http.HandleFunc("/hello", func(w…
kou
  • 31
  • 3
-2
votes
2 answers

Can i return a generic struct from function?

Sorry if the answer to the following is straight forward but i can't seem to understand it. I need to create a swarm and return the swarm to the main function but i don't know how to return a generic struct such as the 'P2p' struct. Traits are used…
21Akame03
  • 11
  • 3
1 2 3 4
5