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

Add support for QUIC #1459

Open
Tracked by #1461
p-shahi opened this issue Oct 20, 2022 · 4 comments
Open
Tracked by #1461

Add support for QUIC #1459

p-shahi opened this issue Oct 20, 2022 · 4 comments
Labels
kind/architecture Core architecture of project status/blocked Unable to be worked further until needs are met

Comments

@p-shahi
Copy link
Member

p-shahi commented Oct 20, 2022

@p-shahi p-shahi added the kind/architecture Core architecture of project label Oct 20, 2022
@mpetrunic mpetrunic added the status/blocked Unable to be worked further until needs are met label Nov 15, 2022
@nikelborm
Copy link

Hi, @p-shahi!

notion link for more reliable with UDP (therefore QUIC) is inaccessible

Could you please update it?

@SgtPooki
Copy link
Member

JS colo 2024 rough discussion
  • Cayman is doing this work and a part of this colo..

  • all i'm doing for this is QUIC transport

  • nodejs quic PRs are all focused on Webtransport as the exposed interface, which means js-libp2p can't really benefit from it for the QUIC transport. So we need this work completed.

  • pinged Prithvi on slack to update notion link

Work for this is being done at https://github.com/ChainSafe/js-libp2p-quic

Update:

  • rough functionality is there.
  • the only annoying thing is dealing with stream read/writes.
  • seemingly a bug in napi-rs?? instead of doing things an easy way, harder ways of doing them, working around this. Point of friction
    • need to create smaller reproducible example for "potential bug"
  • more testing is needed
  • it's passing transport compliance tests
  • CI for releasing/publishing with napi-rs might need finagling.

What's next?

  • more tests
  • implementing into libp2p benchmarks? examples? playing around with it more?
  • polishing, adding docs.
  • add release CI to automatically publish
  • Start webtransport listener?

@p-shahi
Copy link
Member Author

p-shahi commented Sep 25, 2024

@nikelborm The latest link for the hole punching measurement is here: https://github.com/probe-lab/network-measurements/blob/main/results/rfm15-nat-hole-punching.md#final-report-nat-hole-punching-measurement-campaign

and the final report actually shows: "In this NAT hole punching measurement campaign, we found that the success rate of hole punching is approximately 70%. Moreover, we discovered that the success of hole punching does not depend on the round trip time, and QUIC/UDP is not more likely to succeed than TCP"
https://github.com/probe-lab/network-measurements/blob/main/results/rfm15-nat-hole-punching.md#conclusion-1

@2color
Copy link
Contributor

2color commented Sep 26, 2024

Thanks for sharing @p-shahi! That's very helpful

I guess the insight regarding why is from this section

While the hole punch success rates for TCP and QUIC are roughly the same, we see a completely different picture when both clients are allowed to use both transports for hole punching. In that case, we end up with a QUIC connection in almost 81% of the cases. We can explain this with generally faster connection establishment of QUIC connections. libp2p tries to hole punch using both transports at the same time, so both connection attempts race against each other. As soon as one connection succeeds, libp2p closes the remaining in-flight ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/architecture Core architecture of project status/blocked Unable to be worked further until needs are met
Projects
Status: 🧱Blocked
Development

No branches or pull requests

5 participants