You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
BREAKING CHANGE: The default pubsub implementation has changed from floodsub to [gossipsub](https://github.com/ChainSafe/gossipsub-js). Additionally, to enable pubsub programmatically set `pubsub.enabled: true` instead of `EXPERIMENTAL.pubsub: true` or via the CLI pass `--enable-pubsub` instead of `--enable-pubsub-experiment` to `jsipfs daemon`.
@@ -495,6 +495,8 @@ You can see the bundle in action in the [custom libp2p example](examples/custom-
495
495
- `modules` (object):
496
496
- `transport` (Array<[libp2p.Transport](https://github.com/libp2p/interface-transport)>): An array of Libp2p transport classes/instances to use _instead_ of the defaults. See [libp2p/interface-transport](https://github.com/libp2p/interface-transport) for details.
497
497
- `peerDiscovery` (Array<[libp2p.PeerDiscovery](https://github.com/libp2p/interface-peer-discovery)>): An array of Libp2p peer discovery classes/instances to use _instead_ of the defaults. See [libp2p/peer-discovery](https://github.com/libp2p/interface-peer-discovery) for details. If passing a class, configuration can be passed using the config section below under the key corresponding to you module's unique `tag` (a static property on the class)
498
+
- `dht` (object): a DHT implementation that enables PeerRouting and ContentRouting. Example [libp2p/js-libp2p-kad-dht](https://github.com/libp2p/js-libp2p-kad-dht)
499
+
- `pubsub` (object): a Pubsub implementation on top of [libp2p/js-libp2p-pubsub](https://github.com/libp2p/js-libp2p-pubsub)
498
500
- `config` (object):
499
501
- `peerDiscovery` (object):
500
502
- `autoDial` (boolean): Dial to discovered peers when under the Connection Manager min peer count watermark. (default `true`)
@@ -506,6 +508,11 @@ You can see the bundle in action in the [custom libp2p example](examples/custom-
Copy file name to clipboardExpand all lines: doc/config.md
+12
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ The js-ipfs config file is a JSON document located in the root directory of the
19
19
-[`PeerID`](#peerid)
20
20
-[`PrivKey`](#privkey)
21
21
-[`Keychain`](#keychain)
22
+
-[`Pubsub`](#pubsub)
23
+
-[`Router`](#router)
22
24
-[`Swarm`](#swarm)
23
25
-[`ConnMgr`](#connmgr)
24
26
@@ -168,6 +170,16 @@ Default:
168
170
169
171
You can check the [parameter choice for pbkdf2](https://cryptosense.com/parameter-choice-for-pbkdf2/) for more information.
170
172
173
+
## `Pubsub`
174
+
175
+
Options for configuring the pubsub subsystem. It is important pointing out that this is not supported in the browser. If you want to configure a different pubsub router in the browser you must configure `libp2p.modules.pubsub` options instead.
176
+
177
+
### `Router`
178
+
179
+
A string value for specifying which pubsub routing protocol to use. You can either use `gossipsub` in order to use the [ChainSafe/gossipsub-js](https://github.com/ChainSafe/gossipsub-js) implementation, or `floodsub` to use the [libp2p/js-libp2p-floodsub](https://github.com/libp2p/js-libp2p-floodsub) implementation. You can read more about these implementations on the [libp2p/specs/pubsub](https://github.com/libp2p/specs/tree/master/pubsub) document.
0 commit comments