Skip to content

Merge release v0.41.0#11295

Merged
lidel merged 15 commits into
masterfrom
merge-release-v0.41.0
Apr 24, 2026
Merged

Merge release v0.41.0#11295
lidel merged 15 commits into
masterfrom
merge-release-v0.41.0

Conversation

@lidel
Copy link
Copy Markdown
Member

@lidel lidel commented Apr 24, 2026

lidel and others added 14 commits April 12, 2026 20:10
* feat(fuse): accurate st_blocks and st_blksize

Populate st_blocks from the UnixFS file size and advertise a chunk-aligned
st_blksize so du, ls -s, and stat report real numbers on all three mounts.

- fuse/mount/stat.go: new SizeToStatBlocks, DefaultBlksize (1 MiB), BlksizeFromChunker
- fuse/readonly: fillAttr sets blocks and blksize for files, raw nodes, symlinks, directories
- fuse/writable: Config.Blksize field + effectiveBlksize fallback; Dir, FileInode, and Symlink fillAttr populate stat fields
- fuse/mfs, fuse/ipns: pass Import.UnixFSChunker into Config.Blksize via BlksizeFromChunker
- tests: BlksizeFromChunker parser, DefaultBlksize anchor, effectiveBlksize zero-fallback, TestStatBlocks subtests for files, directories, symlinks on both mounts
- docs/changelogs/v0.41.md: FUSE Mount Improvements entry

* refactor(fuse): tighten st_blksize plumbing

cap st_blksize at 16 MiB so a pathological `Import.UnixFSChunker`
cannot push tools into multi-GiB per-read buffers, and parse the
size suffix as uint64 so all valid numeric inputs clamp uniformly
instead of silently falling back past uint32.

normalize Blksize once in writable.NewDir so fillAttr reads
Cfg.Blksize directly, dropping the per-call effectiveBlksize method.

drop unreachable size-zero guard in fusetest.AssertStatBlocks.

* refactor(fuse): cap st_blksize at fuse.MAX_KERNEL_WRITE

Drop the arbitrary 16 MiB MaxBlksize ceiling and clamp directly to go-fuse's MAX_KERNEL_WRITE (1 MiB on Linux v4.20+). Hinting past this ceiling is wasted because the kernel splits any larger userspace read/write into MAX_KERNEL_WRITE-sized FUSE ops regardless.

* fix(fuse): gate stat helpers to fuse-supported platforms

stat.go imports go-fuse, which only builds on linux/darwin/freebsd.
without a build tag it broke cross-compilation for openbsd.

* docs(fuse): clarify st_blocks/st_blksize rationale

(cherry picked from commit 8cebf5c)
- remove metrics highlight already released in v0.40.0
- add go-cid v0.6.1 dep bump with faster base58 encoding note
Reduce example-test flakiness and align with current kubo conventions.

- move peer connection before ipfsA.Unixfs().Add() so bitswap's
  peer-connected event settles before Part IV fetches; on a slow CI
  runner the 1s ProvSearchDelay can expire and fail the test
- use Ed25519 keys via CreateIdentity, matching `ipfs init` default
- comments are concise and avoid jargon

(cherry picked from commit f449e8b)
bump go-libp2p-kad-dht to v0.39.1 to pick up the queryPeer
AddrInfo.Addrs race fix from libp2p/go-libp2p-kad-dht#1244, which resolves
the random daemon crashes reported in #11287 and #11116.

(cherry picked from commit eb2cfac)
* chore: bump p2p-forge to v0.8.0

aligns coredns and gorilla/websocket with go-libp2p v0.48.0 / quic-go v0.59.0 already in kubo, and pulls grpc v1.79.3 to clear CVE-2026-33186 from SBOM scanners (not exploitable in p2p-forge at runtime).

Closes #11283

* docs: document HTTP(S) proxy env vars

cover HTTPS_PROXY, HTTP_PROXY, NO_PROXY in environment-variables.md,
listing every path that honors http.ProxyFromEnvironment (RPC, update,
delegated routing, bitswap HTTP, autoconf, AutoTLS/ACME, libp2p ws/wss).

add a v0.41 changelog highlight pointing at the new section and noting
that the websocket transport now accepts https:// proxy URLs.

(cherry picked from commit e804f08)
* docs(server): document defaultServerFilters with RFC references

Rework the `server` profile, `Addresses.NoAnnounce`, and
`Swarm.AddrFilters` docs to make the default filter list scrutable, and
annotate each entry in `defaultServerFilters` with its RFC origin.

- profile.go: per-entry RFC inline comments on defaultServerFilters; godoc points at IANA special-purpose registries and cautions that changes here affect every server-profile user.
- config.md NoAnnounce/AddrFilters: active-voice rewrites; cross-link publish-side and dial-side filters; consolidated tip pointing to the server profile section.
- config.md server profile: IPv4 and IPv6 prefix tables with RFC references (multiaddr ipcidr notation); scenarios table for overriding specific entries; prose section for optional entries (IPv4 loopback, IPv6 outside 2000::/3) with trade-offs, motivated by loopback and unallocated IPv6 leaking into DHT announces since go-libp2p v0.47.

