Skip to content

fix(p2p): skip addressbook and reacher for unreachable addresses#5370

Open
gacevicljubisa wants to merge 1 commit intomasterfrom
fix/p2p-skip-unreachable-remote-addr-fallback
Open

fix(p2p): skip addressbook and reacher for unreachable addresses#5370
gacevicljubisa wants to merge 1 commit intomasterfrom
fix/p2p-skip-unreachable-remote-addr-fallback

Conversation

@gacevicljubisa
Copy link
Member

@gacevicljubisa gacevicljubisa commented Feb 17, 2026

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

When the peerstore has no addresses for a peer, peerMultiaddrs was falling back to RemoteMultiaddr (NAT IP + ephemeral port). This caused the reacher to ping unreachable ports and hive to gossip unreachable addresses.

Remove the fallback from peerMultiaddrs and handle it explicitly at call sites — RemoteMultiaddr is now only used as ObservedUnderlay for the handshake. Addressbook storage and reacher notifications are skipped when no real peerstore addresses are available.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

@gacevicljubisa gacevicljubisa changed the title fix(p2p): skip addressbook and reacher for unreachable RemoteMultiadd… fix(p2p): skip addressbook and reacher for unreachable addresses Feb 17, 2026
@gacevicljubisa gacevicljubisa marked this pull request as ready for review February 17, 2026 08:50
Copy link
Member

@janos janos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have a test to ensure that the behaviour is kept, as the logic is adjusted.

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