All notable changes to this project will be documented in this file.
Note:
- The format is based on Keep a Changelog.
- This project adheres to Semantic Versioning. ( More notes about versioning and our release policies are here.
The following emojis are used to highlight certain changes:
- 🛠 - BREAKING CHANGE. Action is required if you use this functionality.
- ✨ - Noteworthy change to be aware of.
blockservice.NewWritethroughdeprecated function has been removed, instead you can doblockservice.New(..., ..., WriteThrough())like previously.gateway: a new header configuration middleware has been added to replace the existing header configuration, which can be used more generically.namesysnow has aWithMaxCacheTTLoption, which allows you to define a maximum TTL that will be used for caching IPNS entries.blockservicenow have aWithProvideroption, this allows to recreate the behavior of advertising added blocks the bitswap server used to do.
- 🛠
boxo/gateway: when making a trustless CAR request with the "entity-bytes" parameter, using a negative index greater than the underlying entity length could trigger reading more data than intended - 🛠
boxo/gateway: the header configurationConfig.HeadersandAddAccessControlHeadershas been replaced by the new middleware provided byNewHeaders. - 🛠
bitswap&bitswap/serverno longer provide to content routers, instead you can use theproviderpackage because it uses a datastore queue and batches calls to ProvideMany.
- 🛠
pinning/pinner: you can now give a custom name when pinning a CID. To reflect this, thePinnerhas been adjusted. Note that callingPinfor the same CID with a different name will replace its current name by the newly given name.
- 🛠
tracingjaegerexporter has been removed due to it's deprecation and removal from upstream, you should useotlpexporter instead. See the docs for an example.
- 🛠
boxo/namesys: now fails when multiple valid DNSLink entries are found for the same domain. This used to cause undefined behavior before. Now, we return an error, according to the specification.
- 🛠
boxo/gateway: removed support for undocumented legacyipfs-404.html. Use_redirectsinstead. - 🛠
boxo/namesys: removed support for legacy DNSLink entries at the root of the domain. Use_dnslink.TXT record instead. - 🛠
boxo/coreapi, an intrinsic part of Kubo, has been removed and moved tokubo/core/coreiface.
boxo/gateway- a panic (which is recovered) could sporadically be triggered inside a CAR request, if the right conditions were met.
- no longer emits
http: superfluous response.WriteHeaderwarnings when an error happens.
- 🛠 Bumped to
go-libp2p0.32.
boxo/gateway:- A new
WithResolver(...)option can be used withNewBlocksBackend(...)allowing the user to pass their customResolverimplementation. - The gateway now sets a
Cache-Controlheader for requests under the/ipns/namespace if the TTL for the corresponding IPNS Records or DNSLink entities is known.
- A new
boxo/bitswap/client:- A new
WithoutDuplicatedBlockStats()option can be used withbitswap.Newandbsclient.New. This disable accounting for duplicated blocks, which requires ablockstore.Has()lookup for every received block and thus, can impact performance.
- A new
- ✨ Migrated repositories into Boxo
github.com/ipfs/kubo/peering=>./peeringA service which establish, overwatch and maintain long lived connections.github.com/ipfs/kubo/core/bootstrap=> `./bootstrap A service that maintains connections to a number of bootstrap peers.
boxo/gateway- 🛠 The
IPFSBackendinterface was updated to make the responses of theHeadmethod more explicit. It now returns aHeadResponseinstead of afiles.Node.
- 🛠 The
boxo/routing/http/client.Clientis now exported. This means you can now pass it around functions, or add it to a struct if you want.- 🛠 The
pathpackage has been massively refactored. With this refactor, we have condensed the different path-related and/or Kubo-specific packages under a single generic one. Therefore, there are many breaking changes. Please consult the documentation for more details on how to use the new package.- Note: content paths created with
boxo/pathare automatically normalized:- Replace multiple slashes with a single slash.
- Eliminate each
.path name element (the current directory). - Eliminate each inner
..path name element (the parent directory) along with the non-..element that precedes it. - Eliminate
..elements that begin a rooted path: that is, replace "/.." by "/" at the beginning of a path.
- Note: content paths created with
- 🛠 The signature of
CoreAPI.ResolvePathincoreifacehas changed to now return the remainder segments as a second return value, matching the signature ofresolver.ResolveToLastNode. - 🛠
routing/http/client.FindPeersnow returnsiter.ResultIter[types.PeerRecord]instead ofiter.ResultIter[types.Record]. The specification indicates that records for this method will always be Peer Records. - 🛠 The
namesyspackage has been refactored. The following are the largest modifications:- The options in
coreiface/options/namesyshave been moved tonamesysand their names have been made more consistent. - Many of the exported structs and functions have been renamed in order to be consistent with the remaining packages.
namesys.Resolver.Resolvenow returns a TTL, in addition to the resolved path. If the TTL is unknown, 0 is returned.IPNSResolveris able to resolve a TTL, whileDNSResolveris not.namesys/resolver.ResolveIPNShas been moved tonamesys.ResolveIPNSand now returns a TTL in addition to the resolved path.
- The options in
- ✨
boxo/ipnsrecord defaults follow recommendations from IPNS Record Specification:DefaultRecordTTLis now set to1hDefaultRecordLifetimefollows the increased expiration window of Amino DHT (go-libp2p-kad-dht#793) and is set to48h
- 🛠 The
gateway'sIPFSBackend.ResolveMutableis now expected to return a TTL in addition to the resolved path. If the TTL is unknown, 0 should be returned.
- 🛠
util.MultiErrhas been removed. Please use Go's native support for wrapping errors, orerrors.Joininstead.
- An option
DisableHTMLErrorshas been added togateway.Config. When this option istrue, pretty HTML error pages for web browsers are disabled. Instead, atext/plainpage with the raw error message as the body is returned.
- ✨ The
routing/httpimplements Delegated Peer Routing introduced in IPIP-417.
- 🛠 The
routing/httppackage received the following modifications:- Client
GetIPNSRecordandPutIPNSRecordhave been renamed toGetIPNSandPutIPNS, respectively. Similarly, the required function names in the serverContentRouterhave also been updated. ReadBitswapProviderRecordhas been renamed toBitswapRecordand marked as deprecated. From now on, please use the protocol-agnosticPeerRecordfor most use cases. The new Peer Schema has been introduced in IPIP-417.
- Client
- 🛠 The
routing/httppackage experienced following removals:- Server and client no longer support the experimental
Providemethod.ProvideBitswapis still usable, but marked as deprecated. A protocol-agnostic provide mechanism is being worked on in IPIP-378. - Server no longer exports
FindProvidersPathandProvidePath.
- Server and client no longer support the experimental
- The normalization of DNSLink identifiers in
gatewayhas been corrected in the edge case where the value passed to the path component of the URL is already normalized.
- The
routing/httpclient and server now support Delegated IPNS at/routing/v1as per IPIP-379. - 🛠 The
verifycidpackage has been updated with the new Allowlist interface as part of reducing globals efforts. - The
blockserviceandproviderpackages has been updated to accommodate for changes inverifycid.
- 🛠
blockservice.Newnow accepts a variadic of func options following the Functional Options pattern.
- HTTP Gateway API: Not having a block will result in a 5xx error rather than 404
- HTTP Gateway API: CAR requests will return 200s and a CAR file proving a requested path does not exist rather than returning an error
- 🛠
MultiFileReaderhas been updated with a new header with the encoded file name instead of the plain filename, due to a regression found innet/textproto. This only affects files with binary characters in their name. By keeping the old header, we maximize backwards compatibility.New Client Old Client New Server ✅ 🟡* Old Server ✅ ✅ *Old clients can only send Unicode file paths to the server.
- ✨ The gateway now supports the optional
orderanddupsCAR parameters from IPIP-412.- The
BlocksBackendonly implementsorder=dfs(Depth-First Search) ordering, which was already the default behavior. - If a request specifies no
dups, response withdups=nis returned, which was already the default behavior. - If a request explicitly specifies a CAR
orderother thandfs, it will result in an error. - The only change to the default behavior on CAR responses is that we follow
IPIP-412 and make
order=dfs;dups=nexplicit in the returnedContent-TypeHTTP header.
- The
- ✨ While the call signature remains the same, the blocks that Bitswap returns can now be cast to traceability.Block, which will additionally tell you where the Block came from and how long it took to fetch. This helps consumers of Bitswap collect better metrics on Bitswap behavior.
- 🛠 The
ipnspackage has been refactored.- You should no longer use the direct Protobuf version of the IPNS Record.
Instead, we have a shiny new
ipns.Recordtype that wraps all the required functionality to work the best as possible with IPNS v2 Records. Please check the documentation for more information, and follow ipfs/specs#376 for related IPIP. - There is no change to IPNS Records produced by
boxo/ipns, it still produces both V1 and V2 signatures by default, it is still backward-compatible.
- You should no longer use the direct Protobuf version of the IPNS Record.
Instead, we have a shiny new
- 🛠
ipld/carhas been removed. Please use ipld/go-car instead. More information regarding this decision can be found in issue 218.
- Removed mentions of unused ARC algorithm (#336)
- Handle
_redirectsfile whenIf-None-Matchheader is present (#412)
- Handle
_redirectsfile whenIf-None-Matchheader is present (#412)
- Gateway: include CORS on subdomain redirects.
- Gateway: ensure 'X-Ipfs-Root' header is valid.
None.
None.
None.
- Allow CAR requests with a path when
DeserializedResponsesisfalse.
None.
- ✨ The gateway now supports partial CAR exports via query parameters from IPIP-402.
- 🛠 A few trivial breaking changes have been done to the gateway:
- The signature of
IPFSBackend.GetCARhas been adapted to support IPIP-402 CAR Parameters. - A few variables have been renamed for consistency:
WithHostname->NewHostnameHandlerSpecification->PublicGatewayNewErrorResponse->NewErrorStatusCodeNewErrorResponseForCode->NewErrorStatusCodeFromStatusBlocksGateway->BlocksBackendBlocksGatewayOption->BlocksBackendOptionNewBlocksGateway->NewBlocksBackend
- Some functions that are not supposed to be outside of the package were removed:
ServeContent.
- The signature of
None.
None.
None.
- ✨
gatewayThe gateway were updated to provide better features for users and gateway implementers:- New human-friendly error messages.
- Updated, higher-definition icons in directory listings.
- Customizable menu items next to "About IPFS" and "Install IPFS".
- Valid DAG-CBOR and DAG-JSON blocks now provide a preview, where links can be followed.
ipnsaddValidateWithPeerIDandUnmarshalIpnsEntryhelpers. (https://github.com/ipfs/boxo/pulls/292)- 🛠
coreiface/testsadd*testing.Targument to the swarm provider. (https://github.com/ipfs/boxo/pulls/321)
- 🛠
boxo/pinnersome listing methods have been changed to now return a<-chan StreamedCid. This allows the consumption of pins while the pinner is listing them, which for large pinset can take a long time. (https://github.com/ipfs/boxo/pulls/336) The concerned methods are:DirectKeysRecursiveKeysInternalKeys
- 🛠
provider/batched.Newhas been moved toprovider.Newand arguments has been changed. (https://github.com/ipfs/boxo/pulls/273)- A routing system is now passed with the
provider.Onlineoption, by default the system run in offline mode (push stuff onto the queue). - When using
provider.Onlinecalling the.Runmethod is not required anymore, the background worker is implicitly started in the background byprovider.New. - You do not have to pass a queue anymore, you pass a
datastore.Datastoreexclusively.
- A routing system is now passed with the
- 🛠
provider.NewOfflineProviderhas been renamed toprovider.NewNoopProviderto show more clearly that is does nothing. (https://github.com/ipfs/boxo/pulls/273) - 🛠
provider.Providerandprovider.Reproviderhas been merged under oneprovider.System. (https://github.com/ipfs/boxo/pulls/273) - 🛠
routing/httpresponses now return a streamingiter.ResultItergeneric interface. (https://github.com/ipfs/boxo/pulls/18) - 🛠
coreifaceadd options andAllowOfflineoption toRoutingAPI.Put. (https://github.com/ipfs/boxo/pulls/278) - 🛠
gatewaynow has deserialized responses turned off by default. This can be configured viaDeserializedResponses. (#252)
- 🛠
provider/queuehas been moved toprovider/internal/queue. (https://github.com/ipfs/boxo/pulls/273) - 🛠
provider/simplehas been removed, now instead you can useprovider.Newbecause it accept non batched routing systems and use type assertion for theProvideManycall, giving a single implementation. (https://github.com/ipfs/boxo/pulls/273) - 🛠
provider.NewSystemhas been removed,provider.Newnow returns aprovider.Systemdirectly. (https://github.com/ipfs/boxo/pulls/273)
gatewayfix panics by returning in all error cases. (https://github.com/ipfs/boxo/pulls/314)gatewayavoid duplicate payload during subdomain redirects. (https://github.com/ipfs/boxo/pulls/326)gatewaycorrectly handle question marks in URL when redirecting. (https://github.com/ipfs/boxo/pulls/#313)
None
gatewaytrace context header support (#256)
gatewaywiden duration histograms and cleanup (#265)
None
None
gatewaypanic on path without enough components (#272)
None
- ✨ Migrated repositories into Boxo (#220)
- github.com/ipfs/interface-go-ipfs-core => ./coreiface
- github.com/ipfs/go-pinning-service-http-client => ./pinning/remote/client
- github.com/ipfs/go-path => ./path
- github.com/ipfs/go-namesys => ./namesys
- github.com/ipfs/go-mfs => ./mfs
- github.com/ipfs/go-ipfs-provider => ./provider
- github.com/ipfs/go-ipfs-pinner => ./pinning/pinner
- github.com/ipfs/go-ipfs-keystore => ./keystore
- github.com/ipfs/go-filestore => ./filestore
- github.com/ipfs/go-ipns => ./ipns
- github.com/ipfs/go-blockservice => ./blockservice
- github.com/ipfs/go-ipfs-chunker => ./chunker
- github.com/ipfs/go-fetcher => ./fetcher
- github.com/ipfs/go-ipfs-blockstore => ./blockstore
- github.com/ipfs/go-ipfs-posinfo => ./filestore/posinfo
- github.com/ipfs/go-ipfs-util => ./util
- github.com/ipfs/go-ipfs-ds-help => ./datastore/dshelp
- github.com/ipfs/go-verifcid => ./verifcid
- github.com/ipfs/go-ipfs-exchange-offline => ./exchange/offline
- github.com/ipfs/go-ipfs-routing => ./routing
- github.com/ipfs/go-ipfs-exchange-interface => ./exchange
- github.com/ipfs/go-unixfs => ./ipld/unixfs
- github.com/ipfs/go-merkledag => ./ipld/merkledag
- github.com/ipld/go-car => ./ipld/car
- ✨ Added a migration tool to aid in migrating from the migrated repositories to Boxo, see the documentation here: https://github.com/ipfs/boxo/blob/main/README.md#migrating-to-boxo (#226)
- Added a check to ensure the migration tool is only run in a Git repository (with an optional override flag)
- ✨ Added tracing and metrics to the refactored gateway for its IPFS backend
- Removed a mention of "bitswap" in blockservice debug logs
- Changed the Bitswap message package from "bitswap.message.pb" to "bitswap.message.v1.pb" to avoid protobuf panics due to duplicate registration with go-bitswap (#212)
- ✨ Remove a busyloop in blockservice getBlocks by removing batching when caching (#232)
None
None
- Ensure dag-cbor/json codecs are registered in the gateway handler (#223)
- ✨ Refactor the Gateway API to operate on higher level semantics (#176)
- Fixed a panic in the gateway handler when returning errors (#255)
None