Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
be51d56
chore: firefox webrtc
achingbrain Sep 9, 2025
d9cf155
chore: ignore yamux trace
achingbrain Sep 9, 2025
ae357cf
chore: log stream id
achingbrain Sep 9, 2025
8ff70ce
chore: log stream id
achingbrain Sep 9, 2025
852e941
chore: more log
achingbrain Sep 9, 2025
ed0d84d
chore: do not mark read closed unless closed
achingbrain Sep 9, 2025
6dc660a
chore: log read closure reason
achingbrain Sep 9, 2025
d6e56bb
chore: where message?
achingbrain Sep 9, 2025
558ff7e
chore: update log
achingbrain Sep 9, 2025
6b2b96f
chore: update log
achingbrain Sep 9, 2025
09da1eb
chore: try delay
achingbrain Sep 9, 2025
6ab7942
chore: remove timeout
achingbrain Sep 9, 2025
061d657
chore: rejig channel close
achingbrain Sep 9, 2025
2ce4f5c
chore: rejig channel close
achingbrain Sep 9, 2025
a783ce8
chore: rejig channel close
achingbrain Sep 9, 2025
014ad71
chore: try not closing
achingbrain Sep 9, 2025
12f42ea
chore: let initiator close channel
achingbrain Sep 9, 2025
82fdf3e
chore: let initiator close channel
achingbrain Sep 9, 2025
4652eab
chore: ff
achingbrain Sep 9, 2025
885d517
chore: ff
achingbrain Sep 9, 2025
d8cd161
chore: ff
achingbrain Sep 9, 2025
b650235
chore: ff
achingbrain Sep 9, 2025
ce709fd
chore: ff
achingbrain Sep 9, 2025
05ce97e
chore: try remove ff detection
achingbrain Sep 9, 2025
95a5990
chore: ff
achingbrain Sep 9, 2025
c9cdf33
chore: ff
achingbrain Sep 10, 2025
545e4e3
chore: ff
achingbrain Sep 10, 2025
b069162
chore: ff
achingbrain Sep 10, 2025
660d59b
chore: ff
achingbrain Sep 10, 2025
ec4f73e
chore: ff
achingbrain Sep 10, 2025
a728b64
chore: ff
achingbrain Sep 10, 2025
98c8569
chore: ff
achingbrain Sep 10, 2025
263b746
chore: log sent amount
achingbrain Sep 10, 2025
b09f2a5
chore: ff
achingbrain Sep 10, 2025
daefd63
chore: ff
achingbrain Sep 10, 2025
22e9a90
chore: ff
achingbrain Sep 10, 2025
3c60b0d
chore: ff
achingbrain Sep 10, 2025
8f4914d
chore: ff
achingbrain Sep 10, 2025
2aa163d
chore: ff
achingbrain Sep 10, 2025
1c325b8
chore: ff
achingbrain Sep 11, 2025
d6c790e
chore: ff
achingbrain Sep 11, 2025
db56b0b
chore: wait for init channel to close
achingbrain Sep 12, 2025
ed68503
chore: close channel
achingbrain Sep 12, 2025
71984fc
chore: close on remote reset
achingbrain Sep 12, 2025
1ecd982
chore: ff
achingbrain Sep 16, 2025
32f1a8b
chore: upgrade ff
achingbrain Sep 16, 2025
091caa1
chore: restore code
achingbrain Sep 16, 2025
15dfd3b
Merge branch 'main' into chore/firefox-webrtc
achingbrain Sep 16, 2025
e8baed0
chore: linting
achingbrain Sep 16, 2025
2866f7d
chore: deps
achingbrain Sep 16, 2025
95e5d3a
chore: ff
achingbrain Sep 16, 2025
b4412eb
chore: linting
achingbrain Sep 16, 2025
e1df0bb
chore: close ping
achingbrain Sep 16, 2025
cda3fa5
chore: linting
achingbrain Sep 16, 2025
bd34500
chore: fin ack
achingbrain Sep 16, 2025
47e51cd
chore: handle promise
achingbrain Sep 16, 2025
7955a60
chore: linting
achingbrain Sep 16, 2025
1451375
chore: chrome
achingbrain Sep 17, 2025
30d5950
chore: dep
achingbrain Sep 17, 2025
b835442
chore: filter by protocol
achingbrain Sep 17, 2025
a3c3107
chore: events
achingbrain Sep 17, 2025
40b2dfd
chore: channel open
achingbrain Sep 17, 2025
cafb7e5
chore: linting
achingbrain Sep 17, 2025
23dbd53
chore: slow ci is slow
achingbrain Sep 17, 2025
9274350
chore: update aegir
achingbrain Sep 17, 2025
58f8d1f
chore: disable fin_ack
achingbrain Sep 17, 2025
8b23f3b
chore: deps
achingbrain Sep 17, 2025
7e9ed74
chore: hack for node-datachannel
achingbrain Sep 18, 2025
459f30d
chore: receive data
achingbrain Sep 18, 2025
eff8ff9
chore: receive data
achingbrain Sep 18, 2025
cf23525
chore: linting
achingbrain Sep 18, 2025
6acb0c7
chore: rust is broken
achingbrain Sep 18, 2025
f2b8675
chore: wat
achingbrain Sep 18, 2025
225874c
chore: finack
achingbrain Sep 18, 2025
b6acd87
chore: chrome y u no exit
achingbrain Sep 18, 2025
81902af
chore: hang
achingbrain Sep 18, 2025
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
2 changes: 1 addition & 1 deletion doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"doc-check": "aegir doc-check"
},
"devDependencies": {
"aegir": "^47.0.21"
"aegir": "^47.0.22"
},
"private": true
}
2 changes: 1 addition & 1 deletion interop/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# install node and browsers
FROM mcr.microsoft.com/playwright:v1.50.1
FROM mcr.microsoft.com/playwright:v1.55.0

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@libp2p/websockets": "^9.2.19",
"@libp2p/webtransport": "^5.0.51",
"@multiformats/multiaddr": "^13.0.1",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"libp2p": "^2.10.0",
"p-event": "^6.0.1",
"redis": "^4.7.1"
Expand Down
6 changes: 3 additions & 3 deletions interop/test/fixtures/get-libp2p.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { yamux } from '@libp2p/yamux'
import { createLibp2p } from 'libp2p'
import type { Identify } from '@libp2p/identify'
import type { Libp2p } from '@libp2p/interface'
import type { PingService } from '@libp2p/ping'
import type { Ping } from '@libp2p/ping'
import type { Libp2pOptions } from 'libp2p'

