Skip to content

feat: add quic transport#3475

Draft
achingbrain wants to merge 2 commits intomainfrom
feat/add-quic-transport
Draft

feat: add quic transport#3475
achingbrain wants to merge 2 commits intomainfrom
feat/add-quic-transport

Conversation

@achingbrain
Copy link
Copy Markdown
Member

@achingbrain achingbrain commented Apr 24, 2026

Adds a QUIC transport based on the upcoming Node.js PR here.

Currently you need to build a custom Node.js binary for the tests to pass using the instructions on the linked PR.

There are lots of @ts-expect-error where types do not align, and TODOs to be resolved before this is ready.

The code is based on the WebTransport and TCP transports, so expect some copy/paster and some options that are unused at the moment. Also a lot of the protections in the TCP transport around stopping accepting new connections are not present. These should really be pushed higher up into libp2p anyway so all transports can benefit from the protections.

Depends on:

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

Adds a QUIC transport based on the upcoming Node.js PR [here](nodejs/node#62876).

Currently you need to build a custom Node.js binary for the tests
to pass using the instructions on the linked PR.
@achingbrain
Copy link
Copy Markdown
Member Author

This has been on my hard drive in various forms since last summer so now that the Node.js PR has all the required features it's time to get it somewhere more visible.


// TODO: have to copy before write otherwise error is thrown:
// TypeError: Provided key doesn't match [[ArrayBufferDetachKey]]
const bytes = data.subarray(0, toWrite).slice()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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