Skip to content

Commit b6681bd

Browse files
committed
docs: remove mplex from docs
1 parent 3b43a37 commit b6681bd

File tree

11 files changed

+26
-101
lines changed

11 files changed

+26
-101
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ List of packages currently in existence for libp2p
195195
| [`@chainsafe/libp2p-noise`](//github.com/ChainSafe/js-libp2p-noise) | [![npm](https://img.shields.io/npm/v/%40chainsafe%2Flibp2p-noise.svg?maxAge=86400&style=flat-square)](//github.com/ChainSafe/js-libp2p-noise/releases) | [![Deps](https://img.shields.io/librariesio/release/npm/%40chainsafe%2Flibp2p-noise?logo=Libraries.io&logoColor=white&style=flat-square)](//libraries.io/npm/%40chainsafe%2Flibp2p-noise) | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/ChainSafe/js-libp2p-noise/js-test-and-release.yml?branch=master&label=ci&style=flat-square)](//github.com/ChainSafe/js-libp2p-noise/actions?query=branch%3Amaster+workflow%3Aci+) | [![codecov](https://codecov.io/gh/ChainSafe/js-libp2p-noise/branch/master/graph/badge.svg?style=flat-square)](https://codecov.io/gh/ChainSafe/js-libp2p-noise) |
196196
| [`@libp2p/plaintext`](//github.com/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext) | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fplaintext.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext/releases) | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fplaintext?logo=Libraries.io&logoColor=white&style=flat-square)](//libraries.io/npm/%40libp2p%2Fplaintext) | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext/main.yml?branch=main&label=ci&style=flat-square)](//github.com/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext/actions?query=branch%3Amain+workflow%3Aci+) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext) |
197197
| **stream multiplexers** |
198-
| [`@libp2p/mplex`](//github.com/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex) | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fmplex.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex/releases) | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fmplex?logo=Libraries.io&logoColor=white&style=flat-square)](//libraries.io/npm/%40libp2p%2Fmplex) | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex/main.yml?branch=main&label=ci&style=flat-square)](//github.com/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex/actions?query=branch%3Amain+workflow%3Aci+) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex) |
199198
| [`@chainsafe/libp2p-yamux`](//github.com/ChainSafe/js-libp2p-yamux) | [![npm](https://img.shields.io/npm/v/%40chainsafe%2Flibp2p-yamux.svg?maxAge=86400&style=flat-square)](//github.com/ChainSafe/js-libp2p-yamux/releases) | [![Deps](https://img.shields.io/librariesio/release/npm/%40chainsafe%2Flibp2p-yamux?logo=Libraries.io&logoColor=white&style=flat-square)](//libraries.io/npm/%40chainsafe%2Flibp2p-yamux) | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/ChainSafe/js-libp2p-yamux/js-test-and-release.yml?branch=master&label=ci&style=flat-square)](//github.com/ChainSafe/js-libp2p-yamux/actions?query=branch%3Amaster+workflow%3Aci+) | [![codecov](https://codecov.io/gh/ChainSafe/js-libp2p-yamux/branch/master/graph/badge.svg?style=flat-square)](https://codecov.io/gh/ChainSafe/js-libp2p-yamux) |
200199
| **peer discovery** |
201200
| [`@libp2p/bootstrap`](//github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap) | [![npm](https://img.shields.io/npm/v/%40libp2p%2Fbootstrap.svg?maxAge=86400&style=flat-square)](//github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap/releases) | [![Deps](https://img.shields.io/librariesio/release/npm/%40libp2p%2Fbootstrap?logo=Libraries.io&logoColor=white&style=flat-square)](//libraries.io/npm/%40libp2p%2Fbootstrap) | [![GitHub CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap/main.yml?branch=main&label=ci&style=flat-square)](//github.com/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap/actions?query=branch%3Amain+workflow%3Aci+) | [![codecov](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p/tree/main/packages/peer-discovery-bootstrap) |

doc/ARCHITECTURE.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
js-libp2p is comprised of a number of components that work together to provide functionality such as dailling peers, managing connections, registering protocols, storing information about peers and much more. This document aims to provide a high level overview of the components and how they interact with each other.
44

55
- [Libp2p Architecture](#libp2p-architecture)
6-
- [Component Diagram](#component-diagram)
7-
- [Sequence Diagrams](#sequence-diagrams)
8-
- [Dialing a Peer](#dialing-a-peer)
9-
- [Opening a stream on a connection](#opening-a-stream-on-a-connection)
6+
- [Component Diagram](#component-diagram)
7+
- [Sequence Diagrams](#sequence-diagrams)
8+
- [Dialing a Peer](#dialing-a-peer)
9+
- [Opening a stream on a connection](#opening-a-stream-on-a-connection)
1010

1111
## Component Diagram
1212

@@ -57,7 +57,6 @@ flowchart TB
5757
subgraph Multiplexer[Stream Multiplexers]
5858
direction TB
5959
Yamux
60-
Mplex
6160
end
6261
6362
Multiplexer ~~~ Encryption ~~~ Transports

doc/CONFIGURATION.md

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ If you want to know more about libp2p transports, you should read the following
8989
9090
Some available stream multiplexers are:
9191

92-
- [@libp2p/mplex](https://github.com/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex)
9392
- [@chainsafe/libp2p-yamux](https://github.com/chainsafe/js-libp2p-yamux)
9493

9594
Some transports such as WebRTC and WebTransport come with their own built-in stream multiplexing capabilities.
@@ -100,7 +99,7 @@ If you want to know more about libp2p stream multiplexing, you should read the f
10099

101100
- https://docs.libp2p.io/concepts/stream-multiplexing
102101
- https://github.com/libp2p/specs/tree/master/connections
103-
- https://github.com/libp2p/specs/tree/master/mplex
102+
- https://github.com/libp2p/specs/tree/master/yamux
104103

105104
#### Muxer Selection
106105

@@ -239,7 +238,7 @@ It's important to note that some services depend on others in order to function
239238
// Creating a libp2p node with:
240239
// listen on tcp ports 9001 and 9002 on all interfaces
241240
// transport: websockets + tcp
242-
// stream-muxing: mplex
241+
// stream-muxing: yamux
243242
// crypto-channel: noise
244243
// discovery: multicast-dns
245244
// dht: kad-dht
@@ -248,7 +247,6 @@ It's important to note that some services depend on others in order to function
248247
import { createLibp2p } from 'libp2p'
249248
import { tcp } from '@libp2p/tcp'
250249
import { webSockets } from '@libp2p/websockets'
251-
import { mplex } from '@libp2p/mplex'
252250
import { noise } from '@chainsafe/libp2p-noise'
253251
import { mdns } from '@libp2p/mdns'
254252
import { kadDHT } from '@libp2p/kad-dht'
@@ -266,7 +264,7 @@ const node = await createLibp2p({
266264
tcp(),
267265
webSockets()
268266
],
269-
streamMuxers: [yamux(), mplex()],
267+
streamMuxers: [yamux()],
270268
connectionEncrypters: [noise()],
271269
peerDiscovery: [MulticastDNS],
272270
services: {
@@ -281,15 +279,14 @@ const node = await createLibp2p({
281279
```js
282280
import { createLibp2p } from 'libp2p'
283281
import { tcp } from '@libp2p/tcp'
284-
import { mplex } from '@libp2p/mplex'
285282
import { yamux } from '@chainsafe/libp2p-yamux'
286283
import { noise } from '@chainsafe/libp2p-noise'
287284
import { mdns } from '@libp2p/mdns'
288285
import { bootstrap } from '@libp2p/bootstrap'
289286

290287
const node = await createLibp2p({
291288
transports: [tcp()],
292-
streamMuxers: [yamux(), mplex()],
289+
streamMuxers: [yamux()],
293290
connectionEncrypters: [noise()],
294291
peerDiscovery: [
295292
mdns({
@@ -321,7 +318,6 @@ Potential methods for discovering peers include:
321318
```js
322319
import { createLibp2p } from 'libp2p'
323320
import { tcp } from '@libp2p/tcp'
324-
import { mplex } from '@libp2p/mplex'
325321
import { yamux } from '@chainsafe/libp2p-yamux'
326322
import { noise } from '@chainsafe/libp2p-noise'
327323
import { gossipsub } from 'libp2p-gossipsub'
@@ -333,8 +329,7 @@ const node = await createLibp2p({
333329
tcp()
334330
],
335331
streamMuxers: [
336-
yamux(),
337-
mplex()
332+
yamux()
338333
],
339334
connectionEncrypters: [
340335
noise()
@@ -360,7 +355,6 @@ The kadDHT service requires the Identify service to discover other peers that su
360355
```js
361356
import { createLibp2p } from 'libp2p'
362357
import { tcp } from '@libp2p/tcp'
363-
import { mplex } from '@libp2p/mplex'
364358
import { noise } from '@chainsafe/libp2p-noise'
365359
import { kadDHT } from '@libp2p/kad-dht'
366360
import { identify } from '@libp2p/identify'
@@ -370,8 +364,7 @@ const node = await createLibp2p({
370364
tcp()
371365
],
372366
streamMuxers: [
373-
yamux(),
374-
mplex()
367+
yamux()
375368
],
376369
connectionEncrypters: [
377370
noise()
@@ -391,7 +384,6 @@ const node = await createLibp2p({
391384
```js
392385
import { createLibp2p } from 'libp2p'
393386
import { tcp } from '@libp2p/tcp'
394-
import { mplex } from '@libp2p/mplex'
395387
import { yamux } from '@chainsafe/libp2p-yamux'
396388
import { noise } from '@chainsafe/libp2p-noise'
397389
import { create as ipfsHttpClient } from 'ipfs-http-client'
@@ -418,8 +410,7 @@ const node = await createLibp2p({
418410
tcp()
419411
],
420412
streamMuxers: [
421-
yamux(),
422-
mplex()
413+
yamux()
423414
],
424415
connectionEncrypters: [
425416
noise()
@@ -447,7 +438,6 @@ Thus, it is recommended to include the Identify service in your services configu
447438
```js
448439
import { createLibp2p } from 'libp2p'
449440
import { tcp } from '@libp2p/tcp'
450-
import { mplex } from '@libp2p/mplex'
451441
import { yamux } from '@chainsafe/libp2p-yamux'
452442
import { noise } from '@chainsafe/libp2p-noise'
453443
import { circuitRelayTransport, circuitRelayServer } from '@libp2p/circuit-relay-v2'
@@ -463,8 +453,7 @@ const node = await createLibp2p({
463453
})
464454
],
465455
streamMuxers: [
466-
yamux(),
467-
mplex()
456+
yamux()
468457
],
469458
connectionEncrypters: [
470459
noise()
@@ -505,7 +494,6 @@ In this configuration the libp2p node will search the network for one relay with
505494
```js
506495
import { createLibp2p } from 'libp2p'
507496
import { tcp } from '@libp2p/tcp'
508-
import { mplex } from '@libp2p/mplex'
509497
import { yamux } from '@chainsafe/libp2p-yamux'
510498
import { noise } from '@chainsafe/libp2p-noise'
511499
import { circuitRelayTransport } from '@libp2p/circuit-relay-v2'
@@ -518,8 +506,7 @@ const node = await createLibp2p({
518506
})
519507
],
520508
streamMuxers: [
521-
yamux(),
522-
mplex()
509+
yamux()
523510
],
524511
connectionEncrypters: [
525512
noise()
@@ -534,7 +521,6 @@ In this configuration the libp2p node is a circuit relay client which connects t
534521
```js
535522
import { createLibp2p } from 'libp2p'
536523
import { tcp } from '@libp2p/tcp'
537-
import { mplex } from '@libp2p/mplex'
538524
import { noise } from '@chainsafe/libp2p-noise'
539525
import { circuitRelayTransport } from '@libp2p/circuit-relay-v2'
540526

@@ -549,8 +535,7 @@ const node = await createLibp2p({
549535
]
550536
},
551537
streamMuxers: [
552-
yamux(),
553-
mplex()
538+
yamux()
554539
],
555540
connectionEncrypters: [
556541
noise()
@@ -572,7 +557,6 @@ The keychain will store keys encrypted in the datastore which default is an in m
572557
```js
573558
import { createLibp2p } from 'libp2p'
574559
import { tcp } from '@libp2p/tcp'
575-
import { mplex } from '@libp2p/mplex'
576560
import { yamux } from '@chainsafe/libp2p-yamux'
577561
import { noise } from '@chainsafe/libp2p-noise'
578562
import { FsDatastore } from 'datastore-fs';
@@ -586,8 +570,7 @@ const node = await createLibp2p({
586570
tcp()
587571
],
588572
streamMuxers: [
589-
yamux(),
590-
mplex()
573+
yamux()
591574
],
592575
connectionEncrypters: [
593576
noise()
@@ -610,7 +593,6 @@ See the [API docs](https://libp2p.github.io/js-libp2p/interfaces/index._internal
610593
```js
611594
import { createLibp2p } from 'libp2p'
612595
import { tcp } from '@libp2p/tcp'
613-
import { mplex } from '@libp2p/mplex'
614596
import { yamux } from '@chainsafe/libp2p-yamux'
615597
import { noise } from '@chainsafe/libp2p-noise'
616598

@@ -619,8 +601,7 @@ const node = await createLibp2p({
619601
tcp()
620602
],
621603
streamMuxers: [
622-
yamux(),
623-
mplex()
604+
yamux()
624605
],
625606
connectionEncrypters: [
626607
noise()
@@ -759,7 +740,6 @@ The Transport Manager is responsible for managing the libp2p transports life cyc
759740
```js
760741
import { createLibp2p } from 'libp2p'
761742
import { tcp } from '@libp2p/tcp'
762-
import { mplex } from '@libp2p/mplex'
763743
import { yamux } from '@chainsafe/libp2p-yamux'
764744
import { noise } from '@chainsafe/libp2p-noise'
765745
import { FaultTolerance } from '@libp2p/interface-transport'
@@ -769,8 +749,7 @@ const node = await createLibp2p({
769749
tcp()
770750
],
771751
streamMuxers: [
772-
yamux(),
773-
mplex()
752+
yamux()
774753
],
775754
connectionEncrypters: [
776755
noise()
@@ -798,7 +777,6 @@ The below configuration example shows how the metrics should be configured. Asid
798777
```js
799778
import { createLibp2p } from 'libp2p'
800779
import { tcp } from '@libp2p/tcp'
801-
import { mplex } from '@libp2p/mplex'
802780
import { yamux } from '@chainsafe/libp2p-yamux'
803781
import { noise } from '@chainsafe/libp2p-noise'
804782

@@ -807,8 +785,7 @@ const node = await createLibp2p({
807785
tcp()
808786
],
809787
streamMuxers: [
810-
yamux(),
811-
mplex()
788+
yamux()
812789
],
813790
connectionEncrypters: [
814791
noise()
@@ -843,7 +820,6 @@ The below configuration example shows how the PeerStore should be configured. As
843820
```js
844821
import { createLibp2p } from 'libp2p'
845822
import { tcp } from '@libp2p/tcp'
846-
import { mplex } from '@libp2p/mplex'
847823
import { yamux } from '@chainsafe/libp2p-yamux'
848824
import { noise } from '@chainsafe/libp2p-noise'
849825
import { LevelDatastore } from 'datastore-level'
@@ -857,8 +833,7 @@ const node = await createLibp2p({
857833
tcp()
858834
],
859835
streamMuxers: [
860-
yamux(),
861-
mplex()
836+
yamux()
862837
],
863838
connectionEncrypters: [
864839
noise()

doc/GETTING_STARTED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ If you want to know more about libp2p stream multiplexing, you should read the f
148148

149149
- https://docs.libp2p.io/concepts/stream-multiplexing
150150
- https://github.com/libp2p/specs/tree/master/connections
151-
- https://github.com/libp2p/specs/tree/master/mplex
151+
- https://github.com/libp2p/specs/tree/master/yamux
152152
</details>
153153

154154
#### Running Libp2p

doc/LIMITS.md

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ This is important for [DoS](https://en.wikipedia.org/wiki/Denial-of-service_atta
1010
- [Closing connections](#closing-connections)
1111
- [Inbound connection threshold](#inbound-connection-threshold)
1212
- [Stream limits](#stream-limits)
13-
- [Mplex](#mplex)
1413
- [Yamux](#yamux)
1514
- [Protocol limits](#protocol-limits)
1615
- [Transport specific limits](#transport-specific-limits)
@@ -101,50 +100,6 @@ libp2p stream multiplexers impose limits on the amount of streams that can be op
101100

102101
These settings are done on a per-muxer basis, please see the README of the relevant muxer you are using.
103102

104-
### Mplex
105-
106-
[@libp2p/mplex](https://github.com/libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex) supports the following.
107-
108-
All fields are optional. The default values are defined in [@libp2p/mplex/src/mplex.ts](https://github.com/libp2p/js-libp2p/blob/main/packages/stream-multiplexer-mplex/src/mplex.ts) - please see that file for the current values.
109-
110-
```TypeScript
111-
import { createLibp2p } from 'libp2p'
112-
import { mplex } from '@libp2p/mplex'
113-
114-
const node = await createLibp2p({
115-
streamMuxers: [
116-
mplex({
117-
/**
118-
* The total number of inbound protocol streams that can be opened on a given connection
119-
*/
120-
maxInboundStreams: 100,
121-
122-
/**
123-
* The total number of outbound protocol streams that can be opened on a given connection
124-
*/
125-
maxOutboundStreams: 100,
126-
127-
/**
128-
* How much incoming data in bytes to buffer while attempting to parse messages - peers sending many small messages in batches may cause this buffer to grow
129-
*/
130-
maxUnprocessedMessageQueueSize: 50,
131-
132-
/**
133-
* How much message data in bytes to buffer after parsing - slow stream consumers may cause this buffer to grow
134-
*/
135-
maxStreamBufferSize: 20,
136-
137-
/**
138-
* Mplex does not support backpressure so to protect ourselves, if `maxInboundStreams` is
139-
* hit and the remote opens more than this many streams per second, close the connection
140-
*/
141-
disconnectThreshold: 20,
142-
}),
143-
],
144-
});
145-
146-
```
147-
148103
### Yamux
149104

150105
[@chainsafe/libp2p-yamux](https://github.com/Chainsafe/js-libp2p-yamux) supports the following.

interop/chromium-version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
}
1818
],
1919
"secureChannels": ["noise"],
20-
"muxers": ["mplex", "yamux"]
20+
"muxers": ["yamux", "mplex"]
2121
}

interop/webkit-version.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"noise"
77
],
88
"muxers": [
9-
"mplex",
10-
"yamux"
9+
"yamux",
10+
"mplex"
1111
]
1212
}

packages/libp2p/package-list.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
["libp2p/js-libp2p/tree/main/packages/connection-encrypter-plaintext", "@libp2p/plaintext", "main", "main.yml"],
2323

2424
"stream multiplexers",
25-
["libp2p/js-libp2p/tree/main/packages/stream-multiplexer-mplex", "@libp2p/mplex", "main", "main.yml"],
2625
["ChainSafe/js-libp2p-yamux", "@chainsafe/libp2p-yamux", "master", "js-test-and-release.yml"],
2726

2827
"peer discovery",

packages/protocol-perf/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ The PerfService implements the [perf protocol](https://github.com/libp2p/specs/b
3131
```typescript
3232
import { noise } from '@chainsafe/libp2p-noise'
3333
import { yamux } from '@chainsafe/libp2p-yamux'
34-
import { mplex } from '@libp2p/mplex'
3534
import { tcp } from '@libp2p/tcp'
3635
import { createLibp2p, type Libp2p } from 'libp2p'
3736
import { plaintext } from '@libp2p/plaintext'
@@ -55,7 +54,7 @@ async function createNode (): Promise<Libp2p<{ perf: Perf }>> {
5554
noise(), plaintext()
5655
],
5756
streamMuxers: [
58-
yamux(), mplex()
57+
yamux()
5958
],
6059
services: {
6160
perf: perf()

0 commit comments

Comments
 (0)