Comments (2)
@stefanhans So everyone trying this code by default are using meet me here
as the rendezvousString
.
So every time you run this code a new peer is started and it will announce itself (using Provide
) to the bootstrap node with rendezvous point meet me here
. But what happens once you disconnect?
Your address is still registered in the bootstrap node at that rendezvous point (till the time it expires and dht is forced to remove it) and anyone looking for new peers to connect (using FindProviders
) will get your address. Now bootstrap peers don't know if these address or peers are still alive. Now, when you try to connect to them you get dial attempt failed:
error.
Now, this is not your peers fault instead it's the bootstrap peer giving you dead peers. I don't think libp2p has any method which lets you remove peers from the bootstrap peer's list. It should be the bootstrap peer who should ping a remote node just to check if it is alive or dead and act accordingly. RFC: rendezvous is a more sophisticated rendezvous protocol which is better than the existing dht hack.
You might also notice that if you run a peer (let's say A) and announce yourself to the dht and now start another peer (say B) which queries the bootstrap peer for new addresses. All peers received by peer B are dead and none of the address corresponds to peer A. This happens because bootstrap peer returns a random subset of the peers registered with it.
So, it would be better to not use meet me here
instead use something unique and start two peers with the same rendezvousString
. For meet me here
to work you need more number of alive peers than the dead ones.
from go-libp2p-examples.
Hi @upperwal,
sounds reasonable 😀 thx
I ended up with using a UUID as rendezvous string. Still not always getting all peers connected in the prototype of mine.
Maybe SWIM(++) protocol from Hashicorp is worth a try.
Cheers, Stefan
from go-libp2p-examples.
Related Issues (20)
- pubsub\chat example - Can't see others clients messages HOT 1
- Relay Example error HOT 2
- pubsub chat example datarace
- how to init RendezvousString in chat-with-rendezvous? HOT 2
- How do I keep nodeID unchanged every time I start it HOT 4
- Does libP2P support authentication? HOT 1
- How can i make other peers persist when another peer disconnects HOT 2
- An Error in Echo client/server with libp2p
- Dependencies out of date
- Automated testing
- How can I help PRs get merged? HOT 2
- chat-with-rendezvous doesn't work: dht failed to query self during routing table refresh HOT 3
- Add Example on configuring and using AutoRelay
- Add example to show how to configure AutoNAT client and how it discovers reachability
- go-libp2p-autonat-svc deprecated
- libp2p-host example missing _peer import
- Should I openStream every time like multipro did
- Errors with simple libp2p HOT 1
- routed-echo example: invalid character '-' after top-level value
- Modifying http_proxy/proxy.go to make the remote proxy to act as an egress gateway to connect to a non-p2p real server. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-libp2p-examples.