libp2p 2.10.0-8484de8a2 → 2.10.0-87bc8d4fb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/index.min.js +17 -13
  2. package/dist/index.min.js.map +4 -4
  3. package/dist/src/address-manager/dns-mappings.d.ts +2 -1
  4. package/dist/src/address-manager/dns-mappings.d.ts.map +1 -1
  5. package/dist/src/address-manager/dns-mappings.js +43 -39
  6. package/dist/src/address-manager/dns-mappings.js.map +1 -1
  7. package/dist/src/address-manager/index.d.ts.map +1 -1
  8. package/dist/src/address-manager/index.js +14 -31
  9. package/dist/src/address-manager/index.js.map +1 -1
  10. package/dist/src/address-manager/ip-mappings.d.ts +0 -1
  11. package/dist/src/address-manager/ip-mappings.d.ts.map +1 -1
  12. package/dist/src/address-manager/ip-mappings.js +40 -51
  13. package/dist/src/address-manager/ip-mappings.js.map +1 -1
  14. package/dist/src/address-manager/observed-addresses.d.ts.map +1 -1
  15. package/dist/src/address-manager/observed-addresses.js +3 -1
  16. package/dist/src/address-manager/observed-addresses.js.map +1 -1
  17. package/dist/src/address-manager/transport-addresses.d.ts.map +1 -1
  18. package/dist/src/address-manager/transport-addresses.js +8 -6
  19. package/dist/src/address-manager/transport-addresses.js.map +1 -1
  20. package/dist/src/config/connection-gater.browser.d.ts.map +1 -1
  21. package/dist/src/config/connection-gater.browser.js +9 -3
  22. package/dist/src/config/connection-gater.browser.js.map +1 -1
  23. package/dist/src/config.js +1 -1
  24. package/dist/src/config.js.map +1 -1
  25. package/dist/src/connection-manager/address-sorter.d.ts.map +1 -1
  26. package/dist/src/connection-manager/address-sorter.js +2 -1
  27. package/dist/src/connection-manager/address-sorter.js.map +1 -1
  28. package/dist/src/connection-manager/connection-pruner.d.ts.map +1 -1
  29. package/dist/src/connection-manager/connection-pruner.js +3 -7
  30. package/dist/src/connection-manager/connection-pruner.js.map +1 -1
  31. package/dist/src/connection-manager/constants.defaults.d.ts +0 -4
  32. package/dist/src/connection-manager/constants.defaults.d.ts.map +1 -1
  33. package/dist/src/connection-manager/constants.defaults.js +0 -4
  34. package/dist/src/connection-manager/constants.defaults.js.map +1 -1
  35. package/dist/src/connection-manager/dial-queue.d.ts +2 -2
  36. package/dist/src/connection-manager/dial-queue.d.ts.map +1 -1
  37. package/dist/src/connection-manager/dial-queue.js +23 -11
  38. package/dist/src/connection-manager/dial-queue.js.map +1 -1
  39. package/dist/src/connection-manager/index.d.ts +2 -10
  40. package/dist/src/connection-manager/index.d.ts.map +1 -1
  41. package/dist/src/connection-manager/index.js +26 -44
  42. package/dist/src/connection-manager/index.js.map +1 -1
  43. package/dist/src/connection-manager/reconnect-queue.js +1 -1
  44. package/dist/src/connection-manager/reconnect-queue.js.map +1 -1
  45. package/dist/src/connection-manager/utils.d.ts +3 -31
  46. package/dist/src/connection-manager/utils.d.ts.map +1 -1
  47. package/dist/src/connection-manager/utils.js +18 -99
  48. package/dist/src/connection-manager/utils.js.map +1 -1
  49. package/dist/src/connection-monitor.d.ts +1 -1
  50. package/dist/src/connection-monitor.d.ts.map +1 -1
  51. package/dist/src/connection-monitor.js +3 -2
  52. package/dist/src/connection-monitor.js.map +1 -1
  53. package/dist/src/connection.d.ts +9 -13
  54. package/dist/src/connection.d.ts.map +1 -1
  55. package/dist/src/connection.js +138 -87
  56. package/dist/src/connection.js.map +1 -1
  57. package/dist/src/get-peer.js +3 -3
  58. package/dist/src/get-peer.js.map +1 -1
  59. package/dist/src/index.d.ts +2 -2
  60. package/dist/src/index.js +2 -2
  61. package/dist/src/libp2p.d.ts.map +1 -1
  62. package/dist/src/libp2p.js +5 -5
  63. package/dist/src/libp2p.js.map +1 -1
  64. package/dist/src/peer-routing.js +1 -1
  65. package/dist/src/peer-routing.js.map +1 -1
  66. package/dist/src/random-walk.d.ts.map +1 -1
  67. package/dist/src/random-walk.js +3 -13
  68. package/dist/src/random-walk.js.map +1 -1
  69. package/dist/src/registrar.d.ts +3 -3
  70. package/dist/src/registrar.d.ts.map +1 -1
  71. package/dist/src/registrar.js +41 -50
  72. package/dist/src/registrar.js.map +1 -1
  73. package/dist/src/transport-manager.js +2 -15
  74. package/dist/src/transport-manager.js.map +1 -1
  75. package/dist/src/upgrader.d.ts +16 -26
  76. package/dist/src/upgrader.d.ts.map +1 -1
  77. package/dist/src/upgrader.js +122 -88
  78. package/dist/src/upgrader.js.map +1 -1
  79. package/dist/src/version.d.ts +1 -1
  80. package/dist/src/version.js +1 -1
  81. package/package.json +30 -27
  82. package/src/address-manager/dns-mappings.ts +50 -50
  83. package/src/address-manager/index.ts +17 -37
  84. package/src/address-manager/ip-mappings.ts +44 -64
  85. package/src/address-manager/observed-addresses.ts +3 -1
  86. package/src/address-manager/transport-addresses.ts +9 -7
  87. package/src/config/connection-gater.browser.ts +12 -3
  88. package/src/config.ts +1 -1
  89. package/src/connection-manager/address-sorter.ts +2 -1
  90. package/src/connection-manager/connection-pruner.ts +3 -8
  91. package/src/connection-manager/constants.defaults.ts +0 -5
  92. package/src/connection-manager/dial-queue.ts +27 -12
  93. package/src/connection-manager/index.ts +28 -61
  94. package/src/connection-manager/reconnect-queue.ts +1 -1
  95. package/src/connection-manager/utils.ts +21 -129
  96. package/src/connection-monitor.ts +4 -3
  97. package/src/connection.ts +185 -111
  98. package/src/get-peer.ts +3 -3
  99. package/src/index.ts +2 -2
  100. package/src/libp2p.ts +6 -5
  101. package/src/peer-routing.ts +1 -1
  102. package/src/random-walk.ts +3 -13
  103. package/src/registrar.ts +54 -67
  104. package/src/transport-manager.ts +2 -18
  105. package/src/upgrader.ts +149 -132
  106. package/src/version.ts +1 -1
  107. package/dist/src/utils.d.ts +0 -3
  108. package/dist/src/utils.d.ts.map +0 -1
  109. package/dist/src/utils.js +0 -25
  110. package/dist/src/utils.js.map +0 -1
  111. package/src/utils.ts +0 -31
