-
Notifications
You must be signed in to change notification settings - Fork 974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gossipsub peer sharing #2391
Comments
Thanks for the detailed issue @Frederik-Baetens. Are you calling |
I'm constructing my config as follows:
So i think it should be enabled, since it says that it's enabled by default in the docs. I tried adding .do_px() explicitly to the configbuilder, but that doesn't seem to make a difference. Should I do something for peer exchange when calling the eventloop/handling gossipsub events? |
I've pushed an update to my example repository with the explicit do_px(). It still doesn't seem to work. I made a small recording of what happens: screencast.mp4 |
Yes. Sorry this was not documented well. Gossipsub currently does not support peer exchange because rust-libp2p did not support signed peer records. I've not been up to date with the current state of the peer records, but we will add this feature when we can. |
Please see this for more details: #2397 |
We have peer records now! They were added as part of the rendezvous protocol! See: https://github.com/libp2p/rust-libp2p/blob/master/core/src/peer_record.rs |
So should this feature work? Does do_px actually do anything? |
Unfortunately it does not, thus for now you need to rely on a different discovery mechanism (e.g. Tracked here #2398. Contributions are welcome, right @AgeManning? |
Absolutely. If you dont want to build this yourself. We will get to it, its just going to take some time, pretty flat out at the moment :). |
I'm trying to build a system where nodes connect to a set of known nodes to join the gossipsub network.
However, it seems like these peers don't reach out to eachother after establishing a connection to the known nodes.
Is there any way to get some sort of peer sharing & automatic connection handling?
I saw this pr and it mentions peer eXchange being held up by an addition to the spec which has been merged for a while now, but i'm not sure if that spec has been implemented yet.
An example of what i'm trying to do (adapted from the libp2p examples): https://github.com/Frederik-Baetens/libp2p-tokiochat
It allows starting the first node with
cargo run
. The following nodes are then connected withcargo run -- *multiaddr of first node*
I'd like the additional nodes to find eachother, and for the chat application to keep working after the first node has been shut down. Currently I get an insufficientpeers error after the original node gets shut down.
Am I supposed to implement this functionality myself based on things like https://docs.rs/libp2p/latest/libp2p/core/struct.Network.html#method.connected_peers ? Or could this be made to work of the box?
Older issue about this: #1559
The text was updated successfully, but these errors were encountered: