Skip to content

ci: Add CI step for webrtc compatibility with libp2p-go#628

Merged
lexnv merged 5 commits into
masterfrom
lexnv/ci-webrtc
Jul 2, 2026
Merged

ci: Add CI step for webrtc compatibility with libp2p-go#628
lexnv merged 5 commits into
masterfrom
lexnv/ci-webrtc

Conversation

@lexnv

@lexnv lexnv commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

This PR adds a new CI step to check the compatibility of webrtc implementation with libp2p-go client from litep2p-perf: https://github.com/lexnv/litep2p-perf.

The CI step:

  • clones the repo and replaces litep2p dependency to github PR one
  • spawn the webrtc litep2p server
  • extract the certhash from the running logs
  • tests connectivity, substream code paths, and compatibility with the libp2p-go client

lexnv added 3 commits June 30, 2026 10:24
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 requested a review from a team June 30, 2026 10:59
Comment thread .github/workflows/ci.yml Outdated
}
trap cleanup EXIT

# Wait for the server to advertise its /webrtc-direct/certhash address

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if this is necessary, litep2p takes the cert from the outside right? Could we generate a known certificate and have it being known? Then we would not need to parse the hash here. But only a nit, can be follow up or accept status-quo

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep makes sense, the certhash and peerID are already statically generated from the --node-secret 🙏 Have updated thanks!

@lexnv
lexnv merged commit 938e03b into master Jul 2, 2026
11 checks passed
@lexnv
lexnv deleted the lexnv/ci-webrtc branch July 2, 2026 10:39

@lrubasze lrubasze left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

PR already merged, but left some minor comments anyway.

Comment thread .github/workflows/ci.yml
env:
# Performance harness that contains the litep2p server and go-libp2p client.
PERF_REPO: https://github.com/lexnv/litep2p-perf
PERF_REF: master

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should we pin some revision here to not break this CI in case master breaks?

Comment thread .github/workflows/ci.yml
# Drive the server with the go-libp2p client. A non-zero exit (failed
# dial, handshake, or transfer) propagates through `tee` via pipefail
# and fails this step. The client log is streamed live and saved.
( cd libp2p-go && go mod download && timeout 120 go run . \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor.
Not sure how long does it take to build libp2p-go.
But maybe we could build it outside this 120s timeout and use the timeout purely for running the client?

Comment thread .github/workflows/ci.yml
# server-listenable transport as `/webrtc-direct` (multiaddr code 280).
SERVER_LISTEN_ADDR: /ip4/127.0.0.1/udp/33333/webrtc-direct
# Starting the server with `--node-key secret` makes its identity fully
# deterministic. Both vaulues are therefore stable across runs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit. vaulues -> values

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.

4 participants