From 994a1ce39df214ad05b1461f13f2a702b2bc60ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 11:07:20 +0000 Subject: [PATCH 1/3] deps: bump @chainsafe/libp2p-noise from 11.0.4 to 12.0.1 Bumps [@chainsafe/libp2p-noise](https://github.com/ChainSafe/js-libp2p-noise) from 11.0.4 to 12.0.1. - [Release notes](https://github.com/ChainSafe/js-libp2p-noise/releases) - [Changelog](https://github.com/ChainSafe/js-libp2p-noise/blob/master/CHANGELOG.md) - [Commits](https://github.com/ChainSafe/js-libp2p-noise/compare/v11.0.4...v12.0.1) --- updated-dependencies: - dependency-name: "@chainsafe/libp2p-noise" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c8e81a0..16251a4 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "docs": "aegir docs" }, "dependencies": { - "@chainsafe/libp2p-noise": "^11.0.0", + "@chainsafe/libp2p-noise": "^12.0.1", "@libp2p/interface-connection": "^5.0.0", "@libp2p/interface-peer-id": "^2.0.0", "@libp2p/interface-stream-muxer": "^4.0.0", From 5b53c34a4fcb0ad3286ec60228b68b0580ab140e Mon Sep 17 00:00:00 2001 From: achingbrain Date: Thu, 15 Jun 2023 16:27:52 +0200 Subject: [PATCH 2/3] chore: fix linting --- examples/fetch-file-from-kubo/package.json | 2 +- examples/fetch-file-from-kubo/src/libp2p.ts | 6 +++++- package.json | 2 +- test/browser.ts | 20 ++++++++++++++++---- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/examples/fetch-file-from-kubo/package.json b/examples/fetch-file-from-kubo/package.json index 81c9b39..b526015 100644 --- a/examples/fetch-file-from-kubo/package.json +++ b/examples/fetch-file-from-kubo/package.json @@ -15,7 +15,7 @@ "@multiformats/multiaddr": "^12.1.2", "blockstore-core": "^4.1.0", "ipfs-bitswap": "^17.0.2", - "libp2p": "^0.44.0", + "libp2p": "^0.45.9", "multiformats": "^11.0.2" }, "devDependencies": { diff --git a/examples/fetch-file-from-kubo/src/libp2p.ts b/examples/fetch-file-from-kubo/src/libp2p.ts index 270e431..3d97d38 100644 --- a/examples/fetch-file-from-kubo/src/libp2p.ts +++ b/examples/fetch-file-from-kubo/src/libp2p.ts @@ -11,7 +11,11 @@ export async function setup (): Promise<{ libp2p: Libp2p, bitswap: Bitswap }> { const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + // this is only necessary when dialing local addresses + connectionGater: { + denyDialMultiaddr: async () => false + } }) await node.start() diff --git a/package.json b/package.json index 16251a4..e6af5e9 100644 --- a/package.json +++ b/package.json @@ -169,7 +169,7 @@ }, "devDependencies": { "aegir": "^39.0.3", - "libp2p": "^0.44.0", + "libp2p": "^0.45.9", "p-defer": "^4.0.0" }, "browser": { diff --git a/test/browser.ts b/test/browser.ts index dc4101a..153743e 100644 --- a/test/browser.ts +++ b/test/browser.ts @@ -23,7 +23,10 @@ describe('libp2p-webtransport', () => { const ma = multiaddr(maStr) const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + connectionGater: { + denyDialMultiaddr: async () => false + } }) await node.start() @@ -85,7 +88,10 @@ describe('libp2p-webtransport', () => { const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + connectionGater: { + denyDialMultiaddr: async () => false + } }) await node.start() @@ -103,7 +109,10 @@ describe('libp2p-webtransport', () => { const ma = multiaddr(process.env.serverAddr6) const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + connectionGater: { + denyDialMultiaddr: async () => false + } }) await node.start() @@ -125,7 +134,10 @@ describe('libp2p-webtransport', () => { const ma = multiaddr(maStr) const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + connectionGater: { + denyDialMultiaddr: async () => false + } }) async function * gen (): AsyncGenerator { From bb02c6332a2c8b2955b30a33a3f63a2c9bb3655b Mon Sep 17 00:00:00 2001 From: achingbrain Date: Thu, 15 Jun 2023 16:38:30 +0200 Subject: [PATCH 3/3] chore: update deps --- examples/fetch-file-from-kubo/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/fetch-file-from-kubo/package.json b/examples/fetch-file-from-kubo/package.json index b526015..143eeb2 100644 --- a/examples/fetch-file-from-kubo/package.json +++ b/examples/fetch-file-from-kubo/package.json @@ -10,11 +10,11 @@ "test": "npm run build && test-browser-example tests" }, "dependencies": { - "@chainsafe/libp2p-noise": "^11.0.0", + "@chainsafe/libp2p-noise": "^12.0.1", "@libp2p/webtransport": "../..", "@multiformats/multiaddr": "^12.1.2", "blockstore-core": "^4.1.0", - "ipfs-bitswap": "^17.0.2", + "ipfs-bitswap": "^18.0.1", "libp2p": "^0.45.9", "multiformats": "^11.0.2" },