-
Notifications
You must be signed in to change notification settings - Fork 930
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
{core,swarm}: Remove Network abstraction #2492
Merged
Merged
Commits on Feb 8, 2022
-
{core,swarm}: Remove Network abstraction
This commit removes the `Network` abstraction, thus managing `Listeners` and the connection `Pool` in `Swarm` directly. This is done under the assumption that noone uses the `Network` abstraction directly, but instead everyone always uses it through `Swarm`. Both `Listeners` and `Pool` are moved from `libp2p-core` into `libp2p-swarm`. Given that they are no longer exposed via `Network`, they can be treated as an implementation detail of `libp2p-swarm` and `Swarm`. This change does not include any behavioural changes. This change has the followin benefits: - Removal of `NetworkEvent`, which was mostly an isomorphism of `SwarmEvent`. - Removal of the never-directly-used `Network` abstraction. - Removal of now obsolete verbose `Peer` (`core/src/network/peer.rs`) construct. - Removal of `libp2p-core` `DialOpts`, which is a direct mapping of `libp2p-swarm` `DialOpts`. - Allowing breaking changes to the connection handling and `Swarm` API interface without a breaking change in `libp2p-core` and thus a without a breaking change in `/transport` protocols. This change enables the following potential future changes: - Removal of `NodeHandler` and `ConnectionHandler`. Thus allowing to rename `ProtocolsHandler` into `ConnectionHandler`. - Moving `NetworkBehaviour` and `ProtocolsHandler` into `libp2p-core`, having `libp2p-xxx` protocol crates only depend on `libp2p-core` and thus allowing general breaking changes to `Swarm` without breaking all `libp2p-xxx` crates.
Configuration menu - View commit details
-
Copy full SHA for 2f477e6 - Browse repository at this point
Copy the full SHA 2f477e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b7b3b5 - Browse repository at this point
Copy the full SHA 1b7b3b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1792d4c - Browse repository at this point
Copy the full SHA 1792d4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b19770b - Browse repository at this point
Copy the full SHA b19770bView commit details
Commits on Feb 10, 2022
-
Configuration menu - View commit details
-
Copy full SHA for edd4ba2 - Browse repository at this point
Copy the full SHA edd4ba2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 877dd6a - Browse repository at this point
Copy the full SHA 877dd6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f38af8b - Browse repository at this point
Copy the full SHA f38af8bView commit details
Commits on Feb 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d423561 - Browse repository at this point
Copy the full SHA d423561View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1f3c44 - Browse repository at this point
Copy the full SHA c1f3c44View commit details -
Configuration menu - View commit details
-
Copy full SHA for f478b13 - Browse repository at this point
Copy the full SHA f478b13View commit details
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.