Skip to content

Update module github.com/libp2p/go-libp2p-kad-dht to v0.42.2 - #2

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/github.com-libp2p-go-libp2p-kad-dht-0.x
Open

Update module github.com/libp2p/go-libp2p-kad-dht to v0.42.2#2
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/github.com-libp2p-go-libp2p-kad-dht-0.x

Conversation

@renovate

@renovate renovate Bot commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/libp2p/go-libp2p-kad-dht v0.38.0v0.42.2 age confidence

Release Notes

libp2p/go-libp2p-kad-dht (github.com/libp2p/go-libp2p-kad-dht)

v0.42.2

Compare Source

[!NOTE]
This release was brought to you by the Shipyard team.

Highlights

Provider record writes are batched again (#​1293)

v0.42.0 (#​1277) inadvertently turned every provider record write and GC delete into an individual (fsynced) datastore operation, causing excessive disk I/O on busy nodes (ipfs/kubo#11432). Provider writes and GC deletes are now batched (256 records per batch), restoring the pre-v0.42.0 fsync rate. No protocol or record-layout change.

Local provider record writes respect shutdown (#​1288)

The WithAddLocalRecord callback now receives the sweeping provider's lifecycle context instead of context.Background() (a regression from #​1282), so local provider record writes are properly cancelled when the provider shuts down.

What's Changed

Full Changelog: libp2p/go-libp2p-kad-dht@v0.42.1...v0.42.2

v0.42.1

Compare Source

[!NOTE]
This release was brought to you by the Shipyard team.

What's Changed

Full Changelog: libp2p/go-libp2p-kad-dht@v0.42.0...v0.42.1

v0.42.0

Compare Source

[!NOTE]
This release was brought to you by the Shipyard team.

Highlights

⚠️ Breaking changes

Constructors no longer take a context.Context (#​1282)

The lifecycle context was removed from all constructors. The DHT now runs until Close() is called; cancelling a context no longer tears it down.

Before After
dht.New(ctx, h, opts...) dht.New(h, opts...)
dht.NewDHT(ctx, h, dstore) dht.NewDHT(h, dstore)
dht.NewDHTClient(ctx, h, dstore) dht.NewDHTClient(h, dstore)
dual.New(ctx, h, opts...) dual.New(h, opts...)
records.NewProviderManager(ctx, ...) records.NewProviderManager(...)
rtrefresh.NewRtRefreshManager(ctx, ...) rtrefresh.NewRtRefreshManager(...)

Migration: drop the context argument. If you relied on cancelling the constructor context to shut the DHT down, call Close() instead. Close() blocks until all long-lived components have stopped. Note that in-flight RPC handlers are owned by the libp2p host, so close the host before closing any datastore handed to the DHT.

ProviderStore option removed (#​1277 by @​guillaumemichel)

Custom ProviderStore implementations can no longer be injected; the DHT always runs the built-in provider manager. The dht.ProviderStore(...) option is replaced by datastore-level configuration:

// Before: inject a custom provider store
d, err := dht.New(ctx, h, dht.ProviderStore(customStore))

// After: configure the built-in provider manager
d, err := dht.New(h,
	dht.ProviderDatastore(dstore),          // dedicated datastore for provider records
	dht.ProviderManagerOpts(                // tune the built-in manager
		records.ProvideValidity(48*time.Hour),
		records.Cache(myLRU),
	),
)

New options: ValueDatastore and ProviderDatastore give value and provider records their own physical datastores (both default to the datastore set with Datastore). The dht.ProviderStore() getter on IpfsDHT remains available.

Value records are stored under namespaced datastore keys (#​1277)

Value records used to be stored at the datastore root as /<base32(key)>; they are now namespaced by record type: /<namespace>/<base32(key)> (e.g. /pk/..., /ipns/...). This keeps a shared datastore collision-free and enables per-namespace garbage collection.

Migration: there is no automatic key migration. On upgrade, value records persisted by earlier versions are simply not found under the new layout — nodes will re-store them as the network republishes (records expire after MaxRecordAge, 48h by default, anyway). If you persist the DHT datastore and want to reclaim space, you can delete leftover root-level base32 keys. Provider records are unaffected (already namespaced under /providers/).

What's Changed

Full Changelog: libp2p/go-libp2p-kad-dht@v0.41.0...v0.42.0

v0.41.0

Compare Source

[!NOTE]
This release was brought to you by the Shipyard team.

What's Changed

Full Changelog: libp2p/go-libp2p-kad-dht@v0.40.0...v0.41.0

v0.40.0

Compare Source

[!NOTE]
This release was brought to you by the Shipyard team.

Highlights

⚠️ Breaking change
  • SweepingProvider.Stats() now takes a context.Context and returns (stats.Stats, error). Callers must pass a ctx with a deadline — the key count is fetched through the keystore worker and can stall behind a slow datastore op. (#​1251 by @​guillaumemichel)
Fixes
Other

Full Changelog: libp2p/go-libp2p-kad-dht@v0.39.2...v0.40.0

v0.39.2

Compare Source

[!NOTE]
This release was brought to you by the Shipyard team.

What's Changed

Full Changelog: libp2p/go-libp2p-kad-dht@v0.39.1...v0.39.2

v0.39.1

Compare Source

[!NOTE]
This release was brought to you by the Shipyard team.

What's Changed

Full Changelog: libp2p/go-libp2p-kad-dht@v0.39.0...v0.39.1

v0.39.0

Compare Source

[!NOTE]
This release was brought to you by the Shipyard team.

Breaking changes

What's Changed

New Contributors

Full Changelog: libp2p/go-libp2p-kad-dht@v0.38.0...v0.39.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate

renovate Bot commented Mar 22, 2026

Copy link
Copy Markdown
Contributor Author

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 50 additional dependencies were updated

Details:

Package Change
github.com/golang-jwt/jwt/v5 v5.2.1 -> v5.3.1
github.com/ipfs/boxo v0.36.0 -> v0.41.0
github.com/ipfs/go-cid v0.6.0 -> v0.6.2
github.com/libp2p/go-libp2p v0.48.0 -> v0.49.0
filippo.io/keygen v0.0.0-20260114151900-8e2790ea4c5b -> v1.0.0
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 -> v4.4.1
github.com/gabriel-vasile/mimetype v1.4.12 -> v1.4.13
github.com/gammazero/chanqueue v1.1.1 -> v1.1.2
github.com/ipfs/bbloom v0.0.4 -> v0.1.0
github.com/ipfs/go-block-format v0.2.3 -> v0.2.4
github.com/ipfs/go-cidutil v0.1.0 -> v0.1.1
github.com/ipfs/go-ipld-legacy v0.2.2 -> v0.3.0
github.com/ipfs/go-log/v2 v2.9.1 -> v2.9.2
github.com/ipfs/go-unixfsnode v1.10.2 -> v1.10.4
github.com/ipld/go-car/v2 v2.16.0 -> v2.17.0
github.com/ipld/go-ipld-prime v0.21.0 -> v0.24.0
github.com/klauspost/cpuid/v2 v2.3.0 -> v2.4.0
github.com/koron/go-ssdp v0.0.6 -> v0.9.1
github.com/libp2p/go-libp2p-kbucket v0.8.0 -> v0.9.0
github.com/libp2p/go-yamux/v5 v5.0.1 -> v5.1.0
github.com/mattn/go-isatty v0.0.20 -> v0.0.22
github.com/mr-tron/base58 v1.2.0 -> v1.3.0
github.com/multiformats/go-multiaddr-dns v0.4.1 -> v0.6.0
github.com/multiformats/go-multibase v0.2.0 -> v0.3.0
github.com/pion/dtls/v3 v3.1.2 -> v3.1.4
github.com/pion/stun/v3 v3.1.1 -> v3.1.5
github.com/pion/transport/v4 v4.0.1 -> v4.0.2
github.com/polydawn/refmt v0.89.0 -> v0.90.0
github.com/prometheus/client_golang v1.23.2 -> v1.24.1
github.com/prometheus/common v0.66.1 -> v0.70.1
github.com/prometheus/procfs v0.17.0 -> v0.21.1
github.com/quic-go/quic-go v0.59.0 -> v0.60.0
github.com/quic-go/webtransport-go v0.10.0 -> v0.11.1
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 -> v0.68.0
go.opentelemetry.io/otel v1.40.0 -> v1.44.0
go.opentelemetry.io/otel/metric v1.40.0 -> v1.44.0
go.opentelemetry.io/otel/trace v1.40.0 -> v1.44.0
go.uber.org/mock v0.5.2 -> v0.6.0
go.uber.org/zap v1.27.1 -> v1.28.0
go.yaml.in/yaml/v2 v2.4.3 -> v2.4.4
golang.org/x/crypto v0.48.0 -> v0.54.0
golang.org/x/exp v0.0.0-20260112195511-716be5621a96 -> v0.0.0-20260718201538-764159d718ef
golang.org/x/mod v0.32.0 -> v0.38.0
golang.org/x/net v0.50.0 -> v0.57.0
golang.org/x/sync v0.19.0 -> v0.22.0
golang.org/x/sys v0.41.0 -> v0.47.0
golang.org/x/telemetry v0.0.0-20260109210033-bd525da824e2 -> v0.0.0-20260717140457-bdb89881bb75
golang.org/x/text v0.34.0 -> v0.40.0
golang.org/x/time v0.12.0 -> v0.15.0
golang.org/x/tools v0.41.0 -> v0.48.0

@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch 3 times, most recently from d25cb3f to 9f97df1 Compare March 23, 2026 13:14
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from 9f97df1 to 986e4b1 Compare April 15, 2026 13:20
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from 986e4b1 to 9c875ca Compare April 30, 2026 02:38
@renovate renovate Bot changed the title Update module github.com/libp2p/go-libp2p-kad-dht to v0.39.0 Update module github.com/libp2p/go-libp2p-kad-dht to v0.39.1 Apr 30, 2026
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from 9c875ca to ea40acb Compare May 7, 2026 12:10
@renovate renovate Bot changed the title Update module github.com/libp2p/go-libp2p-kad-dht to v0.39.1 Update module github.com/libp2p/go-libp2p-kad-dht to v0.39.2 May 7, 2026
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from ea40acb to aa2fbfa Compare May 22, 2026 03:26
@renovate renovate Bot changed the title Update module github.com/libp2p/go-libp2p-kad-dht to v0.39.2 Update module github.com/libp2p/go-libp2p-kad-dht to v0.40.0 May 22, 2026
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from aa2fbfa to 881261c Compare July 3, 2026 00:03
@renovate renovate Bot changed the title Update module github.com/libp2p/go-libp2p-kad-dht to v0.40.0 Update module github.com/libp2p/go-libp2p-kad-dht to v0.41.0 Jul 3, 2026
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from 881261c to 1c4135c Compare July 25, 2026 03:59
@renovate renovate Bot changed the title Update module github.com/libp2p/go-libp2p-kad-dht to v0.41.0 Update module github.com/libp2p/go-libp2p-kad-dht to v0.42.1 Jul 25, 2026
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from 1c4135c to 6cbd05e Compare August 22, 2026 20:16
@renovate renovate Bot changed the title Update module github.com/libp2p/go-libp2p-kad-dht to v0.42.1 Update module github.com/libp2p/go-libp2p-kad-dht to v0.42.2 Aug 22, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

未批准:本次运行未见 Cursor Bugbot 检查,且 go-libp2p-kad-dht 升级到 v0.42.2 包含构造函数破坏性变更,仓库里现有 dht.New(ctx, ...) 调用需要人工确认。已指定审阅人。

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor
cursor Bot requested a review from chenjia404 August 22, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants