Skip to content

fix(libp2p): drop empty addrs in AddrsFactory#11302

Merged
lidel merged 1 commit intomasterfrom
fix/filter-empty-multiaddr-in-addrs-factory
Apr 29, 2026
Merged

fix(libp2p): drop empty addrs in AddrsFactory#11302
lidel merged 1 commit intomasterfrom
fix/filter-empty-multiaddr-in-addrs-factory

Conversation

@lidel
Copy link
Copy Markdown
Member

@lidel lidel commented Apr 27, 2026

A zero-value Multiaddr (since go-multiaddr v0.15 is a slice type) encodes to zero bytes on the wire. AddrsFactory was passing such empty entries through to the host's signed peer record, where peers that skip the empty-input check render them as "/" and reject the address. js-libp2p autonatv2 first flagged this against a kubo/0.39.0/2896aed/docker agent.

AddrsFactory is the central chokepoint for kubo's announced addresses, so filtering here scrubs every downstream consumer until the upstream go-libp2p fix lands.

I also opened PR upstream:

but my current policy for libp2p regressions is "belt and suspenders" so this PR will ship anyway so Kubo release cycle is not blocked by libp2p (if possible)

A zero-value Multiaddr (since go-multiaddr v0.15 is a slice type)
encodes to zero bytes on the wire. AddrsFactory was passing such
empty entries through to the host's signed peer record, where peers
that skip the empty-input check render them as "/" and reject the
address. js-libp2p autonatv2 first flagged this against a
kubo/0.39.0/2896aed/docker agent.

AddrsFactory is the central chokepoint for kubo's announced
addresses, so filtering here scrubs every downstream consumer until
the upstream go-libp2p fix lands.

See libp2p/js-libp2p#3478 (comment)
@lidel lidel added the skip/changelog This change does NOT require a changelog entry label Apr 27, 2026
@lidel lidel marked this pull request as ready for review April 27, 2026 20:33
@lidel lidel requested a review from a team as a code owner April 27, 2026 20:33
@lidel lidel merged commit e931b37 into master Apr 29, 2026
31 of 32 checks passed
@lidel lidel deleted the fix/filter-empty-multiaddr-in-addrs-factory branch April 29, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip/changelog This change does NOT require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants