Skip to content

fix(deps): update module github.com/libp2p/go-libp2p-kad-dht to v0.43.1 - #1059

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

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 Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/libp2p/go-libp2p-kad-dht v0.41.0 → v0.43.1 age confidence

Release Notes

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

v0.43.1

Compare Source

Changed
  • upgrade to go-libp2p v0.52.0 (from v0.50.0), which brings quic-go v0.64.1 and releases connections that close before they are accepted. The exported API is unchanged, and Go 1.26 remains the minimum version. #​1311
Fixed
  • GetValue and SearchValue with a quorum no longer leave their lookup running once the quorum is reached. Queries still in flight stayed blocked until the caller's context ended, and kept the lookup's goroutines alive with them; with a context that has no deadline, they never exited. #​1309
  • Provide with EnableOptimisticProvide now returns when the lookup finds no peer to send ADD_PROVIDER to, for example because every routing table peer is unreachable. It used to block forever, whatever its context. #​1309
  • rtrefresh: a refresh that stops at a common prefix length with no peers now signals completion, so the DHT leaves its bootstrap phase. #​1310

v0.43.0

Compare Source

Highlights

Routing table persists across restarts (#​1299)

The DHT now saves its routing table peers, with their addresses, to its Datastore, and dials them the next time its routing table is empty. A restarting node no longer depends only on the bootstrap peers to rejoin the network: a node joining the Amino DHT reached 100 routing table peers in about 2s instead of 11–22s, with fewer file descriptors and connections.

  • RoutingTablePersistence(interval) sets how often the snapshot is saved (hourly by default, and once more on Close). RoutingTablePersistence(0) turns persistence off.
  • BootstrapOrder picks what the DHT dials first when its routing table is empty: BootstrapFirst (default, saved peers as a fallback), PersistedFirst, or Concurrent.
  • Saved peers are only dialed. They join the routing table through the usual checks and IP diversity limits.
  • dual turns persistence off for the LAN DHT. fullrt is unchanged.

Behavior changes: persistence is on by default and writes one key, /kad-dht/routing-table/<protocol ID>, to the Datastore the DHT is given. A DHT with no bootstrap peers but a datastore that survives restarts now dials its saved peers after a restart, where it used to dial nothing. Use RoutingTablePersistence(0) to keep the old behavior.

What's Changed

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

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


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 Jul 20, 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):

  • 30 additional dependencies were updated

Details:

Package Change
github.com/libp2p/go-libp2p v0.51.0 -> v0.52.0
github.com/miekg/dns v1.1.72 -> v1.1.73
golang.org/x/sys v0.49.0 -> v0.50.0
github.com/dunglas/httpsfv v1.1.1 -> v1.1.2
github.com/huin/goupnp v1.3.0 -> v1.3.1
github.com/ipfs/boxo v0.39.0 -> v0.43.0
github.com/ipld/go-ipld-prime v0.23.0 -> v0.24.0
github.com/jackpal/go-nat-pmp v1.0.2 -> v1.1.0
github.com/klauspost/cpuid/v2 v2.4.0 -> v2.4.2
github.com/koron/go-ssdp v0.9.1 -> v0.9.2
github.com/libp2p/go-libp2p-kbucket v0.8.0 -> v0.9.0
github.com/mattn/go-isatty v0.0.22 -> v0.0.24
github.com/polydawn/refmt v0.89.1-0.20231129105047-37766d95467a -> v0.90.0
github.com/prometheus/client_golang v1.24.1 -> v1.25.0
github.com/prometheus/client_model v0.6.2 -> v0.6.3
github.com/prometheus/common v0.70.1 -> v0.74.0
github.com/prometheus/procfs v0.21.1 -> v0.23.0
go.opentelemetry.io/auto/sdk v1.2.1 -> v1.2.2
go.yaml.in/yaml/v3 v3.0.5 -> v3.0.6
golang.org/x/crypto v0.58.0 -> v0.59.0
golang.org/x/exp v0.0.0-20260718201538-764159d718ef -> v0.0.0-20261120182113-8801fbdfac81
golang.org/x/mod v0.41.0 -> v0.43.0
golang.org/x/net v0.62.0 -> v0.63.0
golang.org/x/sync v0.24.0 -> v0.25.0
golang.org/x/telemetry v0.0.0-20260924152758-ed294f943157 -> v0.0.0-20261116191925-e77a43154acb
golang.org/x/text v0.43.0 -> v0.44.0
golang.org/x/time v0.15.0 -> v0.16.0
golang.org/x/tools v0.51.0 -> v0.53.0
google.golang.org/protobuf v1.36.11 -> v1.36.12
lukechampine.com/blake3 v1.4.1 -> v1.5.1

@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch 2 times, most recently from 59f948a to dfc8c07 Compare August 14, 2026 16:45
@renovate renovate Bot changed the title fix(deps): update module github.com/libp2p/go-libp2p-kad-dht to v0.42.1 fix(deps): update module github.com/libp2p/go-libp2p-kad-dht to v0.42.2 Aug 21, 2026
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from dfc8c07 to 00cdea7 Compare August 21, 2026 09:33
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from 00cdea7 to 9591081 Compare September 3, 2026 06:57
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from 9591081 to 5ce6d04 Compare October 28, 2026 17:45
@renovate renovate Bot changed the title fix(deps): update module github.com/libp2p/go-libp2p-kad-dht to v0.42.2 fix(deps): update module github.com/libp2p/go-libp2p-kad-dht to v0.43.0 Oct 28, 2026
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch 2 times, most recently from 2912f84 to 4c8c7ac Compare November 16, 2026 07:22
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from 4c8c7ac to 8bf029b Compare November 19, 2026 07:43
@renovate
renovate Bot force-pushed the renovate/github.com-libp2p-go-libp2p-kad-dht-0.x branch from 8bf029b to 4cfb63c Compare November 21, 2026 14:01
@renovate renovate Bot changed the title fix(deps): update module github.com/libp2p/go-libp2p-kad-dht to v0.43.0 fix(deps): update module github.com/libp2p/go-libp2p-kad-dht to v0.43.1 Nov 21, 2026

This branch has not been deployed

No deployments
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