Revive mplex (#4619)

## Issue Addressed

N/A

## Proposed Changes

In #4431 , we seem to have removed support for mplex as it is being deprecated in libp2p. See https://github.com/libp2p/specs/issues/553 . Related rust-libp2p PR https://github.com/libp2p/rust-libp2p/pull/3920
However, since this isn't part of the official [consensus specs](https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#multiplexing), we still need to support mplex. 

> Clients MUST support [mplex](https://github.com/libp2p/specs/tree/master/mplex) and MAY support [yamux](https://github.com/hashicorp/yamux/blob/master/spec.md).

This PR adds back mplex support as before.
This commit is contained in:
Pawan Dhananjay
2023-08-24 05:54:37 +00:00
parent 661779f08e
commit ea43b6a53c
3 changed files with 30 additions and 1 deletions

20
Cargo.lock generated
View File

@@ -4117,6 +4117,25 @@ dependencies = [
"prometheus-client",
]
[[package]]
name = "libp2p-mplex"
version = "0.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93959ed08b6caf9810e067655e25f1362098797fef7c44d3103e63dcb6f0fabe"
dependencies = [
"asynchronous-codec",
"bytes",
"futures",
"libp2p-core",
"libp2p-identity",
"log",
"nohash-hasher",
"parking_lot 0.12.1",
"rand 0.8.5",
"smallvec 1.11.0",
"unsigned-varint 0.7.1",
]
[[package]]
name = "libp2p-noise"
version = "0.43.0"
@@ -4382,6 +4401,7 @@ dependencies = [
"hex",
"lazy_static",
"libp2p",
"libp2p-mplex",
"lighthouse_metrics",
"lighthouse_version",
"lru 0.7.8",