Skip to content
  1. Nov 21, 2024
    • Alexandru Vasile's avatar
      network-gossip: Ensure sync event is processed on unknown peer roles (#6553) · 7c9e34b5
      Alexandru Vasile authored
      
      
      The `GossipEngine::poll_next` implementation polls both the
      `notification_service` and the `sync_event_stream`.
      
      If both polls produce valid data to be processed
      (`Poll::Ready(Some(..))`), then the sync event is ignored when we
      receive `NotificationEvent::NotificationStreamOpened` and the role
      cannot be deduced.
      
      This PR ensures both events are processed gracefully. While at it, I
      have added a warning to the sync engine related to
      `notification_service` producing `Poll::Ready(None)`.
      
      This effectively ensures that `SyncEvents` propagate to the network
      potentially fixing any state mismatch.
      
      
      For more context: https://github.com/paritytech/polkadot-sdk/issues/6507
      
      cc @paritytech/sdk-node
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <[email protected]>
      7c9e34b5