Skip to content

Commit

Permalink
chore(p2p): Updated libp2p dependencies (#1792)
Browse files Browse the repository at this point in the history
This PR simply updates the libp2p dependencies to the newest versions.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
  • Loading branch information
PhilWindle authored Aug 24, 2023
1 parent 1788fe6 commit 79df831
Show file tree
Hide file tree
Showing 3 changed files with 410 additions and 488 deletions.
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

0 comments on commit 79df831

Please sign in to comment.