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

WebRTC transport for peer-to-peer networking #7

Open
tomaka opened this issue Aug 15, 2022 · 0 comments
Open

WebRTC transport for peer-to-peer networking #7

tomaka opened this issue Aug 15, 2022 · 0 comments

Comments

@tomaka
Copy link

tomaka commented Aug 15, 2022

The Vision

In order for browsers-embedded applications to be able to directly connect to the peer-to-peer network of a chain, there exists three protocols: WebSocket, WebTransport, or WebRTC.

Unfortunately, the first two require the server you connect to to expose a (non-self-signed) TLS certificate. This is ideologically problematic, as we don't want users of our software to have to deal with registering certificates. Browser-embedded applications should have a wide range of accessible peers, and the higher the barrier to making a client accessible, the fewer peers will be accessible.

WebSocket and WebTransport also come with a known security issue w.r.t. to our use case which I would prefer to not disclose publicly in an issue.

For these reasons, we want to use WebRTC. WebRTC has the advantage of existing specifically for peer-to-peer networking, meaning that even if changes are ever made to the WebRTC protocol (such as extra security requirements), we should be able to accommodate them.

The Plan

As a side note, we're currently sponsoring the webrtc-rs library, which is not owned by us but will be used by the Substrate implementation: https://opencollective.com/webrtc-rs

Open Questions

The quality of the webrtc-rs library is unfortunately not the best. Is it wise to enable it by default on all Substrate nodes? A bug in the library could make it possible for an attacker to crash nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Draft
Development

No branches or pull requests

1 participant