-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: add WebRTC transport #12529
base: master
Are you sure you want to change the base?
feat: add WebRTC transport #12529
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
by analogue with `id_keys`. See paritytech/substrate#12529 (comment) Both peer's identity and certificate will need to be stored somewhere (disk) and reused across restarts. Since this is a dominant use-case, I've switched `Config` API to accept a certificate and opted out of generating one completely.
391f122
to
ca39f65
Compare
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.
It's still unclear to me what to do w.r.t. the bandwidth
Everything would be way easier if webrtc-rs simply kept track of how many bytes have been sent and received in total, which would let us calculate the bandwidth, it really doesn't seem like a difficult change to me
33c615a
to
c4b3dcc
Compare
sorry had to force push to do #12529 (comment) |
c4b3dcc
to
43ed99e
Compare
It doesn't matter now, but you didn't have to do that. We squash commits anyway, so whether you're based on top of another branch doesn't matter. The point was just to merge this in two times: first the libp2p changes, then the WebRTC changes. This way, we can easily bisect in case a bug is introduced. |
well it matters for me because the amount of conflicts reduces dramatically when you rebase 1 commit vs 22 😄 |
Bump |
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/infrastructure-treasury-funding/3507/3 |
The CI pipeline was cancelled due to failure one of the required jobs. |
zombienet test failed again, but with different error this time:
not yet sure what is happening, but it looks like Kademlia does not provide dave with addresses to connect to... |
``` [2023-07-26 09:13:50] error: failed to select a version for `regex`. [2023-07-26 09:13:50] ... required by package `webrtc v0.8.0` [2023-07-26 09:13:50] ... which satisfies dependency `webrtc = "^0.8.0"` of package `libp2p-webrtc v0.6.0-alpha` [2023-07-26 09:13:50] ... which satisfies dependency `libp2p-webrtc = "^0.6.0-alpha"` of package `sc-network v0.10.0-dev (/builds/parity/mirrors/substrate/client/network)` [2023-07-26 09:13:50] ... which satisfies git dependency `sc-network` (locked to 0.10.0-dev) of package `polkadot-availability-distribution v0.9.43 (/builds/parity/mirrors/substrate/companions/polkadot/node/network/availability-distribution)` [2023-07-26 09:13:50] ... which satisfies path dependency `polkadot-availability-distribution` (locked to 0.9.43) of package `polkadot-service v0.9.43 (/builds/parity/mirrors/substrate/companions/polkadot/node/service)` [2023-07-26 09:13:50] ... which satisfies path dependency `service` (locked to 0.9.43) of package `polkadot-cli v0.9.43 (/builds/parity/mirrors/substrate/companions/polkadot/cli)` [2023-07-26 09:13:50] ... which satisfies path dependency `polkadot-cli` (locked to 0.9.43) of package `polkadot v0.9.43 (/builds/parity/mirrors/substrate/companions/polkadot)` [2023-07-26 09:13:50] versions that meet the requirements `^1.7.1` are: 1.9.1, 1.9.0, 1.8.4, 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.3, 1.7.2, 1.7.1 [2023-07-26 09:13:50] [2023-07-26 09:13:50] all possible versions conflict with previously selected packages. [2023-07-26 09:13:50] [2023-07-26 09:13:50] previously selected package `regex v1.6.0` [2023-07-26 09:13:50] ... which satisfies dependency `regex = "^1.1"` (locked to 1.6.0) of package `Inflector v0.11.4` [2023-07-26 09:13:50] ... which satisfies dependency `Inflector = "^0.11.4"` (locked to 0.11.4) of package `frame-benchmarking-cli v4.0.0-dev (/builds/parity/mirrors/substrate/utils/frame/benchmarking-cli)` [2023-07-26 09:13:50] ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `polkadot-cli v0.9.43 (/builds/parity/mirrors/substrate/companions/polkadot/cli)` [2023-07-26 09:13:50] ... which satisfies path dependency `polkadot-cli` (locked to 0.9.43) of package `polkadot v0.9.43 (/builds/parity/mirrors/substrate/companions/polkadot)` [2023-07-26 09:13:50] [2023-07-26 09:13:50] failed to select a version for `regex` which could resolve this conflict ```
Just an idea: are you either calling |
Not sure why Charlie needs 10000 substreams unless there's a bug somewhere. Alice & Bob writing to non-existing streams:
Dave fails to open ~2k substreams due to gone receiver:
|
@melekes are these problems reproducible with just libp2p or is Substrate somehow causing these issues? |
Refs paritytech/smoldot#1712
Impl libp2p/rust-libp2p#2622
polkadot companion: paritytech/polkadot#6529
cumulus companion: paritytech/cumulus#2076
Closes paritytech/polkadot-sdk#547
dev
mode the node will advertise and accept/webrtc
connections;libp2p-identify
0.41.1 (see feat: add WebRTC transport #12529 (comment));base dir. In the future, when a new version of
ring
library is released, the certificate will bedeterministically derived from the node's peer ID.