fix: Use Helia defaults for gossipsub and circuit relay. Update circuit relay with up-to-date configuration.

This commit is contained in:
Hayden Young 2024-10-29 16:03:26 +00:00
parent 1daa4bf6a5
commit 2f7a6270a8
4 changed files with 2589 additions and 3737 deletions

View File

@ -2,4 +2,10 @@
For now, please refer to our Git commit history for a list of changes. For now, please refer to our Git commit history for a list of changes.
https://github.com/orbitdb/orbitdb/commits/v2.4.0 https://github.com/orbitdb/orbitdb/compare/v2.4.0...v2.4.1
You can also use the following git command to generate a log of changes:
```
git log v2.4.0..v2.4.1 --oneline
```

6295
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@orbitdb/core", "name": "@orbitdb/core",
"version": "2.4.0", "version": "2.4.1",
"description": "Distributed p2p database on IPFS", "description": "Distributed p2p database on IPFS",
"author": "Haad", "author": "Haad",
"license": "MIT", "license": "MIT",
@ -30,19 +30,18 @@
}, },
"devDependencies": { "devDependencies": {
"@chainsafe/libp2p-gossipsub": "^14.1.0", "@chainsafe/libp2p-gossipsub": "^14.1.0",
"@chainsafe/libp2p-yamux": "^7.0.1", "@libp2p/circuit-relay-v2": "^3.1.0",
"@helia/block-brokers": "^4.0.0", "@playwright/test": "^1.48.2",
"@libp2p/circuit-relay-v2": "^2.1.5",
"blockstore-level": "^2.0.1", "blockstore-level": "^2.0.1",
"c8": "^8.0.1", "c8": "^8.0.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
"helia": "^5.0.0", "helia": "^5.1.0",
"it-all": "^3.0.4", "it-all": "^3.0.4",
"jsdoc": "^4.0.2", "jsdoc": "^4.0.2",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"playwright-test": "^14.0.0", "playwright-test": "^14.1.6",
"rimraf": "^5.0.5", "rimraf": "^5.0.5",
"standard": "^17.1.0", "standard": "^17.1.0",
"webpack": "^5.89.0", "webpack": "^5.89.0",

View File

@ -21,10 +21,6 @@ const Libp2pOptions = {
transports: [ transports: [
webSockets({ webSockets({
filter: all filter: all
}),
webRTC(),
circuitRelayTransport({
discoverRelays: 1
}) })
], ],
connectionEncrypters: [noise()], connectionEncrypters: [noise()],
@ -43,16 +39,14 @@ const Libp2pOptions = {
*/ */
const Libp2pBrowserOptions = { const Libp2pBrowserOptions = {
addresses: { addresses: {
listen: ['/webrtc'] listen: ['/webrtc', '/p2p-circuit']
}, },
transports: [ transports: [
webSockets({ webSockets({
filter: all filter: all
}), }),
webRTC(), webRTC(),
circuitRelayTransport({ circuitRelayTransport()
discoverRelays: 1
})
], ],
connectionEncrypters: [noise()], connectionEncrypters: [noise()],
streamMuxers: [yamux()], streamMuxers: [yamux()],