mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +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:
@@ -20,7 +20,7 @@ futures = { workspace = true }
|
||||
gossipsub = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
libp2p-mplex = "0.42"
|
||||
libp2p-mplex = "0.43"
|
||||
lighthouse_version = { workspace = true }
|
||||
lru = { workspace = true }
|
||||
lru_cache = { workspace = true }
|
||||
@@ -50,7 +50,7 @@ unused_port = { workspace = true }
|
||||
void = "1.0.2"
|
||||
|
||||
[dependencies.libp2p]
|
||||
version = "0.54"
|
||||
version = "0.55"
|
||||
default-features = false
|
||||
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"
|
||||
hashlink = { workspace = true }
|
||||
hex_fmt = "0.3.0"
|
||||
libp2p = { version = "0.54", default-features = false }
|
||||
libp2p = { version = "0.55", default-features = false }
|
||||
prometheus-client = "0.22.0"
|
||||
quick-protobuf = "0.8"
|
||||
quick-protobuf-codec = "0.3"
|
||||
|
||||
@@ -194,7 +194,6 @@ impl EnabledHandler {
|
||||
&mut self,
|
||||
FullyNegotiatedOutbound { protocol, .. }: FullyNegotiatedOutbound<
|
||||
<Handler as ConnectionHandler>::OutboundProtocol,
|
||||
<Handler as ConnectionHandler>::OutboundOpenInfo,
|
||||
>,
|
||||
) {
|
||||
let (substream, peer_kind) = protocol;
|
||||
@@ -217,7 +216,7 @@ impl EnabledHandler {
|
||||
) -> Poll<
|
||||
ConnectionHandlerEvent<
|
||||
<Handler as ConnectionHandler>::OutboundProtocol,
|
||||
<Handler as ConnectionHandler>::OutboundOpenInfo,
|
||||
(),
|
||||
<Handler as ConnectionHandler>::ToBehaviour,
|
||||
>,
|
||||
> {
|
||||
@@ -423,7 +422,7 @@ impl ConnectionHandler for Handler {
|
||||
type OutboundOpenInfo = ();
|
||||
type OutboundProtocol = ProtocolConfig;
|
||||
|
||||
fn listen_protocol(&self) -> SubstreamProtocol<Self::InboundProtocol, Self::InboundOpenInfo> {
|
||||
fn listen_protocol(&self) -> SubstreamProtocol<Self::InboundProtocol, ()> {
|
||||
match self {
|
||||
Handler::Enabled(handler) => {
|
||||
SubstreamProtocol::new(either::Either::Left(handler.listen_protocol.clone()), ())
|
||||
@@ -458,9 +457,7 @@ impl ConnectionHandler for Handler {
|
||||
fn poll(
|
||||
&mut self,
|
||||
cx: &mut Context<'_>,
|
||||
) -> Poll<
|
||||
ConnectionHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::ToBehaviour>,
|
||||
> {
|
||||
) -> Poll<ConnectionHandlerEvent<Self::OutboundProtocol, (), Self::ToBehaviour>> {
|
||||
match self {
|
||||
Handler::Enabled(handler) => handler.poll(cx),
|
||||
Handler::Disabled(DisabledHandler::ProtocolUnsupported { peer_kind_sent }) => {
|
||||
@@ -479,12 +476,7 @@ impl ConnectionHandler for Handler {
|
||||
|
||||
fn on_connection_event(
|
||||
&mut self,
|
||||
event: ConnectionEvent<
|
||||
Self::InboundProtocol,
|
||||
Self::OutboundProtocol,
|
||||
Self::InboundOpenInfo,
|
||||
Self::OutboundOpenInfo,
|
||||
>,
|
||||
event: ConnectionEvent<Self::InboundProtocol, Self::OutboundProtocol>,
|
||||
) {
|
||||
match self {
|
||||
Handler::Enabled(handler) => {
|
||||
@@ -521,7 +513,7 @@ impl ConnectionHandler for Handler {
|
||||
}) => match protocol {
|
||||
Either::Left(protocol) => handler.on_fully_negotiated_inbound(protocol),
|
||||
#[allow(unreachable_patterns)]
|
||||
Either::Right(v) => void::unreachable(v),
|
||||
Either::Right(v) => libp2p::core::util::unreachable(v),
|
||||
},
|
||||
ConnectionEvent::FullyNegotiatedOutbound(fully_negotiated_outbound) => {
|
||||
handler.on_fully_negotiated_outbound(fully_negotiated_outbound)
|
||||
|
||||
@@ -994,7 +994,7 @@ impl<E: EthSpec> NetworkBehaviour for Discovery<E> {
|
||||
&mut self,
|
||||
_peer_id: PeerId,
|
||||
_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
|
||||
}
|
||||
|
||||
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
|
||||
while self.heartbeat.poll_tick(cx).is_ready() {
|
||||
self.heartbeat();
|
||||
|
||||
@@ -353,6 +353,7 @@ where
|
||||
!matches!(self.state, HandlerState::Deactivated)
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn poll(
|
||||
&mut self,
|
||||
cx: &mut Context<'_>,
|
||||
@@ -814,6 +815,7 @@ where
|
||||
Poll::Pending
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn on_connection_event(
|
||||
&mut self,
|
||||
event: ConnectionEvent<
|
||||
|
||||
@@ -1846,7 +1846,7 @@ impl<E: EthSpec> Network<E> {
|
||||
None
|
||||
}
|
||||
#[allow(unreachable_patterns)]
|
||||
BehaviourEvent::ConnectionLimits(le) => void::unreachable(le),
|
||||
BehaviourEvent::ConnectionLimits(le) => libp2p::core::util::unreachable(le),
|
||||
},
|
||||
SwarmEvent::ConnectionEstablished { .. } => None,
|
||||
SwarmEvent::ConnectionClosed { .. } => None,
|
||||
|
||||
@@ -31,7 +31,7 @@ execution_layer = { workspace = true }
|
||||
fnv = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
igd-next = "0.14"
|
||||
igd-next = { version = "0.16", features = ["aio_tokio"] }
|
||||
itertools = { workspace = true }
|
||||
lighthouse_network = { workspace = true }
|
||||
logging = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user