Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework the event system of sc-network #1370

Merged
merged 58 commits into from
Nov 28, 2023

Commits on Sep 3, 2023

  1. Rework the event system of sc-network

    This commit introduces a new concept called `NotificationService` which
    allows Polkadot protocols to communicate with the underlying
    notification protocol implementation directly, without routing events
    through `NetworkWorker`. This implies that each protocol has its own
    service which it uses to communicate with remote peers and that each
    `NotificationService` is unique with respect to the underlying
    notification protocol, meaning `NotificationService` for the transaction
    protocol can only be used to send and receive transaction-related
    notifications.
    
    The `NotificationService` concept introduces two additional benefits:
      * allow protocols to start using custom handshakes
      * allow protocols to accept/reject inbound peers
    
    Previously the validation of inbound connections was solely
    the responsibility of `ProtocolController`. This caused issues with
    light peers and `SyncingEngine` as `ProtocolController` would accept
    more peers than `SyncingEngine` could accept which caused peers to have
    differing views of their own states. `SyncingEngine` would reject excess
    peers but these rejections were not properly communicated to those peers
    causing them to assume that they were accepted.
    
    With `NotificationService`, the local handshake is not sent to remote
    peer if peer is rejected which allows it to detect that it was rejected.
    
    This commit also deprecates the use of `NetworkEventStream` for all
    notification-related events and going forward only DHT events are
    provided through `NetworkEventStream`. If protocols wish to follow
    each other's events, they must introduce additional abtractions, as is
    done for GRANDPA and transactions protocols by following the syncing
    protocol through `SyncEventStream`.
    
    Fixes #512
    Fixes #514
    Fixes #515
    Fixes #554
    Fixes #556
    
    Co-authored-by: Dmitry Markin <[email protected]>
    altonen and dmitry-markin committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    f643843 View commit details
    Browse the repository at this point in the history
  2. Fix clippy

    altonen committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    026466c View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2023

  1. Fix warnings

    altonen committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    229197e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d995a0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    208fe22 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    00611e0 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2023

  1. Update substrate/client/network/src/service/traits.rs

    Co-authored-by: Alexandru Vasile <[email protected]>
    altonen and lexnv authored Sep 5, 2023
    Configuration menu
    Copy the full SHA
    b6174e3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4fe313e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    120f429 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Apply review comments

    altonen committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    fa7156b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e1acf57 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2023

  1. Configuration menu
    Copy the full SHA
    d5a8374 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2023

  1. Configuration menu
    Copy the full SHA
    d178270 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2023

  1. Configuration menu
    Copy the full SHA
    c6b10d5 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2023

  1. Fix warnings

    altonen committed Sep 24, 2023
    Configuration menu
    Copy the full SHA
    2d4bdda View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. Configuration menu
    Copy the full SHA
    b074c57 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. Configuration menu
    Copy the full SHA
    910a737 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2023

  1. Configuration menu
    Copy the full SHA
    3aa962c View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. Configuration menu
    Copy the full SHA
    beee591 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. Fix mixnet

    altonen committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    f4286da View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a2bf29d View commit details
    Browse the repository at this point in the history
  3. Add Sync

    altonen committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    ff10bfb View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2023

  1. Configuration menu
    Copy the full SHA
    1fab0f1 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2023

  1. Configuration menu
    Copy the full SHA
    e2d6d22 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6451147 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2023

  1. Configuration menu
    Copy the full SHA
    ede7ff0 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2023

  1. Configuration menu
    Copy the full SHA
    09be0b9 View commit details
    Browse the repository at this point in the history
  2. Fix stuff

    altonen committed Nov 4, 2023
    Configuration menu
    Copy the full SHA
    fd3a6ce View commit details
    Browse the repository at this point in the history
  3. Fix tests

    altonen committed Nov 4, 2023
    Configuration menu
    Copy the full SHA
    bc9d6cf View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. Fix UI test

    altonen committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    aa78cf6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cc2b3cf View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2023

  1. Configuration menu
    Copy the full SHA
    81b5997 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2023

  1. Configuration menu
    Copy the full SHA
    9d24a55 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2023

  1. Fix stuff

    altonen committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    11b0dac View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2023

  1. Configuration menu
    Copy the full SHA
    2e52080 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. Configuration menu
    Copy the full SHA
    6515510 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    633f481 View commit details
    Browse the repository at this point in the history
  3. Update Cargo.lock

    altonen committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    8dec276 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

  1. Fix more stuff

    altonen committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    6dfef05 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2023

  1. Configuration menu
    Copy the full SHA
    6da99b3 View commit details
    Browse the repository at this point in the history
  2. Fix stuff more

    altonen committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    65ece16 View commit details
    Browse the repository at this point in the history
  3. Fix warnings

    altonen committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    7770477 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eeab2fd View commit details
    Browse the repository at this point in the history
  5. zzz

    altonen committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    5049ade View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2023

  1. Prioritize validation events over other events

    GRANDPA and transactions follow syncing protocol for peers while they're
    still required to validate inbound peers. Peer might be accepted over
    GRANDPA and after `ProtocolController` has accepted the peer, the peer
    is sent to the protocol for validation. While it was being validated,
    syncing protocol may have disconnected from the peer, instructing
    GRANDPA to disconnect as well.
    
    If the validation result from GRANDPA is not processed before the
    disconnection request is received from
    altonen committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    befd2d9 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Improve validation

    altonen committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    cd94277 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0e140bd View commit details
    Browse the repository at this point in the history
  3. Fix clippy

    altonen committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    baf44b2 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2023

  1. Clean up things

    altonen committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    ac76424 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2023

  1. Updates

    altonen committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    20395c6 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. Configuration menu
    Copy the full SHA
    3273e32 View commit details
    Browse the repository at this point in the history
  2. Fix networkbridge test

    altonen committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    e791de2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    32c0c5f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1ce77bd View commit details
    Browse the repository at this point in the history
  5. Update Cargo.lock

    altonen committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    691f4c8 View commit details
    Browse the repository at this point in the history
  6. Fix gitlab ui test

    altonen committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    b04d65d View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2023

  1. Configuration menu
    Copy the full SHA
    0b2e718 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    76bb0be View commit details
    Browse the repository at this point in the history