Chat example report Publish error: Publish error: InsufficientPeers
with peers already discovered
#4837
-
Hi all. I'm trying to learn about libp2p by the chat example. I have running the example in two terminals, they can find each other but they will report
I'm confused about why they can discover each other but still shows I'm running on Windows 11, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Do all of these peers join the same topic? Are they added to each others mesh? If you want to dig deeper: rust-libp2p/protocols/gossipsub/src/behaviour.rs Lines 603 to 763 in 7f4ba69 |
Beta Was this translation helpful? Give feedback.
-
Thank you, after making sure the topic and mesh are working in the example (it is mostly copied from the examples folder). I try to play with the code and find the reason it won't work: I have removed the tracing code:
If I add those code, the chat example works as expected. I'm puzzled why would tracing could actually affect how gossipsub works. I assume it should works fine even if I don't invoke tracing but it seems critical in this case. It is designed to must invoke tracing with libp2p? |
Beta Was this translation helpful? Give feedback.
-
I have the same problem. |
Beta Was this translation helpful? Give feedback.
-
Confirmed that the example is currently broken. Fix in #4840. Sorry about that folks! |
Beta Was this translation helpful? Give feedback.
Confirmed that the example is currently broken. Fix in #4840. Sorry about that folks!