const isDialer: boolean = process.env.is_dialer === 'true'
Expand All @@ -26,8 +26,8 @@ const SECURE_CHANNEL = process.env.security
const MUXER = process.env.muxer
const IP = process.env.ip ?? '0.0.0.0'

export async function getLibp2p (): Promise<Libp2p<{ ping: PingService }>> {
const options: Libp2pOptions<{ ping: PingService, identify: Identify }> = {
export async function getLibp2p (): Promise<Libp2p<{ ping: Ping }>> {
const options: Libp2pOptions<{ ping: Ping, identify: Identify }> = {
start: true,
connectionGater: {
denyDialMultiaddr: async () => false
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@
"docs:no-publish": "aegir docs --publish false -- --exclude interop --exclude doc"
},
"devDependencies": {
"aegir": "^47.0.6",
"aegir": "^47.0.22",
"npm-run-all": "^4.1.5"
},
"workspaces": [
"doc",
"interop",
"packages/*"
]
],
"overrides": {
"playwright-core": "next"
}
}
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"interface-datastore": "^8.3.2"
},
"devDependencies": {
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"datastore-core": "^10.0.4"
},
"sideEffects": false
Expand Down
2 changes: 1 addition & 1 deletion packages/connection-encrypter-noise/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@libp2p/yamux": "^7.0.1",
"@multiformats/multiaddr": "^13.0.1",
"@types/sinon": "^17.0.4",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"execa": "^9.6.0",
"go-libp2p": "^1.6.0",
"iso-random-stream": "^2.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/connection-encrypter-plaintext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"devDependencies": {
"@libp2p/crypto": "^5.1.8",
"@libp2p/logger": "^5.2.0",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"protons": "^7.7.0",
"sinon": "^21.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/connection-encrypter-tls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
"devDependencies": {
"@libp2p/logger": "^5.2.0",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"protons": "^7.7.0",
"sinon": "^21.0.0",
"sinon-ts": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"asn1js": "^3.0.6",
"benchmark": "^2.1.4",
"protons": "^7.7.0"
Expand Down
3 changes: 3 additions & 0 deletions packages/integration-tests/.aegir.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ export default {
await before.libp2p?.stop()
await before.goLibp2pRelay?.proc.kill()
await before.libp2pLimitedRelay?.stop()

// node-datachannel sometimes causes the process to hang
process.exit(0)
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
"test": "aegir test -- --exit",
"clean": "aegir clean",
"lint": "aegir lint",
"test:chrome": "aegir test -t browser --cov",
"test:chrome": "aegir test -t browser --cov -- --exit",
"test:chrome-webworker": "aegir test -t webworker",
"test:firefox": "aegir test -t browser -- --browser firefox",
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
"test:node": "aegir test -t node -f dist/test/node.js -f dist/test/**/*.spec.js --cov -- --exit",
"test:interop": "aegir test -t node -f dist/test/interop.js",
"dep-check": "aegir dep-check"
Expand Down Expand Up @@ -51,7 +53,7 @@
"@multiformats/dns": "^1.0.6",
"@multiformats/multiaddr": "^13.0.1",
"@multiformats/multiaddr-matcher": "^3.0.1",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"delay": "^6.0.0",
"detect-browser": "^5.3.0",
"execa": "^9.6.0",
Expand Down
7 changes: 2 additions & 5 deletions packages/integration-tests/test/bootstrap.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ describe('bootstrap', () => {
let libp2p: Libp2p

beforeEach(async () => {
[remotePeerId1, remotePeerId2] = await Promise.all([
peerIdFromPrivateKey(await generateKeyPair('Ed25519')),
peerIdFromPrivateKey(await generateKeyPair('Ed25519')),
peerIdFromPrivateKey(await generateKeyPair('Ed25519'))
])
remotePeerId1 = peerIdFromPrivateKey(await generateKeyPair('Ed25519'))
remotePeerId2 = peerIdFromPrivateKey(await generateKeyPair('Ed25519'))
})

afterEach(async () => {
Expand Down
38 changes: 18 additions & 20 deletions packages/integration-tests/test/dht.node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-env mocha */

import { identify } from '@libp2p/identify'
import { start, stop } from '@libp2p/interface'
import { kadDHT, passthroughMapper } from '@libp2p/kad-dht'
import { mplex } from '@libp2p/mplex'
import { ping } from '@libp2p/ping'
Expand Down Expand Up @@ -97,10 +98,10 @@ describe('DHT subsystem operates correctly', () => {
}
})

await Promise.all([
libp2p.start(),
remoteLibp2p.start()
])
await start(
libp2p,
remoteLibp2p
)

await libp2p.peerStore.patch(remoteLibp2p.peerId, {
multiaddrs: [remoteListenAddr]
Expand All @@ -109,13 +110,10 @@ describe('DHT subsystem operates correctly', () => {
})

afterEach(async () => {
if (libp2p != null) {
await libp2p.stop()
}

if (remoteLibp2p != null) {
await remoteLibp2p.stop()
}
await stop(
libp2p,
remoteLibp2p
)
})

it('should get notified of connected peers on dial', async () => {
Expand Down Expand Up @@ -186,11 +184,11 @@ describe('DHT subsystem operates correctly', () => {
}
})

await Promise.all([
libp2p.start(),
remoteLibp2p1.start(),
remoteLibp2p2.start()
])
await start(
libp2p,
remoteLibp2p1,
remoteLibp2p2
)

await libp2p.peerStore.patch(remoteLibp2p1.peerId, {
multiaddrs: remoteLibp2p1.getMultiaddrs()
Expand All @@ -208,9 +206,9 @@ describe('DHT subsystem operates correctly', () => {
])

await deferred.promise
return Promise.all([
remoteLibp2p1.stop(),
remoteLibp2p2.stop()
])
return stop(
remoteLibp2p1,
remoteLibp2p2
)
})
})
4 changes: 2 additions & 2 deletions packages/integration-tests/test/events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ describe('events', () => {
await dialer.dial(listener.getMultiaddrs())

// Verify onConnection is called with the connection
const connections = await Promise.all([
const connections = [
...dialer.getConnections(listener.peerId),
...listener.getConnections(dialer.peerId)
])
]
expect(connections).to.have.lengthOf(2)

await Promise.all([
Expand Down
17 changes: 10 additions & 7 deletions packages/integration-tests/test/mdns.node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-env mocha */

import { randomBytes } from '@libp2p/crypto'
import { start, stop } from '@libp2p/interface'
import { mdns } from '@libp2p/mdns'
import { tcp } from '@libp2p/tcp'
import { multiaddr } from '@multiformats/multiaddr'
Expand Down Expand Up @@ -70,15 +71,17 @@ describe('mdns', () => {
}
})

await Promise.all([
remoteLibp2p1.start(),
remoteLibp2p2.start(),
libp2p.start()
])
await start(
remoteLibp2p1,
remoteLibp2p2,
libp2p
)

await deferred.promise

await remoteLibp2p1.stop()
await remoteLibp2p2.stop()
await stop(
remoteLibp2p1,
remoteLibp2p2
)
})
})
2 changes: 1 addition & 1 deletion packages/interface-compliance-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@libp2p/utils": "^6.7.2",
"@multiformats/multiaddr": "^13.0.1",
"@multiformats/multiaddr-matcher": "^3.0.1",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"delay": "^6.0.0",
"it-all": "^3.0.9",
"it-drain": "^3.0.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ export default (common: TestSetup<StreamMuxerFactory>): void => {

await Promise.all([
pEvent(listenerStream, 'close'),
// eslint-disable-next-line @typescript-eslint/await-thenable
dialerStream.abort(new Error('Urk!'))
])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ export default (common: TestSetup<StreamMuxerFactory>): void => {

await Promise.all([
pEvent(outboundStream, 'close'),
// eslint-disable-next-line @typescript-eslint/await-thenable
inboundStream.abort(new Error('Urk!'))
])

Expand Down
7 changes: 4 additions & 3 deletions packages/interface-compliance-tests/src/transport/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,9 @@ export default (common: TestSetup<TransportTestFixtures>): void => {
expect(connection).to.have.property('streams').that.has.lengthOf(5)

if (remoteConn != null) {
await pWaitFor(() => remoteConn.streams.length === 5, {
timeout: 5000
await pWaitFor(() => remoteConn.streams.filter(s => s.protocol === '/echo/1.0.0').length === 5, {
timeout: 5_000,
interval: 1_000
})
}

Expand Down Expand Up @@ -360,7 +361,7 @@ export default (common: TestSetup<TransportTestFixtures>): void => {
const connection = await dialer.dial(dialAddrs[0])
const echoProtocol = dialer.services.echo.protocol

for (let i = 0; i < 2000; i++) {
for (let i = 0; i < 2_000; i++) {
const input = new Uint8Array(1024).fill(5)
const output = await dialer.services.echo.echo(connection.remotePeer, input, {
signal: AbortSignal.timeout(timeout)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export async function createPeer (config: Partial<Libp2pOptions> = {}): Promise<
services: {
...config.services,
echo: echo({
maxInboundStreams: 5_000
maxInboundStreams: 5_000,
timeout: 180_000
})
}
})
Expand Down
2 changes: 1 addition & 1 deletion packages/interface-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"progress-events": "^1.0.1"
},
"devDependencies": {
"aegir": "^47.0.21"
"aegir": "^47.0.22"
},
"sideEffects": false
}
2 changes: 1 addition & 1 deletion packages/interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"uint8arraylist": "^2.4.8"
},
"devDependencies": {
"aegir": "^47.0.21"
"aegir": "^47.0.22"
},
"sideEffects": false
}
2 changes: 1 addition & 1 deletion packages/interface/src/stream-muxer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export interface StreamMuxer<MuxedStream extends Stream = Stream> extends TypedE
/**
* Create a new stream
*/
createStream(options?: CreateStreamOptions): MuxedStream | Promise<MuxedStream>
createStream(options?: CreateStreamOptions): Promise<MuxedStream>

/**
* Immediately close the muxer, abort every open stream and discard any
Expand Down
4 changes: 2 additions & 2 deletions packages/interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
"uint8arrays": "^5.1.0"
},
"devDependencies": {
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"protons": "^7.7.0"
},
"peerDependencies": {
"aegir": "^47.0.21"
"aegir": "^47.0.22"
}
}
2 changes: 1 addition & 1 deletion packages/kad-dht/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"@types/lodash.range": "^3.2.9",
"@types/sinon": "^17.0.4",
"@types/which": "^3.0.4",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"benchmark": "^2.1.4",
"datastore-core": "^10.0.4",
"delay": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"devDependencies": {
"@libp2p/logger": "^5.2.0",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"datastore-core": "^10.0.4"
},
"sideEffects": false
Expand Down
2 changes: 1 addition & 1 deletion packages/libp2p-daemon-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@chainsafe/libp2p-gossipsub": "^14.1.1",
"@libp2p/daemon-server": "^8.0.6",
"@libp2p/kad-dht": "^15.1.11",
"aegir": "^47.0.21",
"aegir": "^47.0.22",
"it-all": "^3.0.9",
"p-event": "^6.0.1",
"sinon": "^21.0.0",
Expand Down
Loading
Loading