Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(p2p): Updated libp2p dependencies #1792

Merged
merged 2 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions yarn-project/p2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions yarn-project/p2p/src/service/libp2p_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 };
}

Expand Down Expand Up @@ -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() {
Expand Down
Loading