mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
update libp2p to 0.55 (#6889)
Updates libp2p to `0.55`. Will address the deprecations in a subsequent PR
This commit is contained in:
473
Cargo.lock
generated
473
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@ futures = { workspace = true }
|
|||||||
gossipsub = { workspace = true }
|
gossipsub = { workspace = true }
|
||||||
hex = { workspace = true }
|
hex = { workspace = true }
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
libp2p-mplex = "0.42"
|
libp2p-mplex = "0.43"
|
||||||
lighthouse_version = { workspace = true }
|
lighthouse_version = { workspace = true }
|
||||||
lru = { workspace = true }
|
lru = { workspace = true }
|
||||||
lru_cache = { workspace = true }
|
lru_cache = { workspace = true }
|
||||||
@@ -50,7 +50,7 @@ unused_port = { workspace = true }
|
|||||||
void = "1.0.2"
|
void = "1.0.2"
|
||||||
|
|
||||||
[dependencies.libp2p]
|
[dependencies.libp2p]
|
||||||
version = "0.54"
|
version = "0.55"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["identify", "yamux", "noise", "dns", "tcp", "tokio", "plaintext", "secp256k1", "macros", "ecdsa", "metrics", "quic", "upnp"]
|
features = ["identify", "yamux", "noise", "dns", "tcp", "tokio", "plaintext", "secp256k1", "macros", "ecdsa", "metrics", "quic", "upnp"]
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ futures-timer = "3.0.2"
|
|||||||
getrandom = "0.2.12"
|
getrandom = "0.2.12"
|
||||||
hashlink = { workspace = true }
|
hashlink = { workspace = true }
|
||||||
hex_fmt = "0.3.0"
|
hex_fmt = "0.3.0"
|
||||||
libp2p = { version = "0.54", default-features = false }
|
libp2p = { version = "0.55", default-features = false }
|
||||||
prometheus-client = "0.22.0"
|
prometheus-client = "0.22.0"
|
||||||
quick-protobuf = "0.8"
|
quick-protobuf = "0.8"
|
||||||
quick-protobuf-codec = "0.3"
|
quick-protobuf-codec = "0.3"
|
||||||
|
|||||||
@@ -194,7 +194,6 @@ impl EnabledHandler {
|
|||||||
&mut self,
|
&mut self,
|
||||||
FullyNegotiatedOutbound { protocol, .. }: FullyNegotiatedOutbound<
|
FullyNegotiatedOutbound { protocol, .. }: FullyNegotiatedOutbound<
|
||||||
<Handler as ConnectionHandler>::OutboundProtocol,
|
<Handler as ConnectionHandler>::OutboundProtocol,
|
||||||
<Handler as ConnectionHandler>::OutboundOpenInfo,
|
|
||||||
>,
|
>,
|
||||||
) {
|
) {
|
||||||
let (substream, peer_kind) = protocol;
|
let (substream, peer_kind) = protocol;
|
||||||
@@ -217,7 +216,7 @@ impl EnabledHandler {
|
|||||||
) -> Poll<
|
) -> Poll<
|
||||||
ConnectionHandlerEvent<
|
ConnectionHandlerEvent<
|
||||||
<Handler as ConnectionHandler>::OutboundProtocol,
|
<Handler as ConnectionHandler>::OutboundProtocol,
|
||||||
<Handler as ConnectionHandler>::OutboundOpenInfo,
|
(),
|
||||||
<Handler as ConnectionHandler>::ToBehaviour,
|
<Handler as ConnectionHandler>::ToBehaviour,
|
||||||
>,
|
>,
|
||||||
> {
|
> {
|
||||||
@@ -423,7 +422,7 @@ impl ConnectionHandler for Handler {
|
|||||||
type OutboundOpenInfo = ();
|
type OutboundOpenInfo = ();
|
||||||
type OutboundProtocol = ProtocolConfig;
|
type OutboundProtocol = ProtocolConfig;
|
||||||
|
|
||||||
fn listen_protocol(&self) -> SubstreamProtocol<Self::InboundProtocol, Self::InboundOpenInfo> {
|
fn listen_protocol(&self) -> SubstreamProtocol<Self::InboundProtocol, ()> {
|
||||||
match self {
|
match self {
|
||||||
Handler::Enabled(handler) => {
|
Handler::Enabled(handler) => {
|
||||||
SubstreamProtocol::new(either::Either::Left(handler.listen_protocol.clone()), ())
|
SubstreamProtocol::new(either::Either::Left(handler.listen_protocol.clone()), ())
|
||||||
@@ -458,9 +457,7 @@ impl ConnectionHandler for Handler {
|
|||||||
fn poll(
|
fn poll(
|
||||||
&mut self,
|
&mut self,
|
||||||
cx: &mut Context<'_>,
|
cx: &mut Context<'_>,
|
||||||
) -> Poll<
|
) -> Poll<ConnectionHandlerEvent<Self::OutboundProtocol, (), Self::ToBehaviour>> {
|
||||||
ConnectionHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::ToBehaviour>,
|
|
||||||
> {
|
|
||||||
match self {
|
match self {
|
||||||
Handler::Enabled(handler) => handler.poll(cx),
|
Handler::Enabled(handler) => handler.poll(cx),
|
||||||
Handler::Disabled(DisabledHandler::ProtocolUnsupported { peer_kind_sent }) => {
|
Handler::Disabled(DisabledHandler::ProtocolUnsupported { peer_kind_sent }) => {
|
||||||
@@ -479,12 +476,7 @@ impl ConnectionHandler for Handler {
|
|||||||
|
|
||||||
fn on_connection_event(
|
fn on_connection_event(
|
||||||
&mut self,
|
&mut self,
|
||||||
event: ConnectionEvent<
|
event: ConnectionEvent<Self::InboundProtocol, Self::OutboundProtocol>,
|
||||||
Self::InboundProtocol,
|
|
||||||
Self::OutboundProtocol,
|
|
||||||
Self::InboundOpenInfo,
|
|
||||||
Self::OutboundOpenInfo,
|
|
||||||
>,
|
|
||||||
) {
|
) {
|
||||||
match self {
|
match self {
|
||||||
Handler::Enabled(handler) => {
|
Handler::Enabled(handler) => {
|
||||||
@@ -521,7 +513,7 @@ impl ConnectionHandler for Handler {
|
|||||||
}) => match protocol {
|
}) => match protocol {
|
||||||
Either::Left(protocol) => handler.on_fully_negotiated_inbound(protocol),
|
Either::Left(protocol) => handler.on_fully_negotiated_inbound(protocol),
|
||||||
#[allow(unreachable_patterns)]
|
#[allow(unreachable_patterns)]
|
||||||
Either::Right(v) => void::unreachable(v),
|
Either::Right(v) => libp2p::core::util::unreachable(v),
|
||||||
},
|
},
|
||||||
ConnectionEvent::FullyNegotiatedOutbound(fully_negotiated_outbound) => {
|
ConnectionEvent::FullyNegotiatedOutbound(fully_negotiated_outbound) => {
|
||||||
handler.on_fully_negotiated_outbound(fully_negotiated_outbound)
|
handler.on_fully_negotiated_outbound(fully_negotiated_outbound)
|
||||||
|
|||||||
@@ -994,7 +994,7 @@ impl<E: EthSpec> NetworkBehaviour for Discovery<E> {
|
|||||||
&mut self,
|
&mut self,
|
||||||
_peer_id: PeerId,
|
_peer_id: PeerId,
|
||||||
_connection_id: ConnectionId,
|
_connection_id: ConnectionId,
|
||||||
_event: void::Void,
|
_event: std::convert::Infallible,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,10 @@ impl<E: EthSpec> NetworkBehaviour for PeerManager<E> {
|
|||||||
// no events from the dummy handler
|
// no events from the dummy handler
|
||||||
}
|
}
|
||||||
|
|
||||||
fn poll(&mut self, cx: &mut Context<'_>) -> Poll<ToSwarm<Self::ToSwarm, void::Void>> {
|
fn poll(
|
||||||
|
&mut self,
|
||||||
|
cx: &mut Context<'_>,
|
||||||
|
) -> Poll<ToSwarm<Self::ToSwarm, std::convert::Infallible>> {
|
||||||
// perform the heartbeat when necessary
|
// perform the heartbeat when necessary
|
||||||
while self.heartbeat.poll_tick(cx).is_ready() {
|
while self.heartbeat.poll_tick(cx).is_ready() {
|
||||||
self.heartbeat();
|
self.heartbeat();
|
||||||
|
|||||||
@@ -353,6 +353,7 @@ where
|
|||||||
!matches!(self.state, HandlerState::Deactivated)
|
!matches!(self.state, HandlerState::Deactivated)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(deprecated)]
|
||||||
fn poll(
|
fn poll(
|
||||||
&mut self,
|
&mut self,
|
||||||
cx: &mut Context<'_>,
|
cx: &mut Context<'_>,
|
||||||
@@ -814,6 +815,7 @@ where
|
|||||||
Poll::Pending
|
Poll::Pending
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(deprecated)]
|
||||||
fn on_connection_event(
|
fn on_connection_event(
|
||||||
&mut self,
|
&mut self,
|
||||||
event: ConnectionEvent<
|
event: ConnectionEvent<
|
||||||
|
|||||||
@@ -1846,7 +1846,7 @@ impl<E: EthSpec> Network<E> {
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
#[allow(unreachable_patterns)]
|
#[allow(unreachable_patterns)]
|
||||||
BehaviourEvent::ConnectionLimits(le) => void::unreachable(le),
|
BehaviourEvent::ConnectionLimits(le) => libp2p::core::util::unreachable(le),
|
||||||
},
|
},
|
||||||
SwarmEvent::ConnectionEstablished { .. } => None,
|
SwarmEvent::ConnectionEstablished { .. } => None,
|
||||||
SwarmEvent::ConnectionClosed { .. } => None,
|
SwarmEvent::ConnectionClosed { .. } => None,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ execution_layer = { workspace = true }
|
|||||||
fnv = { workspace = true }
|
fnv = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
hex = { workspace = true }
|
hex = { workspace = true }
|
||||||
igd-next = "0.14"
|
igd-next = { version = "0.16", features = ["aio_tokio"] }
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
lighthouse_network = { workspace = true }
|
lighthouse_network = { workspace = true }
|
||||||
logging = { workspace = true }
|
logging = { workspace = true }
|
||||||
|
|||||||
Reference in New Issue
Block a user