diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 0b504bf5413c..98b7276d2977 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -37,19 +37,19 @@ "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/types": "workspace:^", - "@chainsafe/libp2p-noise": "^12.0.0", - "@chainsafe/libp2p-yamux": "^4.0.2", - "@libp2p/bootstrap": "^8.0.0", - "@libp2p/interface-peer-id": "^2.0.0", - "@libp2p/interface-registrar": "^2.0.0", - "@libp2p/interfaces": "^3.3.2", - "@libp2p/kad-dht": "^9.3.3", - "@libp2p/mplex": "^8.0.3", - "@libp2p/peer-id": "^2.0.3", - "@libp2p/peer-id-factory": "^2.0.0", - "@libp2p/tcp": "^7.0.1", - "it-pipe": "^3.0.0", - "libp2p": "^0.45.1", + "@chainsafe/libp2p-noise": "^13.0.0", + "@chainsafe/libp2p-yamux": "^5.0.0", + "@libp2p/bootstrap": "^9.0.4", + "@libp2p/interface": "^0.1.2", + "@libp2p/interface-libp2p": "^3.2.0", + "@libp2p/interface-peer-id": "^2.0.2", + "@libp2p/kad-dht": "^10.0.4", + "@libp2p/mplex": "^9.0.4", + "@libp2p/peer-id": "^3.0.2", + "@libp2p/peer-id-factory": "^3.0.3", + "@libp2p/tcp": "^8.0.4", + "it-pipe": "^3.0.1", + "libp2p": "^0.46.6", "lodash.times": "^4.3.2", "sha3": "^2.1.4", "tslib": "^2.4.0" diff --git a/yarn-project/p2p/src/service/libp2p_service.ts b/yarn-project/p2p/src/service/libp2p_service.ts index 6f9ea3a1491c..ca2e5f4de8ad 100644 --- a/yarn-project/p2p/src/service/libp2p_service.ts +++ b/yarn-project/p2p/src/service/libp2p_service.ts @@ -7,7 +7,7 @@ import { yamux } from '@chainsafe/libp2p-yamux'; import { bootstrap } from '@libp2p/bootstrap'; import type { ServiceMap } from '@libp2p/interface-libp2p'; import { PeerId } from '@libp2p/interface-peer-id'; -import { IncomingStreamData } from '@libp2p/interface-registrar'; +import { IncomingStreamData } from '@libp2p/interface/stream-handler'; import { DualKadDHT, kadDHT } from '@libp2p/kad-dht'; import { mplex } from '@libp2p/mplex'; import { createEd25519PeerId, createFromProtobuf, exportToProtobuf } from '@libp2p/peer-id-factory'; @@ -230,7 +230,7 @@ export class LibP2PService implements P2PService { buffer = Buffer.concat([buffer, Buffer.from(payload)]); } }); - incomingStreamData.stream.close(); + await incomingStreamData.stream.close(); return { message: buffer, peer: incomingStreamData.connection.remotePeer }; } @@ -374,7 +374,7 @@ export class LibP2PService implements P2PService { private async sendRawMessageToPeer(message: Uint8Array, peer: PeerId) { const stream = await this.node.dialProtocol(peer, this.protocolId); await pipe([message], stream); - stream.close(); + await stream.close(); } private getTxPeers() {