@@ -1,13 +1,12 @@
1
1
  import { InvalidMultiaddrError, InvalidPeerIdError } from '@libp2p/interface';
2
2
  import * as mss from '@libp2p/multistream-select';
3
3
  import { peerIdFromString } from '@libp2p/peer-id';
4
- import { trackedMap } from '@libp2p/utils';
5
- import { CODE_P2P } from '@multiformats/multiaddr';
4
+ import { trackedMap } from '@libp2p/utils/tracked-map';
6
5
  import { anySignal } from 'any-signal';
7
6
  import { setMaxListeners } from 'main-event';
8
7
  import { CustomProgressEvent } from 'progress-events';
9
8
  import { raceSignal } from 'race-signal';
10
- import { PROTOCOL_NEGOTIATION_TIMEOUT, INBOUND_UPGRADE_TIMEOUT, CONNECTION_CLOSE_TIMEOUT } from './connection-manager/constants.js';
9
+ import { PROTOCOL_NEGOTIATION_TIMEOUT, INBOUND_UPGRADE_TIMEOUT } from './connection-manager/constants.js';
11
10
  import { createConnection } from './connection.js';
12
11
  import { ConnectionDeniedError, ConnectionInterceptedError, EncryptionFailedError, MuxerUnavailableError } from './errors.js';
