mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
upgrade libp2p to v0.53.* (#4935)
* update libp2p and address compiler errors * remove bandwidth logging from transport * use libp2p registry * make clippy happy * use rust 1.73 * correct rpc keep alive * remove comments and obsolte code * remove libp2p prefix * make clippy happy * use quic under facade * remove fast msg id * bubble up close statements * fix wrong comment
This commit is contained in:
@@ -7,8 +7,8 @@ use beacon_chain::{
|
||||
use fnv::FnvHashMap;
|
||||
pub use lighthouse_metrics::*;
|
||||
use lighthouse_network::{
|
||||
metrics::AggregatedBandwidthSinks, peer_manager::peerdb::client::ClientKind, types::GossipKind,
|
||||
GossipTopic, Gossipsub, NetworkGlobals,
|
||||
peer_manager::peerdb::client::ClientKind, types::GossipKind, GossipTopic, Gossipsub,
|
||||
NetworkGlobals,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
use strum::IntoEnumIterator;
|
||||
@@ -223,12 +223,6 @@ lazy_static! {
|
||||
|
||||
lazy_static! {
|
||||
|
||||
/*
|
||||
* Bandwidth metrics
|
||||
*/
|
||||
pub static ref LIBP2P_BYTES: Result<IntCounterVec> =
|
||||
try_create_int_counter_vec("libp2p_inbound_bytes", "The bandwidth over libp2p", &["direction", "transport"]);
|
||||
|
||||
/*
|
||||
* Sync related metrics
|
||||
*/
|
||||
@@ -327,25 +321,6 @@ lazy_static! {
|
||||
);
|
||||
}
|
||||
|
||||
pub fn update_bandwidth_metrics(bandwidth: &AggregatedBandwidthSinks) {
|
||||
if let Some(tcp_in_bandwidth) = get_int_counter(&LIBP2P_BYTES, &["inbound", "tcp"]) {
|
||||
tcp_in_bandwidth.reset();
|
||||
tcp_in_bandwidth.inc_by(bandwidth.total_tcp_inbound());
|
||||
}
|
||||
if let Some(tcp_out_bandwidth) = get_int_counter(&LIBP2P_BYTES, &["outbound", "tcp"]) {
|
||||
tcp_out_bandwidth.reset();
|
||||
tcp_out_bandwidth.inc_by(bandwidth.total_tcp_outbound());
|
||||
}
|
||||
if let Some(quic_in_bandwidth) = get_int_counter(&LIBP2P_BYTES, &["inbound", "quic"]) {
|
||||
quic_in_bandwidth.reset();
|
||||
quic_in_bandwidth.inc_by(bandwidth.total_quic_inbound());
|
||||
}
|
||||
if let Some(quic_out_bandwidth) = get_int_counter(&LIBP2P_BYTES, &["outbound", "quic"]) {
|
||||
quic_out_bandwidth.reset();
|
||||
quic_out_bandwidth.inc_by(bandwidth.total_quic_outbound());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn register_finality_update_error(error: &LightClientFinalityUpdateError) {
|
||||
inc_counter_vec(&GOSSIP_FINALITY_UPDATE_ERRORS_PER_TYPE, &[error.as_ref()]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user