js-libp2p
js-libp2p copied to clipboard
test: add tests for non-unilateral DCUtR over TCP
- fix: get DCUtR test passing for TCP
This change builds on top of https://github.com/libp2p/js-libp2p/pull/1928 and adds a lot more debugging output that is probably not as necessary for someone more familiar (aka @achingbrain)
two other things:
- I can't seem to run lint locally because node is out of memory. will try a restart
- We should add a test that emulates the gateway -> browser node scenario, but I can't think of a way to do that.
Based on https://github.com/ipfs/helia/issues/182#issuecomment-1653860165, it seems like we could just enable/disable some transports on each node to get the effect we want, but I don't believe the third item in that comment is accurate
the gateway does not need to be able to dial the browser (e.g. WebRTC)
In the spec, and in this code, both of the following are true (B=browser, A=gateway):
- A tells B the multiaddrs it's available at, and B attempts to dial them
- B tells A the multiaddrs it's available at, and A attempts to dial them
I don't believe the third item in that comment is accurate
the gateway does not need to be able to dial the browser (e.g. WebRTC)
In the spec, and in this code, both of the following are true (B=browser, A=gateway):
- A tells B the multiaddrs it's available at, and B attempts to dial them
- B tells A the multiaddrs it's available at, and A attempts to dial them
The scenario is:
- Browser (B) has a relay address
- B adds a block to itself, gets a CID, publishes a provider record containing the relay address
- Gateway (A) looks up the provider record, dials B over the relay address
- Identify happens
- B's onConnect handler is notified that A supports DCUtR
- B attempts to unilaterally upgrade the incoming connection
- B checks the reported addresses of A, notices it listens on a public wss address (cos it's the gateway) and dials the wss address
- B closes the relayed connection to A
- Identify happens on the non-relayed connection
- Bitswap is reported as supported
- Bitswap happens and the block is sent from the browser to the gateway
- ???
- Profit
FYI @achingbrain I talked with @MarcoPolo earlier today and was informed that just implementing the dial-back should work. I ended up throwing this PR together into my helia-playground repo on a branch: https://github.com/SgtPooki/helia-playground/tree/feat/half-dcutr-poc to test. I also did some react upgrades.. i'll merge those to main so the diff isn't so messy
I was able to get a successful A side dial-back (some other peer requested DCUtR) but B side dialbacks don't seem to be working.
Peer ID of my node for the below was 12D3KooWEE6hsnDD2G4mB9jpAbSBVXF9ugERzRXHeWhjDX8VHxFg
console log filter for libp2p:dcutr:A
dcutr.ts:107 libp2p:dcutr:A:trace incoming DCUtR attempt. connection.direction = +0ms outbound
dcutr.ts:386 libp2p:dcutr:A:trace handleIncomingUpgrade connection ID = +0ms fux0gl1691464290738
dcutr.ts:392 libp2p:dcutr:A:trace acknowledging stream from B 12D3KooWDJta1Huzw7jGsbXGgjzcZYq3pYuEbJmAcZLSa8JbEwnr +0ms
dcutr.ts:397 libp2p:dcutr:A:trace waiting for CONNECT from B 12D3KooWDJta1Huzw7jGsbXGgjzcZYq3pYuEbJmAcZLSa8JbEwnr +0ms
dcutr.ts:401 libp2p:dcutr:A:trace received CONNECT from B 12D3KooWDJta1Huzw7jGsbXGgjzcZYq3pYuEbJmAcZLSa8JbEwnr +2ms
dcutr.ts:416 libp2p:dcutr:A:error B had no dialable multiaddrs +0ms
dcutr.ts:451 libp2p:dcutr:A:error error during DCUtR attempt +1ms CodeError: DCUtR connect message had no dialable multiaddrs
at DefaultDCUtRService.handleIncomingUpgrade (dcutr.ts:417:15)
dcutr.ts:107 libp2p:dcutr:A:trace incoming DCUtR attempt. connection.direction = +30s outbound
dcutr.ts:386 libp2p:dcutr:A:trace handleIncomingUpgrade connection ID = +0ms 78blut1691464321160
dcutr.ts:392 libp2p:dcutr:A:trace acknowledging stream from B 12D3KooWDJta1Huzw7jGsbXGgjzcZYq3pYuEbJmAcZLSa8JbEwnr +0ms
dcutr.ts:397 libp2p:dcutr:A:trace waiting for CONNECT from B 12D3KooWDJta1Huzw7jGsbXGgjzcZYq3pYuEbJmAcZLSa8JbEwnr +0ms
dcutr.ts:401 libp2p:dcutr:A:trace received CONNECT from B 12D3KooWDJta1Huzw7jGsbXGgjzcZYq3pYuEbJmAcZLSa8JbEwnr +0ms
dcutr.ts:416 libp2p:dcutr:A:error B had no dialable multiaddrs +30s
dcutr.ts:451 libp2p:dcutr:A:error error during DCUtR attempt +0ms CodeError: DCUtR connect message had no dialable multiaddrs
at DefaultDCUtRService.handleIncomingUpgrade (dcutr.ts:417:15)
console log filter for libp2p:dcutr:B
dcutr.ts:373 libp2p:dcutr:B:trace peer 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc has no public addresses, not attempting unilateral connection upgrade +0ms
dcutr.ts:170 libp2p:dcutr:B attempting DCUtR upgrade of relayed connection from 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +0ms
dcutr.ts:190 libp2p:dcutr:B:trace initiateDCUtRUpgrade connection ID = +0ms 9kf3341691464082955
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +0ms
dcutr.ts:348 libp2p:dcutr:B:trace peer 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 has public addresses, attempting unilateral connection upgrade +459ms
dcutr.ts:352 libp2p:dcutr:B attempting unilateral connection upgrade to +459ms (5) [_DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr]
dcutr.ts:370 libp2p:dcutr:B:error Could not unilaterally upgrade connection to advertised public address(es) +0ms (5) [_DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr] AggregateError: All promises were rejected
dcutr.ts:170 libp2p:dcutr:B attempting DCUtR upgrade of relayed connection from 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +2ms
dcutr.ts:190 libp2p:dcutr:B:trace initiateDCUtRUpgrade connection ID = +2ms 5nwx6y1691464084468
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +0ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +202ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +2ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +105ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +403ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +93ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +203ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +4ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +405ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +197ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +217ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWH6JRSZmDpUZicAZD9kpYQvcoqJA1CCRTixNYW1AQ14M6 +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +304ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +85ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +113ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +420ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +726ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +417ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +816ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +3ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +1s CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:348 libp2p:dcutr:B:trace peer QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB has public addresses, attempting unilateral connection upgrade +30s
dcutr.ts:352 libp2p:dcutr:B attempting unilateral connection upgrade to +33s (5) [_DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr]
dcutr.ts:370 libp2p:dcutr:B:error Could not unilaterally upgrade connection to advertised public address(es) +30s (5) [_DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr] AggregateError: All promises were rejected
dcutr.ts:170 libp2p:dcutr:B attempting DCUtR upgrade of relayed connection from QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +2ms
dcutr.ts:190 libp2p:dcutr:B:trace initiateDCUtRUpgrade connection ID = +2ms 5pvqvy1691464117660
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +0ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +189ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +3ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +379ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +187ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +194ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +3ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +384ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +187ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +200ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +3ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +392ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:373 libp2p:dcutr:B:trace peer 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY has no public addresses, not attempting unilateral connection upgrade +10s
dcutr.ts:170 libp2p:dcutr:B attempting DCUtR upgrade of relayed connection from 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +11s
dcutr.ts:190 libp2p:dcutr:B:trace initiateDCUtRUpgrade connection ID = +0ms g0fsz11691464129038
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +1ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +245ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +11s CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +240ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +243ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +3ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +489ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +243ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +246ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWJVA45ydfCAqRTjJ4SHxdsbyGehvK5EgPwvEM5ifsLPeY +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +491ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:348 libp2p:dcutr:B:trace peer QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB has public addresses, attempting unilateral connection upgrade +3m
dcutr.ts:352 libp2p:dcutr:B attempting unilateral connection upgrade to +3m (5) [_DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr]
dcutr.ts:370 libp2p:dcutr:B:error Could not unilaterally upgrade connection to advertised public address(es) +3m (5) [_DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr] AggregateError: All promises were rejected
dcutr.ts:170 libp2p:dcutr:B attempting DCUtR upgrade of relayed connection from QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +2ms
dcutr.ts:190 libp2p:dcutr:B:trace initiateDCUtRUpgrade connection ID = +2ms e89zf1691464297392
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +0ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +197ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +401ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +202ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +241ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +433ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +190ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +208ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A QmUgmRxoLtGERot7Y6G7UyF6fwvnusQZfGR15PuE6pY3aB +3ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +402ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:348 libp2p:dcutr:B:trace peer 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc has public addresses, attempting unilateral connection upgrade +5s
dcutr.ts:352 libp2p:dcutr:B attempting unilateral connection upgrade to +6s (4) [_DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr]
dcutr.ts:370 libp2p:dcutr:B:error Could not unilaterally upgrade connection to advertised public address(es) +5s (4) [_DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr, _DefaultMultiaddr] AggregateError: All promises were rejected
dcutr.ts:170 libp2p:dcutr:B attempting DCUtR upgrade of relayed connection from 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +1ms
dcutr.ts:190 libp2p:dcutr:B:trace initiateDCUtRUpgrade connection ID = +1ms ptom41691464303697
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +0ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +786ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +2s CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +912ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +365ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +1s CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
dcutr.ts:205 libp2p:dcutr:B:trace opening a stream to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +661ms
dcutr.ts:218 libp2p:dcutr:B:trace sending CONNECT to A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +610ms
dcutr.ts:225 libp2p:dcutr:B:trace waiting for CONNECT from A 12D3KooWJnnnA2muKaz2qg32r4bPWBqE9K8nukHxgXqdVXjis8xc +2ms
dcutr.ts:260 libp2p:dcutr:B:error error during DCUtR attempt +959ms CodeError: stream reset
at YamuxStream.reset (stream.ts:357:17)
at YamuxStream.processFlags (stream.ts:242:12)
at YamuxStream.handleWindowUpdate (stream.ts:200:10)
at YamuxMuxer.handleStreamMessage (muxer.ts:480:16)
at YamuxMuxer.handleFrame (muxer.ts:408:22)
at muxer.ts:118:26
at async YamuxMuxer.sink (muxer.ts:114:9)
at async Promise.all (:8888/index 0)
What's remaining to do on this PR?
@p-shahi i think just a review from the js-libp2p folks