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.
boxo/gateway
:- A new
WithResolver(...)
option can be used withNewBlocksBackend(...)
allowing the user to pass their customResolver
implementation.
- A new
boxo/bitswap/client
:- A new
WithoutDuplicatedBlockStats()
option can be used withbitswap.New
andbsclient.New
. This disable accounting for duplicated blocks, which requires ablockstore.Has()
lookup for every received block and thus, can impact performance.
- A new
boxo/gateway
- 🛠 The
IPFSBackend
interface was updated to make the responses of theHead
method more explicit. It now returns aHeadResponse
instead of afiles.Node
.
- 🛠 The
boxo/routing/http/client.Client
is now exported. This means you can now pass it around functions, or add it to a struct if you want.- 🛠 The
path
package 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/path
are 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.ResolvePath
incoreiface
has changed to now return the remainder segments as a second return value, matching the signature ofresolver.ResolveToLastNode
. - 🛠
routing/http/client.FindPeers
now returnsiter.ResultIter[types.PeerRecord]
instead ofiter.ResultIter[types.Record]
. The specification indicates that records for this method will always be Peer Records.
- 🛠
util.MultiErr
has been removed. Please use Go's native support for wrapping errors, orerrors.Join
instead.
- An option
DisableHTMLErrors
has been added togateway.Config
. When this option istrue
, pretty HTML error pages for web browsers are disabled. Instead, atext/plain
page with the raw error message as the body is returned.
- ✨ The
routing/http
implements Delegated Peer Routing introduced in IPIP-417.
- 🛠 The
routing/http
package received the following modifications:- Client
GetIPNSRecord
andPutIPNSRecord
have been renamed toGetIPNS
andPutIPNS
, respectively. Similarly, the required function names in the serverContentRouter
have also been updated. ReadBitswapProviderRecord
has been renamed toBitswapRecord
and marked as deprecated. From now on, please use the protocol-agnosticPeerRecord
for most use cases. The new Peer Schema has been introduced in IPIP-417.
- Client
- 🛠 The
routing/http
package experienced following removals:- Server and client no longer support the experimental
Provide
method.ProvideBitswap
is still usable, but marked as deprecated. A protocol-agnostic provide mechanism is being worked on in IPIP-378. - Server no longer exports
FindProvidersPath
andProvidePath
.
- Server and client no longer support the experimental
- The normalization of DNSLink identifiers in
gateway
has been corrected in the edge case where the value passed to the path component of the URL is already normalized.
- The
routing/http
client and server now support Delegated IPNS at/routing/v1
as per IPIP-379. - 🛠 The
verifycid
package has been updated with the new Allowlist interface as part of reducing globals efforts. - The
blockservice
andprovider
packages has been updated to accommodate for changes inverifycid
.
- 🛠
blockservice.New
now 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
- 🛠
MultiFileReader
has 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
order
anddups
CAR parameters from IPIP-412.- The
BlocksBackend
only implementsorder=dfs
(Depth-First Search) ordering, which was already the default behavior. - If a request specifies no
dups
, response withdups=n
is returned, which was already the default behavior. - If a request explicitly specifies a CAR
order
other 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=n
explicit in the returnedContent-Type
HTTP 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
ipns
package has been refactored.- You should no longer use the direct Protobuf version of the IPNS Record.
Instead, we have a shiny new
ipns.Record
type 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/car
has 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
_redirects
file whenIf-None-Match
header is present (#412)
- Handle
_redirects
file whenIf-None-Match
header 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
DeserializedResponses
isfalse
.
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.GetCAR
has been adapted to support IPIP-402 CAR Parameters. - A few variables have been renamed for consistency:
WithHostname
->NewHostnameHandler
Specification
->PublicGateway
NewErrorResponse
->NewErrorStatusCode
NewErrorResponseForCode
->NewErrorStatusCodeFromStatus
BlocksGateway
->BlocksBackend
BlocksGatewayOption
->BlocksBackendOption
NewBlocksGateway
->NewBlocksBackend
- Some functions that are not supposed to be outside of the package were removed:
ServeContent
.
- The signature of
None.
None.
None.
- ✨
gateway
The 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.
ipns
addValidateWithPeerID
andUnmarshalIpnsEntry
helpers. (https://github.com/ipfs/boxo/pulls/292)- 🛠
coreiface/tests
add*testing.T
argument to the swarm provider. (https://github.com/ipfs/boxo/pulls/321)
- 🛠
boxo/pinner
some 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:DirectKeys
RecursiveKeys
InternalKeys
- 🛠
provider/batched.New
has been moved toprovider.New
and arguments has been changed. (https://github.com/ipfs/boxo/pulls/273)- A routing system is now passed with the
provider.Online
option, by default the system run in offline mode (push stuff onto the queue). - When using
provider.Online
calling the.Run
method 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.Datastore
exclusively.
- A routing system is now passed with the
- 🛠
provider.NewOfflineProvider
has been renamed toprovider.NewNoopProvider
to show more clearly that is does nothing. (https://github.com/ipfs/boxo/pulls/273) - 🛠
provider.Provider
andprovider.Reprovider
has been merged under oneprovider.System
. (https://github.com/ipfs/boxo/pulls/273) - 🛠
routing/http
responses now return a streamingiter.ResultIter
generic interface. (https://github.com/ipfs/boxo/pulls/18) - 🛠
coreiface
add options andAllowOffline
option toRoutingAPI.Put
. (https://github.com/ipfs/boxo/pulls/278) - 🛠
gateway
now has deserialized responses turned off by default. This can be configured viaDeserializedResponses
. (ipfs#252)
- 🛠
provider/queue
has been moved toprovider/internal/queue
. (https://github.com/ipfs/boxo/pulls/273) - 🛠
provider/simple
has been removed, now instead you can useprovider.New
because it accept non batched routing systems and use type assertion for theProvideMany
call, giving a single implementation. (https://github.com/ipfs/boxo/pulls/273) - 🛠
provider.NewSystem
has been removed,provider.New
now returns aprovider.System
directly. (https://github.com/ipfs/boxo/pulls/273)
gateway
fix panics by returning in all error cases. (https://github.com/ipfs/boxo/pulls/314)gateway
avoid duplicate payload during subdomain redirects. (https://github.com/ipfs/boxo/pulls/326)gateway
correctly handle question marks in URL when redirecting. (https://github.com/ipfs/boxo/pulls/#313)
None
gateway
trace context header support (ipfs#256)
gateway
widen duration histograms and cleanup (ipfs#265)
None
None
gateway
panic on path without enough components (ipfs#272)
None
- ✨ Migrated repositories into Boxo (ipfs#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 (ipfs#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 (ipfs#212)
- ✨ Remove a busyloop in blockservice getBlocks by removing batching when caching (ipfs#232)
None
None
- Ensure dag-cbor/json codecs are registered in the gateway handler (ipfs#223)
- ✨ Refactor the Gateway API to operate on higher level semantics (ipfs#176)
- Fixed a panic in the gateway handler when returning errors (ipfs#255)
None