-
Notifications
You must be signed in to change notification settings - Fork 33
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
Rust server #3
Rust server #3
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this happening. Thanks for the work!
In case you are still facing the connection issues, would you mind posting the log output with RUST_LOG=debug
here?
(Run RUST_LOG=debug cargo run xxx
instead of just cargo run xxx
.)
rust-server/src/main.rs
Outdated
// Set a custom gossipsub configuration | ||
let gossipsub_config = gossipsub::ConfigBuilder::default() | ||
.heartbeat_interval(Duration::from_secs(10)) // This is set to aid debugging by not cluttering the log space | ||
.validation_mode(gossipsub::ValidationMode::Strict) // This sets the kind of message validation. The default is Strict (enforce message signing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider not being strict. Just in case the JS implementation does not sign messages by default. If I am not mistaken, we are in a trusted setup here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, changed to permissive
Co-authored-by: Max Inden <[email protected]>
Seeing the following logs when connecting from the browser with the following multiaddr:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @2color I missed that env_logger
wasn't in place yet. Mind running this again and posting the logs?
Co-authored-by: Max Inden <[email protected]>
Here are the logs when trying to connect the UI to the daemon:
|
The Rust server tries to send a ping to the remote:
But the remote seems to never reply:
Over time,
What does the remote peer log? Does it actively ignore the incoming ping streams? For testing purposes you can set |
@mxinden I see the ping running ok
|
The real issue is this. When I enable the following topic subscription
I get the following and a closed connection. It looks like the mesh is low, and needs at least 5. I'll try to update the setting
|
…ges from rust-server
I found the issue for the missing subscribe from the rust-libp2p server to the js-libp2p (or any other) client. Sparsely documented in libp2p/rust-libp2p#3690 for now. Will follow up with more details and push a patch here. Great job everyone surfacing this issue! |
Depend on latest commits on libp2p/rust-libp2p#3625 more specifically libp2p/rust-libp2p@b572895 resolving the missing SUBSCRIBE message previously not send by a rust-libp2p server. Additional refactorings: - Use clap to parse command line arguments. Among other things gives us nice help text and better error messages. - Depend on `libp2p-webrtc` directly as we will remove the re-export from `libp2p`. - Use `futures-timer` to send `Hello World` on a 2 second interval instead of on each `SwarmEvent`. - Redo logging on various levels (warn, info, debug).
Fix for the missing SUBSCRIBE will be added with #6. |
Fix missing SUBSCRIBE and refactor
Add Rust server that does the following:
universal-connectivity
topicTODO