Skip to content
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

sbd integration into tx5 #91

Merged
merged 22 commits into from
May 13, 2024
Merged

sbd integration into tx5 #91

merged 22 commits into from
May 13, 2024

Conversation

neonphog
Copy link
Collaborator

@neonphog neonphog commented Apr 29, 2024

DEPENDS ON: holochain/sbd#1
RESOLVES: holochain/sbd#17

  • deletes tx5-signal-srv - we will now be using sbd-server
  • updates tx5-signal to be a thin wrapper around sbd-e2e-crypto-client
  • adds crate tx5-connection which manages connections initially talking over the signal connection (and a placeholder to eventually upgrade to webrtc connections to be added in a follow-on PR)
  • updates tx5 endpoint to work with tx5-connection-s

@neonphog neonphog changed the title [NO MERGE: DEPENDENCY] sbd integration into tx5 sbd integration into tx5 May 7, 2024
@neonphog neonphog marked this pull request as ready for review May 7, 2024 21:57
Comment on lines +142 to +155
ConnCmd::SigRecv(sig) => {
use tx5_signal::SignalMessage::*;
#[allow(clippy::single_match)] // placeholder
match sig {
// invalid
HandshakeReq(_) | HandshakeRes(_) => break,
Message(msg) => {
if msg_send.send(msg).await.is_err() {
break;
}
}
_ => (),
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the webrtc placeholder. Currently we're just dealing with the Message type, but eventually we'll pay attention to offers/answers/ice and try to establish a webrtc connection, switching to it if it is successful.

stats::Stats {
backend,
peer_url_list: self.get_listening_addresses(),
connection_list: Vec::new(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this just returns an empty array for now. I'll flesh out the stats once we have the webrtc connections working.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just not useful on this repo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly. The volume isn't high enough to warrant it, and it doesn't have the permanent label... if we ever need it, we can port the one from holochain over here.

Copy link
Member

@ThetaSinner ThetaSinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is large as advertised. I think I'm following most of the changes and they make sense! I'm calling this a 'high level' approval where I think the structure of the changes and the code looks good. If there are logic errors in loops or task management etc then I'm probably not going to catch it in this much code :)

@@ -15,7 +15,7 @@ resolver = "2"
[workspace.dependencies]
app_dirs2 = "2.5.5"
backtrace = "0.3.69"
base64 = "0.13.0"
base64 = "0.22.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

@neonphog neonphog merged commit 469b098 into main May 13, 2024
7 checks passed
@neonphog neonphog deleted the sbd branch May 13, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tx5: Tx5 uses sbd client with e2e encryption instead of previous signal client
2 participants