Commit Graph

5 Commits

Author SHA1 Message Date
Liu-Cheng Xu f44e4b3d48 Enrich the sync log on handling the block request (#11747)
Add more info to the log to help debug the issue like
https://github.com/paritytech/substrate/issues/11732.

Co-authored-by: Bastian Köcher <info@kchr.de>
2022-07-28 17:31:47 +02:00
Nazar Mokrynskyi 5896072b86 Network sync refactoring (part 4) (#11412)
* Remove direct dependency of `sc-network` on `sc-network-light`

* Move `WarpSyncProvider` trait and surrounding data structures into `sc-network-common`

* Move `WarpSyncProvider` trait and surrounding data structures into `sc-network-common`

* Create `sync` module in `sc-network-common`, create `ChainSync` trait there (not used yet), move a bunch of associated data structures from `sc-network-sync`

* Switch from concrete implementation to `ChainSync` trait from `sc-network-common`

* Introduce `OpaqueStateRequest`/`OpaqueStateResponse` to remove generics from `StateSync` trait

* Introduce `OpaqueBlockRequest`/`OpaqueBlockResponse`, make `scheme` module of `sc-network-sync` private

* Surface `sc-network-sync` into `sc-service` and make `sc-network` not depend on it anymore

* Remove now unnecessary dependency from `sc-network`

* Replace crate links with just text since dependencies are gone now

* Remove `warp_sync` re-export from `sc-network-common`

* Update copyright in network-related files

* Address review comments about documentation

* Apply review suggestion

* Rename `extra_requests` module to `metrics`

Co-authored-by: Bastian Köcher <info@kchr.de>
2022-07-12 20:34:17 +00:00
Nathan Whitaker 3502bc5c1d Return a successful response on repeated small block request (#11429) 2022-05-18 09:42:53 +02:00
Nazar Mokrynskyi 8a45870878 Network sync refactoring (part 3) (#11347)
* Move `light.v1.proto` schema into new crate `sc-network-light`

* Move `sc_network::light_client_requests` and submodule to `sc_network_light::light_client_requests`

* Fix apparently outdated reference in documentation and visibility modifier

* Fix rustdoc check

* Update lock file
2022-05-14 07:17:53 +00:00
Nazar Mokrynskyi e397e0b634 Network sync refactoring (part 2) (#11322)
* 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: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2022-05-03 15:55:26 +02:00