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

{core,swarm}: Remove Network abstraction #2492

Merged
merged 10 commits into from
Feb 13, 2022
Merged

Commits on Feb 8, 2022

  1. {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.
    mxinden committed Feb 8, 2022
    Configuration menu
    Copy the full SHA
    2f477e6 View commit details
    Browse the repository at this point in the history
  2. {core,swarm}: Sort deps

    mxinden committed Feb 8, 2022
    Configuration menu
    Copy the full SHA
    1b7b3b5 View commit details
    Browse the repository at this point in the history
  3. *: Fix intra doc links

    mxinden committed Feb 8, 2022
    Configuration menu
    Copy the full SHA
    1792d4c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b19770b View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2022

  1. Configuration menu
    Copy the full SHA
    edd4ba2 View commit details
    Browse the repository at this point in the history
  2. swarm/: Fix docs

    mxinden committed Feb 10, 2022
    Configuration menu
    Copy the full SHA
    877dd6a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f38af8b View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2022

  1. Configuration menu
    Copy the full SHA
    d423561 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c1f3c44 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f478b13 View commit details
    Browse the repository at this point in the history