Skip to content

Bridge receives duplicate headers through p2p subscription #4724

@vgonkivs

Description

@vgonkivs

Bridge nodes are receiving duplicate header due to an unnecessary p2p subscription.

The issue manifests when:

  • Bridge receives a header from p2p.
  • The subscription from Core triggers a case with an already known/familiar header

This is related to the broader issue where HeaderSub subscriptions trigger PubSub subscriptions, which in turn trigger p2p subscriptions that bridge nodes don't need.

Current Behaviour:
Bridge nodes subscribe to p2p topics unnecessarily
Headers received via p2p trigger duplicate processing when Core's subscription fires
The ErrKnownHeader case is being hit due to this duplicate delivery path

Root Cause
By default, PubSub topics are in fanout mode (send-only), but the current implementation creates a subscription chain: HeaderSub → PubSub → p2p, causing bridge nodes to receive traffic they shouldn't be listening to.

Proposed Solution by @Wondertan:
Add a new option to PubSub topics that enforces fanout mode, preventing the subscription cascade and eliminating the duplicate header processing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions