Releases: ipfs/boxo
v0.37.0
Note
This release was brought to you by the Shipyard team.
What's Changed
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-499
Changed
- 🛠
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-499 gateway: 🛠 ✨ 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)- upgrade to
go-ipld-primev0.22.0 - upgrade to
go-libp2p-kad-dhtv0.38.0
Removed
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-499 ipld/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.
Full Changelog: v0.36.0...v0.37.0
v0.36.0
What's Changed
Added
routing/http:GET /routing/v1/dht/closest/peers/{key}per IPIP-476ipld/merkledag: Added fetched node size reporting to the progress tracker. See kubo#8915gateway: Added a configurable fallback timeout for the gateway handler, defaulting to 1 hour. Configurable viaMaxRequestDurationin the gateway config.
Changed
keystore: improve error messages and include key file name #1080- upgrade to
go-libp2p-kad-dhtv0.37.1 - upgrade to
go-libp2pv0.47.0
Fixed
bitswap/network: Fixed goroutine leak that could cause bitswap to stop serving blocks after extended uptime. The root cause isstream.Close()blocking indefinitely when remote peers are unresponsive during multistream handshake (go-libp2p#3448). This PR (#1083) adds a localized fix specific to bitswap'sSendMessageby setting a read deadline before closing streams.
Full Changelog: v0.35.2...v0.36.0
v0.35.2
What's Changed
- upgrade to
go-libp2pv0.45.0 - upgrade to
go-log/v2v2.9.0- Applications using go-log (>=2.9)+go-libp2p(>=0.45) may need to initialize their application to bridge slog-based libraries to into go-log. See documentation for go-log release and slog integration.
Full Changelog: v0.35.1...v0.35.2
v0.35.1
Note
This release was brought to you by the Shipyard team.
What's Changed
Added
- new span for the
handleIncomingbitswap clientgetterplus events when blocks are received. - mark opentelemetry spans, span attributes, and span events as being used by ProbeLab's analysis scripts
Changed
- upgrade to
go-dsqueuev0.1.0 - Fixes batch reuse that could cause panic.
Fixed
gateway: Fixed duplicate peer IDs appearing in retrieval timeout error messagesbitswap/client: fix tracing by using context to pass trace and retrieval state to session #1059bitswap/client: propagate trace state when calling GetBlocks #1060
bitswap/network/httpnet: improved error detection on HTTP and block fetches:- Do not attempt to GET a test CID if the endpoint returns 429 to the test HEAD request.
- Unify error parsing and handling of http statues and content.
Full Changelog: v0.35.0...v0.35.1
v0.35.0
Note
This release was brought to you by the Shipyard team.
What's Changed
Added
pinning/pinner: AddedCheckIfPinnedWithTypemethod toPinnerinterface for efficient type-specific pin checks with optional name loading (#1035)- Enables checking specific pin types (recursive, direct, indirect) without loading all pins
- Optional
includeNamesparameter controls whether pin names are loaded from datastore CheckIfPinnednow delegates toCheckIfPinnedWithTypefor consistency
gateway: Enhanced error handling and UX for timeouts:- Added retrieval state tracking for timeout diagnostics. When retrieval timeouts occur, the error messages now include detailed information about which phase failed (path resolution, provider discovery, connecting, or data retrieval) and provider statistics including failed peer IDs #1015 #1023
- Added
Config.DiagnosticServiceURLto configure a CID retrievability diagnostic service. When set, 504 Gateway Timeout errors show a "Check CID retrievability" button linking to the service with?cid=<failed-cid>#1023 - Improved 504 error pages with "Retry" button, diagnostic service integration, and clear indication when timeout occurs on sub-resource vs root CID #1023
gateway: AddedConfig.MaxRangeRequestFileSizeto protect against CDN issues with large file range requests. When set to a non-zero value, range requests for files larger than this limit return HTTP 501 Not Implemented with a suggestion to use verifiable block requests (application/vnd.ipld.raw) instead. This provides protection against Cloudflare's issue where range requests for files over 5GiB are silently ignored, causing excess bandwidth consumption and billing
Changed
routing/http: ✨ Delegated Routing V1 HTTP endpoints now return 200 with empty results instead of 404 when no records are found, per IPIP-513 (#1024)- Server endpoints (
/routing/v1/providers/{cid},/routing/v1/peers/{peer-id},/routing/v1/ipns/{name}) return HTTP 200 with empty JSON arrays or appropriate content types for empty results - Client maintains backward compatibility by treating both 200 with empty results and 404 as "no records found"
- IPNS endpoint distinguishes between valid records (Content-Type:
application/vnd.ipfs.ipns-record) and no record found (any other content type)
- Server endpoints (
verifcid: 🛠 Enhanced Allowlist interface with per-hash size limits (#1018)- Expanded
Allowlistinterface withMinDigestSize(code uint64)andMaxDigestSize(code uint64)methods for per-hash function size validation - Added public constants:
DefaultMinDigestSize(20 bytes),DefaultMaxDigestSize(128 bytes for cryptographic hashes), andDefaultMaxIdentityDigestSize(128 bytes for identity CIDs) DefaultAllowlistimplementation now uses these constants and supports different size limits per hash type- Renamed errors for clarity: Added
ErrDigestTooSmallandErrDigestTooLargeas the new primary errors ErrBelowMinimumHashLengthandErrAboveMaximumHashLengthremain as deprecated aliases pointing to the new errors
- Expanded
bitswap: Updated to useverifcid.DefaultMaxDigestSizeforMaximumHashLengthconstant- The default
MaximumAllowedCidlimit for incoming CIDs can be adjusted usingbitswap.MaxCidSizeorserver.MaxCidSizeoptions
- The default
- 🛠
bitswap/client: TheRebroadcastDelayoption now takes atime.Durationvalue. This is a potentially BREAKING CHANGE. The time-varying functionality ofdelay.Delaywas never used, so it was replaced with a fixed duration value. This also removes thegithub.com/ipfs/go-ipfs-delaydependency. filestore: Support providing filestore-blocks. A newprovider.MultihashProviderparameter has been added tofilestore.New(). When used, the blocks handled by the Filestore'sFileManagerwill be provided on write (Put and PutMany).
Removed
provider:Provide()calls are replaced withStartProviding()to benefit from the Reprovide Sweep improvement. See kubo#10834 and kad-dht#1095.
Fixed
routing/http/client:- Fixed off-by-one error in
routing_http_client_lengthmetric - the metric now correctly reports 0 for empty results instead of 1 - Added metrics for IPNS operations (
GetIPNSandPutIPNS) - these now report latency, status code, and result count (0 or 1 for GetIPNS) - Added simple counter metrics to avoid confusing histogram bucket math:
routing_http_client_requests_total- total requests including errorsrouting_http_client_positive_responses_total- requests that returned at least 1 result
- Fixed off-by-one error in
ipld/unixfs/mod:DagModifiernow correctly preserves raw node codec when modifying data under the chunker threshold, instead of incorrectly forcing everything to dag-pbDagModifierprevents creation of identity CIDs exceedingverifcid.DefaultMaxIdentityDigestSizelimit when modifying data, automatically switching to proper cryptographic hash while preserving small identity CIDsDagModifiernow supports appending data to aRawNodeby automatically converting it into a UnixFS file structure where the originalRawNodebecomes the first leaf block, fixing previously impossible append operations that would fail with "expected protobuf dag node" errors
mfs:- Files with identity CIDs now properly inherit full CID prefix from parent directories (version, codec, hash type, length), not just hash type (#1018)
Security
verifcid: Now enforces maximum size limit of 128 bytes for identity CIDs to prevent abuse (#1018, ipfs/specs#512).- 🛠 Attempts to read CIDs with identity multihash digests longer than
DefaultMaxIdentityDigestSizewill now produceErrDigestTooLargeerror. - Identity CIDs can inline data directly, and without a size limit, they could embed arbitrary amounts of data. Limiting the size also protects gateways from poorly written clients that might send absurdly big data to the gateway encoded as identity CIDs only to retrieve it back. Note that identity CIDs do not provide integrity verification, making them vulnerable to bit flips. They should only be used in controlled contexts like raw leaves of a larger DAG. The limit is explicitly defined as
DefaultMaxIdentityDigestSize(128 bytes).
- 🛠 Attempts to read CIDs with identity multihash digests longer than
Full Changelog: v0.34.0...v0.35.0
v0.34.0
What's Changed
Added
autoconf: Client library for fetching, caching and expanding IPFS network configurations using "auto" placeholdersgateway: Added configurable limits for gateway resource protection:Config.RetrievalTimeout: Maximum duration between writes of non-empty data to HTTP response body (default: 30s). Returns 504 Gateway Timeout when gateway cannot retrieve content within this period.Config.MaxConcurrentRequests: Limits concurrent HTTP requests (default: 4096, suitable for most deployments). Returns 429 Too Many Requests with 60s Retry-After header when exceeded. To restore previous unlimited behavior set bothRetrievalTimeoutandMaxConcurrentRequeststo0.[!IMPORTANT]
If your gateway returns many HTTP 429 responses while having available resources (CPU, memory), increaseMaxConcurrentRequests. If experiencing high load or resource exhaustion, decrease it. See theMaxConcurrentRequestsgodoc for detailed tuning guidance.Config.MetricsRegistry: Optional Prometheus registry for metrics isolation. When nil, uses the default global registry. Useful for testing and deployments with multiple gateway instances.- New middleware with Prometheus metrics:
ipfs_http_gw_concurrent_requests: Gauge tracking number of concurrent requestsipfs_http_gw_responses_total{code}: Counter for all HTTP responses by status codeipfs_http_gw_retrieval_timeouts_total{code,truncated}: Counter for retrieval timeout events with details on truncation
namesys/IPNSPublisher: option toPublishOptionsthat allows for setting a custom sequence number for the IPNS record with proper validation to prevent unintentional replay attacks. #962blockstore: AddedValidatingBlockstorewrapper. This replaces theHashOnReadblockstore API.
Changed
bitswap/network: The connection event manager now has aSetListenersmethod. Bothbsnetandhttpnetnow have options to provide theConnectionEventManagerduringNew(...). This allows sharing the connection event manager when using both. The connection manager SHOULD be shared when using both networks with thenetwork.Routerutility.provider: Distribute the responsability of providing new blocks to the places that play a role in the different providing strategies #976. Refactor the logic to perform Provides, when the component has been given a provider:- Remove
providing.Exchange - Provide directly from Blockstore when
provideris set (via Option). - Provide directly from pinner/merkledag on dag traversal when
provideris set (via Option). - Provide from MFS whenever there is a call to
DAGService.Addandprovideris set (via constructor param).
- Remove
- upgrade to
go-libp2pv0.43.0 - replace
uber-go/multierrwitherrors.Join#996 - updated Go in
go.modto 1.24.0 #999
Removed
blockstore: Removed HashOnRead API. This is a potentially BREAKING CHANGE for any users of the HashOnRead API. Use theValidatingBlocksoreinstead.- The
HashOnReadfunction was also removed fromFilestore. To use this functionality, provide aValidatingBlockstorewhen creating a newFilestore.
- The
Full Changelog: v0.33.1...v0.34.0
This release was brought to you by the Shipyard team.
v0.33.1
What's Changed
Added
provider: Add ability to clear provide queue #978
Changed
bitswap/network: The connection event manager now has aSetListenersmethod. Bothbsnetandhttpnetnow have options to provide theConnectionEventManagerduringNew(...). This allows sharing the connection event manager when using both. The connection manager SHOULD be shared when using both networks with thenetwork.Routerutility.bootstrap: Relay-only peers (with/p2p-circuit/addresses) are now filtered out when selecting backup bootstrap peers to improve reliability.- bitswap/client: disable use of traceability block #956
- bitswap/httpnet: start pinging before signaling Connected 982
- upgrade to
go-libp2pv0.42.1
Fixed
bitswap: fix an issue where boxo silently stops making http retrieval requests. #981, #980, #979 and #984 (writeup), #986.
Full Changelog: v0.33.0...v0.33.1
This release was brought to you by the Shipyard team.
v0.33.0
What's Changed
Added
bitswap/network/httpnet: NewWithMetricsLabelsForEndpointsallows defining which hosts/endpoints can be used for labelling metrics that support such label. '*' enables this for all endpoints receiving HTTP requests, but may cause metric cardinality growth when too many endpoints exist. These labels allow tracking, for example, number or requests per response status AND endpoint used. Non-labelled request hosts are labelled with same value:other.
Changed
DontHaveTimeoutConfig's defaultMinTimeoutis changed from0to50ms#959 #965.- upgrade to
go-libp2pv0.42.0
Fixed
bitswap/client: Fix sending extra wants #968 + #975routing/http/client: Improve URL handling for delegated routing endpoints #971
Security
- fix panic when incoming Bitswap protobuf message does not contain
Wantlist#961
Full Changelog: v0.32.0...v0.33.0
This release was brought to you by the Shipyard team.
v0.32.0
What's Changed
Added
providerincludes metrics on the number of keys provided so far(reprovider_provide_count) and the number of keys reprovided so far (reprovider_reprovide_count) #944bitswap/client: New metrics:ipfs_bitswap_wanthaves_broadcast: Count of want-haves broadcastsipfs_bitswap_haves_received: Count of total have responsesipfs_bitswap_bcast_skips_total{: Count of broadcasts skipped as part of spam reduction logic (see "Changed" below)ipfs_bitswap_unique_blocks_received: Count of non-duplicate blocks recieved
Changed
provider: previously, the code in this module was logging toreprovider.simple,provider.batchedandprovider.queuefacilities. They have now been consolidated in a singleproviderlogging facility, along with some adjustments to logging levels and extra debug statements.bitswap/client: Added an opt-in ability to reduce bitswap broadcast volume by limiting broadcasts to peers that have previously responded as having wanted blocks and peers on local network. The following bitswap client options are available to configure the behavior of broadcast reduction:BroadcastControlEnableenables or disables broadcast reduction logic. Setting this tofalserestores the previous broadcast behavior of sending broadcasts to all peers, and ignores all otherBroadcastControloptions. Default isfalse(disabled).BroadcastControlMaxPeerssets a hard limit on the number of peers to send broadcasts to. A value of0means no broadcasts are sent. A value of-1means there is no limit. Default is-1(unlimited).BroadcastControlLocalPeersenables or disables broadcast control for peers on the local network. Iffalse, then always broadcast to peers on the local network. Iftrue, apply broadcast control to local peers. Default isfalse(always broadcast to local peers).BroadcastControlPeeredPeersenables or disables broadcast control for peers configured for peering. Iffalse, then always broadcast to peers configured for peering. Iftrue, apply broadcast control to peered peers. Default isfalse(always broadcast to peered peers).BroadcastControlMaxRandomPeerssets the number of peers to broadcast to anyway, even though broadcast control logic has determined that they are not broadcast targets. Setting this to a non-zero value ensures at least this number of random peers receives a broadcast. This may be helpful in cases where peers that are not receiving broadcasts may have wanted blocks. Default is0(no random broadcasts).BroadcastControlSendToPendingPeersenables or disables sending broadcasts to any peers to which there is a pending message to send. Whentrue(enabled), this sends broadcasts to many more peers, but does so in a way that does not increase the number of separate broadcast messages. There is still the increased cost of the recipients having to process and respond to the broadcasts. Default isfalse.
Removed
bitswap/serverdo not allow override of peer ledger withWithPeerLedger#938
Fixed
gateway: Fixed suffix range-requests and updated tests to gateway-conformance v0.8 #922
Full Changelog: v0.31.0...v0.32.0
This release was brought to you by the Shipyard team.
v0.31.0
What's Changed
Added
bitswap/httpnet: New optionWithMaxDontHaveErrors(int)(defaults to 100)
will trigger disconnections from bitswap peers that cannot provide any of
the blocks that are requested for the given number of requests in a
row.. This is meant to limit bitswap HTTP-based optimistic requests for
blocks to discovered endpoints, which were before considered permanently
peered upon discovery.
Changed
- upgrade to
go-libp2p-kad-dhtv0.33.1 - deprecated
WithPeerLedgeroption for bitswap server. Will remove option in next release. See issue #928 - gateway: update backend car traversal to use go-car/v2 #925
- This change may prohibit fetching DAGs from CAR files that have no roots.
Full Changelog: v0.30.0...v0.31.0
This release was brought to you by the Shipyard team.

