diff --git a/.changeset/modern-hairs-scream.md b/.changeset/modern-hairs-scream.md new file mode 100644 index 0000000..12042f0 --- /dev/null +++ b/.changeset/modern-hairs-scream.md @@ -0,0 +1,5 @@ +--- +'@rosen-bridge/rosenet-utils': patch +--- + +Append unused format parameters to format function diff --git a/.changeset/tame-queens-study.md b/.changeset/tame-queens-study.md new file mode 100644 index 0000000..66ff1b0 --- /dev/null +++ b/.changeset/tame-queens-study.md @@ -0,0 +1,6 @@ +--- +'@rosen-bridge/rosenet-relay': minor +'@rosen-bridge/rosenet-node': minor +--- + +Switch from mplex to yamux for multiplexing diff --git a/package-lock.json b/package-lock.json index a182aad..2ad1be2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -645,6 +645,20 @@ "npm": ">=7.0.0" } }, + "node_modules/@chainsafe/libp2p-yamux": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-yamux/-/libp2p-yamux-6.0.2.tgz", + "integrity": "sha512-S5OkLHqYhEVMQQ4BTgnRANEIbGTQhaC23glCgBwGdeoTRtMpIozwDiPfljFLCm0RYWdCRJw9oFztO95KUHjptA==", + "dependencies": { + "@libp2p/interface": "^1.1.3", + "@libp2p/utils": "^5.2.5", + "get-iterator": "^2.0.1", + "it-foreach": "^2.0.6", + "it-pipe": "^3.0.1", + "it-pushable": "^3.2.3", + "uint8arraylist": "^2.4.8" + } + }, "node_modules/@chainsafe/netmask": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@chainsafe/netmask/-/netmask-2.0.0.tgz", @@ -5656,6 +5670,14 @@ "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.4.tgz", "integrity": "sha512-FtQl84iTNxN5EItP/JgL28V2rzNMkCzTUlNoj41eVdfix2z1DBuLnBqZ0hzYhGGa1rMpbQf0M7CQSA2adlrLJg==" }, + "node_modules/it-foreach": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.1.1.tgz", + "integrity": "sha512-ID4Gxnavk/LVQLQESAQ9hR6dR63Ih6X+8VdxEktX8rpz2dCGAbZpey/eljTNbMfV2UKXHiu6UsneoNBZuac97g==", + "dependencies": { + "it-peekable": "^3.0.0" + } + }, "node_modules/it-length-prefixed": { "version": "9.0.4", "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-9.0.4.tgz", @@ -9380,6 +9402,7 @@ "dependencies": { "@chainsafe/libp2p-gossipsub": "^12.0.0", "@chainsafe/libp2p-noise": "^15.0.0", + "@chainsafe/libp2p-yamux": "^6.0.2", "@libp2p/bootstrap": "^10.0.15", "@libp2p/circuit-relay-v2": "^1.0.15", "@libp2p/identify": "^1.0.14", @@ -9664,6 +9687,7 @@ "dependencies": { "@chainsafe/libp2p-gossipsub": "^12.0.0", "@chainsafe/libp2p-noise": "^15.0.0", + "@chainsafe/libp2p-yamux": "^6.0.2", "@libp2p/circuit-relay-v2": "^1.0.15", "@libp2p/identify": "^1.0.14", "@libp2p/interface": "^1.1.3", @@ -10065,6 +10089,7 @@ } }, "tests/scaling-large-messages": { + "name": "@rosenet-tests/scaling-large-messages", "version": "0.0.0", "license": "GPL-3.0", "dependencies": { diff --git a/packages/rosenet-node/lib/createRoseNetNode.ts b/packages/rosenet-node/lib/createRoseNetNode.ts index 458059d..6b8ccad 100644 --- a/packages/rosenet-node/lib/createRoseNetNode.ts +++ b/packages/rosenet-node/lib/createRoseNetNode.ts @@ -4,7 +4,7 @@ import { bootstrap } from '@libp2p/bootstrap'; import { circuitRelayTransport } from '@libp2p/circuit-relay-v2'; import { identify } from '@libp2p/identify'; import { PeerId } from '@libp2p/interface'; -import { mplex } from '@libp2p/mplex'; +import { yamux } from '@chainsafe/libp2p-yamux'; import { pubsubPeerDiscovery } from '@libp2p/pubsub-peer-discovery'; import { tcp } from '@libp2p/tcp'; import map from 'it-map'; @@ -95,7 +95,7 @@ const createRoseNetNode = async ({ denyDialPeer: isPeerUnauthorized, }), }, - streamMuxers: [mplex()], + streamMuxers: [yamux()], peerDiscovery: [ bootstrap({ list: config.relayMultiaddrs, diff --git a/packages/rosenet-node/package.json b/packages/rosenet-node/package.json index 39be0d3..171b287 100644 --- a/packages/rosenet-node/package.json +++ b/packages/rosenet-node/package.json @@ -37,10 +37,10 @@ "dependencies": { "@chainsafe/libp2p-gossipsub": "^12.0.0", "@chainsafe/libp2p-noise": "^15.0.0", + "@chainsafe/libp2p-yamux": "^6.0.2", "@libp2p/bootstrap": "^10.0.15", "@libp2p/circuit-relay-v2": "^1.0.15", "@libp2p/identify": "^1.0.14", - "@libp2p/mplex": "^10.0.15", "@libp2p/peer-id": "^4.0.6", "@libp2p/pubsub-peer-discovery": "^10.0.2", "@libp2p/tcp": "^9.0.15", diff --git a/packages/rosenet-relay/lib/createRoseNetRelay.ts b/packages/rosenet-relay/lib/createRoseNetRelay.ts index 031b33b..ab435be 100644 --- a/packages/rosenet-relay/lib/createRoseNetRelay.ts +++ b/packages/rosenet-relay/lib/createRoseNetRelay.ts @@ -3,7 +3,7 @@ import { noise } from '@chainsafe/libp2p-noise'; import { circuitRelayServer } from '@libp2p/circuit-relay-v2'; import { identify } from '@libp2p/identify'; import { PeerId } from '@libp2p/interface'; -import { mplex } from '@libp2p/mplex'; +import { yamux } from '@chainsafe/libp2p-yamux'; import { pubsubPeerDiscovery } from '@libp2p/pubsub-peer-discovery'; import { tcp } from '@libp2p/tcp'; import { createLibp2p } from 'libp2p'; @@ -63,7 +63,7 @@ const createRoseNetRelay = async ({ denyInboundRelayedConnection: () => true, denyDialPeer: isPeerUnauthorized, }, - streamMuxers: [mplex()], + streamMuxers: [yamux()], services: { circuitRelay: circuitRelayServer({ reservations: { diff --git a/packages/rosenet-relay/package.json b/packages/rosenet-relay/package.json index 03d20bb..ef7cfa9 100644 --- a/packages/rosenet-relay/package.json +++ b/packages/rosenet-relay/package.json @@ -35,10 +35,10 @@ "dependencies": { "@chainsafe/libp2p-gossipsub": "^12.0.0", "@chainsafe/libp2p-noise": "^15.0.0", + "@chainsafe/libp2p-yamux": "^6.0.2", "@libp2p/circuit-relay-v2": "^1.0.15", "@libp2p/identify": "^1.0.14", "@libp2p/interface": "^1.1.3", - "@libp2p/mplex": "^10.0.15", "@libp2p/pubsub-peer-discovery": "^10.0.2", "@libp2p/tcp": "^9.0.15", "@rosen-bridge/logger-interface": "^0.2.0",