Skip to content

Sending control extension message to remote peers#442

Merged
lucassaldanha merged 6 commits intolibp2p:developfrom
lucassaldanha:gossip_v1_3_outgoing
Feb 17, 2026
Merged

Sending control extension message to remote peers#442
lucassaldanha merged 6 commits intolibp2p:developfrom
lucassaldanha:gossip_v1_3_outgoing

Conversation

@lucassaldanha
Copy link
Collaborator

@lucassaldanha lucassaldanha commented Feb 16, 2026

The overall logic for sending control extension messages to remote peers is simple:

  • always report support for all extensions (finer-grained control to be implemented as part of Feature flag for supported extensions #441)
  • control extension message is sent whenever a new peer connects or when we are subscribing to a topic (to handle incoming and outgoing connections)
  • GossipExtensionsState class was added to GossipRouter to help keep track of which peers our node has already sent a control extension message to, to avoid sending it again.
  • When a peer disconnects, we clear the information associated with that peer from GossipExtensionsState
  • Control extensions messages are only sent when the gossipsub protocol version supports it (1.3+)

part of #436

Copy link
Collaborator

@StefanBratanov StefanBratanov left a comment

Choose a reason for hiding this comment

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

LGTM

@lucassaldanha lucassaldanha merged commit 1ba3fc4 into libp2p:develop Feb 17, 2026
2 checks passed
@lucassaldanha lucassaldanha deleted the gossip_v1_3_outgoing branch February 17, 2026 22:17
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