Skip to content

Commit 34d3ecd

Browse files
authored
feat!: update to libp2p@v3 and latest data/block stores (#856)
Updates libp2p to the latest version and all accompanying deps. BREAKING CHANGE: uses libp2p v3 and updated block/data stores
1 parent a0cac72 commit 34d3ecd

File tree

121 files changed

+705
-735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+705
-735
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ updates:
1010
prefix: "deps"
1111
prefix-development: "chore"
1212
groups:
13-
helia-deps: # group all helia/libp2p deps together
13+
interplanetary-deps: # Helia/libp2p deps
1414
patterns:
1515
- "*helia*"
1616
- "*libp2p*"
1717
- "*multiformats*"
1818
- "*blockstore*"
1919
- "*datastore*"
20-
kubo-deps: # group kubo, kubo-rpc-client, and ipfsd-ctl updates
20+
kubo-deps: # kubo deps
2121
patterns:
2222
- "*kubo*"
2323
- "ipfsd-ctl"

.github/workflows/semantic-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ on:
99

1010
jobs:
1111
main:
12-
uses: pl-strflt/.github/.github/workflows/reusable-semantic-pull-request.yml@v0.3
12+
uses: ipdxco/unified-github-workflows/.github/workflows/reusable-semantic-pull-request.yml@v1

benchmarks/add-dir/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
"devDependencies": {
1616
"@helia/unixfs": "^5.0.2",
1717
"aegir": "^47.0.7",
18-
"blockstore-core": "^5.0.2",
18+
"blockstore-core": "^6.0.2",
1919
"blockstore-fs": "^2.0.1",
20-
"datastore-core": "^10.0.2",
20+
"datastore-core": "^11.0.2",
2121
"datastore-level": "^11.0.1",
2222
"execa": "^9.5.3",
2323
"helia": "^5.1.1",
24-
"ipfs-unixfs-importer": "^15.1.5",
24+
"ipfs-unixfs-importer": "^16.0.1",
2525
"ipfsd-ctl": "^15.0.0",
2626
"it-last": "^3.0.6",
27-
"kubo": "^0.34.1",
27+
"kubo": "^0.38.0",
2828
"kubo-rpc-client": "^5.0.0",
2929
"multiformats": "^13.1.0",
3030
"tinybench": "^4.0.1"

benchmarks/gc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"it-all": "^3.0.4",
2222
"it-drain": "^3.0.5",
2323
"it-map": "^3.0.5",
24-
"kubo": "^0.34.1",
24+
"kubo": "^0.38.0",
2525
"kubo-rpc-client": "^5.0.0",
2626
"multiformats": "^13.0.0",
2727
"tinybench": "^4.0.1"

benchmarks/pinning/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"it-all": "^3.0.4",
2222
"it-drain": "^3.0.5",
2323
"it-map": "^3.0.5",
24-
"kubo": "^0.34.1",
24+
"kubo": "^0.38.0",
2525
"kubo-rpc-client": "^5.0.0",
2626
"multiformats": "^13.0.0",
2727
"tinybench": "^4.0.1"

benchmarks/transfer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
"blockstore-fs": "^2.0.1",
2525
"datastore-level": "^11.0.1",
2626
"helia": "^5.1.1",
27-
"ipfs-unixfs-importer": "^15.1.1",
27+
"ipfs-unixfs-importer": "^16.0.1",
2828
"ipfsd-ctl": "^15.0.0",
2929
"it-buffer-stream": "^3.0.2",
3030
"it-drain": "^3.0.1",
31-
"kubo": "^0.34.1",
31+
"kubo": "^0.38.0",
3232
"kubo-rpc-client": "^5.0.0",
3333
"libp2p": "^2.9.0",
3434
"multiformats": "^13.1.0",

benchmarks/transports/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@
3535
"debug": "^4.3.4",
3636
"execa": "^8.0.1",
3737
"helia": "^5.1.1",
38-
"interface-blockstore": "^5.2.10",
39-
"interface-datastore": "^8.2.11",
40-
"ipfs-unixfs-importer": "^15.1.1",
38+
"interface-blockstore": "^6.0.1",
39+
"interface-datastore": "^9.0.2",
40+
"ipfs-unixfs-importer": "^16.0.1",
4141
"ipfsd-ctl": "^15.0.0",
4242
"it-buffer-stream": "^3.0.2",
4343
"it-drain": "^3.0.7",
44-
"kubo": "^0.34.1",
44+
"kubo": "^0.38.0",
4545
"kubo-rpc-client": "^5.0.0",
4646
"libp2p": "^2.9.0",
4747
"multiformats": "^13.1.0",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributor Code of Conduct
2+
3+
This project follows the [`IPFS Community Code of Conduct`](https://github.com/ipfs/community/blob/master/code-of-conduct.md)

packages/bitswap/package.json

Lines changed: 26 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,6 @@
3535
"import": "./dist/src/index.js"
3636
}
3737
},
38-
"eslintConfig": {
39-
"extends": "ipfs",
40-
"parserOptions": {
41-
"project": true,
42-
"sourceType": "module"
43-
},
44-
"ignorePatterns": [
45-
"scripts/*",
46-
"*.test-d.ts"
47-
]
48-
},
4938
"scripts": {
5039
"clean": "aegir clean",
5140
"lint": "aegir lint",
@@ -64,45 +53,42 @@
6453
"dependencies": {
6554
"@helia/interface": "^5.4.0",
6655
"@helia/utils": "^1.4.0",
67-
"@libp2p/interface": "^2.2.1",
68-
"@libp2p/logger": "^5.1.4",
69-
"@libp2p/peer-collections": "^6.0.12",
70-
"@libp2p/utils": "^6.2.1",
71-
"@multiformats/multiaddr": "^12.3.3",
56+
"@libp2p/interface": "^3.0.2",
57+
"@libp2p/logger": "^6.0.5",
58+
"@libp2p/peer-collections": "^7.0.5",
59+
"@libp2p/utils": "^7.0.5",
60+
"@multiformats/multiaddr": "^13.0.1",
7261
"any-signal": "^4.1.1",
73-
"interface-blockstore": "^5.3.1",
74-
"interface-store": "^6.0.2",
75-
"it-drain": "^3.0.7",
62+
"interface-blockstore": "^6.0.1",
63+
"interface-store": "^7.0.0",
64+
"it-drain": "^3.0.10",
7665
"it-length-prefixed": "^10.0.1",
77-
"it-map": "^3.1.1",
78-
"it-pipe": "^3.0.1",
79-
"it-take": "^3.0.6",
80-
"multiformats": "^13.3.1",
66+
"it-map": "^3.1.4",
67+
"it-pushable": "^3.2.3",
68+
"it-take": "^3.0.9",
69+
"it-to-buffer": "^4.0.10",
70+
"multiformats": "^13.4.1",
8171
"p-defer": "^4.0.1",
8272
"progress-events": "^1.0.1",
83-
"protons-runtime": "^5.5.0",
84-
"race-event": "^1.3.0",
73+
"protons-runtime": "^5.6.0",
74+
"race-event": "^1.6.1",
8575
"uint8-varint": "^2.0.4",
8676
"uint8arraylist": "^2.4.8",
8777
"uint8arrays": "^5.1.0"
8878
},
8979
"devDependencies": {
90-
"@libp2p/crypto": "^5.0.7",
91-
"@libp2p/interface-compliance-tests": "^6.1.11",
92-
"@libp2p/peer-id": "^5.0.8",
93-
"@types/sinon": "^17.0.3",
94-
"aegir": "^47.0.7",
95-
"blockstore-core": "^5.0.2",
80+
"@libp2p/crypto": "^5.1.12",
81+
"@libp2p/peer-id": "^6.0.3",
82+
"@types/sinon": "^17.0.4",
83+
"aegir": "^47.0.22",
84+
"blockstore-core": "^6.0.2",
9685
"delay": "^6.0.0",
97-
"it-all": "^3.0.6",
98-
"it-length-prefixed-stream": "^2.0.2",
99-
"it-pair": "^2.0.6",
100-
"it-protobuf-stream": "^2.0.2",
101-
"p-event": "^6.0.1",
102-
"p-retry": "^6.2.1",
103-
"p-wait-for": "^5.0.2",
104-
"protons": "^7.6.0",
105-
"sinon": "^20.0.0",
86+
"it-all": "^3.0.9",
87+
"p-event": "^7.0.0",
88+
"p-retry": "^7.0.0",
89+
"p-wait-for": "^6.0.0",
90+
"protons": "^7.7.0",
91+
"sinon": "^21.0.0",
10692
"sinon-ts": "^2.0.0"
10793
},
10894
"browser": {

packages/bitswap/src/bitswap.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ import { Stats } from './stats.js'
88
import { WantList } from './want-list.js'
99
import type { BitswapOptions, Bitswap as BitswapInterface, BitswapWantProgressEvents, BitswapNotifyProgressEvents, WantListEntry, BitswapComponents } from './index.js'
1010
import type { BlockBroker, CreateSessionOptions, ProviderOptions } from '@helia/interface'
11-
import type { ComponentLogger, Libp2p, PeerId } from '@libp2p/interface'
11+
import type { ComponentLogger, Libp2p, PeerId, AbortOptions } from '@libp2p/interface'
1212
import type { Logger } from '@libp2p/logger'
13-
import type { AbortOptions } from '@multiformats/multiaddr'
1413
import type { Blockstore } from 'interface-blockstore'
1514
import type { CID } from 'multiformats/cid'
1615
import type { ProgressOptions } from 'progress-events'
@@ -111,7 +110,7 @@ export class Bitswap implements BitswapInterface {
111110
/**
112111
* Sends notifications about the arrival of a block
113112
*/
114-
async notify (cid: CID, block: Uint8Array, options: ProgressOptions<BitswapNotifyProgressEvents> & AbortOptions = {}): Promise<void> {
113+
async notify (cid: CID, options: ProgressOptions<BitswapNotifyProgressEvents> & AbortOptions = {}): Promise<void> {
115114
await Promise.all([
116115
this.peerWantLists.receivedBlock(cid, options),
117116
this.wantList.receivedBlock(cid, options)

0 commit comments

Comments
 (0)