-
Notifications
You must be signed in to change notification settings - Fork 74
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
Perform the multi-stream connections handshake inside smoldot #2755
Perform the multi-stream connections handshake inside smoldot #2755
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.
Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.
twiggy diff reportDifference in .wasm size before and after this pull request.
|
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.
are you sure this is easier than the old approach + Rust binding called from JS, which performs Noise handshake?
This is definitely easier. The old approach requires going through the JS<->Rust FFI layer, which is kind of complicated. It also requires proper handling of what to do if an exception is thrown by smoldot, which is also super complicated. |
cc #2754
In terms of API, this removes the necessity to pass a
PeerId
when creating a "multi-stream connection". The inner implementation now performs the substream opening and Noise negotiation internally.