13
12
  export class Upgrader {
@@ -19,7 +18,6 @@ export class Upgrader {
19
18
  outboundStreamProtocolNegotiationTimeout;
20
19
  events;
21
20
  metrics;
22
- connectionCloseTimeout;
23
21
  constructor(components, init) {
24
22
  this.components = components;
25
23
  this.connectionEncrypters = trackedMap({
@@ -39,7 +37,6 @@ export class Upgrader {
39
37
  this.inboundUpgradeTimeout = init.inboundUpgradeTimeout ?? INBOUND_UPGRADE_TIMEOUT;
40
38
  this.inboundStreamProtocolNegotiationTimeout = init.inboundStreamProtocolNegotiationTimeout ?? PROTOCOL_NEGOTIATION_TIMEOUT;
41
39
  this.outboundStreamProtocolNegotiationTimeout = init.outboundStreamProtocolNegotiationTimeout ?? PROTOCOL_NEGOTIATION_TIMEOUT;
42
- this.connectionCloseTimeout = init.connectionCloseTimeout ?? CONNECTION_CLOSE_TIMEOUT;
43
40
  this.events = components.events;
44
41
  this.metrics = {
45
42
  dials: components.metrics?.registerCounterGroup('libp2p_connection_manager_dials_total'),
@@ -67,6 +64,9 @@ export class Upgrader {
67
64
  setMaxListeners(Infinity, output);
68
65
  return output;
69
66
  }
67
+ /**
68
+ * Upgrades an inbound connection
69
+ */
70
70
  async upgradeInbound(maConn, opts) {
71
71
  let accepted = false;
72
72
  // always apply upgrade timeout for incoming upgrades
@@ -75,7 +75,7 @@ export class Upgrader {
75
75
  this.metrics.dials?.increment({
76
76
  inbound: true
77
77
  });
78
- accepted = this.components.connectionManager.acceptIncomingConnection(maConn);
78
+ accepted = await raceSignal(this.components.connectionManager.acceptIncomingConnection(maConn), signal);
79
79
  if (!accepted) {
80
80
  throw new ConnectionDeniedError('Connection denied');
81
81
  }
@@ -101,12 +101,15 @@ export class Upgrader {
101
101
  }
102
102
  }
103
103
  }
104
+ /**
105
+ * Upgrades an outbound connection
106
+ */
104
107
  async upgradeOutbound(maConn, opts) {
105
108
  try {
106
109
  this.metrics.dials?.increment({
107
110
  outbound: true
108
111
  });
109
- const idStr = maConn.remoteAddr.getComponents().findLast(c => c.code === CODE_P2P)?.value;
112
+ const idStr = maConn.remoteAddr.getPeerId();
110
113
  let remotePeerId;
111
114
  if (idStr != null) {
112
115
  remotePeerId = peerIdFromString(idStr);
@@ -130,53 +133,51 @@ export class Upgrader {
130
133
  }
131
134
  }
132
135
  async _performUpgrade(maConn, direction, opts) {
133
- let stream = maConn;
136
+ let encryptedConn;
134
137
  let remotePeer;
138
+ let upgradedConn;
135
139
  let muxerFactory;
136
- let muxer;
137
140
  let cryptoProtocol;
138
141
  const id = `${(parseInt(String(Math.random() * 1e9))).toString(36)}${Date.now()}`;
139
142
  maConn.log = maConn.log.newScope(`${direction}:${id}`);
140
143
  this.components.metrics?.trackMultiaddrConnection(maConn);
141
144
  maConn.log.trace('starting the %s connection upgrade', direction);
142
145
  // Protect
146
+ let protectedConn = maConn;
143
147
  if (opts?.skipProtection !== true) {
144
148
  const protector = this.components.connectionProtector;
145
149
  if (protector != null) {
146
150
  maConn.log('protecting the %s connection', direction);
147
- stream = await protector.protect(stream, opts);
151
+ protectedConn = await protector.protect(maConn, opts);
148
152
  }
149
153
  }
150
154
  try {
151
155
  // Encrypt the connection
152
- if (isEncryptionSkipped(opts)) {
153
- if (opts.remotePeer == null) {
154
- throw new InvalidMultiaddrError(`${direction} connection that skipped encryption must have a peer id`);
155
- }
156
- cryptoProtocol = 'native';
157
- remotePeer = opts.remotePeer;
158
- }
159
- else {
160
- const peerIdString = maConn.remoteAddr.getComponents().findLast(c => c.code === CODE_P2P)?.value;
161
- let remotePeerFromMultiaddr;
162
- if (peerIdString != null) {
163
- remotePeerFromMultiaddr = peerIdFromString(peerIdString);
164
- }
156
+ encryptedConn = protectedConn;
157
+ if (opts?.skipEncryption !== true) {
165
158
  opts?.onProgress?.(new CustomProgressEvent(`upgrader:encrypt-${direction}-connection`));
166
159
  ({
167
- connection: stream,
160
+ conn: encryptedConn,
168
161
  remotePeer,
169
162
  protocol: cryptoProtocol,
170
163
  streamMuxer: muxerFactory
171
164
  } = await (direction === 'inbound'
172
- ? this._encryptInbound(stream, {
173
- ...opts,
174
- remotePeer: remotePeerFromMultiaddr
175
- })
176
- : this._encryptOutbound(stream, {
177
- ...opts,
178
- remotePeer: remotePeerFromMultiaddr
179
- })));
165
+ ? this._encryptInbound(protectedConn, opts)
166
+ : this._encryptOutbound(protectedConn, opts)));
167
+ const maConn = {
168
+ ...protectedConn,
169
+ ...encryptedConn
170
+ };
171
+ await this.shouldBlockConnection(direction === 'inbound' ? 'denyInboundEncryptedConnection' : 'denyOutboundEncryptedConnection', remotePeer, maConn);
172
+ }
173
+ else {
174
+ const idStr = maConn.remoteAddr.getPeerId();
175
+ if (idStr == null) {
176
+ throw new InvalidMultiaddrError(`${direction} connection that skipped encryption must have a peer id`);
177
+ }
178
+ const remotePeerId = peerIdFromString(idStr);
179
+ cryptoProtocol = 'native';
180
+ remotePeer = remotePeerId;
180
181
  }
181
182
  // this can happen if we dial a multiaddr without a peer id, we only find
182
183
  // out the identity of the remote after the connection is encrypted
@@ -185,61 +186,89 @@ export class Upgrader {
185
186
  maConn.abort(err);
186
187
  throw err;
187
188
  }
188
- // stream.pause()
189
- await this.shouldBlockConnection(direction === 'inbound' ? 'denyInboundEncryptedConnection' : 'denyOutboundEncryptedConnection', remotePeer, maConn);
190
- // stream.resume()
189
+ upgradedConn = encryptedConn;
191
190
  if (opts?.muxerFactory != null) {
192
191
  muxerFactory = opts.muxerFactory;
193
192
  }
194
193
  else if (muxerFactory == null && this.streamMuxers.size > 0) {
195
194
  opts?.onProgress?.(new CustomProgressEvent(`upgrader:multiplex-${direction}-connection`));
196
195
  // Multiplex the connection
197
- muxerFactory = await (direction === 'inbound'
198
- ? this._multiplexInbound(stream, this.streamMuxers, opts)
199
- : this._multiplexOutbound(stream, this.streamMuxers, opts));
196
+ const multiplexed = await (direction === 'inbound'
197
+ ? this._multiplexInbound({
198
+ ...protectedConn,
199
+ ...encryptedConn
200
+ }, this.streamMuxers, opts)
201
+ : this._multiplexOutbound({
202
+ ...protectedConn,
203
+ ...encryptedConn
204
+ }, this.streamMuxers, opts));
205
+ muxerFactory = multiplexed.muxerFactory;
206
+ upgradedConn = multiplexed.stream;
200
207
  }
201
208
  }
202
209
  catch (err) {
203
- maConn.log.error('failed to upgrade %s connection %s %a - %e', direction, direction === 'inbound' ? 'from' : 'to', maConn.remoteAddr, err);
210
+ maConn.log.error('failed to upgrade inbound connection %s %a - %e', direction === 'inbound' ? 'from' : 'to', maConn.remoteAddr, err);
204
211
  throw err;
205
212
  }
206
- // create the connection muxer if one is configured
207
- if (muxerFactory != null) {
208
- maConn.log('create muxer %s', muxerFactory.protocol);
209
- muxer = muxerFactory.createStreamMuxer(stream);
210
- }
211
- // stream.pause()
212
213
  await this.shouldBlockConnection(direction === 'inbound' ? 'denyInboundUpgradedConnection' : 'denyOutboundUpgradedConnection', remotePeer, maConn);
213
214
  const conn = this._createConnection({
214
215
  id,
215
216
  cryptoProtocol,
216
217
  direction,
217
218
  maConn,
218
- stream,
219
- muxer,
219
+ upgradedConn,
220
+ muxerFactory,
220
221
  remotePeer,
221
- limits: opts?.limits,
222
- closeTimeout: this.connectionCloseTimeout
222
+ limits: opts?.limits
223
223
  });
224
- conn.log('successfully upgraded connection');
225
- // stream.resume()
224
+ conn.log('successfully upgraded %s connection', direction);
226
225
  return conn;
227
226
  }
228
227
  /**
229
228
  * A convenience method for generating a new `Connection`
230
229
  */
231
230
  _createConnection(opts) {
231
+ const { id, cryptoProtocol, direction, maConn, upgradedConn, remotePeer, muxerFactory, limits } = opts;
232
+ let connection; // eslint-disable-line prefer-const
233
+ const _timeline = maConn.timeline;
234
+ maConn.timeline = new Proxy(_timeline, {
235
+ set: (...args) => {
236
+ if (args[1] === 'close' && args[2] != null && _timeline.close == null) {
237
+ // Wait for close to finish before notifying of the closure
238
+ (async () => {
239
+ try {
240
+ if (connection.status === 'open') {
241
+ await connection.close();
242
+ }
243
+ }
244
+ catch (err) {
245
+ connection.log.error('error closing connection after timeline close %e', err);
246
+ }
247
+ finally {
248
+ this.events.safeDispatchEvent('connection:close', {
249
+ detail: connection
250
+ });
251
+ }
252
+ })().catch(err => {
253
+ connection.log.error('error thrown while dispatching connection:close event %e', err);
254
+ });
255
+ }
256
+ return Reflect.set(...args);
257
+ }
258
+ });
259
+ maConn.timeline.upgraded = Date.now();
232
260
  // Create the connection
233
- const connection = createConnection(this.components, {
234
- ...opts,
261
+ connection = createConnection(this.components, {
262
+ id,
263
+ maConn: upgradedConn,
264
+ remotePeer,
265
+ direction,
266
+ muxerFactory,
267
+ encryption: cryptoProtocol,
268
+ limits,
235
269
  outboundStreamProtocolNegotiationTimeout: this.outboundStreamProtocolNegotiationTimeout,
236
270
  inboundStreamProtocolNegotiationTimeout: this.inboundStreamProtocolNegotiationTimeout
237
271
  });
238
- connection.addEventListener('close', () => {
239
- this.events.safeDispatchEvent('connection:close', {
240
- detail: connection
241
- });
242
- });
243
272
  this.events.safeDispatchEvent('connection:open', {
244
273
  detail: connection
245
274
  });
@@ -251,18 +280,22 @@ export class Upgrader {
251
280
  async _encryptInbound(connection, options) {
252
281
  const protocols = Array.from(this.connectionEncrypters.keys());
253
282
  try {
254
- const protocol = await mss.handle(connection, protocols, options);
283
+ const { stream, protocol } = await mss.handle(connection, protocols, {
284
+ ...options,
285
+ log: connection.log
286
+ });
255
287
  const encrypter = this.connectionEncrypters.get(protocol);
256
288
  if (encrypter == null) {
257
289
  throw new EncryptionFailedError(`no crypto module found for ${protocol}`);
258
290
  }
259
- connection.log('encrypting inbound connection using %s', protocol);
291
+ connection.log('encrypting inbound connection to %a using %s', connection.remoteAddr, protocol);
260
292
  return {
261
- ...await encrypter.secureInbound(connection, options),
293
+ ...await encrypter.secureInbound(stream, options),
262
294
  protocol
263
295
  };
264
296
  }
265
297
  catch (err) {
298
+ connection.log.error('encrypting inbound connection from %a failed', connection.remoteAddr, err);
266
299
  throw new EncryptionFailedError(err.message);
267
300
  }
268
301
  }
@@ -274,18 +307,23 @@ export class Upgrader {
274
307
  const protocols = Array.from(this.connectionEncrypters.keys());
275
308
  try {
276
309
  connection.log.trace('selecting encrypter from %s', protocols);
277
- const protocol = await mss.select(connection, protocols, options);
310
+ const { stream, protocol } = await mss.select(connection, protocols, {
311
+ ...options,
312
+ log: connection.log,
313
+ yieldBytes: true
314
+ });
278
315
  const encrypter = this.connectionEncrypters.get(protocol);
279
316
  if (encrypter == null) {
280
317
  throw new EncryptionFailedError(`no crypto module found for ${protocol}`);
281
318
  }
282
- connection.log('encrypting outbound connection using %s', protocol);
319
+ connection.log('encrypting outbound connection to %a using %s', connection.remoteAddr, protocol);
283
320
  return {
284
- ...await encrypter.secureOutbound(connection, options),
321
+ ...await encrypter.secureOutbound(stream, options),
285
322
  protocol
286
323
  };
287
324
  }
288
325
  catch (err) {
326
+ connection.log.error('encrypting outbound connection to %a failed', connection.remoteAddr, err);
289
327
  throw new EncryptionFailedError(err.message);
290
328
  }
291
329
  }
@@ -293,21 +331,22 @@ export class Upgrader {
293
331
  * Selects one of the given muxers via multistream-select. That
294
332
  * muxer will be used for all future streams on the connection.
295
333
  */
296
- async _multiplexOutbound(maConn, muxers, options) {
334
+ async _multiplexOutbound(connection, muxers, options) {
297
335
  const protocols = Array.from(muxers.keys());
298
- maConn.log('outbound selecting muxer %s', protocols);
336
+ connection.log('outbound selecting muxer %s', protocols);
299
337
  try {
300
- maConn.log.trace('selecting stream muxer from %s', protocols);
301
- const protocol = await mss.select(maConn, protocols, options);
338
+ connection.log.trace('selecting stream muxer from %s', protocols);
339
+ const { stream, protocol } = await mss.select(connection, protocols, {
340
+ ...options,
341
+ log: connection.log,
342
+ yieldBytes: true
343
+ });
344
+ connection.log('selected %s as muxer protocol', protocol);
302
345
  const muxerFactory = muxers.get(protocol);
303
- if (muxerFactory == null) {
304
- throw new MuxerUnavailableError(`No muxer configured for protocol "${protocol}"`);
305
- }
306
- maConn.log('selected %s as muxer protocol', protocol);
307
- return muxerFactory;
346
+ return { stream, muxerFactory };
308
347
  }
309
348
  catch (err) {
310
- maConn.log.error('error multiplexing outbound connection', err);
349
+ connection.log.error('error multiplexing outbound connection', err);
311
350
  throw new MuxerUnavailableError(String(err));
312
351
  }
313
352
  }
@@ -315,22 +354,20 @@ export class Upgrader {
315
354
  * Registers support for one of the given muxers via multistream-select. The
316
355
  * selected muxer will be used for all future streams on the connection.
317
356
  */
318
- async _multiplexInbound(maConn, muxers, options) {
357
+ async _multiplexInbound(connection, muxers, options) {
319
358
  const protocols = Array.from(muxers.keys());
320
- maConn.log('inbound handling muxers %s', protocols);
359
+ connection.log('inbound handling muxers %s', protocols);
321
360
  try {
322
- maConn.log.trace('selecting stream muxer from %s', protocols);
323
- const protocol = await mss.handle(maConn, protocols, options);
361
+ const { stream, protocol } = await mss.handle(connection, protocols, {
362
+ ...options,
363
+ log: connection.log
364
+ });
324
365
  const muxerFactory = muxers.get(protocol);
325
- if (muxerFactory == null) {
326
- throw new MuxerUnavailableError(`No muxer configured for protocol "${protocol}"`);
327
- }
328
- maConn.log('selected %s as muxer protocol', protocol);
329
- return muxerFactory;
366
+ return { stream, muxerFactory };
330
367
  }
331
368
  catch (err) {
332
- maConn.log.error('error multiplexing inbound connection', err);
333
- throw err;
369
+ connection.log.error('error multiplexing inbound connection', err);
370
+ throw new MuxerUnavailableError(String(err));
334
371
  }
335
372
  }
336
373
  getConnectionEncrypters() {
@@ -340,7 +377,4 @@ export class Upgrader {
340
377
  return this.streamMuxers;
341
378
  }
342
379
  }
343
- function isEncryptionSkipped(opts) {
344
- return opts.skipEncryption === true;
345
- }
346
380
  //# sourceMappingURL=upgrader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"upgrader.js","sourceRoot":"","sources":["../../src/upgrader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC7E,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAA;AACnI,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AA+E7H,MAAM,OAAO,QAAQ;IACF,UAAU,CAAoB;IAC9B,oBAAoB,CAAkC;IACtD,YAAY,CAAiC;IAC7C,qBAAqB,CAAQ;IAC7B,uCAAuC,CAAQ;IAC/C,wCAAwC,CAAQ;IAChD,MAAM,CAAgC;IACtC,OAAO,CAKvB;IAEgB,sB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C,CAAA;YAClE,MAAM,IAAI,qBAAqB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;QAC9C,CAAC;IACH,CAAC;IAED,uBAAuB;QACrB,OAAO,IAAI,CAAC,oBAAoB,CAAA;IAClC,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;CACF"}
@@ -1,3 +1,3 @@
1
- export declare const version = "2.10.0-8484de8a2";
1
+ export declare const version = "2.10.0-87bc8d4fb";
2
2
  export declare const name = "js-libp2p";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,3 +1,3 @@
1
- export const version = '2.10.0-8484de8a2';
1
+ export const version = '2.10.0-87bc8d4fb';
2
2
  export const name = 'js-libp2p';
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libp2p",
3
- "version": "2.10.0-8484de8a2",
3
+ "version": "2.10.0-87bc8d4fb",
4
4
  "description": "JavaScript implementation of libp2p, a modular peer to peer network stack",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/libp2p#readme",
@@ -80,44 +80,47 @@
80
80
  "dependencies": {
81
81
  "@chainsafe/is-ip": "^2.1.0",
82
82
  "@chainsafe/netmask": "^2.0.0",
83
- "@libp2p/crypto": "5.1.8-8484de8a2",
84
- "@libp2p/interface": "2.11.0-8484de8a2",
85
- "@libp2p/interface-internal": "2.3.19-8484de8a2",
86
- "@libp2p/logger": "5.2.0-8484de8a2",
87
- "@libp2p/multistream-select": "6.0.29-8484de8a2",
88
- "@libp2p/peer-collections": "6.0.35-8484de8a2",
89
- "@libp2p/peer-id": "5.1.9-8484de8a2",
90
- "@libp2p/peer-store": "11.2.7-8484de8a2",
91
- "@libp2p/utils": "6.7.2-8484de8a2",
83
+ "@libp2p/crypto": "5.1.8-87bc8d4fb",
84
+ "@libp2p/interface": "2.11.0-87bc8d4fb",
85
+ "@libp2p/interface-internal": "2.3.19-87bc8d4fb",
86
+ "@libp2p/logger": "5.2.0-87bc8d4fb",
87
+ "@libp2p/multistream-select": "6.0.29-87bc8d4fb",
88
+ "@libp2p/peer-collections": "6.0.35-87bc8d4fb",
89
+ "@libp2p/peer-id": "5.1.9-87bc8d4fb",
90
+ "@libp2p/peer-store": "11.2.7-87bc8d4fb",
91
+ "@libp2p/utils": "6.7.2-87bc8d4fb",
92
92
  "@multiformats/dns": "^1.0.6",
93
- "@multiformats/multiaddr": "^13.0.1",
94
- "@multiformats/multiaddr-matcher": "^3.0.1",
93
+ "@multiformats/multiaddr": "^12.4.4",
94
+ "@multiformats/multiaddr-matcher": "^2.0.0",
95
95
  "any-signal": "^4.1.1",
96
- "datastore-core": "^10.0.4",
97
- "interface-datastore": "^8.3.2",
98
- "it-merge": "^3.0.12",
99
- "it-parallel": "^3.0.13",
96
+ "datastore-core": "^10.0.2",
97
+ "interface-datastore": "^8.3.1",
98
+ "it-byte-stream": "^2.0.2",
99
+ "it-merge": "^3.0.11",
100
+ "it-parallel": "^3.0.11",
100
101
  "main-event": "^1.0.1",
101
- "multiformats": "^13.4.0",
102
+ "multiformats": "^13.3.6",
102
103
  "p-defer": "^4.0.1",
103
- "p-event": "^6.0.1",
104
- "p-retry": "^7.0.0",
104
+ "p-retry": "^6.2.1",
105
105
  "progress-events": "^1.0.1",
106
- "race-signal": "^2.0.0",
106
+ "race-event": "^1.3.0",
107
+ "race-signal": "^1.1.3",
107
108
  "uint8arrays": "^5.1.0"
108
109
  },
109
110
  "devDependencies": {
110
- "aegir": "^47.0.21",
111
+ "aegir": "^47.0.14",
111
112
  "delay": "^6.0.0",
112
- "it-all": "^3.0.9",
113
- "it-drain": "^3.0.10",
113
+ "it-all": "^3.0.8",
114
+ "it-drain": "^3.0.9",
114
115
  "it-length-prefixed": "^10.0.1",
115
- "it-map": "^3.1.4",
116
- "it-take": "^3.0.9",
116
+ "it-map": "^3.1.3",
117
+ "it-pair": "^2.0.6",
118
+ "it-pipe": "^3.0.1",
119
+ "it-take": "^3.0.8",
120
+ "p-event": "^6.0.1",
117
121
  "p-wait-for": "^5.0.2",
118
- "sinon": "^21.0.0",
122
+ "sinon": "^20.0.0",
119
123
  "sinon-ts": "^2.0.0",
120
- "uint8arraylist": "^2.4.8",
121
124
  "wherearewe": "^2.0.1"
122
125
  },
123
126
  "browser": {