Skip to content

Design and plan network-bridge to rely on Network and NotificationService #4811

Description

@EclesioMeloJunior

Issue summary

  • Currently parachain has the responsability to register its own protocol stream handlers
  • The responsability to register protocol stream handlers should not be in the parachains package but in the network layer which should provide to the network bridge an API to be aware of any received message. That's the point of relying on NotificationService
  • The Network interface is the API of network layer where resides the peer reputation and send request methods used by parachains subsystems.

Implementation details

  • Basically the network bridge has its own Network Service interface implemenation that under the hood uses the NetworkService implementation of substrate client. What the network-bridge Network Service interface has differently is the start_request method that should be implemented as it requires the authority discovery as part of the logic and in the end uses substrate NetworkService interface to perform the raw p2p request.

Other information and links

Acceptance criteria

[] Add AC's here..
[] Regression testing (if applicable)
[] New code is 60% covered with unit tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-implementationthis issue/pr is a new feature or functionality.

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions