Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
92aa993
chore: 0.37.0-dev
lidel Jun 18, 2025
ace0b0b
Replace use of go-car v1 with go-car/v2 (#10845)
gammazero Jun 23, 2025
be24176
docs: fix minor typos (#10849)
gammazero Jun 25, 2025
839023c
chore: p2p-forge v0.6.0 + go-libp2p 0.42.0 (#10840)
sukunrt Jun 26, 2025
024225e
core:constructor: add a log line about http retrieval
hsanjuan Jun 26, 2025
a0632aa
Merge pull request #10852 from ipfs/httpretrieval-logging-core-constr…
hsanjuan Jun 27, 2025
6f0c1de
chore: Upgrade github.com/cockroachdb/pebble/v2 to v2.0.6 for Go 1.25…
stefanb Jul 2, 2025
738d523
Upgrade to Boxo v0.33.0 (#10857)
gammazero Jul 8, 2025
b95845e
refactor: use slices.Sort where appropriate (#10858)
gammazero Jul 8, 2025
4195a1d
fix: handling of EDITOR env var (#10855)
gammazero Jul 8, 2025
b4e6769
docs(config): add network exposure considerations (#10856)
lidel Jul 11, 2025
475e2ba
docs: release checklist fixes from 0.36 (#10861)
lidel Jul 14, 2025
780b207
chore: changelog 0.37
lidel Jul 14, 2025
8589296
Merge remote-tracking branch 'origin/master' into merge-release-v0.36.0
lidel Jul 14, 2025
1131dde
Merge pull request #10868 from ipfs/merge-release-v0.36.0
lidel Jul 14, 2025
d80e85f
Update dependencies (#10860)
gammazero Jul 15, 2025
a22efea
provider: clear provide queue when reprovide strategy changes (#10863)
gammazero Jul 16, 2025
bb58ca4
remove unneeded thirdparty packages (#10871)
gammazero Jul 16, 2025
2a5b53c
Update to latest boxo PR #976
gammazero Jul 29, 2025
fde0f8d
Revert "Update to latest boxo PR #976"
gammazero Jul 29, 2025
02cf751
Upgrade to Boxo v0.33.1 (#10888)
gammazero Jul 31, 2025
017d500
Bitswap: use a single ConnectEventManager.
hsanjuan Jul 31, 2025
8862a5e
chore: update go-libp2p and p2p-forge (#10887)
sukunrt Jul 31, 2025
19300f2
core: Add a ContentDiscovery field
hsanjuan Aug 1, 2025
5fdaad5
Merge pull request #10890 from ipfs/fx-separate-discovery
hsanjuan Aug 5, 2025
458ad45
docs:added GOLOG_LOG_LEVEL to debug-guide for logging more info (#10894)
SAHU-01 Aug 5, 2025
47b31fe
feat(daemon): accelerated client startup note (#10859)
lidel Aug 5, 2025
90b73d2
refactor: remove goprocess (#10872)
gammazero Aug 5, 2025
10abb90
feat(add): add support for naming pinned CIDs (#10877)
KapilSareen Aug 6, 2025
58ad11b
Merge pull request #10889 from ipfs/reuse-connevtmanager
hsanjuan Aug 6, 2025
918aa07
refactor: move `ipfs stat provide/reprovide` to `ipfs provide stat` (…
gammazero Aug 8, 2025
cfbc648
feat: ipfs-webui v4.8.0 (#10902)
lidel Aug 8, 2025
a673c2e
fix: Provide according to Reprovider.Strategy (#10886)
hsanjuan Aug 8, 2025
6e039a4
client/rpc: re-enable tests on windows. (#10895)
hsanjuan Aug 8, 2025
1c9fe27
fix: `ipfs cid` without repo (#10897)
lidel Aug 8, 2025
b139df1
feat: go-libp2p v0.43.0 (#10892)
sukunrt Aug 8, 2025
d4ab512
fix(cmd): exit 1 on error (#10903)
gammazero Aug 9, 2025
06abadc
Fix failing FUSE test (#10904)
gammazero Aug 9, 2025
6e3ae8f
fix(ci): switch to debian:bookworm-slim
lidel Aug 11, 2025
d3cc4ff
feat: add query functionality to log level command (#10885)
SgtPooki Aug 11, 2025
c08e24b
fix(sharness): no blocking on unclean FUSE unmount (#10906)
lidel Aug 11, 2025
c513e1a
fix(relay): feed connected peers to AutoRelay discovery (#10901)
lidel Aug 11, 2025
7250eb8
bump go-libp2p-kad-dht (#10911)
guillaumemichel Aug 13, 2025
d81f524
feat(ipns): support passing custom sequence number during publishing …
gsergey418 Aug 13, 2025
a3b01cd
Replace `uber-go/multierr` with `errors.Join` (#10912)
gammazero Aug 13, 2025
abe6d9d
chore(deps): bump actions/download-artifact from 4 to 5 (#10908)
dependabot[bot] Aug 13, 2025
8e5ef55
fix(ci): docker build (#10914)
lidel Aug 13, 2025
2b858bb
feat(ci): reusable spellcheck from unified CI (#10873)
galargh Aug 14, 2025
501b1f8
feat: require go1.25 for building kubo (#10913)
gammazero Aug 14, 2025
b8a1aa4
chore: replace random test utils with equivalents in go-test/random (…
gammazero Aug 14, 2025
5cb0943
chore(deps): bump actions/checkout from 4 to 5 (#10907)
dependabot[bot] Aug 14, 2025
64c47c3
feat(config): `Gateway.RetrievalTimeout|MaxConcurrentRequests` (#10905)
lidel Aug 15, 2025
1ca5c9d
test: fix flaky repo verify (#10743)
lidel Aug 15, 2025
7109534
Upgrade to Boxo v0.34.0 (#10917)
gammazero Aug 15, 2025
187fce7
fix typos in docs and comments (#10920)
gammazero Aug 18, 2025
4255cc3
feat: telemetry plugin (#10866)
hsanjuan Aug 18, 2025
c5b13b1
docs: fix broadcast control release docs (#10919)
hsanjuan Aug 18, 2025
a81cc29
fix: resolve TestAddMultipleGCLive race condition (#10916)
lidel Aug 18, 2025
4bafb22
fix(ci): make NewRandPort thread-safe (#10921)
lidel Aug 18, 2025
c468f44
upgrade to go-test v0.2.3 (#10923)
gammazero Aug 19, 2025
ccb49de
feat(config): AutoConf with "auto" placeholders (#10883)
lidel Aug 20, 2025
c12d249
feat: optimize docker builds (#10925)
lidel Aug 21, 2025
426477e
docs: improve `ipfs add --help` (#10926)
lidel Aug 21, 2025
846e219
feat: Reprovider.Strategy: rename "flat" to "all" (#10928)
hsanjuan Aug 21, 2025
255bc88
chore: v0.37.0-rc1
lidel Aug 21, 2025
fae08d6
fix: harness tests random panic (#10933)
gammazero Aug 22, 2025
46324f0
fix: disable telemetry in test profile (#10931)
hsanjuan Aug 24, 2025
21e9f27
feat(ci): docker linting (#10927)
lidel Aug 26, 2025
53702e4
chore: set version to v0.37.0
lidel Aug 27, 2025
67f7129
chore: update v0.37.0 changelog
lidel Aug 27, 2025
20092c5
docs: update v0.37.0 dependency versions
lidel Aug 27, 2025
5661dfd
docs: improve v0.37 changelog
lidel Aug 27, 2025
6971f9f
docs(config): clarify Ipns.DelegatedPublishers auto behavior
lidel Aug 27, 2025
b2f50ec
docs: fix typo in v0.37 changelog
lidel Aug 27, 2025
9cb1d10
docs: add v0.38 changelog template
lidel Aug 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: move ipfs stat provide/reprovide to ipfs provide stat (#…
…10896)

- Move `ipfs stat reprovide` to `ipfs provide stat`
- Mark `ipfs stat provide` as deprecated and replaces by `ipfs provide stat`
- Mark `ipfs stat reprovide` as deprecated and replaces by `ipfs provide stat`
- Remove redundant code from deprecated subcommands

Closes #10869
  • Loading branch information
gammazero authored Aug 8, 2025
commit 918aa07c9ee64500f57eab8b8e12e9a4c727a94e
1 change: 1 addition & 0 deletions core/commands/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ func TestCommands(t *testing.T) {
"/ping",
"/provide",
"/provide/clear",
"/provide/stat",
"/pubsub",
"/pubsub/ls",
"/pubsub/peers",
Expand Down
102 changes: 99 additions & 3 deletions core/commands/provide.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ package commands
import (
"fmt"
"io"
"text/tabwriter"
"time"

humanize "github.com/dustin/go-humanize"
"github.com/ipfs/boxo/provider"
cmds "github.com/ipfs/go-ipfs-cmds"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/libp2p/go-libp2p-kad-dht/fullrt"
"golang.org/x/exp/constraints"
)

const (
Expand All @@ -28,11 +34,12 @@ reprovide' provides statistics. Additionally, 'ipfs bitswap reprovide' and
},

Subcommands: map[string]*cmds.Command{
"clear": ProvideClearCmd,
"clear": provideClearCmd,
"stat": provideStatCmd,
},
}

var ProvideClearCmd = &cmds.Command{
var provideClearCmd = &cmds.Command{
Status: cmds.Experimental,
Helptext: cmds.HelpText{
Tagline: "Clear all CIDs from the provide queue.",
Expand Down Expand Up @@ -80,3 +87,92 @@ https://github.com/ipfs/kubo/blob/master/docs/config.md#reproviderstrategy
}),
},
}

type provideStats struct {
provider.ReproviderStats
fullRT bool
}

var provideStatCmd = &cmds.Command{
Status: cmds.Experimental,
Helptext: cmds.HelpText{
Tagline: "Returns statistics about the node's provider system.",
ShortDescription: `
Returns statistics about the content the node is reproviding every
Reprovider.Interval according to Reprovider.Strategy:
https://github.com/ipfs/kubo/blob/master/docs/config.md#reprovider

This interface is not stable and may change from release to release.

`,
},
Arguments: []cmds.Argument{},
Options: []cmds.Option{},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)
if err != nil {
return err
}

if !nd.IsOnline {
return ErrNotOnline
}

stats, err := nd.Provider.Stat()
if err != nil {
return err
}
_, fullRT := nd.DHTClient.(*fullrt.FullRT)

if err := res.Emit(provideStats{stats, fullRT}); err != nil {
return err
}

return nil
},
Encoders: cmds.EncoderMap{
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s provideStats) error {
wtr := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0)
defer wtr.Flush()

fmt.Fprintf(wtr, "TotalReprovides:\t%s\n", humanNumber(s.TotalReprovides))
fmt.Fprintf(wtr, "AvgReprovideDuration:\t%s\n", humanDuration(s.AvgReprovideDuration))
fmt.Fprintf(wtr, "LastReprovideDuration:\t%s\n", humanDuration(s.LastReprovideDuration))
if !s.LastRun.IsZero() {
fmt.Fprintf(wtr, "LastReprovide:\t%s\n", humanTime(s.LastRun))
if s.fullRT {
fmt.Fprintf(wtr, "NextReprovide:\t%s\n", humanTime(s.LastRun.Add(s.ReprovideInterval)))
}
}
return nil
}),
},
Type: provideStats{},
}

func humanDuration(val time.Duration) string {
return val.Truncate(time.Microsecond).String()
}

func humanTime(val time.Time) string {
return val.Format("2006-01-02 15:04:05")
}

func humanNumber[T constraints.Float | constraints.Integer](n T) string {
nf := float64(n)
str := humanSI(nf, 0)
fullStr := humanFull(nf, 0)
if str != fullStr {
return fmt.Sprintf("%s\t(%s)", str, fullStr)
}
return str
}

func humanSI(val float64, decimals int) string {
v, unit := humanize.ComputeSI(val)
return fmt.Sprintf("%s%s", humanFull(v, decimals), unit)
}

func humanFull(val float64, decimals int) string {
return humanize.CommafWithDigits(val, decimals)
}
55 changes: 6 additions & 49 deletions core/commands/stat_provide.go
Original file line number Diff line number Diff line change
@@ -1,65 +1,22 @@
package commands

import (
"fmt"
"io"
"text/tabwriter"

cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/libp2p/go-libp2p-kad-dht/fullrt"
)

var statProvideCmd = &cmds.Command{
Status: cmds.Deprecated,
Helptext: cmds.HelpText{
Tagline: "Deprecated command, use 'ipfs stats reprovide' instead.",
Tagline: "Deprecated command, use 'ipfs provide stat' instead.",
ShortDescription: `
'ipfs stats provide' is deprecated because provide and reprovide operations
are now distinct. This command may be replaced by provide only stats in the
future.
`,
},
Arguments: []cmds.Argument{},
Options: []cmds.Option{},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)
if err != nil {
return err
}

if !nd.IsOnline {
return ErrNotOnline
}

stats, err := nd.Provider.Stat()
if err != nil {
return err
}
_, fullRT := nd.DHTClient.(*fullrt.FullRT)

if err := res.Emit(reprovideStats{stats, fullRT}); err != nil {
return err
}

return nil
},
Encoders: cmds.EncoderMap{
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s reprovideStats) error {
wtr := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0)
defer wtr.Flush()

fmt.Fprintf(wtr, "TotalProvides:\t%s\n", humanNumber(s.TotalReprovides))
fmt.Fprintf(wtr, "AvgProvideDuration:\t%s\n", humanDuration(s.AvgReprovideDuration))
fmt.Fprintf(wtr, "LastReprovideDuration:\t%s\n", humanDuration(s.LastReprovideDuration))
if !s.LastRun.IsZero() {
fmt.Fprintf(wtr, "LastRun:\t%s\n", humanTime(s.LastRun))
if s.fullRT {
fmt.Fprintf(wtr, "NextRun:\t%s\n", humanTime(s.LastRun.Add(s.ReprovideInterval)))
}
}
return nil
}),
},
Type: reprovideStats{},
Arguments: provideStatCmd.Arguments,
Options: provideStatCmd.Options,
Run: provideStatCmd.Run,
Encoders: provideStatCmd.Encoders,
Type: provideStatCmd.Type,
}
101 changes: 9 additions & 92 deletions core/commands/stat_reprovide.go
Original file line number Diff line number Diff line change
@@ -1,104 +1,21 @@
package commands

import (
"fmt"
"io"
"text/tabwriter"
"time"

humanize "github.com/dustin/go-humanize"
"github.com/ipfs/boxo/provider"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/libp2p/go-libp2p-kad-dht/fullrt"
"golang.org/x/exp/constraints"
)

type reprovideStats struct {
provider.ReproviderStats
fullRT bool
}

var statReprovideCmd = &cmds.Command{
Status: cmds.Experimental,
Status: cmds.Deprecated,
Helptext: cmds.HelpText{
Tagline: "Returns statistics about the node's reprovider system.",
Tagline: "Deprecated command, use 'ipfs provide stat' instead.",
ShortDescription: `
Returns statistics about the content the node is reproviding every
Reprovider.Interval according to Reprovider.Strategy:
https://github.com/ipfs/kubo/blob/master/docs/config.md#reprovider

This interface is not stable and may change from release to release.

'ipfs stats reprovide' is deprecated because provider stats are now
available fomr 'ipfs provide stat'.

Check failure on line 13 in core/commands/stat_reprovide.go

View workflow job for this annotation

GitHub Actions / spellcheck

fomr ==> from, form
`,
},
Arguments: []cmds.Argument{},
Options: []cmds.Option{},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)
if err != nil {
return err
}

if !nd.IsOnline {
return ErrNotOnline
}

stats, err := nd.Provider.Stat()
if err != nil {
return err
}
_, fullRT := nd.DHTClient.(*fullrt.FullRT)

if err := res.Emit(reprovideStats{stats, fullRT}); err != nil {
return err
}

return nil
},
Encoders: cmds.EncoderMap{
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s reprovideStats) error {
wtr := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0)
defer wtr.Flush()

fmt.Fprintf(wtr, "TotalReprovides:\t%s\n", humanNumber(s.TotalReprovides))
fmt.Fprintf(wtr, "AvgReprovideDuration:\t%s\n", humanDuration(s.AvgReprovideDuration))
fmt.Fprintf(wtr, "LastReprovideDuration:\t%s\n", humanDuration(s.LastReprovideDuration))
if !s.LastRun.IsZero() {
fmt.Fprintf(wtr, "LastReprovide:\t%s\n", humanTime(s.LastRun))
if s.fullRT {
fmt.Fprintf(wtr, "NextReprovide:\t%s\n", humanTime(s.LastRun.Add(s.ReprovideInterval)))
}
}
return nil
}),
},
Type: reprovideStats{},
}

func humanDuration(val time.Duration) string {
return val.Truncate(time.Microsecond).String()
}

func humanTime(val time.Time) string {
return val.Format("2006-01-02 15:04:05")
}

func humanNumber[T constraints.Float | constraints.Integer](n T) string {
nf := float64(n)
str := humanSI(nf, 0)
fullStr := humanFull(nf, 0)
if str != fullStr {
return fmt.Sprintf("%s\t(%s)", str, fullStr)
}
return str
}

func humanSI(val float64, decimals int) string {
v, unit := humanize.ComputeSI(val)
return fmt.Sprintf("%s%s", humanFull(v, decimals), unit)
}

func humanFull(val float64, decimals int) string {
return humanize.CommafWithDigits(val, decimals)
Arguments: provideStatCmd.Arguments,
Options: provideStatCmd.Options,
Run: provideStatCmd.Run,
Encoders: provideStatCmd.Encoders,
Type: provideStatCmd.Type,
}
9 changes: 9 additions & 0 deletions docs/changelogs/v0.37.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This release was brought to you by the [Interplanetary Shipyard](https://ipship
- [Clear provide queue when reprovide strategy changes](#clear-provide-queue-when-reprovide-strategy-changes)
- [Named pins in `ipfs add` command](#-named-pins-in-ipfs-add-command)
- [Removed unnecessary dependencies](#removed-unnecessary-dependencies)
- [Deprecated `ipfs stats reprovide`](#deprecated-ipfs-stats-reprovide)
- [📦️ Important dependency updates](#-important-dependency-updates)
- [📝 Changelog](#-changelog)
- [👨‍👩‍👧‍👦 Contributors](#-contributors)
Expand Down Expand Up @@ -55,6 +56,14 @@ Kubo has been cleaned up by removing unnecessary dependencies and packages:

These changes reduce the dependency footprint while improving code maintainability and following Go best practices.

#### Deprecated `ipfs stats reprovide`

The `ipfs stats reprovide` command has moved to `ipfs provide stat`. This was done to organize provider commands in one location.

> [!NOTE]
> `ipfs stats reprovide` still works, but is marked as deprecated and will be removed in a future release.


#### 📦️ Important dependency updates

- update `go-libp2p` to [v0.42.1](https://github.com/libp2p/go-libp2p/releases/tag/v0.42.1)
Expand Down
Loading