Skip to content

Commit

Permalink
fix(@libp2p/protocol-perf): use noise for encryption (#1992)
Browse files Browse the repository at this point in the history
Closes #1991
  • Loading branch information
maschad authored Aug 25, 2023
1 parent 6a02d76 commit 24c1c24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/protocol-perf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"renderResults": "node dist/src/renderResults.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^13.0.0",
"@chainsafe/libp2p-yamux": "^5.0.0",
"@libp2p/crypto": "^2.0.3",
"@libp2p/interface": "^0.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol-perf/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { noise } from '@chainsafe/libp2p-noise'
import { yamux } from '@chainsafe/libp2p-yamux'
import { unmarshalPrivateKey } from '@libp2p/crypto/keys'
import { createFromPrivKey } from '@libp2p/peer-id-factory'
import { tcp } from '@libp2p/tcp'
import { multiaddr } from '@multiformats/multiaddr'
import { createLibp2p } from 'libp2p'
import { plaintext } from 'libp2p/insecure'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import yargs from 'yargs'
import { hideBin } from 'yargs/helpers'
Expand Down Expand Up @@ -57,7 +57,7 @@ export async function main (runServer: boolean, serverIpAddress: string, transpo
transports: [tcp()],
streamMuxers: [yamux()],
connectionEncryption: [
plaintext()
noise()
],
services: {
perf: perfService(defaultInit)
Expand Down

0 comments on commit 24c1c24

Please sign in to comment.