Skip to content

libp2p-go: Add support for WebRTC testing using libp2p-go#4

Open
lexnv wants to merge 7 commits into
masterfrom
lexnv/add-libp2p-go
Open

libp2p-go: Add support for WebRTC testing using libp2p-go#4
lexnv wants to merge 7 commits into
masterfrom
lexnv/add-libp2p-go

Conversation

@lexnv
Copy link
Copy Markdown
Owner

@lexnv lexnv commented May 25, 2026

This PR adds a libp2p-go equivalent of the litep2p-perf protocol.

This will allow us to stress-test our substreams and serve as a compatibility check to ensure our implementation remains compliant with the WebRTC spec

Testing Done

Running at the moment with lexnv/add-libp2p-go which includes:

Litep2p

RUST_LOG=info cargo run -p litep2p-perf --release -- server \
   --listen-address "/ip4/127.0.0.1/udp/33333/webrtc-direct" \
   --node-key "secret" \
   --transport-layer webrtc
   
2026-05-25T10:42:30.319671Z  INFO litep2p_perf: Event: ConnectionEstablished { peer: PeerId("12D3KooWK5cpS16bj7VQQXzS5xWYyGhUvt6mKSqm7tvL39WPYYQe"), endpoint: Listener { address: /ip4/127.0.0.1/udp/48086/webrtc-direct/certhash/uEiCVH9ycEm6Nl-l04x3WfPLmcyWfIDqscnuQzVYQbQLe3w/p2p/12D3KooWK5cpS16bj7VQQXzS5xWYyGhUvt6mKSqm7tvL39WPYYQe, connection_id: ConnectionId(0) } }
2026-05-25T10:42:30.319936Z  WARN str0m: Drop BufferedAmountLow for id: 0
2026-05-25T10:42:30.322256Z  WARN str0m: Drop ChannelData event for id: 2
2026-05-25T10:42:30.322269Z  WARN str0m: Drop ChannelData event for id: 2

2026-05-25T10:42:35.323384Z  INFO litep2p_perf: Event: ConnectionClosed { peer: PeerId("12D3KooWK5cpS16bj7VQQXzS5xWYyGhUvt6mKSqm7tvL39WPYYQe"), connection_id: ConnectionId(0) }
2026-05-25T10:42:35.323501Z  INFO litep2p-perf: connection closed peer=PeerId("12D3KooWK5cpS16bj7VQQXzS5xWYyGhUvt6mKSqm7tvL39WPYYQe")

Libp2p-go

cd libp2p-go 
  go mod tidy
  go run . \
        --server-address "/ip4/127.0.0.1/udp/33333/webrtc-direct/certhash/uEiCnBkZwj-Y-JhhThrKDhDuQxwPOy_3vWsCfavSDha4Ccg/p2p/12D3KooWBpZHDZu7YSbvPaPXKhkRNJvR7MkTJMQQAVBKx9mCqz3q" \
        --upload-bytes 1048576 \
        --download-bytes 1048576
        
        
2026/05/25 10:42:39 local peer id: 12D3KooWDKuqsVg7jpgWErHDrZayuUCys5U5eCtrLMcuawccmVJL
2026/05/25 10:42:39 dialing /ip4/127.0.0.1/udp/33333/webrtc-direct/certhash/uEiCnBkZwj-Y-JhhThrKDhDuQxwPOy_3vWsCfavSDha4Ccg/p2p/12D3KooWBpZHDZu7YSbvPaPXKhkRNJvR7MkTJMQQAVBKx9mCqz3q
2026/05/25 10:42:39 connected to 12D3KooWBpZHDZu7YSbvPaPXKhkRNJvR7MkTJMQQAVBKx9mCqz3q
2026/05/25 10:42:39 Uploaded 1.00 MiB in 0.0465s bandwidth 171.92 Mbit/s
2026/05/25 10:42:39 Downloaded 1.00 MiB in 0.0215s bandwidth 372.63 Mbit/s

lexnv added 6 commits May 20, 2026 15:21
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv self-assigned this May 25, 2026
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
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.

1 participant