This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Network sync refactoring (part 2) #11322
Merged
bkchr
merged 13 commits into
paritytech:master
from
nazar-pc:network-sync-refactoring-part-2
May 3, 2022
Merged
Network sync refactoring (part 2) #11322
bkchr
merged 13 commits into
paritytech:master
from
nazar-pc:network-sync-refactoring-part-2
May 3, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…c::blocks` and some data structures from `sc_network::protocol::message` module into `sc_network_sync::message`
…request_responses` into new `sc-network-common` crate
…_handler` modules into `sc_network_sync`
…_old.rs` to preserve history of changes of the file in the next commit
…sync/src/lib.rs` to preserve history of changes
…s, move message data structures around accordingly
I see Polkadot digs a bit deeper into networking and fails CI because of that. Would you prefer to add re-exports of UPD: Went with re-exports, so nothing needs to be aware of this refactoring happening yet. |
…ctoring-part-2 # Conflicts: # client/network/src/protocol/message.rs
arkpar
approved these changes
May 2, 2022
bkchr
approved these changes
May 3, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty!
bkchr
added
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
labels
May 3, 2022
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
bot merge |
Waiting for commit status. |
bkchr
added
the
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
label
May 3, 2022
Merge cancelled due to error. Error: Statuses failed for 29b58a8 |
CI failure must be related to #11340 that was just merged |
godcodehunter
pushed a commit
to sensoriumxr/substrate
that referenced
this pull request
Jun 22, 2022
* 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>
DaviRain-Su
pushed a commit
to octopus-network/substrate
that referenced
this pull request
Aug 23, 2022
* 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>
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
* 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>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the second step towards #8686.
As #8686 (comment) suggests, this moves
api.v1
proto scheme and a bunch of data structures related to sync into newsc-network-sync
module, whichsc-network
now depends on.This is mostly an implementation detail of
sc-network
, most ofsc-network
public API is unchanged.I also noticed that there are some shared data structures that will be used in
sc-network
,sc-network-sync
and upcomingsc-network-light
(will be sent in a separate PR) and moved them into another new cratesc-network-common
.sc-network-common
is fairly minimal and can be expanded more in the future if necessary.Overall this is mostly moving code around and really there is no changes in business logic.
I have made changes in commits such that they should make sense and compile/run (except two where I intentionally moved files in specific way). If this is merged without squashing, the history of all files should be preserved throughout all of the changes (useful for tracing origin of code changes in the future).
Reviewing individual commits is recommended.
P.S. I was unlucky to do this right when libp2p was updated 🙃