diff --git a/lerna.json b/lerna.json index b5a3985c..9fa6cd7f 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "packages/*" ], - "version": "0.2.26", + "version": "0.2.27", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/packages/address-watcher/package.json b/packages/address-watcher/package.json index b413f2ec..ea6a6825 100644 --- a/packages/address-watcher/package.json +++ b/packages/address-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/address-watcher", - "version": "0.2.26", + "version": "0.2.27", "description": "Address Watcher", "private": true, "scripts": { @@ -26,11 +26,11 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@cerc-io/cache": "^0.2.26", - "@cerc-io/ipld-eth-client": "^0.2.26", - "@cerc-io/solidity-mapper": "^0.2.26", - "@cerc-io/tracing-client": "^0.2.26", - "@cerc-io/util": "^0.2.26", + "@cerc-io/cache": "^0.2.27", + "@cerc-io/ipld-eth-client": "^0.2.27", + "@cerc-io/solidity-mapper": "^0.2.27", + "@cerc-io/tracing-client": "^0.2.27", + "@cerc-io/util": "^0.2.27", "@types/lodash": "^4.14.168", "debug": "^4.3.1", "ethers": "^5.4.4", diff --git a/packages/cache/package.json b/packages/cache/package.json index 71ef511c..21cb7ab8 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/cache", - "version": "0.2.26", + "version": "0.2.27", "description": "Generic object cache", "main": "dist/index.js", "scripts": { diff --git a/packages/cli/package.json b/packages/cli/package.json index c71373e9..4e07f707 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/cli", - "version": "0.2.26", + "version": "0.2.27", "main": "dist/index.js", "license": "AGPL-3.0", "scripts": { @@ -11,8 +11,8 @@ "chat": "node dist/chat.js" }, "dependencies": { - "@cerc-io/peer": "^0.2.26", - "@cerc-io/util": "^0.2.26", + "@cerc-io/peer": "^0.2.27", + "@cerc-io/util": "^0.2.27", "@ethersproject/providers": "^5.4.4", "@graphql-tools/utils": "^9.1.1", "@ipld/dag-cbor": "^8.0.0", diff --git a/packages/codegen/package.json b/packages/codegen/package.json index e201f2b6..5f83ae6e 100644 --- a/packages/codegen/package.json +++ b/packages/codegen/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/codegen", - "version": "0.2.26", + "version": "0.2.27", "description": "Code generator", "private": true, "main": "index.js", @@ -20,7 +20,7 @@ }, "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { - "@cerc-io/util": "^0.2.26", + "@cerc-io/util": "^0.2.27", "@graphql-tools/load-files": "^6.5.2", "@poanet/solidity-flattener": "https://github.com/vulcanize/solidity-flattener.git", "@solidity-parser/parser": "^0.13.2", diff --git a/packages/codegen/src/templates/package-template.handlebars b/packages/codegen/src/templates/package-template.handlebars index 0e6e16c8..134866a9 100644 --- a/packages/codegen/src/templates/package-template.handlebars +++ b/packages/codegen/src/templates/package-template.handlebars @@ -41,12 +41,12 @@ "dependencies": { "@apollo/client": "^3.3.19", "@ethersproject/providers": "^5.4.4", - "@cerc-io/cli": "^v0.2.26", - "@cerc-io/ipld-eth-client": "^v0.2.26", - "@cerc-io/solidity-mapper": "^v0.2.26", - "@cerc-io/util": "^v0.2.26", + "@cerc-io/cli": "^0.2.27", + "@cerc-io/ipld-eth-client": "^0.2.27", + "@cerc-io/solidity-mapper": "^0.2.27", + "@cerc-io/util": "^0.2.27", {{#if (subgraphPath)}} - "@cerc-io/graph-node": "^v0.2.26", + "@cerc-io/graph-node": "^0.2.27", {{/if}} "apollo-type-bigint": "^0.1.3", "debug": "^4.3.1", diff --git a/packages/eden-watcher/package.json b/packages/eden-watcher/package.json index 8bb0e3e4..df76eb70 100644 --- a/packages/eden-watcher/package.json +++ b/packages/eden-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/eden-watcher", - "version": "0.2.26", + "version": "0.2.27", "description": "eden-watcher", "private": true, "main": "dist/index.js", @@ -38,11 +38,11 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@cerc-io/cli": "^0.2.26", - "@cerc-io/graph-node": "^0.2.26", - "@cerc-io/ipld-eth-client": "^0.2.26", - "@cerc-io/solidity-mapper": "^0.2.26", - "@cerc-io/util": "^0.2.26", + "@cerc-io/cli": "^0.2.27", + "@cerc-io/graph-node": "^0.2.27", + "@cerc-io/ipld-eth-client": "^0.2.27", + "@cerc-io/solidity-mapper": "^0.2.27", + "@cerc-io/util": "^0.2.27", "@ethersproject/providers": "^5.4.4", "apollo-type-bigint": "^0.1.3", "debug": "^4.3.1", diff --git a/packages/erc20-watcher/package.json b/packages/erc20-watcher/package.json index be3c1e4e..9a409689 100644 --- a/packages/erc20-watcher/package.json +++ b/packages/erc20-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/erc20-watcher", - "version": "0.2.26", + "version": "0.2.27", "description": "ERC20 Watcher", "private": true, "main": "dist/index.js", @@ -42,10 +42,10 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@cerc-io/cli": "^0.2.26", - "@cerc-io/ipld-eth-client": "^0.2.26", - "@cerc-io/solidity-mapper": "^0.2.26", - "@cerc-io/util": "^0.2.26", + "@cerc-io/cli": "^0.2.27", + "@cerc-io/ipld-eth-client": "^0.2.27", + "@cerc-io/solidity-mapper": "^0.2.27", + "@cerc-io/util": "^0.2.27", "@ethersproject/providers": "^5.4.4", "apollo-type-bigint": "^0.1.3", "debug": "^4.3.1", diff --git a/packages/erc721-watcher/package.json b/packages/erc721-watcher/package.json index 78c94e08..470fa67d 100644 --- a/packages/erc721-watcher/package.json +++ b/packages/erc721-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/erc721-watcher", - "version": "0.2.26", + "version": "0.2.27", "description": "erc721-watcher", "private": true, "main": "dist/index.js", @@ -47,10 +47,10 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@cerc-io/cli": "^0.2.26", - "@cerc-io/ipld-eth-client": "^0.2.26", - "@cerc-io/solidity-mapper": "^0.2.26", - "@cerc-io/util": "^0.2.26", + "@cerc-io/cli": "^0.2.27", + "@cerc-io/ipld-eth-client": "^0.2.27", + "@cerc-io/solidity-mapper": "^0.2.27", + "@cerc-io/util": "^0.2.27", "@ethersproject/providers": "^5.4.4", "apollo-type-bigint": "^0.1.3", "debug": "^4.3.1", diff --git a/packages/graph-node/package.json b/packages/graph-node/package.json index 6b22badb..66af0279 100644 --- a/packages/graph-node/package.json +++ b/packages/graph-node/package.json @@ -1,10 +1,10 @@ { "name": "@cerc-io/graph-node", - "version": "0.2.26", + "version": "0.2.27", "main": "dist/index.js", "license": "AGPL-3.0", "devDependencies": { - "@cerc-io/solidity-mapper": "^0.2.26", + "@cerc-io/solidity-mapper": "^0.2.27", "@ethersproject/providers": "^5.4.4", "@graphprotocol/graph-ts": "^0.22.0", "@nomiclabs/hardhat-ethers": "^2.0.2", @@ -50,9 +50,9 @@ "dependencies": { "@apollo/client": "^3.3.19", "@cerc-io/assemblyscript": "0.19.10-watcher-ts-0.1.2", - "@cerc-io/cache": "^0.2.26", - "@cerc-io/ipld-eth-client": "^0.2.26", - "@cerc-io/util": "^0.2.26", + "@cerc-io/cache": "^0.2.27", + "@cerc-io/ipld-eth-client": "^0.2.27", + "@cerc-io/util": "^0.2.27", "@types/json-diff": "^0.5.2", "bn.js": "^4.11.9", "debug": "^4.3.1", diff --git a/packages/graph-test-watcher/package.json b/packages/graph-test-watcher/package.json index ba4df016..753897ca 100644 --- a/packages/graph-test-watcher/package.json +++ b/packages/graph-test-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/graph-test-watcher", - "version": "0.2.26", + "version": "0.2.27", "description": "graph-test-watcher", "private": true, "main": "dist/index.js", @@ -38,11 +38,11 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@cerc-io/cli": "^0.2.26", - "@cerc-io/graph-node": "^0.2.26", - "@cerc-io/ipld-eth-client": "^0.2.26", - "@cerc-io/solidity-mapper": "^0.2.26", - "@cerc-io/util": "^0.2.26", + "@cerc-io/cli": "^0.2.27", + "@cerc-io/graph-node": "^0.2.27", + "@cerc-io/ipld-eth-client": "^0.2.27", + "@cerc-io/solidity-mapper": "^0.2.27", + "@cerc-io/util": "^0.2.27", "@ethersproject/providers": "^5.4.4", "apollo-type-bigint": "^0.1.3", "debug": "^4.3.1", diff --git a/packages/ipld-eth-client/package.json b/packages/ipld-eth-client/package.json index d6179802..6de8faa0 100644 --- a/packages/ipld-eth-client/package.json +++ b/packages/ipld-eth-client/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/ipld-eth-client", - "version": "0.2.26", + "version": "0.2.27", "description": "IPLD ETH Client", "main": "dist/index.js", "scripts": { @@ -20,7 +20,7 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.7.1", - "@cerc-io/cache": "^0.2.26", + "@cerc-io/cache": "^0.2.27", "cross-fetch": "^3.1.4", "debug": "^4.3.1", "ethers": "^5.4.4", diff --git a/packages/mobymask-watcher/package.json b/packages/mobymask-watcher/package.json index 27c66bd4..1214a099 100644 --- a/packages/mobymask-watcher/package.json +++ b/packages/mobymask-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/mobymask-watcher", - "version": "0.2.26", + "version": "0.2.27", "description": "mobymask-watcher", "private": true, "main": "dist/index.js", @@ -37,10 +37,10 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@cerc-io/cli": "^0.2.26", - "@cerc-io/ipld-eth-client": "^0.2.26", - "@cerc-io/solidity-mapper": "^0.2.26", - "@cerc-io/util": "^0.2.26", + "@cerc-io/cli": "^0.2.27", + "@cerc-io/ipld-eth-client": "^0.2.27", + "@cerc-io/solidity-mapper": "^0.2.27", + "@cerc-io/util": "^0.2.27", "@ethersproject/providers": "^5.4.4", "apollo-type-bigint": "^0.1.3", "debug": "^4.3.1", diff --git a/packages/peer/package.json b/packages/peer/package.json index 7b16de80..87389f2c 100644 --- a/packages/peer/package.json +++ b/packages/peer/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/peer", - "version": "0.2.26", + "version": "0.2.27", "description": "libp2p module", "main": "dist/index.js", "exports": "./dist/index.js", @@ -26,7 +26,7 @@ "relay-node": "node dist/relay.js" }, "dependencies": { - "@cerc-io/libp2p": "0.42.2-laconic-0.1.0", + "@cerc-io/libp2p": "0.42.2-laconic-0.1.1", "@cerc-io/webrtc-direct": "^5.0.0-laconic-0.1.1", "@chainsafe/libp2p-noise": "^11.0.0", "@libp2p/floodsub": "^6.0.0", diff --git a/packages/peer/src/index.ts b/packages/peer/src/index.ts index f9683bb1..0b869534 100644 --- a/packages/peer/src/index.ts +++ b/packages/peer/src/index.ts @@ -25,7 +25,8 @@ import { multiaddr, Multiaddr } from '@multiformats/multiaddr'; import { floodsub } from '@libp2p/floodsub'; import { pubsubPeerDiscovery } from '@libp2p/pubsub-peer-discovery'; -import { MAX_CONCURRENT_DIALS_PER_PEER, MAX_CONNECTIONS, MIN_CONNECTIONS, PUBSUB_DISCOVERY_INTERVAL, PUBSUB_SIGNATURE_POLICY, RELAY_TAG, RELAY_REDIAL_DELAY, CONN_CHECK_INTERVAL, PING_TIMEOUT } from './constants.js'; +import { MAX_CONCURRENT_DIALS_PER_PEER, MAX_CONNECTIONS, MIN_CONNECTIONS, PUBSUB_DISCOVERY_INTERVAL, PUBSUB_SIGNATURE_POLICY, RELAY_TAG, RELAY_REDIAL_DELAY, PING_TIMEOUT } from './constants.js'; +import { PeerHearbeatChecker } from './peer-heartbeat-checker.js'; export const CHAT_PROTOCOL = '/chat/1.0.0'; @@ -33,13 +34,13 @@ export const ERR_PROTOCOL_SELECTION = 'protocol selection failed'; export class Peer { _node?: Libp2p + _peerHeartbeatChecker?: PeerHearbeatChecker _wrtcTransport: (components: WebRTCDirectComponents) => Transport _relayNodeMultiaddr: Multiaddr _peerStreamMap: Map> = new Map() _messageHandlers: Array<(peerId: PeerId, message: any) => void> = [] _topicHandlers: Map void>> = new Map() - _peerHeartbeatIntervalIdsMap: Map = new Map(); constructor (relayNodeURL: string, nodejs?: boolean) { this._relayNodeMultiaddr = multiaddr(relayNodeURL); @@ -105,6 +106,7 @@ export class Peer { } console.log('libp2p node created', this._node); + this._peerHeartbeatChecker = new PeerHearbeatChecker(this._node); // Dial to the HOP enabled relay node await this._dialRelay(); @@ -171,7 +173,7 @@ export class Peer { await this._node.unhandle(CHAT_PROTOCOL); const remotePeerIds = this._node.getPeers(); - remotePeerIds.forEach(remotePeerId => this._stopHeartbeatChecks(remotePeerId)); + remotePeerIds.forEach(remotePeerId => this._peerHeartbeatChecker?.stop(remotePeerId)); const hangUpPromises = remotePeerIds.map(async peerId => this._node?.hangUp(peerId)); await Promise.all(hangUpPromises); } @@ -334,8 +336,8 @@ export class Peer { console.log(`Current number of peers connected: ${this._node.getPeers().length}`); - // Start heartbeat check peer - await this._startHeartbeatChecks( + // Start heartbeat check for peer + await this._peerHeartbeatChecker?.start( remotePeerId, async () => this._handleDeadConnections(remotePeerId) ); @@ -348,46 +350,6 @@ export class Peer { console.log('Closed'); } - async _startHeartbeatChecks (peerId: PeerId, handleDisconnect: () => Promise): Promise { - if (this._peerHeartbeatIntervalIdsMap.has(peerId.toString())) { - // Do not start connection check interval if already present - return; - } - - const intervalId = setInterval(async () => { - await this._validatePing( - peerId, - async () => { - // Check if connection check interval for peer is already cleared - if (!this._peerHeartbeatIntervalIdsMap.has(peerId.toString())) { - return; - } - - // Clear and remove check interval for remote peer if not connected - this._stopHeartbeatChecks(peerId); - - await handleDisconnect(); - } - ); - }, CONN_CHECK_INTERVAL); - - this._peerHeartbeatIntervalIdsMap.set(peerId.toString(), intervalId); - } - - async _validatePing (peerId: PeerId, handleDisconnect: () => Promise): Promise { - assert(this._node); - - try { - // Ping remote peer - await this._node.ping(peerId); - } catch (err) { - // On error i.e. no pong - console.log(`Not connected to peer ${peerId.toString()}`); - - await handleDisconnect(); - } - } - async _handleDisconnect (connection: Connection): Promise { assert(this._node); const disconnectedPeerId = connection.remotePeer; @@ -400,7 +362,7 @@ export class Peer { if (!peerConnections.length) { // Stop connection check for disconnected peer - this._stopHeartbeatChecks(disconnectedPeerId); + this._peerHeartbeatChecker?.stop(disconnectedPeerId); if (disconnectedPeerId.toString() === this._relayNodeMultiaddr?.getPeerId()) { // Reconnect to relay node if disconnected @@ -409,17 +371,6 @@ export class Peer { } } - _stopHeartbeatChecks (peerId: PeerId): void { - // Clear check interval for disconnected peer - const intervalId = this._peerHeartbeatIntervalIdsMap.get(peerId.toString()); - - if (intervalId) { - clearInterval(intervalId); - } - - this._peerHeartbeatIntervalIdsMap.delete(peerId.toString()); - } - async _connectPeer (peer: PeerInfo): Promise { assert(this._node); diff --git a/packages/peer/src/peer-heartbeat-checker.ts b/packages/peer/src/peer-heartbeat-checker.ts new file mode 100644 index 00000000..0b9ad1c2 --- /dev/null +++ b/packages/peer/src/peer-heartbeat-checker.ts @@ -0,0 +1,83 @@ +// +// Copyright 2023 Vulcanize, Inc. +// + +import { Libp2p } from '@cerc-io/libp2p'; +import type { PeerId } from '@libp2p/interface-peer-id'; + +import { CONN_CHECK_INTERVAL } from './constants.js'; + +/** + * Used for tracking heartbeat of connected remote peers + */ +export class PeerHearbeatChecker { + _node: Libp2p; + _peerHeartbeatIntervalIdsMap: Map = new Map(); + + constructor (node: Libp2p) { + this._node = node; + } + + /** + * Method to start heartbeat checks for a peer + * @param peerId + * @param handleDisconnect + */ + async start (peerId: PeerId, handleDisconnect: () => Promise): Promise { + if (this._peerHeartbeatIntervalIdsMap.has(peerId.toString())) { + // Do not start connection check interval if already present + return; + } + + const intervalId = setInterval(async () => { + await this._validatePing( + peerId, + async () => { + // Check if connection check interval for peer is already cleared + if (!this._peerHeartbeatIntervalIdsMap.has(peerId.toString())) { + return; + } + + // Clear and remove check interval for remote peer if not connected + this.stop(peerId); + + await handleDisconnect(); + } + ); + }, CONN_CHECK_INTERVAL); + + this._peerHeartbeatIntervalIdsMap.set(peerId.toString(), intervalId); + } + + /** + * Method to check connection using ping request + * @param peerId + * @param handleDisconnect + */ + async _validatePing (peerId: PeerId, handleDisconnect: () => Promise): Promise { + try { + // Ping remote peer + await this._node.ping(peerId); + } catch (err) { + // On error i.e. no pong + console.log(`Not connected to peer ${peerId.toString()}`); + + await handleDisconnect(); + } + } + + /** + * Method to stop heartbeat checks for a peer + * @param peerId + */ + stop (peerId: PeerId): void { + // Clear check interval for disconnected peer + const intervalId = this._peerHeartbeatIntervalIdsMap.get(peerId.toString()); + + if (intervalId) { + clearInterval(intervalId); + } + + this._peerHeartbeatIntervalIdsMap.delete(peerId.toString()); + } +} diff --git a/packages/peer/src/relay.ts b/packages/peer/src/relay.ts index 6b4c8f8a..68154b19 100644 --- a/packages/peer/src/relay.ts +++ b/packages/peer/src/relay.ts @@ -18,8 +18,10 @@ import { pubsubPeerDiscovery } from '@libp2p/pubsub-peer-discovery'; import { createFromJSON } from '@libp2p/peer-id-factory'; import type { Connection } from '@libp2p/interface-connection'; import { multiaddr } from '@multiformats/multiaddr'; +import type { PeerId } from '@libp2p/interface-peer-id'; import { HOP_TIMEOUT, PUBSUB_DISCOVERY_INTERVAL, PUBSUB_SIGNATURE_POLICY } from './constants.js'; +import { PeerHearbeatChecker } from './peer-heartbeat-checker.js'; const log = debug('laconic:relay'); @@ -79,17 +81,24 @@ async function main (): Promise { } }); + const peerHeartbeatChecker = new PeerHearbeatChecker(node); + console.log(`Relay node started with id ${node.peerId.toString()}`); console.log('Listening on:'); node.getMultiaddrs().forEach((ma) => console.log(ma.toString())); - console.log(); // Listen for peers connection - node.addEventListener('peer:connect', (evt) => { + node.addEventListener('peer:connect', async (evt) => { // console.log('event peer:connect', evt); // Log connected peer const connection: Connection = evt.detail; log(`Connected to ${connection.remotePeer.toString()} using multiaddr ${connection.remoteAddr.toString()}`); + + // Start heartbeat check for peer + await peerHeartbeatChecker.start( + connection.remotePeer, + async () => _handleDeadConnections(node, connection.remotePeer) + ); }); // Listen for peers disconnecting @@ -149,6 +158,13 @@ async function _dialRelayPeers (node: Libp2p, relayPeersList: string[]): Promise }); } +async function _handleDeadConnections (node: Libp2p, remotePeerId: PeerId): Promise { + // Close existing connections of remote peer + log(`Closing connections for ${remotePeerId}`); + await node.hangUp(remotePeerId); + log('Closed'); +} + main().catch(err => { console.log(err); }); diff --git a/packages/solidity-mapper/package.json b/packages/solidity-mapper/package.json index 0d17ed6c..7dabf493 100644 --- a/packages/solidity-mapper/package.json +++ b/packages/solidity-mapper/package.json @@ -1,10 +1,10 @@ { "name": "@cerc-io/solidity-mapper", - "version": "0.2.26", + "version": "0.2.27", "main": "dist/index.js", "license": "AGPL-3.0", "devDependencies": { - "@cerc-io/ipld-eth-client": "^0.2.26", + "@cerc-io/ipld-eth-client": "^0.2.27", "@ethersproject/abi": "^5.3.0", "@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-waffle": "^2.0.1", diff --git a/packages/test/package.json b/packages/test/package.json index 5186add9..501ecd7c 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/test", - "version": "0.2.26", + "version": "0.2.27", "main": "dist/index.js", "license": "AGPL-3.0", "private": true, diff --git a/packages/tracing-client/package.json b/packages/tracing-client/package.json index c90468df..a038fec6 100644 --- a/packages/tracing-client/package.json +++ b/packages/tracing-client/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/tracing-client", - "version": "0.2.26", + "version": "0.2.27", "description": "ETH VM tracing client", "private": true, "main": "dist/index.js", diff --git a/packages/util/package.json b/packages/util/package.json index fad8825e..f2737dfd 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,11 +1,11 @@ { "name": "@cerc-io/util", - "version": "0.2.26", + "version": "0.2.27", "main": "dist/index.js", "license": "AGPL-3.0", "dependencies": { "@apollo/utils.keyvaluecache": "^1.0.1", - "@cerc-io/solidity-mapper": "^0.2.26", + "@cerc-io/solidity-mapper": "^0.2.27", "@ethersproject/providers": "^5.4.4", "@graphql-tools/schema": "^9.0.10", "@graphql-tools/utils": "^9.1.1", @@ -37,8 +37,8 @@ "yargs": "^17.0.1" }, "devDependencies": { - "@cerc-io/cache": "^0.2.26", - "@cerc-io/ipld-eth-client": "^0.2.26", + "@cerc-io/cache": "^0.2.27", + "@cerc-io/ipld-eth-client": "^0.2.27", "@nomiclabs/hardhat-waffle": "^2.0.1", "@types/express": "^4.17.14", "@types/fs-extra": "^9.0.11", diff --git a/yarn.lock b/yarn.lock index a01be2a8..86369dbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -299,10 +299,10 @@ binaryen "101.0.0-nightly.20210723" long "^4.0.0" -"@cerc-io/libp2p@0.42.2-laconic-0.1.0": - version "0.42.2-laconic-0.1.0" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Flibp2p/-/0.42.2-laconic-0.1.0/libp2p-0.42.2-laconic-0.1.0.tgz#42284e291426d6aeef7fb9942785277f682e6977" - integrity sha512-sXMFZawBOI4lbTnajI7/0Wo/G3+uVEV2FLFqK72QR13V1CkNpCHzOrT87SBnhbG/MMUWeiggUrLULoXtc7+gHA== +"@cerc-io/libp2p@0.42.2-laconic-0.1.1": + version "0.42.2-laconic-0.1.1" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Flibp2p/-/0.42.2-laconic-0.1.1/libp2p-0.42.2-laconic-0.1.1.tgz#428272102b0fff29816e387557f43d7b31aa6b68" + integrity sha512-uoXiyLMhO4vPvNK9Vmpj+p9GHZJk4+ON3qdMj22ui+8sjf/CNOfhOG9mQcUa2u2FMDo5rUAXp2wMehKphCVDzg== dependencies: "@achingbrain/nat-port-mapper" "^1.0.3" "@libp2p/crypto" "^1.0.4" @@ -2472,7 +2472,7 @@ dependencies: "@libp2p/interface-connection" "^3.0.0" -"@libp2p/interface-peer-discovery@^1.0.0": +"@libp2p/interface-peer-discovery@^1.0.0", "@libp2p/interface-peer-discovery@^1.0.1": version "1.0.5" resolved "https://registry.yarnpkg.com/@libp2p/interface-peer-discovery/-/interface-peer-discovery-1.0.5.tgz#0fb935d55221e0ff58b4dad93646111a4fc7dcdf" integrity sha512-R0TN/vDaCJLvRhop0y4qoPqapHxX4AEQDEtqmpayAA1BuPgbBq4fS4mepR3FAMcNva/szeqVCDuI4gDejtCaVg== @@ -2480,14 +2480,6 @@ "@libp2p/interface-peer-info" "^1.0.0" "@libp2p/interfaces" "^3.0.0" -"@libp2p/interface-peer-discovery@^1.0.1": - version "1.0.4" - resolved "https://registry.npmjs.org/@libp2p/interface-peer-discovery/-/interface-peer-discovery-1.0.4.tgz" - integrity sha512-VPLi7onA+WOjYFYH79Qq2hqR+b+OLqTRom5WJaAXv6pclFb1gUetBv4W1MEHY8Hb7l1MidANO/kSySHZ5A3yPg== - dependencies: - "@libp2p/interface-peer-info" "^1.0.0" - "@libp2p/interfaces" "^3.0.0" - "@libp2p/interface-peer-id@^1.0.0", "@libp2p/interface-peer-id@^1.0.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@libp2p/interface-peer-id/-/interface-peer-id-1.1.2.tgz#22cbfb4707949cd49c3271a871172221d6920049" @@ -2604,12 +2596,7 @@ "@multiformats/multiaddr" "^11.0.0" it-stream-types "^1.0.4" -"@libp2p/interfaces@^3.0.0", "@libp2p/interfaces@^3.0.2": - version "3.1.0" - resolved "https://registry.npmjs.org/@libp2p/interfaces/-/interfaces-3.1.0.tgz" - integrity sha512-WxzUVaeOpMcNPyjruVbjNvVnjFzay8udqiaW0+rDltlYHSA1LXvZIzk1s5+/m+PKFM+UK7KmY1FZ70HiJzlZ9Q== - -"@libp2p/interfaces@^3.0.3": +"@libp2p/interfaces@^3.0.0", "@libp2p/interfaces@^3.0.2", "@libp2p/interfaces@^3.0.3": version "3.3.0" resolved "https://registry.yarnpkg.com/@libp2p/interfaces/-/interfaces-3.3.0.tgz#19299d0a627d8513170506261e3a1a572df58154" integrity sha512-X02bdMBl3tFoQfQWIioSnupOpA9lbBkmTx920idtfmes02kHcGWI+vEtMs1Prm+HtlIPQLQiQe5ZEr1WKwhPRQ==