Skip to content

Commit 1f5763f

Browse files
committed
chore: deprecate the pubsub api
Fixes #9717
1 parent 5b9442c commit 1f5763f

File tree

6 files changed

+30
-45
lines changed

6 files changed

+30
-45
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Kubo was the first IPFS implementation and is the most widely used one today. Im
1212
Featureset
1313
- Runs an IPFS-Node as a network service
1414
- [Command Line Interface](https://docs.ipfs.tech/reference/kubo/cli/) to IPFS-Nodes
15-
- Local [Web2-to-Web3 HTTP Gateway functionality](https://github.com/ipfs/specs/tree/main/http-gateways#readme)
15+
- Local [Web2-to-Web3 HTTP Gateway functionality](https://github.com/ipfs/specs/tree/main/http-gateways#readme)
1616
- HTTP RPC API (`/api/v0`) to access and control the daemon
1717
- IPFS's internal Webgui can be used to manage the Kubo nodes
1818

@@ -381,7 +381,6 @@ Some places to get you started on the codebase:
381381
- libp2p
382382
- libp2p: https://github.com/libp2p/go-libp2p
383383
- DHT: https://github.com/libp2p/go-libp2p-kad-dht
384-
- PubSub: https://github.com/libp2p/go-libp2p-pubsub
385384
- [IPFS : The `Add` command demystified](https://github.com/ipfs/kubo/tree/master/docs/add-code-flow.md)
386385

387386
### Map of Implemented Subsystems

cmd/ipfs/daemon.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Headers.
171171
cmds.BoolOption(enableGCKwd, "Enable automatic periodic repo garbage collection"),
172172
cmds.BoolOption(adjustFDLimitKwd, "Check and raise file descriptor limits if needed").WithDefault(true),
173173
cmds.BoolOption(migrateKwd, "If true, assume yes at the migrate prompt. If false, assume no."),
174-
cmds.BoolOption(enablePubSubKwd, "Enable experimental pubsub feature. Overrides Pubsub.Enabled config."),
174+
cmds.BoolOption(enablePubSubKwd, "DEPRECATED"),
175175
cmds.BoolOption(enableIPNSPubSubKwd, "Enable IPNS over pubsub. Implicitly enables pubsub, overrides Ipns.UsePubsub config."),
176176
cmds.BoolOption(enableMultiplexKwd, "DEPRECATED"),
177177
cmds.StringOption(agentVersionSuffix, "Optional suffix to the AgentVersion presented by `ipfs id` and also advertised through BitSwap."),

core/commands/pubsub.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import (
1616
)
1717

1818
var PubsubCmd = &cmds.Command{
19-
Status: cmds.Experimental,
19+
Status: cmds.Deprecated,
2020
Helptext: cmds.HelpText{
2121
Tagline: "An experimental publish-subscribe system on ipfs.",
2222
ShortDescription: `
2323
ipfs pubsub allows you to publish messages to a given topic, and also to
2424
subscribe to new messages on a given topic.
2525
26-
EXPERIMENTAL FEATURE
26+
DEPRECATED FEATURE (see https://github.com/ipfs/kubo/issues/9717)
2727
2828
It is not intended in its current state to be used in a production
2929
environment. To use, the daemon must be run with
@@ -46,13 +46,13 @@ type pubsubMessage struct {
4646
}
4747

4848
var PubsubSubCmd = &cmds.Command{
49-
Status: cmds.Experimental,
49+
Status: cmds.Deprecated,
5050
Helptext: cmds.HelpText{
5151
Tagline: "Subscribe to messages on a given topic.",
5252
ShortDescription: `
5353
ipfs pubsub sub subscribes to messages on a given topic.
5454
55-
EXPERIMENTAL FEATURE
55+
DEPRECATED FEATURE (see https://github.com/ipfs/kubo/issues/9717)
5656
5757
It is not intended in its current state to be used in a production
5858
environment. To use, the daemon must be run with
@@ -145,14 +145,14 @@ TOPIC AND DATA ENCODING
145145
}
146146

147147
var PubsubPubCmd = &cmds.Command{
148-
Status: cmds.Experimental,
148+
Status: cmds.Deprecated,
149149
Helptext: cmds.HelpText{
150150
Tagline: "Publish data to a given pubsub topic.",
151151
ShortDescription: `
152152
ipfs pubsub pub publishes a message to a specified topic.
153153
It reads binary data from stdin or a file.
154154
155-
EXPERIMENTAL FEATURE
155+
DEPRECATED FEATURE (see https://github.com/ipfs/kubo/issues/9717)
156156
157157
It is not intended in its current state to be used in a production
158158
environment. To use, the daemon must be run with
@@ -201,13 +201,13 @@ HTTP RPC ENCODING
201201
}
202202

203203
var PubsubLsCmd = &cmds.Command{
204-
Status: cmds.Experimental,
204+
Status: cmds.Deprecated,
205205
Helptext: cmds.HelpText{
206206
Tagline: "List subscribed topics by name.",
207207
ShortDescription: `
208208
ipfs pubsub ls lists out the names of topics you are currently subscribed to.
209209
210-
EXPERIMENTAL FEATURE
210+
DEPRECATED FEATURE (see https://github.com/ipfs/kubo/issues/9717)
211211
212212
It is not intended in its current state to be used in a production
213213
environment. To use, the daemon must be run with
@@ -273,15 +273,15 @@ func safeTextListEncoder(req *cmds.Request, w io.Writer, list *stringList) error
273273
}
274274

275275
var PubsubPeersCmd = &cmds.Command{
276-
Status: cmds.Experimental,
276+
Status: cmds.Deprecated,
277277
Helptext: cmds.HelpText{
278278
Tagline: "List peers we are currently pubsubbing with.",
279279
ShortDescription: `
280280
ipfs pubsub peers with no arguments lists out the pubsub peers you are
281281
currently connected to. If given a topic, it will list connected peers who are
282282
subscribed to the named topic.
283283
284-
EXPERIMENTAL FEATURE
284+
DEPRECATED FEATURE (see https://github.com/ipfs/kubo/issues/9717)
285285
286286
It is not intended in its current state to be used in a production
287287
environment. To use, the daemon must be run with

docs/changelogs/v0.19.md

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [🔦 Highlights](#-highlights)
99
- [Improving the libp2p resource management integration](#improving-the-libp2p-resource-management-integration)
1010
- [Addition of "autoclient" router type](#addition-of-autoclient-router-type)
11+
- [Deprecation of the `ipfs pubsub` commands and matching HTTP endpoints](#deprecation-of-the-ipfs-pubsub-commands-and-matching-http-endpoints)
1112
- [📝 Changelog](#-changelog)
1213
- [👨‍👩‍👧‍👦 Contributors](#-contributors)
1314

@@ -28,6 +29,12 @@ A new routing type "autoclient" has been added. This mode is similar to "auto",
2829

2930
See the [Routing.Type documentation](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingtype) for more information.
3031

32+
#### Deprecation of the `ipfs pubsub` commands and matching HTTP endpoints
33+
34+
We are deprecating `ipfs pubsub` and all `/api/v0/pubsub/` RPC endpoints and will remove them in the next release.
35+
36+
For more information and rational see [#9717](https://github.com/ipfs/kubo/issues/9717).
37+
3138
### 📝 Changelog
3239

3340
### 👨‍👩‍👧‍👦 Contributors

docs/config.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1165,13 +1165,15 @@ Type: `duration`
11651165

11661166
## `Pubsub`
11671167

1168+
**DEPRECATED**: See [#9717](https://github.com/ipfs/kubo/issues/9717)
1169+
11681170
Pubsub configures the `ipfs pubsub` subsystem. To use, it must be enabled by
11691171
passing the `--enable-pubsub-experiment` flag to the daemon
11701172
or via the `Pubsub.Enabled` flag below.
11711173

11721174
### `Pubsub.Enabled`
11731175

1174-
**EXPERIMENTAL:** read about current limitations at [experimental-features.md#ipfs-pubsub](./experimental-features.md#ipfs-pubsub).
1176+
**DEPRECATED**: See [#9717](https://github.com/ipfs/kubo/issues/9717)
11751177

11761178
Enables the pubsub system.
11771179

@@ -1181,6 +1183,8 @@ Type: `flag`
11811183

11821184
### `Pubsub.Router`
11831185

1186+
**DEPRECATED**: See [#9717](https://github.com/ipfs/kubo/issues/9717)
1187+
11841188
Sets the default router used by pubsub to route messages to peers. This can be one of:
11851189

11861190
* `"floodsub"` - floodsub is a basic router that simply _floods_ messages to all
@@ -1196,6 +1200,8 @@ Type: `string` (one of `"floodsub"`, `"gossipsub"`, or `""` (apply default))
11961200

11971201
### `Pubsub.DisableSigning`
11981202

1203+
**DEPRECATED**: See [#9717](https://github.com/ipfs/kubo/issues/9717)
1204+
11991205
Disables message signing and signature verification. Enable this option if
12001206
you're operating in a completely trusted network.
12011207

@@ -1209,6 +1215,8 @@ Type: `bool`
12091215

12101216
### `Pubsub.SeenMessagesTTL`
12111217

1218+
**DEPRECATED**: See [#9717](https://github.com/ipfs/kubo/issues/9717)
1219+
12121220
Controls the time window within which duplicate messages, identified by Message
12131221
ID, will be identified and won't be emitted again.
12141222

@@ -1228,6 +1236,8 @@ Type: `optionalDuration`
12281236

12291237
### `Pubsub.SeenMessagesStrategy`
12301238

1239+
**DEPRECATED**: See [#9717](https://github.com/ipfs/kubo/issues/9717)
1240+
12311241
Determines how the time-to-live (TTL) countdown for deduplicating Pubsub
12321242
messages is calculated.
12331243

docs/experimental-features.md

-31
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ When you add a new experimental feature to kubo or change an experimental
1212
feature, you MUST please make a PR updating this document, and link the PR in
1313
the above issue.
1414

15-
- [ipfs pubsub](#ipfs-pubsub)
1615
- [Raw leaves for unixfs files](#raw-leaves-for-unixfs-files)
1716
- [ipfs filestore](#ipfs-filestore)
1817
- [ipfs urlstore](#ipfs-urlstore)
@@ -31,36 +30,6 @@ the above issue.
3130

3231
---
3332

34-
## ipfs pubsub
35-
36-
### State
37-
38-
Candidate, disabled by default but will be enabled by default in 0.6.0.
39-
40-
### In Version
41-
42-
0.4.5 (`--enable-pubsub-experiment`)
43-
0.11.0 (`Pubsub.Enabled` flag in config)
44-
45-
### How to enable
46-
47-
Run your daemon with the `--enable-pubsub-experiment` flag
48-
or modify your ipfs config and restart the daemon:
49-
```
50-
ipfs config --json Pubsub.Enabled true
51-
```
52-
53-
Then use the `ipfs pubsub` commands.
54-
55-
NOTE: `--enable-pubsub-experiment` CLI flag overrides `Pubsub.Enabled` config.
56-
57-
Configuration documentation can be found in [kubo/docs/config.md](./config.md#pubsub)
58-
59-
### Road to being a real feature
60-
61-
- [ ] Needs to not impact peers who don't use pubsub:
62-
https://github.com/libp2p/go-libp2p-pubsub/issues/332
63-
6433
## Raw Leaves for unixfs files
6534

6635
Allows files to be added with no formatting in the leaf nodes of the graph.

0 commit comments

Comments
 (0)