Releases: ipfs/boxo
v0.26.0
What's Changed
Added
bitswap/client
: Improved timeout configuration for block requests- Exposed
DontHaveTimeoutConfig
to hold configuration values fordontHaveTimeoutMgr
which controls how long to wait for requested block before emitting a synthetic DontHave response - Added
DefaultDontHaveTimeoutConfig()
to return aDontHaveTimeoutConfig
populated with default values - Added optional
WithDontHaveTimeoutConfig
to allow passing a customDontHaveTimeoutConfig
- Setting
SetSendDontHaves(false)
works the same as before. Behind the scenes, it will disabledontHaveTimeoutMgr
by passing anil
onDontHaveTimeout
tonewDontHaveTimeoutMgr
.
- Exposed
Changed
- 🛠
blockstore
andblockservice
'sWriteThrough()
option now takes an "enabled" parameter:WriteThrough(enabled bool)
. - Replaced unmaintained mock time implementation uses in tests: from => to
bitswap/client
: if a libp2p connection has a context, usecontext.AfterFunc
to cleanup the connection.- upgrade to
go-libp2p-kad-dht
v0.28.1 - upgrade to
go-libp2p
v0.38.1 - blockstore/blockservice: change option to
WriteThrough(enabled bool)
#749 mfs
: improve mfs republisher #754
Fixed
mfs
: directory cache is now cleared on Flush(), liberating the memory used by the otherwise ever-growing cache. References to directories and sub-directories should be renewed after flushing.bitswap/client
: Fix leak due to cid queue never getting cleaned up #756bitswap
: Drop stream references on Close/Reset 760
Full Changelog: v0.25.0...v0.26.0
v0.25.0
Added
routing/http/server
: added built-in Prometheus instrumentation to http delegated/routing/v1/
endpoints, with custom buckets for response size and duration to match real world data observed at thedelegated-ipfs.dev
instance. #718 #724routing/http/server
: added configurable routing timeout (DefaultRoutingTimeout
being 30s) to prevent indefinite hangs during content/peer routing. Set custom duration viaWithRoutingTimeout
. #720routing/http/server
: exposes Prometheus metrics onprometheus.DefaultRegisterer
and a custom one can be provided viaWithPrometheusRegistry
#722gateway
:NewCacheBlockStore
andNewCarBackend
will useprometheus.DefaultRegisterer
when a custom one is not specified viaWithPrometheusRegistry
#722filestore
: added opt-inWithMMapReader
option toFileManager
to enable memory-mapped file reads #665bitswap/routing
ProviderQueryManager
does not require callingStartup
separate fromNew
. #741bitswap/routing
ProviderQueryManager does not use liftcycle context.
Changed
bitswap
,routing
,exchange
(#641):-
✨ Bitswap is no longer in charge of providing blocks to the newtork: providing functionality is now handled by a
exchange/providing.Exchange
, meant to be used withprovider.System
so that all provides follow the same rules (multiple parts of the code where handling provides) before. -
🛠
bitswap/client/internal/providerquerymanager
has been moved torouting/providerquerymanager
where it belongs. In order to keep compatibility, Bitswap now receives arouting.ContentDiscovery
parameter which implementsFindProvidersAsync(...)
and uses it to create aproviderquerymanager
with the default settings as before. Custom settings can be used by using a customproviderquerymanager
to manually wrap aContentDiscovery
object and pass that in asContentDiscovery
on initialization while settingbitswap.WithDefaultProviderQueryManager(false)
(to avoid re-wrapping it again). -
The renovated
providedQueryManager
will trigger lookups until it manages to connect toMaxProviders
. Before it would lookup at mostMaxInProcessRequests*MaxProviders
and connection failures may have limited the actual number of providers found. -
🛠 We have aligned our routing-related interfaces with the libp2p
routing
ones, including in thereprovider.System
. -
In order to obtain exactly the same behaviour as before (i.e. particularly ensuring that new blocks are still provided), what was done like:
bswapnet := network.NewFromIpfsHost(host, contentRouter) bswap := bitswap.New(p.ctx, bswapnet, blockstore) bserv = blockservice.New(blockstore, bswap)
-
becomes:
// Create network: no contentRouter anymore bswapnet := network.NewFromIpfsHost(host) // Create Bitswap: a new "discovery" parameter, usually the "contentRouter" // which does both discovery and providing. bswap := bitswap.New(p.ctx, bswapnet, discovery, blockstore) // A provider system that handles concurrent provides etc. "contentProvider" // is usually the "contentRouter" which does both discovery and providing. // "contentProvider" could be used directly without wrapping, but it is recommended // to do so to provide more efficiently. provider := provider.New(datastore, provider.Online(contentProvider) // A wrapped providing exchange using the previous exchange and the provider. exch := providing.New(bswap, provider) // Finally the blockservice bserv := blockservice.New(blockstore, exch) ...
-
The above is only necessary if content routing is needed. Otherwise:
// Create network: no contentRouter anymore bswapnet := network.NewFromIpfsHost(host) // Create Bitswap: a new "discovery" parameter set to nil (disable content discovery) bswap := bitswap.New(p.ctx, bswapnet, nil, blockstore) // Finally the blockservice bserv := blockservice.New(blockstore, exch)
-
routing/http/client
: creating delegated routing client withNew
now defaults to querying delegated routing server withDefaultProtocolFilter
(IPIP-484) #689bitswap/client
: Wait at lease one broadcast interval before resending wants to a peer. Check for peers to rebroadcast to more often than one broadcast interval.- No longer using
github.com/jbenet/goprocess
to avoid requiring in dependents. #710 pinning/remote/client
: Refactor remote pinningLs
to take results channel instead of returning one. The previousLs
behavior is implemented by the GoLs function, which creates the channels, starts the goroutine that calls Ls, and returns the channels to the caller #738- updated to go-libp2p to v0.37.2
Fixed
- Do not erroneously update the state of sent wants when a send a peer disconnected and the send did not happen. #452
Full Changelog: v0.24.3...v0.25.0
This release was brought to you by the Shipyard team.
v0.24.3
bitswap/client
no longer logs"Received provider X for cid Y not requested
to ERROR level, moved to DEBUG #771go.mod
updates
Full Changelog: v0.24.2...v0.24.3
This release was brought to you by the Shipyard team.
v0.24.2
Changed
- updated to go-libp2p to v0.37.0
ipns/pb
: removed use of deprecatedExporter
(SA1019, golang/protobuf#1640, 9a7055)
Fixed
bitswap/client
: fix panic if current live count is greater than broadcast limit #702
Full Changelog: v0.24.1...v0.24.2
This release was brought to you by the Shipyard team.
v0.24.1
Changed
routing/http/client
: creating delegated routing client withNew
now defaults to querying delegated routing server withDefaultProtocolFilter
(IPIP-484) #689- updated go-libp2p to v0.36.5
- updated dependencies #693
- update
go-libp2p-kad-dht
to v0.27.0
Fixed
routing/http/client
: optional address and protocol filter parameters from IPIP-484 use human-readable,
instead of%2C
. #688bitswap/client
Cleanup live wants when wants are canceled. This prevents live wants from continuing to get rebroadcasted even after the wants are canceled. #690- Fix problem adding invalid CID to exhausted wants list resulting in possible performance issue. #692
Full Changelog: v0.24.0...v0.24.1
This release was brought to you by the Shipyard team.
v0.24.0
Added
boxo/bitswap/server
:- A new
WithWantHaveReplaceSize(n)
option can be used withbitswap.New
to fine-tune cost-vs-performance. It sets the maximum size of a block in bytes up to which the bitswap server will replace a WantHave with a WantBlock response. Setting this to 0 disables this WantHave replacement and means that block sizes are not read when processing WantHave requests. #672
- A new
routing/http
:- added support for address and protocol filtering to the delegated routing server (IPIP-484) #671 #678
- added support for address and protocol filtering to the delegated routing client (IPIP-484) #678. To add filtering to the client, use the
WithFilterAddrs
andWithFilterProtocols
options when creating the client.Client-side filtering for servers that don't support filtering is enabled by default. To disable it, use thedisableLocalFiltering
option when creating the client.
Fixed
unixfs/hamt
Log error instead of panic if both link and shard are nil #393
Full Changelog: v0.23.0...v0.24.0
This release was brought to you by the Shipyard team.
v0.23.0
Added
files
,ipld/unixfs
,mfs
andtar
now support optional UnixFS 1.5 mode and modification time metadata #653gateway
deserialized responses will haveLast-Modified
set to value from optional UnixFS 1.5 modification time field (if present in DAG) and a matchingIf-Modified-Since
will return304 Not Modified
(UnixFS 1.5 files only) #659
Changed
- updated Go in
go.mod
to 1.22 #661 - updated go-libp2p to v0.36.3
chunker
refactored to reduce overall memory use by reducing heap fragmentation #649bitswap/server
minor performance improvements in concurrent operations #666- removed dependency on go-ipfs-blocksutil #656
Full Changelog: v0.22.0...v0.23.0
This release was brought to you by the Shipyard team.
v0.22.0
What's Changed
Changed
go-libp2p
dependency updated to v0.36 (release notes)bitswap/server
minor memory use and performance improvements #634bitswap/server
PeerLedger.Wants
now returnsbool
(interface change fromWants(p peer.ID, e wl.Entry)
toWants(p peer.ID, e wl.Entry) bool
) #629bitswap
unify logger names to use uniform format bitswap/path/pkgname #637gateway
now always returns meaningful cache-control headers for generated HTML listings of UnixFS directories #643util
generate random test data usingipfs/go-test
instead of internal util code #638
Fixed
boxo/gateway
now correctly returns 404 Status Not Found instead of 500 when the requested content cannot be found due to offline exchange, gateway running in no-fetch (non-recursive) mode, or a similar restriction that only serves a specific set of CIDs. #630bitswap/client
fix memory leak in BlockPresenceManager due to unlimited map growth. #636bitswap/network
fixed race condition when a timeout occurred before hole punching completed while establishing a first-time stream to a peer behind a NAT #651bitswap
: wantlist overflow handling now cancels existing entries to make room for newer entries. This fix prevents the wantlist from filling up with CIDs that the server does not have. #629
New Contributors
- @stensonb made their first contribution in #635
- @omahs made their first contribution in #642
- @2color made their first contribution in #651
Full Changelog: v0.21.0...v0.22.0
This release was brought to you by the Shipyard team.
v0.21.0
Changed
boxo/gateway
is now tested against gateway-conformance v0.6bitswap/client
supports additional tracing
Removed
- 🛠
routing/none
removedConstructNilRouting
, if you need this functionality, you can use theNull
Router from go-libp2p-routing-helpers.
Fixed
routing/http
: theFindPeer
now returnsrouting.ErrNotFound
when no addresses are foundrouting/http
: theFindProvidersAsync
no longer causes a goroutine buildup
Full Changelog: v0.20.0...v0.21.0
This release was brought to you by the Shipyard team.
v0.20.0
Added
- ✨
gateway
has new backend possibilities:NewRemoteBlocksBackend
allows you to create a gateway backend that uses one or multiple other gateways as backend. These gateways must support RAW block requests (application/vnd.ipld.raw
), as well as IPNS Record requests (application/vnd.ipfs.ipns-record
). With this, we also introducedNewCacheBlockStore
,NewRemoteBlockstore
andNewRemoteValueStore
.NewRemoteCarBackend
allows you to create a gateway backend that uses one or multiple Trustless Gateways as backend. These gateways must support CAR requests (application/vnd.ipld.car
), as well as the extensions describe in IPIP-402. With this, we also introducedNewCarBackend
,NewRemoteCarFetcher
andNewRetryCarFetcher
.
gateway
now sets theContent-Location
header for requests with non-default content format, as a result of content negotiation. This allows generic and misconfigured HTTP caches to store Deserialized, CAR and Block responses separately, under distinct cache keys.gateway
now supportscar-dups
,car-order
andcar-version
as query parameters in addition to theapplication/vnd.ipld.car
parameters sent viaAccept
header. The parameters in theAccept
header have always priority, but including them in URL simplifies HTTP caching and allows use inContent-Location
header on CAR responses to maximize interoperability with wide array of HTTP caches.bitswap/server
now allows to override the default peer ledger withWithPeerLedger
.
Fixed
routing/http/server
now returns 404 Status Not Found when no records can be found.routing/http/server
now supports legacy RSA PeerIDs encoded as Base58 Multihash
What's Changed
- Merge release v0.18.0 by @hacdias in #582
- docs: use tag link instead of branch by @hacdias in #583
- fix(routing/http): support lookups with legacy peerid notation by @lidel in #585
- routing/http/server: add cache control by @hacdias in #584
- chore: go 1.21 by @hacdias in #588
- ci: uci/update-go by @web3-bot in #589
- ipns: fix test by using global random reader by @hacdias in #586
- ci: uci/copy-templates by @web3-bot in #590
- feat(routing/http/server): improve ux of /ipns by @lidel in #596
- bitswap: add missing client options to exchange by @hacdias in #597
- provider: prioritize roots and introduce NewPrioritizedProvider by @hacdias in #595
- Release v0.19.0 by @hacdias in #598
Full Changelog: v0.18.0...v0.20.0
This release was brought to you by the Shipyard team.