* feat(server): strip loopback and non-public IPv6 from announces

v0.40 switched libp2p to enumerate all interface addresses, which started
leaking loopback, unallocated IPv6 space (e.g. 1e::/16), and other
non-globally-reachable addresses into DHT and identify records of public
IPFS nodes including bootstrap peers.

adds three entries to defaultServerFilters applied to both
Swarm.AddrFilters and Addresses.NoAnnounce:

- /ip4/127.0.0.0/ipcidr/8: IPv4 loopback (RFC 1122)
- /ip6/::1/ipcidr/128: IPv6 loopback (kept for documentation; subset of ::/3)
- /ip6/::/ipcidr/3: everything outside global unicast 2000::/3

docs/config.md: overhaul server-profile section with per-entry RFC
references, override guidance for Yggdrasil/NAT64/co-located loopback,
and notes on /ip6/::/ipcidr/3 blast radius.

docs/changelogs/v0.42.md: highlight entry with upgrade instructions for
operators who already applied server profile before v0.42.

* docs(server): sort filters, correct ::/3 wording

The /ip6/::/ipcidr/3 CIDR matches only the IANA-reserved 0000::/3
block. Prior wording "everything outside global unicast 2000::/3"
implied wider coverage; other non-2000::/3 blocks are IANA-reserved
or already covered by fc00::/7 and fe80::/10, so behavior is
unchanged.

Also sort new entries into their numeric positions within the IPv4
and IPv6 blocks in both profile.go and the config.md tables.

* docs(v0.41): server profile filter highlight

Move the server profile changelog entry from v0.42 to v0.41 since
the fix ships in v0.41. Also rewrite to lead with the concrete
filter list addition, link to the server profile docs section for
full details and override guidance, and warn that applying the
profile disables LAN and localhost peer discovery.

(cherry picked from commit 61018d7)
Provide/reprovide messages from core/node/provider.go were emitted
under core:constructor (the shared core/node constructor subsystem),
making GOLOG_LOG_LEVEL and `ipfs log level` hard to target for
provide visibility. Scope them to "provider", matching boxo's
provider package so a single lever covers both layers.

- core/node/provider.go: new providerLog at the "provider" subsystem,
  applied to 25 keystore/reprovide/strategy/throughput call sites
- test/cli/provider_test.go: reprovide dedup subtest raises
  provider=info instead of core:constructor=info
- docs/debug-guide.md: new "Known logger subsystems" section listing
  provider, dht/provider, dht/provider/lan, dsqueue
- docs/environment-variables.md: link to the new section from under
  GOLOG_LOG_LEVEL

(cherry picked from commit 6059743)
* Upgrade to Boxo v0.39.0

(cherry picked from commit d62ee27)
* chore: bump boxo to ipfs/boxo#1140

picks up dspinner fix that snapshots the index before emitting pins,
avoiding the streaming lock convoy.

* docs: changelog entry for pinner stall fix

* docs: clarify pinner snapshot behavior

* chore: bump boxo to include ipfs/boxo#1146

Picks up the fix for "panic: pebble: closed" on shutdown (#11292):
the dspinner streamIndex goroutine now recovers from any datastore
panic and reports it as an error on the output channel, so the
daemon exits cleanly instead of crashing when the datastore closes
before pin enumeration drains.

* fix(provider): quiet keystore-close on shutdown

When the daemon shuts down, the keystore Close fires while the
startup sync goroutine may still be in flight: the OnStart ctx is
not yet cancelled, so ResetCids returning keystore.ErrClosed gets
logged at Error as "sync failed".

Treat keystore.ErrClosed the same as a cancelled ctx and log at
Debug as "interrupted by shutdown". Apply the same rule to the
periodic reprovide GC loop (whose error log got a unified message
in the process).

* test(cli): keystore-close log + pin ls shutdown

Adds TestProviderKeystoreSyncShutdownQuiet, a CLI test that:

1. Verifies no shutdown-caused keystore-sync error (err="keystore
   is closed" or err="context canceled") is logged at Error level.
   Scans stderr line-by-line so unrelated Error logs (e.g.
   "reset already in progress" from the startup+periodic overlap
   at tight Intervals) do not false-positive the assertion.

2. Runs `ipfs pin ls --stream` against the live daemon, shuts the
   daemon down mid-stream, and asserts the CLI returns within 15s,
   does not observe a daemon panic, and produces a meaningful
   error message if it exited non-zero.

Uses Provide.DHT.Interval=10ms so the periodic reprovide loop is
always inside ResetCids when StopDaemon fires, making the shutdown
race deterministic enough to catch the regression on most runs
(verified empirically against the pre-fix provider.go).

(cherry picked from commit 8416f38)
@lidel lidel requested a review from a team as a code owner April 24, 2026 11:56
# Conflicts:
#	docs/changelogs/v0.41.md
#	version.go
@lidel lidel force-pushed the merge-release-v0.41.0 branch from c51a1e5 to c4094b5 Compare April 24, 2026 12:02
@lidel lidel merged commit 8387e66 into master Apr 24, 2026
2 checks passed
@lidel lidel deleted the merge-release-v0.41.0 branch April 24, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants