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.
