-
Notifications
You must be signed in to change notification settings - Fork 56
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
Feat p2p #47
Conversation
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.
We need to discuss how we want to propagate connection errors as well as removing the println! macro usage because we cannot assume that all library consumers will have a console at all.
1f77dec
to
8811ac8
Compare
engine/communication/Cargo.toml
Outdated
thiserror = "1.0.21" | ||
serde = { version = "1.0.117", default-features = false, features = ["alloc", "derive"] } | ||
serde_json = { version = "1.0.59", default-features = false, features = ["alloc"] } | ||
riker = "0.4.1" |
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.
Riker 0.4.2 was just published, so this is now out of date. In order to stay 'synced' with the client deps, please drop the patch versions for now. At some point we may return to this, but I am concerned that things stop working in concert if we don't have parity.
engine/communication/Cargo.toml
Outdated
@@ -0,0 +1,29 @@ | |||
[package] | |||
name = "communication" |
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.
name = "communication" | |
name = "stronghold-communication" |
engine/communication/Cargo.toml
Outdated
version = "0.1.0" | ||
authors = ["Elena Frank <elena.frank@iota.org>"] | ||
edition = "2018" | ||
license = "Apache-2.0 OR MIT" |
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.
license = "Apache-2.0 OR MIT" | |
license = "Apache-2.0" |
e11d42d
to
0823734
Compare
communication/examples/local-echo.rs
Outdated
} | ||
|
||
fn handle_input_line(swarm: &mut Swarm<P2PNetworkBehaviour<Request, Response>>, line: String) { | ||
if let Some(peer_id) = Regex::new("PING\\s+\"(\\w+)\"") |
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.
Little verbose on the if branches. Would be better if you put most of the internal logic into the body of the if checks so that it doesn't have to execute it every time.
Description of change
Enable communication between peers by using rust-libp2p and a mailbox concept for peers that can not communicate directly.
Type of change
Change checklist