Broken pipe error during negotiation of mplex after successfully negotiating noise protocol #4334
-
Hey all, I have the following swarm build as part of a larger let tcp_transport = libp2p::tcp::tokio::Transport::default()
.upgrade(upgrade::Version::V1Lazy)
.authenticate(noise::Config::new(&local_key).expect("signing libp2p-noise static keypair"))
.multiplex(libp2p_mplex::MplexConfig::new())
.boxed();
let mut swarm =
SwarmBuilder::with_tokio_executor(tcp_transport, behaviour, local_peer_id).build(); the With the swarm initiated, my #[tokio::main]
async fn main() {
// ... configuring options
let (mut gossip_node, command_sender) =
network::p2p::gossip_node::GossipNode::new(node_options);
let mut bootstrap_addrs = Vec::new();
// this is from CLI input
if dial_peer_addr.is_some() {
let addr = Multiaddr::from_str(dial_peer_addr.unwrap().as_str());
bootstrap_addrs.push(addr.unwrap());
}
gossip_node.start(bootstrap_addrs).await;
} The With this, I start up two instances of this node - one with no bootstrap addr to connect to, and another with the address of the first one. I get these strange debug logs which show that both nodes successfully negotiate the Node One (Being connected TO) Debug Logs:
Node Two Debug Logs (Connecting to One):
P.S. Yes, I know mplex is deprecated. I am using it as this is an effort towards creating a Rust node of an existing project written using Any help would be appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Is any of your Lines 1606 to 1608 in 2c4c961 You should be able to see the entire error chain when you use a crate like |
Beta Was this translation helpful? Give feedback.
Hm interesting, i'm getting a Connection
NotAllowed
error.My custom behaviour has the
allow_block_list
allowed and blocked peers - and perhaps that's the cause of this. I assumed that theallowed_peers
list would help me explicitly mark peers as allowed regardless of their score thresholds - but perhaps the fact thatallowed_peers
is currently empty is what's causing this issue?