mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Remove peer sampling code (#7768)
Peer sampling has been completely removed from the spec. This PR removes our partial implementation from the codebase. https://github.com/ethereum/consensus-specs/pull/4393
This commit is contained in:
@@ -17,9 +17,6 @@ use strum::IntoEnumIterator;
|
||||
use types::DataColumnSubnetId;
|
||||
use types::EthSpec;
|
||||
|
||||
pub const SUCCESS: &str = "SUCCESS";
|
||||
pub const FAILURE: &str = "FAILURE";
|
||||
|
||||
#[derive(Debug, AsRefStr)]
|
||||
pub(crate) enum BlockSource {
|
||||
Gossip,
|
||||
@@ -611,31 +608,6 @@ pub static BEACON_PROCESSOR_REPROCESSING_QUEUE_SENT_OPTIMISTIC_UPDATES: LazyLock
|
||||
)
|
||||
});
|
||||
|
||||
/*
|
||||
* Sampling
|
||||
*/
|
||||
pub static SAMPLE_DOWNLOAD_RESULT: LazyLock<Result<IntCounterVec>> = LazyLock::new(|| {
|
||||
try_create_int_counter_vec(
|
||||
"beacon_sampling_sample_verify_result_total",
|
||||
"Total count of individual sample download results",
|
||||
&["result"],
|
||||
)
|
||||
});
|
||||
pub static SAMPLE_VERIFY_RESULT: LazyLock<Result<IntCounterVec>> = LazyLock::new(|| {
|
||||
try_create_int_counter_vec(
|
||||
"beacon_sampling_sample_verify_result_total",
|
||||
"Total count of individual sample verify results",
|
||||
&["result"],
|
||||
)
|
||||
});
|
||||
pub static SAMPLING_REQUEST_RESULT: LazyLock<Result<IntCounterVec>> = LazyLock::new(|| {
|
||||
try_create_int_counter_vec(
|
||||
"beacon_sampling_request_result_total",
|
||||
"Total count of sample request results",
|
||||
&["result"],
|
||||
)
|
||||
});
|
||||
|
||||
pub fn register_finality_update_error(error: &LightClientFinalityUpdateError) {
|
||||
inc_counter_vec(&GOSSIP_FINALITY_UPDATE_ERRORS_PER_TYPE, &[error.as_ref()]);
|
||||
}
|
||||
@@ -683,13 +655,6 @@ pub(crate) fn register_process_result_metrics(
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_result<T, E>(result: &std::result::Result<T, E>) -> &str {
|
||||
match result {
|
||||
Ok(_) => SUCCESS,
|
||||
Err(_) => FAILURE,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_gossip_metrics<E: EthSpec>(
|
||||
gossipsub: &Gossipsub,
|
||||
network_globals: &Arc<NetworkGlobals<E>>,
|
||||
|
||||
Reference in New Issue
Block a user