diff --git a/core/commands/bitswap.go b/core/commands/bitswap.go index f577c03e31c..7bddaac60ac 100644 --- a/core/commands/bitswap.go +++ b/core/commands/bitswap.go @@ -21,9 +21,10 @@ var BitswapCmd = &cmds.Command{ }, Subcommands: map[string]*cmds.Command{ - "stat": bitswapStatCmd, - "wantlist": showWantlistCmd, - "ledger": ledgerCmd, + "stat": bitswapStatCmd, + "wantlist": showWantlistCmd, + "ledger": ledgerCmd, + "reprovide": deprecatedBitswapReprovideCmd, }, } @@ -31,6 +32,17 @@ const ( peerOptionName = "peer" ) +var deprecatedBitswapReprovideCmd = &cmds.Command{ + Status: cmds.Deprecated, + Helptext: cmds.HelpText{ + Tagline: "Deprecated command to announce to bitswap. Use 'ipfs routing reprovide' instead.", + ShortDescription: ` +'ipfs bitswap reprovide' is a legacy plumbing command used to announce to DHT. +Deprecated, use modern 'ipfs routing reprovide' instead.`, + }, + Run: reprovideRoutingCmd.Run, // alias to routing reprovide to not break existing users +} + var showWantlistCmd = &cmds.Command{ Helptext: cmds.HelpText{ Tagline: "Show blocks currently on the wantlist.", diff --git a/core/commands/commands_test.go b/core/commands/commands_test.go index 5faf54e5d73..2dda639f545 100644 --- a/core/commands/commands_test.go +++ b/core/commands/commands_test.go @@ -20,6 +20,7 @@ func TestCommands(t *testing.T) { "/add", "/bitswap", "/bitswap/ledger", + "/bitswap/reprovide", "/bitswap/stat", "/bitswap/wantlist", "/block", diff --git a/docs/changelogs/v0.34.md b/docs/changelogs/v0.34.md index 84b17b10cc7..773d942fe46 100644 --- a/docs/changelogs/v0.34.md +++ b/docs/changelogs/v0.34.md @@ -6,28 +6,20 @@ - [Overview](#overview) - [๐Ÿ”ฆ Highlights](#-highlights) - - [JSON config validation](#json-config-validation) - - [Reprovide command moved to routing](#reprovide-command-moved-to-routing) - - [Additional stats for Accelerated DHT Reprovides](#additional-stats-for-accelerated-dht-reprovides) -- [๐Ÿ“ Changelog](#-changelog) + - [RPC and CLI command changes](#rpc-and-cli-command-changes) - [Bitswap improvements from Boxo](#bitswap-improvements-from-boxo) +- [๐Ÿ“ Changelog](#-changelog) - [๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributors](#-contributors) ### Overview ### ๐Ÿ”ฆ Highlights -#### JSON config validation - -`ipfs config` is now validating json fields ([#10679](https://github.com/ipfs/kubo/pull/10679)). - -#### Reprovide command moved to routing - -Moved the `bitswap reprovide` command to `routing reprovide`. ([#10677](https://github.com/ipfs/kubo/pull/10677)) - -#### Additional stats for Accelerated DHT Reprovides +#### RPC and CLI command changes -The `stats reprovide` command now shows additional stats for the DHT Accelerated Client, indicating the last and next `reprovide` times. ([#10677](https://github.com/ipfs/kubo/pull/10677)) +- `ipfs config` is now validating json fields ([#10679](https://github.com/ipfs/kubo/pull/10679)). +- Deprecated the `bitswap reprovide` command. Make sure to switch to modern `routing reprovide`. ([#10677](https://github.com/ipfs/kubo/pull/10677)) +- The `stats reprovide` command now shows additional stats for [`Routing.AcceleratedDHTClient`](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingaccelerateddhtclient), indicating the last and next `reprovide` times. ([#10677](https://github.com/ipfs/kubo/pull/10677)) #### Bitswap improvements from Boxo