Skip to content
Snippets Groups Projects
  1. Apr 11, 2023
  2. Mar 14, 2023
    • Aaro Altonen's avatar
      Move code from `sc-network-common` back to `sc-network` (#13592) · 9ced14e2
      Aaro Altonen authored
      
      * Move service tests to `client/network/tests`
      
      These tests depend on `sc-network` and `sc-network-sync` so they should
      live outside the crate.
      
      * Move some configs from `sc-network-common` to `sc-network`
      
      * Move `NetworkService` traits to `sc-network`
      
      * Move request-responses to `sc-network`
      
      * Remove more stuff
      
      * Remove rest of configs from `sc-network-common` to `sc-network`
      
      * Remove more stuff
      
      * Fix warnings
      
      * Update client/network/src/request_responses.rs
      
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
      
      * Fix cargo doc
      
      ---------
      
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
      9ced14e2
  3. Mar 06, 2023
    • Aaro Altonen's avatar
      Extract syncing protocol from `sc-network` (#12828) · 1a7f5be0
      Aaro Altonen authored
      
      * Move import queue out of `sc-network`
      
      Add supplementary asynchronous API for the import queue which means
      it can be run as an independent task and communicated with through
      the `ImportQueueService`.
      
      This commit removes removes block and justification imports from
      `sc-network` and provides `ChainSync` with a handle to import queue so
      it can import blocks and justifications. Polling of the import queue is
      moved complete out of `sc-network` and `sc_consensus::Link` is
      implemented for `ChainSyncInterfaceHandled` so the import queue
      can still influence the syncing process.
      
      * Move stuff to SyncingEngine
      
      * Move `ChainSync` instanation to `SyncingEngine`
      
      Some of the tests have to be rewritten
      
      * Move peer hashmap to `SyncingEngine`
      
      * Let `SyncingEngine` to implement `ChainSyncInterface`
      
      * Introduce `SyncStatusProvider`
      
      * Move `sync_peer_(connected|disconnected)` to `SyncingEngine`
      
      * Implement `SyncEventStream`
      
      Remove `SyncConnected`/`SyncDisconnected` events from
      `NetworkEvenStream` and provide those events through
      `ChainSyncInterface` instead.
      
      Modify BEEFY/GRANDPA/transactions protocol and `NetworkGossip` to take
      `SyncEventStream` object which they listen to for incoming sync peer
      events.
      
      * Introduce `ChainSyncInterface`
      
      This interface provides a set of miscellaneous functions that other
      subsystems can use to query, for example, the syncing status.
      
      * Move event stream polling to `SyncingEngine`
      
      Subscribe to `NetworkStreamEvent` and poll the incoming notifications
      and substream events from `SyncingEngine`.
      
      The code needs refactoring.
      
      * Make `SyncingEngine` into an asynchronous runner
      
      This commits removes the last hard dependency of syncing from
      `sc-network` meaning the protocol now lives completely outside of
      `sc-network`, ignoring the hardcoded peerset entry which will be
      addressed in the future.
      
      Code needs a lot of refactoring.
      
      * Fix warnings
      
      * Code refactoring
      
      * Use `SyncingService` for BEEFY
      
      * Use `SyncingService` for GRANDPA
      
      * Remove call delegation from `NetworkService`
      
      * Remove `ChainSyncService`
      
      * Remove `ChainSync` service tests
      
      They were written for the sole purpose of verifying that `NetworWorker`
      continues to function while the calls are being dispatched to
      `ChainSync`.
      
      * Refactor code
      
      * Refactor code
      
      * Update client/finality-grandpa/src/communication/tests.rs
      
      Co-authored-by: default avatarAnton <anton.kalyaev@gmail.com>
      
      * Fix warnings
      
      * Apply review comments
      
      * Fix docs
      
      * Fix test
      
      * cargo-fmt
      
      * Update client/network/sync/src/engine.rs
      
      Co-authored-by: default avatarAnton <anton.kalyaev@gmail.com>
      
      * Update client/network/sync/src/engine.rs
      
      Co-authored-by: default avatarAnton <anton.kalyaev@gmail.com>
      
      * Add missing docs
      
      * Refactor code
      
      ---------
      
      Co-authored-by: default avatarAnton <anton.kalyaev@gmail.com>
      1a7f5be0
  4. Feb 21, 2023
    • Vivek Pandya's avatar
      Remove years from copyright notes. (#13415) · bc53b9a0
      Vivek Pandya authored
      * Change copyright year to 2023 from 2022
      
      * Fix incorrect update of copyright year
      
      * Remove years from copy right header
      
      * Fix remaining files
      
      * Fix typo in a header and remove update-copyright.sh
      bc53b9a0
  5. Dec 23, 2022
  6. Nov 30, 2022
  7. Oct 10, 2022
    • Aaro Altonen's avatar
      Move block announcement protocol config out of `Protocol` (#12441) · ce9ce49b
      Aaro Altonen authored
      * Move Role(s) to `sc-network-common`
      
      * Introduce `NotificationHandshake` type
      
      * Move block announce protocol config creation to `ChainSync`
      
      * Include block announcement into `notification_protocols`
      
      * Apply review comments
      
      * Remove unneeded include
      
      * Add missing include
      
      * Apply review comments
      ce9ce49b
  8. Sep 26, 2022
  9. Sep 21, 2022
  10. Sep 03, 2022
    • Dmitry Markin's avatar
      Use custom type for ProtocolName (#12172) · 24d09fe8
      Dmitry Markin authored
      * Add ProtocolName custom type
      
      * Use new ProtocolName in sc_network_common
      
      * Use new ProtocolName in sc_network
      
      * Use new ProtocolName for BEEFY and GRANDPA
      
      * Use new ProtocolName for notifications
      
      * Use new ProtocolName in sc_network (part 2)
      
      * Use new ProtocolName in sc_network_gossip
      
      * Use new ProtocolName in sc_offchain
      
      * Remove unused imports
      
      * Some more fixes
      
      * Add tests
      
      * Fix minor import issues
      
      * Re-export ProtocolName in sc_network
      
      * Revert "Re-export ProtocolName in sc_network"
      
      This reverts commit 8d8ff71927e7750757f29c9bbd88dc0ba181d214.
      
      * Re-export ProtocolName in sc_network
      
      * Remove dependency on sc-network-common from beefy-gadget
      24d09fe8
  11. Aug 31, 2022
  12. Aug 09, 2022
    • Nazar Mokrynskyi's avatar
      Network sync refactoring (part 6) (#11940) · a685582b
      Nazar Mokrynskyi authored
      * Extract `NetworkKVProvider` trait in `sc-authority-discovery` and remove unnecessary dependency
      
      * Extract `NetworkSyncForkRequest` trait in `sc-finality-grandpa`
      
      * Relax requirements on `SyncOracle` trait, remove extra native methods from `NetworkService` that are already provided by trait impls
      
      * Move `NetworkSigner` trait from `sc-authority-discovery` into `sc-network-common` and de-duplicate methods on `NetworkService`
      
      * Move `NetworkKVProvider` trait from `sc-authority-discovery` into `sc-network-common` and de-duplicate methods on `NetworkService`
      
      * Minimize `sc-authority-discovery` dependency on `sc-network`
      
      * Move `NetworkSyncForkRequest` trait from `sc-finality-grandpa` to `sc-network-common` and de-duplicate methods in `NetworkService`
      
      * Extract `NetworkStatusProvider` trait and de-duplicate methods on `NetworkService`
      
      * Extract `NetworkPeers` trait and de-duplicate methods on `NetworkService`
      
      * Extract `NetworkEventStream` trait and de-duplicate methods on `NetworkService`
      
      * Move more methods from `NetworkService` into `NetworkPeers` trait
      
      * Move `NetworkStateInfo` trait into `sc-network-common`
      
      * Extract `NetworkNotification` trait and de-duplicate methods on `NetworkService`
      
      * Extract `NetworkRequest` trait and de-duplicate methods on `NetworkService`
      
      * Remove `NetworkService::local_peer_id()`, it is already provided by `NetworkStateInfo` impl
      
      * Extract `NetworkTransaction` trait and de-duplicate methods on `NetworkService`
      
      * Extract `NetworkBlock` trait and de-duplicate methods on `NetworkService`
      
      * Remove dependencies on `NetworkService` from most of the methods of `sc-service`
      
      * Address simple review comments
      a685582b
  13. Aug 05, 2022
    • Dmitry Markin's avatar
      Change on-the-wire protocol names to include genesis hash & fork id (#11938) · 6eda842c
      Dmitry Markin authored
      * Rename transactions protocol to include genesis hash
      
      * Add protocol name generation to sc_network::utils
      
      * Use utils functions for transactions protocol name generation
      
      * Extract protocol name generation into public module
      
      * Use sc_network::protocol_name::standard_protocol_name() for BEEFY and GRANDPA
      
      * minor: add missing newline at EOF
      
      * Change block-announces protocol name to include genesis_hash & fork_id
      
      * Change protocol names to include genesis hash and fork id
      
      Protocols changed:
          - sync
          - state
          - light
          - sync/warp
      
      * Revert "Use sc_network::protocol_name::standard_protocol_name() for BEEFY and GRANDPA"
      
      This reverts commit cd60a95a3face397e1b67f4bc95dd0f2b581bfae.
      
      * Get rid of `protocol_name` module
      6eda842c
  14. Jul 21, 2022
  15. May 03, 2022
    • Nazar Mokrynskyi's avatar
      Network sync refactoring (part 2) (#11322) · e397e0b6
      Nazar Mokrynskyi authored
      
      * Move `api.v1.proto` schema into new crate `sc-network-sync`
      
      * Move `sc_network::protocol::sync::state` module into `sc_network_sync::state`
      
      * Move `sc_network::protocol::sync::blocks` module into `sc_network_sync::blocks` and some data structures from `sc_network::protocol::message` module into `sc_network_sync::message`
      
      * Move some data structures from `sc_network::config` and `sc_network::request_responses` into new `sc-network-common` crate
      
      * Move `sc_network::protocol::sync::warm` and `sc_network::warp_request_handler` modules into `sc_network_sync`
      
      * Move `client/network/sync/src/lib.rs` to `client/network/sync/src/lib_old.rs` to preserve history of changes of the file in the next commit
      
      * Move `client/network/src/protocol/sync.rs` on top of `client/network/sync/src/lib.rs` to preserve history of changes
      
      * Move `sc_network::protocol::sync` to `sc_network_sync` with submodules, move message data structures around accordingly
      
      * Move `sc_network::block_request_handler` to `sc_network_sync::block_request_handler`
      
      * Move `sc_network::state_request_handler` to `sc_network_sync::state_request_handler`
      
      * Add re-exports for compatibility reasons
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <bkchr@users.noreply.github.com>
      
      Co-authored-by: default avatarBastian Köcher <bkchr@users.noreply.github.com>
      e397e0b6
  16. Apr 30, 2022
  17. Jan 03, 2022
  18. Dec 09, 2021
  19. Nov 13, 2021
  20. Oct 08, 2021
    • ordian's avatar
      NetworkService: change `remove_from_peers_set` to accept `PeerId`s (#9964) · 12f958fa
      ordian authored
      * NetworkService: expose split_multiaddr_and_peer_id
      
      * Revert "NetworkService: expose split_multiaddr_and_peer_id"
      
      This reverts commit 47b9a0d57c3617e64d01c449afca8896bd4bb6b6.
      
      * change remove_from_peer_set to accets PeerIds
      
      * fixes
      
      * try fixing it
      
      * try fixing it again
      
      * FMT
      
      * revert me
      
      * Revert "revert me"
      
      This reverts commit 1ea34f473f1aedc8b3e6e888d1ad2e1b45eaa1e0.
      12f958fa
  21. Oct 01, 2021
  22. Jul 21, 2021
  23. May 06, 2021
  24. Apr 05, 2021
  25. Feb 26, 2021
  26. Feb 24, 2021
  27. Feb 18, 2021