feat: add base p2p node with relay client #97
Conversation
|
Coverage (base → head): |
| println!("Relay told us our observed address: {}", observed_addr); | ||
| learned_observed_addr = true; | ||
| } | ||
| event => panic!("{event:?}"), |
There was a problem hiding this comment.
During testing, if you run this client, shut it down, and then start again with the same relay we can end up in a panic due to recieving an NewExternalAddrOfPeer message.
Not a blocker since it's testing code but it's worth keeping track of this.
| @@ -0,0 +1,9 @@ | |||
| //! Behaviours. | |||
| #![allow(missing_docs)] // we need to allow missing docs for the derive macro | |||
There was a problem hiding this comment.
nit: In general we can write is as follows:
| #![allow(missing_docs)] // we need to allow missing docs for the derive macro | |
| #![allow(missing_docs, reason = "required for the derive macro")] |
| Self { | ||
| relay: relay_client, | ||
| identify: identify::Behaviour::new(identify::Config::new( | ||
| "/pluto/1.0.0-alpha".into(), |
There was a problem hiding this comment.
The original Go implementation uses "" as the protocol version (ends up being the default).
What actually gets configured is the UserAgent which is set to obolnetwork-charon/<current version>, ex. obolnetwork-charon/v1.7.0-rc. We should set the User agent to something like pluto/v1.0.0-alpha.
| vise.workspace = true | ||
| tokio.workspace = true | ||
| rand.workspace = true | ||
| tempfile.workspace = true |
There was a problem hiding this comment.
We can move this to a dev-dependency since it's only used in tests.
|
Fixes will be applied in a separate PR (#110) |
No description provided.