Skip to content

Commit f86111b

Browse files
feat: use yamux instead of mplex
1 parent 25f838a commit f86111b

File tree

3 files changed

+53
-6
lines changed

3 files changed

+53
-6
lines changed

package-lock.json

+48-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/sdk/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
},
6363
"dependencies": {
6464
"@chainsafe/libp2p-noise": "^14.1.0",
65+
"@chainsafe/libp2p-yamux": "^6.0.2",
66+
"@libp2p/bootstrap": "^10",
6567
"@libp2p/identify": "^1.0.11",
6668
"@libp2p/mplex": "^10.0.12",
6769
"@libp2p/ping": "^1.0.11",
@@ -73,8 +75,7 @@
7375
"@waku/peer-exchange": "^0.0.20",
7476
"@waku/relay": "0.0.10",
7577
"@waku/utils": "0.0.15",
76-
"libp2p": "^1.1.2",
77-
"@libp2p/bootstrap": "^10.0.11"
78+
"libp2p": "^1.1.2"
7879
},
7980
"devDependencies": {
8081
"@chainsafe/libp2p-gossipsub": "^12.0.0",

packages/sdk/src/utils/libp2p.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
22
import { noise } from "@chainsafe/libp2p-noise";
3+
import { yamux } from "@chainsafe/libp2p-yamux";
34
import { bootstrap } from "@libp2p/bootstrap";
45
import { identify } from "@libp2p/identify";
5-
import { mplex } from "@libp2p/mplex";
66
import { ping } from "@libp2p/ping";
77
import { webSockets } from "@libp2p/websockets";
88
import { all as filterAll } from "@libp2p/websockets/filters";
@@ -63,7 +63,7 @@ export async function defaultLibp2p(
6363
minConnections: 1
6464
},
6565
transports: [webSockets({ filter: filterAll })],
66-
streamMuxers: [mplex()],
66+
streamMuxers: [yamux()],
6767
connectionEncryption: [noise()],
6868
...options,
6969
services: {

0 commit comments

Comments
 (0)