Skip to content

Commit

Permalink
Add yamux stream multiplexer in peer package (#413)
Browse files Browse the repository at this point in the history
* Add yamux muxer to peer

* Upgrade version to 0.2.58

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
  • Loading branch information
nikugogoi and neerajvijay1997 authored Sep 15, 2023
1 parent bd73dae commit 77312a2
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 32 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "0.2.57",
"version": "0.2.58",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/cache",
"version": "0.2.57",
"version": "0.2.58",
"description": "Generic object cache",
"main": "dist/index.js",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/cli",
"version": "0.2.57",
"version": "0.2.58",
"main": "dist/index.js",
"license": "AGPL-3.0",
"scripts": {
Expand All @@ -12,13 +12,13 @@
},
"dependencies": {
"@apollo/client": "^3.7.1",
"@cerc-io/cache": "^0.2.57",
"@cerc-io/ipld-eth-client": "^0.2.57",
"@cerc-io/cache": "^0.2.58",
"@cerc-io/ipld-eth-client": "^0.2.58",
"@cerc-io/libp2p": "^0.42.2-laconic-0.1.4",
"@cerc-io/nitro-node": "^0.1.10",
"@cerc-io/peer": "^0.2.57",
"@cerc-io/rpc-eth-client": "^0.2.57",
"@cerc-io/util": "^0.2.57",
"@cerc-io/peer": "^0.2.58",
"@cerc-io/rpc-eth-client": "^0.2.58",
"@cerc-io/util": "^0.2.58",
"@ethersproject/providers": "^5.4.4",
"@graphql-tools/utils": "^9.1.1",
"@ipld/dag-cbor": "^8.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/codegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/codegen",
"version": "0.2.57",
"version": "0.2.58",
"description": "Code generator",
"private": true,
"main": "index.js",
Expand All @@ -20,7 +20,7 @@
},
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@cerc-io/util": "^0.2.57",
"@cerc-io/util": "^0.2.58",
"@graphql-tools/load-files": "^6.5.2",
"@poanet/solidity-flattener": "https://github.com/vulcanize/solidity-flattener.git",
"@solidity-parser/parser": "^0.13.2",
Expand Down
10 changes: 5 additions & 5 deletions packages/graph-node/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@cerc-io/graph-node",
"version": "0.2.57",
"version": "0.2.58",
"main": "dist/index.js",
"license": "AGPL-3.0",
"devDependencies": {
"@cerc-io/solidity-mapper": "^0.2.57",
"@cerc-io/solidity-mapper": "^0.2.58",
"@ethersproject/providers": "^5.4.4",
"@graphprotocol/graph-ts": "^0.22.0",
"@nomiclabs/hardhat-ethers": "^2.0.2",
Expand Down Expand Up @@ -51,9 +51,9 @@
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/assemblyscript": "0.19.10-watcher-ts-0.1.2",
"@cerc-io/cache": "^0.2.57",
"@cerc-io/ipld-eth-client": "^0.2.57",
"@cerc-io/util": "^0.2.57",
"@cerc-io/cache": "^0.2.58",
"@cerc-io/ipld-eth-client": "^0.2.58",
"@cerc-io/util": "^0.2.58",
"@types/json-diff": "^0.5.2",
"@types/yargs": "^17.0.0",
"bn.js": "^4.11.9",
Expand Down
4 changes: 2 additions & 2 deletions packages/ipld-eth-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/ipld-eth-client",
"version": "0.2.57",
"version": "0.2.58",
"description": "IPLD ETH Client",
"main": "dist/index.js",
"scripts": {
Expand All @@ -20,7 +20,7 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.7.1",
"@cerc-io/cache": "^0.2.57",
"@cerc-io/cache": "^0.2.58",
"cross-fetch": "^3.1.4",
"debug": "^4.3.1",
"ethers": "^5.4.4",
Expand Down
3 changes: 2 additions & 1 deletion packages/peer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/peer",
"version": "0.2.57",
"version": "0.2.58",
"description": "libp2p module",
"main": "dist/index.js",
"exports": "./dist/index.js",
Expand Down Expand Up @@ -32,6 +32,7 @@
"@cerc-io/prometheus-metrics": "1.1.4",
"@chainsafe/libp2p-gossipsub": "^6.0.0",
"@chainsafe/libp2p-noise": "^11.0.0",
"@chainsafe/libp2p-yamux": "3.0.7",
"@libp2p/floodsub": "^6.0.0",
"@libp2p/mplex": "^7.1.1",
"@libp2p/peer-id-factory": "^2.0.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/peer/src/peer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { createLibp2p, Libp2p, Libp2pInit } from '@cerc-io/libp2p';
import { webSockets } from '@libp2p/websockets';
import { noise } from '@chainsafe/libp2p-noise';
import { mplex } from '@libp2p/mplex';
import { yamux } from '@chainsafe/libp2p-yamux';
import type { Stream as P2PStream, Connection } from '@libp2p/interface-connection';
import type { PeerInfo } from '@libp2p/interface-peer-info';
import type { Message } from '@libp2p/interface-pubsub';
Expand Down Expand Up @@ -156,7 +157,7 @@ export class Peer {
listen: initOptions.listenMultiaddrs ?? []
},
connectionEncryption: [noise()],
streamMuxers: [mplex()],
streamMuxers: [mplex(), yamux()],
pubsub: initPubsub(initOptions.pubsub),
peerDiscovery: [
// Use pubsub based discovery; relay server acts as a peer discovery source
Expand Down
8 changes: 4 additions & 4 deletions packages/rpc-eth-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/rpc-eth-client",
"version": "0.2.57",
"version": "0.2.58",
"description": "RPC ETH Client",
"main": "dist/index.js",
"scripts": {
Expand All @@ -19,9 +19,9 @@
},
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@cerc-io/cache": "^0.2.57",
"@cerc-io/ipld-eth-client": "^0.2.57",
"@cerc-io/util": "^0.2.57",
"@cerc-io/cache": "^0.2.58",
"@cerc-io/ipld-eth-client": "^0.2.58",
"@cerc-io/util": "^0.2.58",
"chai": "^4.3.4",
"ethers": "^5.4.4",
"left-pad": "^1.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/solidity-mapper/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@cerc-io/solidity-mapper",
"version": "0.2.57",
"version": "0.2.58",
"main": "dist/index.js",
"license": "AGPL-3.0",
"devDependencies": {
"@cerc-io/ipld-eth-client": "^0.2.57",
"@cerc-io/ipld-eth-client": "^0.2.58",
"@ethersproject/abi": "^5.3.0",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-waffle": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/test",
"version": "0.2.57",
"version": "0.2.58",
"main": "dist/index.js",
"license": "AGPL-3.0",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/tracing-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/tracing-client",
"version": "0.2.57",
"version": "0.2.58",
"description": "ETH VM tracing client",
"main": "dist/index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions packages/util/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@cerc-io/util",
"version": "0.2.57",
"version": "0.2.58",
"main": "dist/index.js",
"license": "AGPL-3.0",
"dependencies": {
"@apollo/utils.keyvaluecache": "^1.0.1",
"@cerc-io/nitro-node": "^0.1.10",
"@cerc-io/peer": "^0.2.57",
"@cerc-io/solidity-mapper": "^0.2.57",
"@cerc-io/peer": "^0.2.58",
"@cerc-io/solidity-mapper": "^0.2.58",
"@cerc-io/ts-channel": "1.0.3-ts-nitro-0.1.1",
"@ethersproject/providers": "^5.4.4",
"@graphql-tools/schema": "^9.0.10",
Expand Down Expand Up @@ -49,7 +49,7 @@
"yargs": "^17.0.1"
},
"devDependencies": {
"@cerc-io/cache": "^0.2.57",
"@cerc-io/cache": "^0.2.58",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@types/bunyan": "^1.8.8",
"@types/express": "^4.17.14",
Expand Down
17 changes: 16 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,21 @@
uint8arraylist "^2.3.2"
uint8arrays "^4.0.2"

"@chainsafe/libp2p-yamux@3.0.7":
version "3.0.7"
resolved "https://registry.yarnpkg.com/@chainsafe/libp2p-yamux/-/libp2p-yamux-3.0.7.tgz#345d620097c6ac07fcbeb5910da18b3ed974337c"
integrity sha512-fp59/7Xzws+4Nz4TUS+5Z/lkwk+9IW6GsU6wPJVaGInxf5tl4qQ5S8TLql23CEGbuvbToqMEdNLVAtE+M2Lvng==
dependencies:
"@libp2p/interface-connection" "^3.0.1"
"@libp2p/interface-stream-muxer" "^3.0.0"
"@libp2p/interfaces" "^3.2.0"
"@libp2p/logger" "^2.0.1"
abortable-iterator "^4.0.2"
any-signal "^3.0.1"
it-pipe "^2.0.4"
it-pushable "^3.1.0"
uint8arraylist "^2.3.2"

"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
Expand Down Expand Up @@ -4576,7 +4591,7 @@ any-promise@^1.0.0:
resolved "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz"
integrity sha1-q8av7tzqUugJzcA3au0845Y10X8=

any-signal@^3.0.0:
any-signal@^3.0.0, any-signal@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/any-signal/-/any-signal-3.0.1.tgz#49cae34368187a3472e31de28fb5cb1430caa9a6"
integrity sha512-xgZgJtKEa9YmDqXodIgl7Fl1C8yNXr8w6gXjqK3LW4GcEiYT+6AQfJSE/8SPsEpLLmcvbv8YU+qet94UewHxqg==
Expand Down

0 comments on commit 77312a2

Please sign in to comment.