Skip to content

Commit

Permalink
feat: use yamux instead of mplex
Browse files Browse the repository at this point in the history
  • Loading branch information
danisharora099 committed Mar 7, 2024
1 parent 25f838a commit f86111b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
50 changes: 48 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
},
"dependencies": {
"@chainsafe/libp2p-noise": "^14.1.0",
"@chainsafe/libp2p-yamux": "^6.0.2",
"@libp2p/bootstrap": "^10",
"@libp2p/identify": "^1.0.11",
"@libp2p/mplex": "^10.0.12",
"@libp2p/ping": "^1.0.11",
Expand All @@ -73,8 +75,7 @@
"@waku/peer-exchange": "^0.0.20",
"@waku/relay": "0.0.10",
"@waku/utils": "0.0.15",
"libp2p": "^1.1.2",
"@libp2p/bootstrap": "^10.0.11"
"libp2p": "^1.1.2"
},
"devDependencies": {
"@chainsafe/libp2p-gossipsub": "^12.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/utils/libp2p.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { GossipSub } from "@chainsafe/libp2p-gossipsub";
import { noise } from "@chainsafe/libp2p-noise";
import { yamux } from "@chainsafe/libp2p-yamux";
import { bootstrap } from "@libp2p/bootstrap";
import { identify } from "@libp2p/identify";
import { mplex } from "@libp2p/mplex";
import { ping } from "@libp2p/ping";
import { webSockets } from "@libp2p/websockets";
import { all as filterAll } from "@libp2p/websockets/filters";
Expand Down Expand Up @@ -63,7 +63,7 @@ export async function defaultLibp2p(
minConnections: 1
},
transports: [webSockets({ filter: filterAll })],
streamMuxers: [mplex()],
streamMuxers: [yamux()],
connectionEncryption: [noise()],
...options,
services: {
Expand Down

0 comments on commit f86111b

Please sign in to comment.