profile
viewpoint
James M Snell jasnell @nearform Clovis, California http://jasnell.me One who writes code. #notmypresident

jasnell/activitystrea.ms 140

Activity Streams 2.0 for Node.js (this package is not actively maintained, if you'd like to help, let me know)

Fishrock123/bob 61

🚰 binary data "streams+" via data producers, data consumers, and pull flow.

davidmarkclements/proffer 11

Realtime V8 Tick Profiler

jasnell/activitystreams 5

Activity Streams 2.0 Java Reference Implementation

jasnell/activitystreams.jsonld 5

http://asjsonld.mybluemix.net

jasnell/as2-schema 4

activitystrea.ms schema.org extensions

addaleax/node 3

Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:

push eventjasnell/node

James M Snell

commit sha 7799cc0bc58cdad375acf9ad330dac68c0d07a85

src: improve handling of internal field counting Change suggested by bnoordhuis. Improve handing of internal field counting by using enums. Helps protect against future possible breakage if field indexes are ever changed or added to.

view details

James M Snell

commit sha 61221e9dc836dab0c2537dc3537f1e11f8e1c6de

[Squash] nits

view details

James M Snell

commit sha ec851dc89cee2dde93afc775f7adb15f98492b40

[Squash] nits

view details

push time in 17 minutes

push eventjasnell/node

James M Snell

commit sha 39f07a23461c23beca7427bb8fe12bd289335d90

[Squash] nits

view details

push time in 18 minutes

Pull request review commentnodejs/node

src: revamp internal field count tracking

 using node_ares_task_list =  class ChannelWrap : public AsyncWrap {  public:+  enum InternalFields { kCount = AsyncWrap::InternalFields::kCount };

Yeah, I was going back and forth on these also. Going off @bnoordhuis' original concern -- that if any of these field counts change it could cause weird breakage -- then it might be better to be more precise here, but then again, the additional enums are certainly unnecessary. I'll drop them :-)

jasnell

comment created time in 30 minutes

push eventjasnell/node

James M Snell

commit sha ab32ac0badd530fa3f3de30e512ce6123cb41adb

[Squash] nits

view details

push time in 32 minutes

Pull request review commentnodejs/node

src: revamp internal field count tracking

 void AsyncWrap::EmitAfter(Environment* env, double async_id) {  class PromiseWrap : public AsyncWrap {  public:+  enum InternalFields {+    kIsChainedPromiseField = AsyncWrap::InternalFields::kCount,

You can skip the ::InternalFields everywhere, right?

Yeah, and I go back and forth on it. I tend to prefer being extra precise here but have no problem removing it.

(I’d also rename kCount → kInternalFieldCount)

👍

jasnell

comment created time in an hour

push eventjasnell/node

James M Snell

commit sha 744a2ce86d836b5f7ac0c3ffbc2af7ca77c24877

[Squash] address feedback

view details

push time in an hour

Pull request review commentnodejs/node

dgram: make UDPWrap more reusable

 void UDPWrap::Initialize(Local<Object> target,   Environment* env = Environment::GetCurrent(context);    Local<FunctionTemplate> t = env->NewFunctionTemplate(New);-  t->InstanceTemplate()->SetInternalFieldCount(1);+  t->InstanceTemplate()->SetInternalFieldCount(kUDPWrapBaseField + 1);

Other PR: https://github.com/nodejs/node/pull/31960

If that one lands first, I'll update this one, if this one lands first, I'll update that one

jasnell

comment created time in an hour

PR opened nodejs/node

src: revamp internal field count tracking

Improved handling of internal field counts.

In a separate PR, it would likely be good to switch to use of utility functions that include DCHECKs for the InternalFieldCount().

/cc @bnoordhuis @addaleax

Checklist
  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines
+206 -91

0 comment

56 changed files

pr created time in an hour

create barnchjasnell/node

branch : revamp-internal-field-count-tracking

created branch time in an hour

push eventjasnell/node

Harshitha KP

commit sha 2d3717ad847665de333c85e5239ad4e6a4c0eb95

worker: emit runtime error on loop creation failure Instead of hard asserting throw a runtime error, that is more consumable. Fixes: https://github.com/nodejs/node/issues/31614 PR-URL: https://github.com/nodejs/node/pull/31621 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Rich Trott

commit sha 1c4e984ed970612f129db2ba6f684311418ed3a2

test: remove common.PORT from test-net-write-callbacks.js Switch test-net-write-callbacks.js from common.PORT to a port assigned by the operating system. PR-URL: https://github.com/nodejs/node/pull/31839 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>

view details

Rich Trott

commit sha cdac18519fd14df9ece958cf8e29b846f512656e

test: remove flaky designation for test-net-connect-options-port Closes: https://github.com/nodejs/node/issues/23207 PR-URL: https://github.com/nodejs/node/pull/31841 Fixes: https://github.com/nodejs/node/issues/23207 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

Rich Trott

commit sha 82afd85a31ab7c8f931f0bb0b23e76570aceb46d

tools: update lint-md task to lint for possessives of Node.js Add a markdown lint rule to prohibit "Node.js'" and "Node.js's". Instead, of "Node.js' module system", use "the Node.js module system". Refs: https://github.com/nodejs/node/pull/31748#issuecomment-585087745 PR-URL: https://github.com/nodejs/node/pull/31862 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Shelley Vohr

commit sha ae41049a760d55b5dcc20e137a7454e7c70415c4

doc: add note about ssh key to releases PR-URL: https://github.com/nodejs/node/pull/31856 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Michaël Zasso

commit sha cf0096104752607c7374a7f7297139e60b03c59d

tools: sync gyp code base with node-gyp repo PR-URL: https://github.com/nodejs/node/pull/30563 Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Rich Trott

commit sha 2f97e973ff540d2ae7de77482c631c06cc99c313

meta: move julianduque to emeritus julianduque confirmed in email that they can be moved to emeritus. PR-URL: https://github.com/nodejs/node/pull/31863 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Vse Mozhet Byt

commit sha 2f23918ca5090417ad0e06be6ecce63553f17985

doc: update stream.pipeline() signature The `...transforms` parameter is optional. Refs: https://github.com/nodejs/node/blob/0875837417/lib/internal/streams/pipeline.js#L130-L132 Refs: https://github.com/nodejs/node/blob/e559842188/doc/api/stream.md#streams-compatibility-with-async-generators-and-async-iterators PR-URL: https://github.com/nodejs/node/pull/31789 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Robert Nagy

commit sha 21bd6679ce150e193cacd4b1b6585928224f255a

stream: fix finished typo https://github.com/nodejs/node/pull/31509 introduced a slight typo. Fortunately this typo does not have big impact due to `isWritableFinished()`. Fixes: https://github.com/nodejs/node/pull/31509#discussion_r381809355 PR-URL: https://github.com/nodejs/node/pull/31881 Fixes: https://github.com/nodejs/node/issues/31509 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Tobias Nießen

commit sha 0e63a079e8f535e1d4f0398400c534b0b5772fa5

crypto: fix ieee-p1363 for createVerify Fixes: https://github.com/nodejs/node/issues/31866 PR-URL: https://github.com/nodejs/node/pull/31876 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Tobias Nießen

commit sha fa1fc6bf9f257f7365454dc7a28bb4cd4385919f

doc: fix anchor for ERR_TLS_INVALID_CONTEXT PR-URL: https://github.com/nodejs/node/pull/31915 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

simon

commit sha 341c06f0889e5295d7a7a34c3e38296bd2c4ac18

tls: expose SSL_export_keying_material Fixes: https://github.com/nodejs/node/issues/31802 PR-URL: https://github.com/nodejs/node/pull/31814 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

Ben Noordhuis

commit sha 793cfe54cd26e0eb881eec895df41da62a3049ed

doc,crypto: re-document oaepLabel option Erroneously removed in https://github.com/nodejs/node/pull/29516. Fixes: https://github.com/nodejs/node/issues/31810 Refs: https://github.com/nodejs/node/pull/29516 PR-URL: https://github.com/nodejs/node/pull/31825 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

Rich Trott

commit sha 97c8abe2c0df261aacadd5abd9cabfbeef2d5d61

test: remove common.PORT from assorted pummel tests Use port "0" for an OS-provided open port instead of common.PORT. PR-URL: https://github.com/nodejs/node/pull/31897 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>

view details

Shelley Vohr

commit sha 72b6cea25d4e43b2db63eeb32417088c5bd93307

cli: --perf-prof only works on Linux PR-URL: https://github.com/nodejs/node/pull/31892 Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

view details

vdeturckheim

commit sha 9c702922cdcf830cedb92d51e5dc9f956584c3ee

async_hooks: introduce async-context API Adding AsyncLocalStorage class to async_hooks module. This API provide a simple CLS-like set of features. Co-authored-by: Andrey Pechkurov <apechkurov@gmail.com> PR-URL: https://github.com/nodejs/node/pull/26540 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>

view details

Robert Nagy

commit sha db28739aed31b2ad6e85c497e3a836a29d13021c

stream: fix broken pipeline error propagation If the destination was an async function any error thrown from that function would be swallowed. PR-URL: https://github.com/nodejs/node/pull/31835 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>

view details

Eric Eastwood

commit sha be2f3a3bf88fd728799d1917f7d82428f53183f0

doc: update assert.rejects() docs with a validation function example Spawned from my own struggle to use in https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1702#note_268452483 PR-URL: https://github.com/nodejs/node/pull/31271 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Anna Henningsen

commit sha 2035e3d6cb3071dfbe142f8351cde3d883626a38

src: move BaseObject subclass dtors/ctors out of node_crypto.h Originally landed in the QUIC repo Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. Original review metadata: ``` PR-URL: https://github.com/nodejs/quic/pull/220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: https://github.com/nodejs/node/pull/31872 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

Anna Henningsen

commit sha e68d4c6f5f6086c2816ed6d870e23e824c661f92

src: allow unique_ptrs with custom deleter in memory tracker Originally landed in the QUIC repo Original review metadata: ``` PR-URL: https://github.com/nodejs/quic/pull/145 Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: https://github.com/nodejs/node/pull/31870 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

push time in 5 hours

Pull request review commentnodejs/node

dgram: make UDPWrap more reusable

 void UDPWrap::Initialize(Local<Object> target,   Environment* env = Environment::GetCurrent(context);    Local<FunctionTemplate> t = env->NewFunctionTemplate(New);-  t->InstanceTemplate()->SetInternalFieldCount(1);+  t->InstanceTemplate()->SetInternalFieldCount(kUDPWrapBaseField + 1);

It appears that there are nearly 60 places in src/* where similar break could occur. Your suggested fix is good but likely should be made throughout. I'll open a separate PR for it.

jasnell

comment created time in 5 hours

Pull request review commentnodejs/node

dgram: make UDPWrap more reusable

 void UDPWrap::DoSend(const FunctionCallbackInfo<Value>& args, int family) {     }   } -  uv_buf_t* bufs_ptr = *bufs;-  if (err == 0 && !UNLIKELY(env->options()->test_udp_no_try_send)) {-    err = uv_udp_try_send(&wrap->handle_, bufs_ptr, count, addr);+  if (err == 0) {+    err = wrap->Send(*bufs, count, addr);+  }

Removig the braces but prefer to keep the err = ... on the next line

jasnell

comment created time in 6 hours

Pull request review commentnodejs/node

dgram: make UDPWrap more reusable

 void UDPWrap::Initialize(Local<Object> target,   Environment* env = Environment::GetCurrent(context);    Local<FunctionTemplate> t = env->NewFunctionTemplate(New);-  t->InstanceTemplate()->SetInternalFieldCount(1);+  t->InstanceTemplate()->SetInternalFieldCount(kUDPWrapBaseField + 1);

For now, I'll add a code comment warning folks away from that change along with a CHECK

jasnell

comment created time in 6 hours

pull request commentnodejs/node

feat: make fs.read params optional

The options argument can and should be optional here.

lholmquist

comment created time in 7 hours

issue commentw3c/did-core

IETF did+ld+json media type registration

Fwiw, I'd be very much in favor of an IETF draft that added json/* as a new top level media type. e.g. json/ld, json/did, json/did-ld, json/activity, etc ... it would be in line with other top level types like multipart/* and would address a large number of these kinds of issues. But again, that's just me shouting from the sidelines :-)

msporny

comment created time in 9 hours

issue commentnodejs/node

Disable __proto__

I'm not convinced there's anything reasonable we can do at the Node.js level here by default without causing massive backwards compat issues. I wouldn't be opposed to running an experiment tho so see if that's wrong.

mcollina

comment created time in 9 hours

issue commentw3c/did-core

IETF did+ld+json media type registration

ah... always fun to see long standing issues still as yet unresolved ;-) ... This all, of course, brings back up all the issues why the current media-type mechanism is broken in some fundamental ways but none of that would help resolve the more immediate issue here. One approach you could take is simple application/didld+json or application/lddid+json. It's not ideal, but it would work and fits within what IANA would accept. It would mean, of course, that "We should also see if we can convince JSON-LD processor implementers to treat other known media types as JSON-LD" would be required. @rhiaro describes the history of the Activity Streams 2.0 discussions well :-)

msporny

comment created time in 9 hours

pull request commentnodejs/quic

quic: configurable max early data

Getting this closer to supporting 0RTT but just can't seem to get ngtcp2 to actually do it. Giving up for the day and going to try a few other things tomorrow. In the meantime, there's a bunch in this PR that should land and a few more improvements coming.

jasnell

comment created time in a day

push eventjasnell/quic

James M Snell

commit sha 9e65ec90bac597dd3a7a7d690e2e39e798f44b1f

quic: fix startHandshake

view details

push time in a day

push eventjasnell/quic

James M Snell

commit sha 34312bc8e60d2e323c1b9cfeecb3d2cf68a93c63

quic: fix startHandshake

view details

push time in a day

push eventjasnell/quic

James M Snell

commit sha 547876a99e4d55d17a80bbffa4871a03261c9713

quic: hopefully temporary fallback to vfprintf Debug() is asserting when using a va_list

view details

push time in a day

push eventjasnell/quic

James M Snell

commit sha 089071162a4ecc0af493c5d72fbd2685b99a6bb7

[Squash] nits

view details

push time in a day

pull request commentnodejs/node

[WIP] quic: initial experimental quic implementation

Working on some initial benchmarking, thought folks might be interested in this...

I set up two servers, one QUIC and one using TLS/TCP. Both client and server running on my local machine. Client opens the TLS connection, server responds with a simple "hello", after which the client closes the connection.

20 runs each, with cold-start for each, no real time for optimization from v8:

Time to handshake complete was recorded by recording process.hrtime.bigint() immediately before initiating the connect, and recording the delta immediately upon user code being notified that the handshake was complete: image

Time to stream.end() is recorded using the same start time but recording the delta immediately upon the stream.on('end') event emitting on the client: image

This is extremely preliminary but the perf gains with the QUIC implementation are looking to be pretty massive overall.

jasnell

comment created time in a day

pull request commentnodejs/quic

quic: configurable max early data

@addaleax this is ready for review but it does not get 0RTT early data fully functional. All of the mechanism is in place but there are still some timing issues getting in the way. It does make a number of improvements that need to land regardless.

jasnell

comment created time in a day

push eventjasnell/quic

James M Snell

commit sha ccc225b1a13a9bcf0109f5e886ab2c19fed48164

quic: add mechanism for adding app data to tls session ticket QUIC applications need the ability to add application data to the TLS stateless session ticket used for resumption. This adds the basic mechanism.

view details

push time in a day

push eventjasnell/quic

Ouyang Yadong

commit sha b67b41950e6bed7cab0324d53f545ed2ad18fb2a

quic: fix clang build It seems that clang doesn't implicitly convert "unsigned long" into "unsigned long long" for function templates. PR-URL: https://github.com/nodejs/quic/pull/352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha 889d26274c35b4659fc7653b50ef841adf6285f4

Revert "deps: update OpenSSL config" This reverts commit bd611274fb49f0a0f54ba6ba991313ea38e8cb4e. Note: Drop this and the reverted commit on next master squash PR-URL: https://github.com/nodejs/quic/pull/350 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha 42f85dba28cd47f0e8aa2af73df14ea37a2a07dc

Revert "deps: Port BoringSSL QUIC APIs" This reverts commit 1268968e51c18fa02796ee732486f973a9e9fda8. Note: Drop this and the reverted commit on next master squash PR-URL: https://github.com/nodejs/quic/pull/350 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha 49a3b646e68e7e7731bc069ea39733ab7ab1570b

deps: add support for BoringSSL QUIC APIs Sourced from: https://github.com/akamai/openssl/commits/OpenSSL_1_1_1d-quic This is a cherry-pick of 2a4b03a306439307e0b822b17eda3bdabddfbb68 on the master-quic-support2 branch (2019-10-07) Which was a rebase/squash of master-quic-support: * 5aa62ce Add support for more secrets - Todd Short/Todd Short (master-quic-support) * 58e0643 Tweeks to quic_change_cipher_state() - Todd Short/Todd Short * 8169702 Move QUIC code out of tls13_change_cipher_state() - Todd Short/Todd Short * a08cfe6 Correctly disable middlebox compat - Todd Short/Todd Short * 3a9eabf Add OPENSSL_NO_QUIC wrapper - Todd Short/Todd Short * f550eca Add client early traffic secret storage - Todd Short/Todd Short * 1b787ae Quick fix: s2c to c2s for early secret - Todd Short/Todd Short * f97e6a9 Don't process an incomplete message - Todd Short/Todd Short * 81f0ce2 Reset init state in SSL_process_quic_post_handshake() - Todd Short/Todd Short * 5d59cf9 Fix quic_transport constructors/parsers - Todd Short/Todd Short * 5e5f91c Fix INSTALL nit. - Todd Short/Todd Short * bd290ab Fix duplicate word in docs - Todd Short/Todd Short * 699590b fixup! Handle partial handshake messages - Todd Short/Todd Short * a472a8d Handle partial handshake messages - Todd Short/Todd Short * 363cf3d fixup! Use proper secrets for handshake - Todd Short/Todd Short * b03fee6 Use proper secrets for handshake - Todd Short/Todd Short * 2ab1aa0 Move QUIC transport params to encrypted extensions - Todd Short/Todd Short * 0d16af9 Make temp secret names less confusing - Todd Short/Todd Short * abb6f39 New method to get QUIC secret length - Todd Short/Todd Short * 05fdae9 Add support for BoringSSL QUIC APIs - Todd Short/Todd Short This adds a compatible API for BoringSSL's QUIC support, based on the current |draft-ietf-quic-tls|. Based on BoringSSL commit 3c034b2cf386b3131f75520705491871a2e0cafe Based on BoringSSL commit c8e0f90f83b9ec38ea833deb86b5a41360b62b6a Based on BoringSSL commit 3cbb0299a28a8bd0136257251a78b91a96c5eec8 Based on BoringSSL commit cc9d935256539af2d3b7f831abf57c0d685ffd81 Based on BoringSSL commit e6eef1ca16a022e476bbaedffef044597cfc8f4b Based on BoringSSL commit 6f733791148cf8a076bf0e95498235aadbe5926d Based on BoringSSL commit 384d0eaf1930af1ebc47eda751f0c78dfcba1c03 Based on BoringSSL commit a0373182eb5cc7b81d49f434596b473c7801c942 Based on BoringSSL commit b1b76aee3cb43ce11889403c5334283d951ebd37 New method to get QUIC secret length Make temp secret names less confusing Move QUIC transport params to encrypted extensions Use proper secrets for handshake fixup! Use proper secrets for handshake Handle partial handshake messages fixup! Handle partial handshake messages Fix duplicate word in docs Fix INSTALL nit. Fix quic_transport constructors/parsers Reset init state in SSL_process_quic_post_handshake() Don't process an incomplete message Quick fix: s2c to c2s for early secret Add client early traffic secret storage Add OPENSSL_NO_QUIC wrapper Correctly disable middlebox compat Move QUIC code out of tls13_change_cipher_state() Create quic_change_cipher_state() that does the minimal required to generate the QUIC secrets. (e.g. encryption contexts are not initialized). Tweeks to quic_change_cipher_state() Add support for more secrets PR-URL: https://github.com/nodejs/quic/pull/350 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha f7b88724dd40bab660b2a3f60a113410205864b3

deps: update openssl config PR-URL: https://github.com/nodejs/quic/pull/350 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha 505fd051b108a94041eceb3a8f9c17b2a1bbf575

quic: refactor lifecycle and allow for early data Refactor core.js and various lifecycle events for consistency and clarity. Start support for early data (ORTT and 0.5RTT streams). Improve handling of early transport params and session ticket.

view details

James M Snell

commit sha b6f1e679786a84ee933644be09bb43baf23aea43

[WIP] quic: add mechanism for adding app data to tls session ticket QUIC applications need the ability to add application data to the TLS stateless session ticket used for resumption. This adds the basic mechanism.

view details

push time in a day

PR closed nodejs/quic

deps: use akamai's openssl 1.1.1d quic API port

Rather than maintain our own separate port of the BoringSSL QUIC API port to OpenSSL 1.1.1d, make use of the one Akamai has already done: https://github.com/akamai/openssl/commits/OpenSSL_1_1_1d-quic /cc @tmshort

This is a squash of the commits with one change: the changes to tls13secretstest.c are pulled out because that file does not appear in our branch for some reason.

+684 -206

7 comments

162 changed files

jasnell

pr closed time in a day

pull request commentnodejs/quic

deps: use akamai's openssl 1.1.1d quic API port

Landed

jasnell

comment created time in a day

push eventnodejs/quic

James M Snell

commit sha 889d26274c35b4659fc7653b50ef841adf6285f4

Revert "deps: update OpenSSL config" This reverts commit bd611274fb49f0a0f54ba6ba991313ea38e8cb4e. Note: Drop this and the reverted commit on next master squash PR-URL: https://github.com/nodejs/quic/pull/350 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha 42f85dba28cd47f0e8aa2af73df14ea37a2a07dc

Revert "deps: Port BoringSSL QUIC APIs" This reverts commit 1268968e51c18fa02796ee732486f973a9e9fda8. Note: Drop this and the reverted commit on next master squash PR-URL: https://github.com/nodejs/quic/pull/350 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha 49a3b646e68e7e7731bc069ea39733ab7ab1570b

deps: add support for BoringSSL QUIC APIs Sourced from: https://github.com/akamai/openssl/commits/OpenSSL_1_1_1d-quic This is a cherry-pick of 2a4b03a306439307e0b822b17eda3bdabddfbb68 on the master-quic-support2 branch (2019-10-07) Which was a rebase/squash of master-quic-support: * 5aa62ce Add support for more secrets - Todd Short/Todd Short (master-quic-support) * 58e0643 Tweeks to quic_change_cipher_state() - Todd Short/Todd Short * 8169702 Move QUIC code out of tls13_change_cipher_state() - Todd Short/Todd Short * a08cfe6 Correctly disable middlebox compat - Todd Short/Todd Short * 3a9eabf Add OPENSSL_NO_QUIC wrapper - Todd Short/Todd Short * f550eca Add client early traffic secret storage - Todd Short/Todd Short * 1b787ae Quick fix: s2c to c2s for early secret - Todd Short/Todd Short * f97e6a9 Don't process an incomplete message - Todd Short/Todd Short * 81f0ce2 Reset init state in SSL_process_quic_post_handshake() - Todd Short/Todd Short * 5d59cf9 Fix quic_transport constructors/parsers - Todd Short/Todd Short * 5e5f91c Fix INSTALL nit. - Todd Short/Todd Short * bd290ab Fix duplicate word in docs - Todd Short/Todd Short * 699590b fixup! Handle partial handshake messages - Todd Short/Todd Short * a472a8d Handle partial handshake messages - Todd Short/Todd Short * 363cf3d fixup! Use proper secrets for handshake - Todd Short/Todd Short * b03fee6 Use proper secrets for handshake - Todd Short/Todd Short * 2ab1aa0 Move QUIC transport params to encrypted extensions - Todd Short/Todd Short * 0d16af9 Make temp secret names less confusing - Todd Short/Todd Short * abb6f39 New method to get QUIC secret length - Todd Short/Todd Short * 05fdae9 Add support for BoringSSL QUIC APIs - Todd Short/Todd Short This adds a compatible API for BoringSSL's QUIC support, based on the current |draft-ietf-quic-tls|. Based on BoringSSL commit 3c034b2cf386b3131f75520705491871a2e0cafe Based on BoringSSL commit c8e0f90f83b9ec38ea833deb86b5a41360b62b6a Based on BoringSSL commit 3cbb0299a28a8bd0136257251a78b91a96c5eec8 Based on BoringSSL commit cc9d935256539af2d3b7f831abf57c0d685ffd81 Based on BoringSSL commit e6eef1ca16a022e476bbaedffef044597cfc8f4b Based on BoringSSL commit 6f733791148cf8a076bf0e95498235aadbe5926d Based on BoringSSL commit 384d0eaf1930af1ebc47eda751f0c78dfcba1c03 Based on BoringSSL commit a0373182eb5cc7b81d49f434596b473c7801c942 Based on BoringSSL commit b1b76aee3cb43ce11889403c5334283d951ebd37 New method to get QUIC secret length Make temp secret names less confusing Move QUIC transport params to encrypted extensions Use proper secrets for handshake fixup! Use proper secrets for handshake Handle partial handshake messages fixup! Handle partial handshake messages Fix duplicate word in docs Fix INSTALL nit. Fix quic_transport constructors/parsers Reset init state in SSL_process_quic_post_handshake() Don't process an incomplete message Quick fix: s2c to c2s for early secret Add client early traffic secret storage Add OPENSSL_NO_QUIC wrapper Correctly disable middlebox compat Move QUIC code out of tls13_change_cipher_state() Create quic_change_cipher_state() that does the minimal required to generate the QUIC secrets. (e.g. encryption contexts are not initialized). Tweeks to quic_change_cipher_state() Add support for more secrets PR-URL: https://github.com/nodejs/quic/pull/350 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha f7b88724dd40bab660b2a3f60a113410205864b3

deps: update openssl config PR-URL: https://github.com/nodejs/quic/pull/350 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in a day

pull request commentnodejs/quic

deps: use akamai's openssl 1.1.1d quic API port

@sam-github ... also, I will update the docs on keeping the openssl patches up to date in a separate PR as the process may quite likely evolve a bit over the next week or so

jasnell

comment created time in a day

PR closed nodejs/quic

quic: fix clang build

It seems that clang doesn't implicitly convert "unsigned long" into "unsigned long long" for function templates.

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+6 -6

1 comment

2 changed files

oyyd

pr closed time in a day

pull request commentnodejs/quic

quic: fix clang build

Landed

oyyd

comment created time in a day

push eventnodejs/quic

Ouyang Yadong

commit sha b67b41950e6bed7cab0324d53f545ed2ad18fb2a

quic: fix clang build It seems that clang doesn't implicitly convert "unsigned long" into "unsigned long long" for function templates. PR-URL: https://github.com/nodejs/quic/pull/352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in a day

push eventjasnell/specs-1

James M Snell

commit sha c82319808987963f79249ce31b57e1f696179972

draft updates

view details

push time in a day

pull request commentnodejs/node

doc: update zlib doc

Ping @Trott and @addaleax

jasnell

comment created time in a day

PR closed nodejs/node

http: move OutboundMessage.prototype.flush to EOL author ready deprecations http semver-major

API was deprecated long ago. Move to end of life and remove.

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines
+5 -43

10 comments

3 changed files

jasnell

pr closed time in a day

pull request commentnodejs/node

http: move OutboundMessage.prototype.flush to EOL

Landed in d3715c7

jasnell

comment created time in a day

push eventnodejs/node

James M Snell

commit sha d3715c76b5c287d900d28f472da0186322ace811

http: move OutboundMessage.prototype.flush to EOL API was deprecated long ago. Move to end of life and remove. PR-URL: https://github.com/nodejs/node/pull/31164 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

push time in a day

pull request commentnodejs/node

dgram: make UDPWrap more reusable

@addaleax ... given that you wrote the original change here, do you have thoughts on the suggestions from @mscdex and @bnoordhuis ?

jasnell

comment created time in a day

PR closed nodejs/node

src: allow unique_ptrs with custom deleter in memory tracker C++

Authored by @addaleax and originally landed in the QUIC repo. Separating it out from the QUIC PR. This does not have any QUIC specific bits...

Original review metadata:

  PR-URL: https://github.com/nodejs/quic/pull/145
  Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines
+4 -4

2 comments

2 changed files

jasnell

pr closed time in a day

pull request commentnodejs/node

src: allow unique_ptrs with custom deleter in memory tracker

Landed in e68d4c6

jasnell

comment created time in a day

push eventnodejs/node

Anna Henningsen

commit sha e68d4c6f5f6086c2816ed6d870e23e824c661f92

src: allow unique_ptrs with custom deleter in memory tracker Originally landed in the QUIC repo Original review metadata: ``` PR-URL: https://github.com/nodejs/quic/pull/145 Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: https://github.com/nodejs/node/pull/31870 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

push time in a day

PR closed nodejs/node

src: move BaseObject subclass dtors/ctors out of node_crypto.h C++ author ready crypto

Originally landed in the QUIC repo. Separated from from the QUIC PR. There is nothing QUIC specific in this change.

Move constructor and destructors for subclasses of BaseObject from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases.

Original review metadata:

  PR-URL: https://github.com/nodejs/quic/pull/220
  Reviewed-By: Anna Henningsen <anna@addaleax.net>
  Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines
+97 -80

2 comments

2 changed files

jasnell

pr closed time in a day

pull request commentnodejs/node

src: move BaseObject subclass dtors/ctors out of node_crypto.h

Landed in 2035e3d

jasnell

comment created time in a day

push eventnodejs/node

Anna Henningsen

commit sha 2035e3d6cb3071dfbe142f8351cde3d883626a38

src: move BaseObject subclass dtors/ctors out of node_crypto.h Originally landed in the QUIC repo Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. Original review metadata: ``` PR-URL: https://github.com/nodejs/quic/pull/220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: https://github.com/nodejs/node/pull/31872 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

push time in a day

pull request commentmultiformats/specs

Initial IETF drafts

Published the drafts, completely missed adding Jeromy but apparently IETF is restricting the number of authors listed on these docs now so we may want to shorten the list a bit.

  • https://datatracker.ietf.org/doc/draft-snell-multihash/
  • https://datatracker.ietf.org/doc/draft-snell-multicodec/

Btw, These can be updated at any time by any of the listed authors.

jasnell

comment created time in 2 days

push eventjasnell/quic

James M Snell

commit sha a031d926ca7547163fcfd281839faa5e62f4c785

[WIP] quic: add mechanism for adding app data to tls session ticket QUIC applications need the ability to add application data to the TLS stateless session ticket used for resumption. This adds the basic mechanism.

view details

push time in 4 days

push eventjasnell/quic

James M Snell

commit sha b8ef17f4d227505bcfe9ce2d0b7d860a1c7a6b37

quic: refactor lifecycle and allow for early data Refactor core.js and various lifecycle events for consistency and clarity. Start support for early data (ORTT and 0.5RTT streams). Improve handling of early transport params and session ticket.

view details

James M Snell

commit sha 76af15d33ca590b5a523a0c1ac9d87d8276b5e40

quic: add mechanism for adding app data to tls session ticket QUIC applications need the ability to add application data to the TLS stateless session ticket used for resumption. This adds the basic mechanism.

view details

push time in 4 days

push eventjasnell/quic

James M Snell

commit sha e6dec6e3b74813bcfe583e01ab8ef7c3b611077b

quic: remove unused session ID TLS session ID is not used.

view details

push time in 4 days

issue commentnodejs/node

Multiple Identical ExperimentalWarnings

It definitely should only be output to the console once. The process.on('warning') is working as expected. The warning is emitted using process.emitWarning(), which always forwards all warnings to process.on('warning') in addition to the default behavior of printing to the console.

LJNeon

comment created time in 4 days

push eventjasnell/quic

James M Snell

commit sha 303bb54354c0a3e5099e1181b85560fd6ef06472

quic: remove unused session ID TLS session ID is not used.

view details

push time in 4 days

push eventjasnell/quic

James M Snell

commit sha cef9b37909845044a00d4f5b6dd5d02b3166d27f

quic: refactor lifecycle and allow for early data Refactor core.js and various lifecycle events for consistency and clarity. Start support for early data (ORTT and 0.5RTT streams). Improve handling of early transport params and session ticket.

view details

push time in 4 days

Pull request review commentnodejs/node

doc: update os.tmpdir() to discuss symlink results on macOS

 changes: Returns the operating system's default directory for temporary files as a string. +On macOS, the returned path is usually a symlink. To get the resolved path, use

usually? Can we document the conditions where it either is or isn't?

Trott

comment created time in 4 days

Pull request review commentnodejs/node

doc: update os.tmpdir() to discuss symlink results on macOS

 changes: Returns the operating system's default directory for temporary files as a string. +On macOS, the returned path is usually a symlink. To get the resolved path, use+[`fs.realpath()`][] or [`fs.realpathSync()`][].++```js+const tmpdirPath = os.tmpdir();++// For most use cases, it does not matter whether tmpdirPath is a symlink or not+// but if you need it to be a resolved path, use fs.realpath() or
// but if a resolved path is needed , use fs.realpath() or
Trott

comment created time in 4 days

pull request commentnodejs/quic

quic: configurable max early data

Still working through this trying to get 0RTT and 0.5RTT early data to work. The timing is pretty tricky if we want it to have a reasonable developer experience. Right now, there are two issues that I likely won't get to until either this weekend or early next week:

  1. Moving the server side onSessionReady to occur once the client initial handshake has started makes it too late to add listeners that impact the handshake, so adding keylog and OCSP request event handlers aren't called. Need to rework the timing on these a bit.

  2. On the client side, when autoStart is false, the handshake is kicked off by calling write() or end() on the QuicStream. It shouldn't be.

jasnell

comment created time in 4 days

push eventjasnell/quic

James M Snell

commit sha 60420eaaaf8598493c19c13e919bbb6296e0ac97

quic: refactor lifecycle and allow for early data Refactor core.js and various lifecycle events for consistency and clarity. Allow support for early data (ORTT and 0.5RTT streams). Improve handling of early transport params and session ticket.

view details

push time in 4 days

pull request commentnodejs/quic

quic: configurable max early data

Ok, so this turned into a much larger change. In order to properly enable early data, I had to revamp a bunch of the state tracking across the various objects and took the opportunity to also clean things up. Early data is still not full tested but pending QuicStream is much more reliable and clearer now than it was previously. I will be adding a 0RTT test soon

jasnell

comment created time in 4 days

push eventjasnell/quic

James M Snell

commit sha e07d9cda5363ac1edfd9a115ba0b2889716f2d93

quic: refactor lifecycle and allow for early data Refactor core.js and various lifecycle events for consistency and clarity. Allow support for early data (ORTT and 0.5RTT streams). Improve handling of early transport params and session ticket.

view details

push time in 4 days

push eventjasnell/quic

James M Snell

commit sha fae56ccb6064fad731c0292c604956c0062a4368

quic: refactor lifecycle and allow for early data Refactor core.js and various lifecycle events for consistency and clarity. Allow support for early data (ORTT and 0.5RTT streams). Improve handling of early transport params and session ticket.

view details

push time in 4 days

push eventjasnell/quic

James M Snell

commit sha 8a73111c1f4c3885718f55a060695f8f4d70c596

quic: configurable early data Allow early data to be enabled/disabled; ensure that early data reporting is working. Improve handling of early transport params and session ticket. (likely will do more on the transport params and session ticket later)

view details

push time in 5 days

push eventjasnell/quic

James M Snell

commit sha cf3c57de706e51c76004cf26bcfe83ef11841de2

quic: configurable early data Allow early data to be enabled/disabled; ensure that early data reporting is working. Improve handling of early transport params and session ticket. (likely will do more on the transport params and session ticket later)

view details

push time in 5 days

pull request commentnodejs/quic

deps: use akamai's openssl 1.1.1d quic API port

They appear to revert things that have never landed on node's master. Is that a typo?

This is on nodejs/quic, not nodejs/master

jasnell

comment created time in 5 days

PR opened nodejs/quic

quic: configurable max early data

Set a more reasonable default for max early data and provide a configurable option to either disable or modify the max.

+49 -9

0 comment

8 changed files

pr created time in 6 days

create barnchjasnell/quic

branch : max-early-data

created branch time in 6 days

push eventjasnell/quic

James M Snell

commit sha 368e339bbb71375f5a7f5f064084fd396be68189

quic: cleanup options and add highWaterMark/defaultEncoding Allow passing in highWaterMark and defaultEncoding options when creating new `QuicStream` instances using `openStream()` and `pushStream()`, and allow setting the options for all newly received peer-initiated `QuicStream` instances. Additional cleanups and doc nits PR-URL: https://github.com/nodejs/quic/pull/349 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in 6 days

PR closed nodejs/quic

quic: cleanup options and add highWaterMark/defaultEncoding

Allow passing in highWaterMark and defaultEncoding options when creating new QuicStream instances using openStream() and pushStream(), and allow setting the options for all newly received peer-initiated QuicStream instances.

Additional cleanups and doc nits

+364 -105

1 comment

7 changed files

jasnell

pr closed time in 6 days

pull request commentnodejs/quic

quic: cleanup options and add highWaterMark/defaultEncoding

Landed

jasnell

comment created time in 6 days

push eventnodejs/quic

James M Snell

commit sha 368e339bbb71375f5a7f5f064084fd396be68189

quic: cleanup options and add highWaterMark/defaultEncoding Allow passing in highWaterMark and defaultEncoding options when creating new `QuicStream` instances using `openStream()` and `pushStream()`, and allow setting the options for all newly received peer-initiated `QuicStream` instances. Additional cleanups and doc nits PR-URL: https://github.com/nodejs/quic/pull/349 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in 6 days

pull request commentnodejs/quic

deps: use akamai's openssl 1.1.1d quic API port

When this lands in master later today I will be rebasing the original openssl port and reverts out of master.

jasnell

comment created time in 6 days

pull request commentnodejs/quic

deps: use akamai's openssl 1.1.1d quic API port

Fantastic, let me know if there's anyway I can help.

jasnell

comment created time in 6 days

PR opened nodejs/quic

Use akamai openssl 1 1 1d quic

Rather than maintain our own separate port of the BoringSSL QUIC API port to OpenSSL 1.1.1d, make use of the one Akamai has already done: https://github.com/akamai/openssl/commits/OpenSSL_1_1_1d-quic /cc @tmshort

This is a squash of the commits with one change: the changes to tls13secretstest.c are pulled out because that file does not appear in our branch for some reason.

+684 -206

0 comment

162 changed files

pr created time in 6 days

push eventjasnell/quic

James M Snell

commit sha 22c09a8a8cc672569c13e76391d4ea8d96983219

deps: update openssl config

view details

push time in 6 days

create barnchjasnell/quic

branch : use-akamai-openssl-1_1_1d-quic

created branch time in 6 days

pull request commentnodejs/node

crypto: make DH error messages consistent

Ah, ok. That original pr should have been semver major

tniessen

comment created time in 6 days

pull request commentnodejs/node

crypto: make DH error messages consistent

Since this is not changing the error code and only touches the error message, it does not need to be semver-major

tniessen

comment created time in 6 days

PR opened nodejs/quic

quic: cleanup options and add highWaterMark/defaultEncoding

Allow passing in highWaterMark and defaultEncoding options when creating new QuicStream instances using openStream() and pushStream(), and allow setting the options for all newly received peer-initiated QuicStream instances.

Additional cleanups and doc nits

+364 -105

0 comment

7 changed files

pr created time in 6 days

create barnchjasnell/quic

branch : quicstream-options

created branch time in 6 days

Pull request review commentnodejs/node

src: move BaseObject subclass dtors/ctors out of node_crypto.h

 void SecureContext::Initialize(Environment* env, Local<Object> target) {   env->set_secure_context_constructor_template(t); } +SecureContext::SecureContext(Environment* env, v8::Local<v8::Object> wrap)+    : BaseObject(env, wrap) {+  MakeWeak();+  env->isolate()->AdjustAmountOfExternalAllocatedMemory(kExternalSize);+}++inline void SecureContext::Reset() {+  if (ctx_ != nullptr) {+    env()->isolate()->AdjustAmountOfExternalAllocatedMemory(-kExternalSize);+  }+  ctx_.reset();

It does not need to be. IIRC it's a smart pointer here. The != nullptr is using overridden != operator and the .reset() is a non-op if the ctx_ is not set.

jasnell

comment created time in 6 days

Pull request review commentnodejs/node

lib: refactor isLegalPort, move to validators

 function validateEncoding(data, encoding) {   } } +// Check that the port number is not NaN when coerced to a number,+// is an integer and that it falls within the legal range of port numbers.+function validatePort(port, name = 'Port', { allowZero = true } = {}) {

While there is certainly an overhead, it's been getting consistently better with V8 updates and it's consistent with style already used in the validators.js file (see https://github.com/nodejs/node/blob/a100a5460adf7db8939fffc2d81f82858fb6b6ad/lib/internal/validators.js#L133 for instance).

jasnell

comment created time in 6 days

pull request commentnodejs/node

[WIP] quic: initial experimental quic implementation

Separated out several commits that are needed by this implementation but that can be applied independently and do not have any QUIC specific bits: #31869...#31872

jasnell

comment created time in 6 days

PR opened nodejs/node

src: move BaseObject subclass dtors/ctors out of node_crypto.h

Originally landed in the QUIC repo. Separated from from the QUIC PR. There is nothing QUIC specific in this change.

Move constructor and destructors for subclasses of BaseObject from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases.

Original review metadata:

  PR-URL: https://github.com/nodejs/quic/pull/220
  Reviewed-By: Anna Henningsen <anna@addaleax.net>
  Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines
+97 -80

0 comment

2 changed files

pr created time in 6 days

create barnchjasnell/node

branch : move_baseobj_ctors

created branch time in 6 days

PR opened nodejs/node

dgram: make UDPWrap more reusable

Authored by @addaleax and originally landed in the QUIC repo. Separating out from the QUIC PR. While this does not have any QUIC specific bits, QUIC would be the only current use of it so it would likely be best to land this PR in conjunction with the QUIC PR. Separating out only to make it easier to review.

Allow using the handle more directly for I/O in other parts of the codebase.

Original review metadata:

  PR-URL: https://github.com/nodejs/quic/pull/165
  Reviewed-By: James M Snell <jasnell@gmail.com>
  Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Checklist
  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines
+254 -57

0 comment

3 changed files

pr created time in 6 days

create barnchjasnell/node

branch : reusable-udpwrap

created branch time in 6 days

PR opened nodejs/node

src: allow unique_ptrs with custom deleter in memory tracker

Authored by @addaleax and originally landed in the QUIC repo. Separating it out from the QUIC PR. This does not have any QUIC specific bits...

Original review metadata:

  PR-URL: https://github.com/nodejs/quic/pull/145
  Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines
+4 -4

0 comment

2 changed files

pr created time in 6 days

create barnchjasnell/node

branch : unique_ptrs_with_customer_deleter_memory_tracker

created branch time in 6 days

PR opened nodejs/node

src: enable `StreamPipe` for generic `StreamBase`s

Authored by @addaleax and landed in the nodejs/quic repo and used there for efficient file sending. Separating this out from the main QUIC PR to help reduce the side. There is no QUIC specific details in this, however.

Original review metadata:

  PR-URL: https://github.com/nodejs/quic/pull/150
  Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines
+47 -16

0 comment

2 changed files

pr created time in 6 days

create barnchjasnell/node

branch : stream-pipe

created branch time in 6 days

push eventjasnell/node

James M Snell

commit sha 5bef2ccf20cceda7975f8bce860e0f60595482fc

test: add known issue test for sync writable callback If the write callbacks are invoked synchronously with an error, onwriteError would cause the error event to be emitted synchronously, making it impossible to attach an error handler after the call that triggered it. PR-URL: https://github.com/nodejs/node/pull/31756 Refs: https://github.com/nodejs/quic/commit/b0d469c69c49c9186c1a581a7cebce4c5d398947 Refs: https://github.com/nodejs/quic/pull/341 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>

view details

Robert Nagy

commit sha 85c6fcd1cd11ec6ee22891e48a67cc97f60880e8

stream: avoid writing to writable A remainder from a previous refactoring. Refs: https://github.com/nodejs/node/pull/31197 PR-URL: https://github.com/nodejs/node/pull/31805 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Rich Trott

commit sha 99428e0858bb3cce820190770ca8217460d95c80

doc: reword possessive form of Node.js in debugger.md Throughout the docs, we sometimes write the possessive of _Node.js_ as _Node.js'_ and other times as _Node.js's_. The former conforms with some generally accepted style guides (e.g., Associated Press Stylebook) while the latter complies with others (e.g., Chicago Manual of Style). Since there is no clear authoritative answer as to which form is correct, and since (at least to me) both are visually jarring and sometimes cause a pause to understand, I'd like to reword things to eliminate the possessive form where possible. This is one of those examples. PR-URL: https://github.com/nodejs/node/pull/31748 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Rich Trott

commit sha d40c648e884bd64028fa0a67122a0af87c60f467

doc: reword possessive form of Node.js in process.md Throughout the docs, we sometimes write the possessive of _Node.js_ as _Node.js'_ and other times as _Node.js's_. The former conforms with some generally accepted style guides (e.g., Associated Press Stylebook) while the latter complies with others (e.g., Chicago Manual of Style). Since there is no clear authoritative answer as to which form is correct, and since (at least to me) both are visually jarring and sometimes cause a pause to understand, I'd like to reword things to eliminate the possessive form where possible. This is one of those examples. PR-URL: https://github.com/nodejs/node/pull/31748 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Rich Trott

commit sha d25fcb0c201286d18c07653347258ce02951ddf8

doc: reword possessive form of Node.js in http.md Throughout the docs, we sometimes write the possessive of _Node.js_ as _Node.js'_ and other times as _Node.js's_. The former conforms with some generally accepted style guides (e.g., Associated Press Stylebook) while the latter complies with others (e.g., Chicago Manual of Style). Since there is no clear authoritative answer as to which form is correct, and since (at least to me) both are visually jarring and sometimes cause a pause to understand, I'd like to reword things to eliminate the possessive form where possible. This is one of those examples. PR-URL: https://github.com/nodejs/node/pull/31748 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Rich Trott

commit sha eb0ade10a7af855ecdaa822dea028d661664cd43

doc: reword possessive form of Node.js in adding-new-napi-api.md Throughout the docs, we sometimes write the possessive of _Node.js_ as _Node.js'_ and other times as _Node.js's_. The former conforms with some generally accepted style guides (e.g., Associated Press Stylebook) while the latter complies with others (e.g., Chicago Manual of Style). Since there is no clear authoritative answer as to which form is correct, and since (at least to me) both are visually jarring and sometimes cause a pause to understand, I'd like to reword things to eliminate the possessive form where possible. This is one of those examples. PR-URL: https://github.com/nodejs/node/pull/31748 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Anna Henningsen

commit sha fab3eff2e53eb9bfbb890e5ac45523ae68ae95e5

src: inform callback scopes about exceptions in HTTP parser Refs: https://github.com/nodejs/node/commit/4aca277f16b8649b5fc21d41f340fad0a47c2e61 Refs: https://github.com/nodejs/node/pull/30236 Fixes: https://github.com/nodejs/node/issues/31796 PR-URL: https://github.com/nodejs/node/pull/31801 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

Rich Trott

commit sha 794bfacb26c4059c2eab7efb475489b7010054c3

test: remove common.PORT from test-net-timeout Switch test-net-timeout from common.PORT to a port assigned by the operating system. PR-URL: https://github.com/nodejs/node/pull/31749 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Rich Trott

commit sha 76fd17a7dff6b89b8851044b17125a88a3043b4e

test: remove common.PORT from test-net-throttle Switch test-net-throttle from common.PORT to a port assigned by the operating system. PR-URL: https://github.com/nodejs/node/pull/31749 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Rich Trott

commit sha a092886b1d29d17c94683348430e062cf7ae2fc9

test: remove common.PORT from test-tls-server-large-request Switch test-tls-server-large-request from common.PORT to a port assigned by the operating system. PR-URL: https://github.com/nodejs/node/pull/31749 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Rich Trott

commit sha af19f4116c5c3ce0fc7b18b62ffb05e8138bf74b

test: remove common.PORT from test-net-pause Switch test-net-pause from common.PORT to a port assigned by the operating system. PR-URL: https://github.com/nodejs/node/pull/31749 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Guy Bedford

commit sha 58de9b46b80fd3e48f5faf9db8101930a6493fc4

module: package "exports" error refinements PR-URL: https://github.com/nodejs/node/pull/31625 Reviewed-By: Jan Krems <jan.krems@gmail.com>

view details

Myles Borins

commit sha 1c2d77d3d9dd5753a96c0033265c5eeaf3531d00

2020-02-18, Version 12.16.1 'Erbium' (LTS) Notable changes: Node.js 12.16.0 included 6 regressions that are being fixed in this release **Accidental Unflagging of Self Resolving Modules**: 12.16.0 included a large update to the ESM implementation. One of the new features, Self Referential Modules, was accidentally released without requiring the `--experimental-modules` flag. This release is being made to appropriately flag the feature. **Process Cleanup Changed Introduced WASM-Related Assertion**: A change during Node.js process cleanup led to a crash in combination with specific usage of WASM. This has been fixed by partially reverted said change. A regression test and a full fix are being worked on and will likely be included in future 12.x and 13.x releases. **Use Largepages Runtime Option Introduced Linking Failure**: A Semver-Minor change to introduce `--use-largepages` as a runtime option introduced a linking failure. This had been fixed in master but regressed as the fix has not yet gone out in a Current release. The feature has been reverted, but will be able to reland with a fix in a future Semver-Minor release. **Async Hooks was Causing an Exception When Handling Errors**: Changes in async hooks internals introduced a case where an internal api call could be called with undefined causing a process to crash. The change to async hooks was reverted. A regression test and fix has been proposed and the change could re land in a future Semver-Patch release if the regression is reliably fixed. **New Enumerable Read-Only Property on EventEmitter breaks @types/extend** A new property for enumerating events was added to the EventEmitter class. This broke existing code that was using the `@types/extend` module for extending classses as `@types/extend` was attemping to write over the existing field which the new change made read-only. As this is the first property on EventEmitter that is read-only this feature could be considered Semver-Major. The new feature has been reverted but could re land in a future Semver-Minor release if a non breaking way of applying it is found. **Exceptions in the HTTP parser were not emitting an uncaughtException** A refactoring to Node.js interanls resulted in a bug where errors in the HTTP parser were not being emitted by `process.on('uncaughtException')`. The fix to this bug has been included in this release. PR-URL: https://github.com/nodejs/node/pull/31781

view details

Robert Nagy

commit sha 8ba7a2f889472d58478bf40b758d336b41af682b

http2: make compat finished match http/1 finished should true directly after end(). PR-URL: https://github.com/nodejs/node/pull/24347 Refs: https://github.com/nodejs/node/issues/24743 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Shelley Vohr

commit sha 0c3c0e7184c4ca625148c14d61d8e9438a1b69f2

2020-02-18, Version 13.9.0 (Current) Notable changes: * async_hooks * add executionAsyncResource (Matteo Collina) #30959 * crypto * add crypto.diffieHellman (Tobias Nießen) #31178 * add DH support to generateKeyPair (Tobias Nießen) #31178 * simplify DH groups (Tobias Nießen) #31178 * add key type 'dh' (Tobias Nießen) #31178 * test * skip keygen tests on arm systems (Tobias Nießen) #31178 * perf_hooks * add property flags to GCPerformanceEntry (Kirill Fomichev) #29547 * process * report ArrayBuffer memory in `memoryUsage()` (Anna Henningsen) #31550 * readline * make tab size configurable (Ruben Bridgewater) #31318 * report * add support for Workers (Anna Henningsen) #31386 * worker * add ability to take heap snapshot from parent thread (Anna Henningsen) #31569 * added new collaborators * add ronag to collaborators (Robert Nagy) #31498 PR-URL: https://github.com/nodejs/node/pull/31837

view details

Myles Borins

commit sha 43fb664701d771c00595fa1c152cfca03b10a4fd

doc: fix missing changelog corrections There was a slight discrepancy between the build of 12.16.1 and what landed on 12.x. This was only a couple spelling errors that didn't get updated between machines I was working on. This change gets the changelog up to date with what went out in the release vs what is current on the 12.x release branch. PR-URL: https://github.com/nodejs/node/pull/31854 Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Richard Lau <riclau@uk.ibm.com>

view details

Shelley Vohr

commit sha 31290824de068eb4b282ab74829450b988ae225b

doc: fix notable changes for v13.9.0 PR-URL: https://github.com/nodejs/node/pull/31857 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Myles Borins <myles.borins@gmail.com>

view details

Robert Nagy

commit sha 7c524fb092b143470795c8ca869de4654c728fe1

doc: fix Writable.write callback description Clarifies a userland invariant until a better solution can be found. Also moves a misplaced sentence from _write to write. Refs: https://github.com/nodejs/node/pull/31756 Refs: https://github.com/nodejs/node/pull/31765 PR-URL: https://github.com/nodejs/node/pull/31812 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Rich Trott

commit sha 822101f570478ffa15e4ed0e00cd0d67b9cc789e

meta: move eljefedelrodeodeljefe to emeritus eljefedelrodeodeljefe confirmed in email that moving to emeritus was fine at this time. PR-URL: https://github.com/nodejs/node/pull/31735 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>

view details

Joyee Cheung

commit sha e6c2277241e542cdf86475d71c5fdc581bd72025

vm: lazily initialize primordials for vm contexts Lazily initialize primordials when cross-context support for builtins is needed to fix the performance regression in context creation. PR-URL: https://github.com/nodejs/node/pull/31738 Fixes: https://github.com/nodejs/node/issues/29842 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

push time in 6 days

pull request commentnodejs/node

fs: add fs/promises alias module

Master is always the next major -pre... That is, currently master is 14.0.0-pre. 13.x is a separate branch.

devsnek

comment created time in 7 days

Pull request review commentnodejs/node

lib: refactor isLegalPort, move to validators

 Socket.prototype.bind = function(port_, address_ /* , callback */) {   return this; }; --function validatePort(port) {-  const legal = isLegalPort(port);-  if (legal)-    port = port | 0;

Ok, not allowing zero is now accounted for.

jasnell

comment created time in 7 days

push eventjasnell/node

James M Snell

commit sha a100a5460adf7db8939fffc2d81f82858fb6b6ad

[Squash] account for not allowing zero

view details

push time in 7 days

Pull request review commentnodejs/node

lib: refactor isLegalPort, move to validators

 Socket.prototype.bind = function(port_, address_ /* , callback */) {   return this; }; --function validatePort(port) {-  const legal = isLegalPort(port);-  if (legal)-    port = port | 0;

Ugh. ok

jasnell

comment created time in 7 days

Pull request review commentnodejs/node

lib: refactor isLegalPort, move to validators

 module.exports = {   validateBoolean,   validateBuffer,   validateEncoding,-  validateObject,-  validateInteger,   validateInt32,-  validateUint32,-  validateString,

Since I was in here, I went ahead and alphabetized the exports also

jasnell

comment created time in 7 days

PR opened nodejs/node

lib: refactor isLegalPort, move to validators

isLegalPort was used multiple places in the same way -- to validate the port and throw if necessary. Moved into internal/validators.

Checklist
  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] commit message follows commit guidelines
+66 -79

0 comment

10 changed files

pr created time in 7 days

push eventjasnell/node

James M Snell

commit sha 710fe7085efcfc78ffad069f5488650373935fef

lib: move isLegalPort to validators, refactor isLegalPort was used multiple places in the same way -- to validate the port and throw if necessary. Moved into internal/validators.

view details

push time in 7 days

create barnchjasnell/node

branch : refactor-islegalport

created branch time in 7 days

push eventjasnell/quic

James M Snell

commit sha 26c9c33c9997c31408eab679f122c80d2345e08f

quic: use appropriate bound endpoint Previously, send would always use the preferred endpoint. Use the appropriate QuicEndpoint to send PR-URL: https://github.com/nodejs/quic/pull/346 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha 91baa39819dbdb079716a2a585bbdd5c1481e8e3

quic: use shared function for allow unauthorized check PR-URL: https://github.com/nodejs/quic/pull/348 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

James M Snell

commit sha 355d60b7c650c3d50547c7b3004b4fc69c7f43aa

quic: use validators PR-URL: https://github.com/nodejs/quic/pull/348 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in 7 days

PR closed nodejs/quic

quic: multiple javascript cleanups and use validators

Multiple javascript cleanups including use of common validators

+266 -289

1 comment

14 changed files

jasnell

pr closed time in 7 days

pull request commentnodejs/quic

quic: multiple javascript cleanups and use validators

Landed

jasnell

comment created time in 7 days

more