Update module github.com/ipfs/boxo to v0.40.0#6
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
8e65723 to
b22b7bc
Compare
b22b7bc to
bf3e8f1
Compare
bf3e8f1 to
5980e66
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.36.0→v0.40.0Release Notes
ipfs/boxo (github.com/ipfs/boxo)
v0.40.0Compare Source
Added
retrieval: addedState.Snapshot,State.Apply, andState.Notifyso consumers can streamStateacross a process boundary, e.g. to drive a live progress bar in Kubo'scat,get, ordag export. #1153pinning/pinner: addedPinner.Close() error. Close cancels every in-flight operation's context, including streaming goroutines fromRecursiveKeys,DirectKeys, andInternalPins, and waits for them to return. A scalar method that observes the cancellation may returncontext.Canceled; a stream interrupted by Close may surfaceErrClosedon the channel before it closes. After Close returns, every other method returns the newErrClosedsentinel; streaming methods deliver it asStreamedPin.Erron a single entry, then close the channel. Close is idempotent and goroutine-safe. Action required: downstreamPinnerimplementations must addClose. #1150pinning/pinner/dspinner: implementsClose. Close cancels the contexts of in-flight operations, so snapshot iteration inRecursiveKeys/DirectKeysand DAG fetches inPinbail out promptly instead of draining to completion. Close returns as soon as those operations honor their ctx. Hosts owning the datastore should callCloseon the pinner before closing the datastore to avoid the use-after-close panic path in stores such as pebble. #1150routing/http/types/iter: addedLimit, an iterator that caps another iterator at a fixed number of values. #1157routing/providerquerymanager: newWithFindPeerFallbackoption. When set, a one-shotFindPeerfallback runs if the first dial to a provider fails; the manager retries the dial with the freshAddrInfo, but only ifFindPeersurfaced at least one address that wasn't already in the routing-record set just tried. Rescues providers whose routing-record snapshot is thin or stale but whose actual addresses are still reachable, without wasting a retry on a duplicate address set. Disabled by default; passWithFindPeerFallback(myDHT)to enable.Changed
upgrade to
go-libp2p-kad-dhtv0.40.0🛠
files: theFileinterface no longer embedsio.Seeker. Seekability is now explicit in the type system instead of implied by an always-presentSeekmethod that returnedErrNotSupportedat runtime for non-seekable inputs. Callers that need to seek type-assert toio.Seeker; the assertion is an honest capability check rather than a guess. Seekable implementations (ReaderFilewrapping a seekable reader,Symlink, UnixFS files returned from the gateway and importer) still satisfy the assertion. Non-seekable implementations (HTTP multipart streams,WebFile) now fail the assertion at compile-aware sites instead of producing runtime errors deep in third-party code. The previous behavior forced downstream workarounds: e.g. ipfs/kubo#11253 had to wrapfiles.Filein a plainio.Reader/io.Closerto stripSeekand forcego-car's forward-only fallback, becausego-car'sNewBlockReadertrusted the interface and calledSeek, which failed with "operation not supported" on CARv2 imports over the HTTP API. With this change the trap stops existing.Action required. Replace direct
Seekcalls onfiles.Filewith a type assertion:See ipfs/kubo#11254 for a worked example of the call-site update. #1128
✨
routing/http/server: the Delegated Routing server now passeslimit=0(unbounded) toDelegatedRouter.FindProviders/FindPeersand applies the configured records limit itself, after filtering. Filtered requests now return a full page of results instead of fewer than requested. The server reads the delegate's iterator lazily and closes it once it has enough records. Action required: delegate implementations should return results lazily and stop work onClose. A delegate that previously used thelimitargument to end its walk early should now end the walk onCloseinstead. #1157path/resolver:ResolveToLastNode,ResolvePath, andResolvePathComponentsnow populateretrieval.Stateon the request context when one is attached. They advance the state toPhasePathResolution, record the root CID from the input path, and record the terminal CID once resolution completes. Until now only the gateway backends populated these fields, leaving non-gateway callers (CLIs, custom tools) without phase or CID diagnostics on retrieval errors. The new calls are idempotent with the existing gateway-side ones, so behavior on the gateway path is unchanged.Fixed
files: now builds underGOOS=js GOARCH=wasmandGOOS=wasip1 GOARCH=wasm. #935routing/http/server: filtered/routing/v1/providersand/routing/v1/peersrequests now return up to the configured records limit. Previously the limit was applied beforefilter-addrs/filter-protocolsran, so records dropped by the filters shrank the response below the limit. The limit now applies after filtering. #1157routing/http/types/iter:Filter.Nextnow iterates instead of recursing on rejected values, so the goroutine stack stays flat even when a long run of records is filtered out. This matters now that the server pulls unbounded results from the delegate. #1157v0.39.0Compare Source
Added
gateway:Config.MaxDeserializedResponseSizeallows setting a maximum file/directory size for deserialized gateway responses. Content exceeding this limit returns410 Gone, directing users to run their own IPFS node. Trustless response formats (application/vnd.ipld.raw,application/vnd.ipld.car) are not affected. The size is read from the UnixFS root block, so no extra block fetches are needed for the check. #1138gateway:Config.MaxUnixFSDAGResponseSizeallows setting a maximum content size applied to all response formats (deserialized, raw blocks, CAR, TAR). Content exceeding this limit returns410 Gone. For most handlers the check reuses size information already available in the request path; for CAR responses a lightweightHeadcall is made only when the limit is configured. #1138Changed
bitswap/server: the default peer comparator now schedules peers fairly. A peer that has never been served, or has waited longer than 10s, outranks non-starved peers. Pending counts cap at 16 for ordering purposes, so peers with small wantlists no longer wait behind peers with large ones. The final tiebreak uses a per-process salted hash of peer.ID, so no peer can craft an ID that permanently outranks everyone. Engines built withWithTaskComparatorkeep their existing behavior. #1141go-libp2p-kad-dhtv0.39.1Fixed
bitswap/network/bsnet:SendMessageandhandleNewStreamnow close streams in a background goroutine. Previously,stream.Closecould hold the caller for up toDefaultNegotiationTimeout(10s) whilelazyClientConn.Closewaited for the remote peer to complete the multistream handshake. This saturated the bitswapTaskWorkerCountpool when peers were unresponsive and stopped bitswap from serving blocks to other peers. As a side effect,SendMessageno longer returns errors fromstream.Close; close failures are logged at Debug. #1142bitswap/server: a peer with a single pending want no longer waits behind peers with large wantlists. #1141pinner/dspinner:RecursiveKeysandDirectKeysnow snapshot the pin index under the read lock and release it before emitting pins, so a slow consumer (e.g. the reprovider draining the channel at DHT speed underProvide.Strategy=pinned*) can no longer starvePin/Unpin/Flushwriters. #1140v0.38.0Compare Source
Added
ipns:NewRecordacceptsWithMetadata(map[string]any)option for storing custom scalar key-value pairs (string,[]byte, int64, int, bool) in the signed DAG-CBOR data of IPNS records. Metadata can be read back viaRecord.Metadata(returns typedMetadataValuewithKind()discriminator) and iterated withRecord.MetadataEntries. Reserved IPNS field names, empty keys, and unsupported value types are rejected. #1085dag/walker: new package for memory-efficient DAG traversal with deduplication.VisitedTrackerinterface withBloomTracker(scalable bloom filter chain, ~4 bytes/CID vs ~75 bytes for a map) andMapTracker(exact, for tests).WalkDAGprovides iterative DFS traversal with integrated dedup, supporting dag-pb, dag-cbor, raw, and other registered codecs. ~2x faster than the legacy go-ipld-prime selector-based traversal.WalkEntityRootsemits only entity roots (files, directories, HAMT shards) instead of every block, skipping internal file chunks. #1124pinner:NewUniquePinnedProviderandNewPinnedEntityRootsProviderlog and skip corrupted pin entries instead of aborting the provide cycle, allowing remaining pins to still be provided. #1124routing/http/client:WithProviderInfoFuncoption resolves provider addresses at provide-time instead of client construction time. This only impacts legacy HTTP-only custom routing setups that depend on IPIP-526 and were sending unresolved0.0.0.0addresses in provider records instead of actual interface addresses. #1115chunker: addedRegisterfunction to allow custom chunkers to be registered for use withFromString.mfs: addedDirectory.Mode()andDirectory.ModTime()getters to match the existingFile.Mode()andFile.ModTime()API. #1131Changed
provider:NewPrioritizedProvidernow continues to the next stream when one fails instead of stopping all streams.NewConcatProvideradded for pre-deduplicated streams. #1124chunker:FromStringnow rejects malformedsize-strings with extra parameters (e.g.size-123-extrawas previously silently accepted).gateway: compliance with gateway-conformance v0.13go-libp2pv0.48.0mfs: replacedRootOptionwith a unifiedOptionfunctional options pattern (e.g.WithCidBuilder,WithChunker,WithMaxLinks).NewRoot,NewEmptyRoot,MkdirWithOpts, andNewEmptyDirectorynow accept...Option.Mkdirtakes aMkdirOptsstruct (narrowed toMkparentsandFlushflags) followed by...Optionfor directory configuration. #1125Removed
gateway: removed dead DoH resolver for.cryptoTLD (Unstoppable Domains) #772cmd/boxo-migrate: removed code for go-ipfs migration -- no longer needed.cmd/deprecator: removed code to deprecare relocated ipfs packages -- no longer needed.Fixed
bitswap/server: incoming identity CIDs in wantlist messages are now silently ignored instead of killing the connection to the remote peer. Some IPFS implementations naively send identity CIDs, and disconnecting them for it caused unnecessary churn. #1117bitswap/network:ExtractHTTPAddressnow infers default ports for portless HTTP multiaddrs (e.g./dns/host/httpswithout/tcp/443). #1123mfs:FileDescriptoroperations are serialized with a mutex, preventing data races on the underlyingDagModifierwhen FUSE mounts or Kubo RPC commands dispatch concurrent Read, Write, Seek, Truncate, Flush, or Close calls.FlushafterClosereturnsErrClosed. #1131 #1133mfs: preserveCidBuilderandSizeEstimationModeacrosssetNodeData(),Mkdir()andNewRoot(). #1125mfs: closing a file descriptor after its directory entry was removed (e.g. FUSE RELEASE racing with RENAME) no longer re-adds the stale entry to the parent directory. #1134mfs:SetModeandSetModTimeno longer drop file content links when updating UnixFS metadata. #1134v0.37.0Compare Source
Added
ipld/unixfs/io: addedSizeEstimationModefor configurable HAMT sharding threshold decisions. Supports legacy link-based estimation (SizeEstimationLinks), accurate block-based estimation (SizeEstimationBlock), or disabling size-based thresholds (SizeEstimationDisabled). #1088, IPIP-499ipld/unixfs/io: addedUnixFSProfilewithUnixFS_v0_2015andUnixFS_v1_2025presets for CID-deterministic file and directory DAG construction. #1088, IPIP-499files:NewSerialFileWithOptionsnow supports controlling whether symlinks are preserved or dereferenced before being added to IPFS. SeeSerialFileOptions.DereferenceSymlinks. #1088, IPIP-499Changed
chunker,ipld/unixfs/importer/helpers: block size limits raised from 1MiB to 2MiB to match the bitswap spec. Max chunker size is2MiB - 256 bytesto leave room for protobuf framing when--raw-leaves=false. IPIP-499 profiles use lower chunk sizes (256KiB and 1MiB) and are not affected.chunker:DefaultBlockSizechanged fromconsttovarto allow runtime configuration via global profiles. #1088, IPIP-499gateway: 🛠 ✨ IPIP-523?format=URL query parameter now takes precedence overAcceptHTTP header, ensuring deterministic HTTP cache behavior and allowing browsers to use?format=even when they sendAcceptheaders with specific content types. #1074gateway: 🛠 ✨ IPIP-524 codec conversions (e.g., dag-pb to dag-json, dag-json to dag-cbor) are no longer performed by default. Requesting a format that differs from the block's codec now returns HTTP 406 Not Acceptable with a hint to fetch raw blocks (?format=raw) and convert client-side. SetConfig.AllowCodecConversiontotrueto restore the old behavior. #1077gateway: compliance with gateway-conformance v0.10.0 (since v0.8: relaxed DAG-CBOR HTML preview cache headers, relaxed CAR 200/404 for missing paths, IPIP-523 format query precedence, IPIP-524 codec mismatch returns 406)go-ipld-primev0.22.0go-libp2p-kad-dhtv0.38.0Removed
tracing: opentelemetry zipkin exporter (go.opentelemetry.io/otel/exporters/zipkin) is deprecated and has been removed. It is recommended to switch to OTLP. Configure your application to send traces using OTLP and enable Zipkin’s OTLP ingestion support.Fixed
ipld/unixfs/io: fixed HAMT sharding threshold comparison to use>instead of>=. A directory exactly at the threshold now stays as a basic (flat) directory, aligning behavior with code documentation and the JS implementation. This is a theoretical breaking change, but unlikely to impact real-world users as it requires a directory to be exactly at the threshold boundary. If you depend on the old behavior, adjustHAMTShardingSizeto be 1 byte lower. #1088, IPIP-499ipld/unixfs/mod: fixed sparse file writes in MFS. Writing past the end of a file (e.g.,ipfs files write --offset 1000 /fileon a smaller file) would lose data becauseexpandSparsecreated the zero-padding node but didn't update the internal pointer. Subsequent writes went to the old unexpanded node.ipld/unixfs/io: fixed mode/mtime metadata loss during Basic<->HAMT directory conversions. Previously, directories withWithStat(mode, mtime)would lose this metadata when converting between basic and sharded formats, or when reloading a HAMT directory from disk.Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.