mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Remove yamux support (#1526)
## Issue Addressed There is currently an issue with yamux when connecting to prysm peers. The source of the issue is currently unknown. This PR removes yamux support to force mplex negotation. We can add back yamux support once we have isolated and corrected the issue.
This commit is contained in:
@@ -85,7 +85,7 @@ impl<TSpec: EthSpec> Service<TSpec> {
|
||||
debug!(log, "Attempting to open listening ports"; "address" => format!("{}", config.listen_address), "tcp_port" => config.libp2p_port, "udp_port" => discovery_string);
|
||||
|
||||
let mut swarm = {
|
||||
// Set up the transport - tcp/ws with noise and yamux/mplex
|
||||
// Set up the transport - tcp/ws with noise and mplex
|
||||
let transport = build_transport(local_keypair.clone())
|
||||
.map_err(|e| format!("Failed to build transport: {:?}", e))?;
|
||||
// Lighthouse network behaviour
|
||||
@@ -297,7 +297,7 @@ impl<TSpec: EthSpec> Service<TSpec> {
|
||||
}
|
||||
|
||||
/// The implementation supports TCP/IP, WebSockets over TCP/IP, noise as the encryption layer, and
|
||||
/// yamux or mplex as the multiplexing layer.
|
||||
/// mplex as the multiplexing layer.
|
||||
fn build_transport(
|
||||
local_private_key: Keypair,
|
||||
) -> Result<Boxed<(PeerId, StreamMuxerBox), Error>, Error> {
|
||||
@@ -312,10 +312,7 @@ fn build_transport(
|
||||
Ok(transport
|
||||
.upgrade(core::upgrade::Version::V1)
|
||||
.authenticate(generate_noise_config(&local_private_key))
|
||||
.multiplex(core::upgrade::SelectUpgrade::new(
|
||||
libp2p::mplex::MplexConfig::new(),
|
||||
libp2p::yamux::Config::default(),
|
||||
))
|
||||
.multiplex(libp2p::mplex::MplexConfig::new())
|
||||
.map(|(peer, muxer), _| (peer, core::muxing::StreamMuxerBox::new(muxer)))
|
||||
.timeout(Duration::from_secs(10))
|
||||
.timeout(Duration::from_secs(10))
|
||||
|
||||
Reference in New Issue
Block a user