From d2e89cad2da6a847b438f10df9c03d81a4a86cce Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 11:37:28 +0200 Subject: [PATCH 01/27] feat: add tracing crates --- Cargo.lock | 117 ++++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 2 + grandine/Cargo.toml | 1 + grandine/src/main.rs | 5 +- logging/Cargo.toml | 3 ++ logging/src/lib.rs | 23 +++++++++ 6 files changed, 142 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2f74cc6f..b41e5503 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1018,7 +1018,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", - "regex-automata", + "regex-automata 0.4.7", "serde", ] @@ -3077,6 +3077,7 @@ dependencies = [ "thiserror", "tokio", "tower-http", + "tracing", "types", "validator", "validator_key_cache", @@ -4371,7 +4372,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax", + "regex-syntax 0.8.4", "string_cache", "term", "tiny-keccak", @@ -4385,7 +4386,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata", + "regex-automata 0.4.7", ] [[package]] @@ -5024,6 +5025,9 @@ name = "logging" version = "0.0.0" dependencies = [ "derive_more", + "tracing", + "tracing-appender", + "tracing-subscriber", ] [[package]] @@ -5059,6 +5063,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matchit" version = "0.7.3" @@ -5348,6 +5361,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -5566,6 +5589,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "p256" version = "0.13.2" @@ -5730,7 +5759,7 @@ checksum = "914a1c2265c98e2446911282c6ac86d8524f495792c38c5bd884f80499c7538a" dependencies = [ "parse-display-derive", "regex", - "regex-syntax", + "regex-syntax 0.8.4", ] [[package]] @@ -5742,7 +5771,7 @@ dependencies = [ "proc-macro2 1.0.86", "quote 1.0.36", "regex", - "regex-syntax", + "regex-syntax 0.8.4", "structmeta", "syn 2.0.68", ] @@ -6493,8 +6522,17 @@ checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -6505,9 +6543,15 @@ checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.4", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.8.4" @@ -7229,6 +7273,15 @@ dependencies = [ "keccak", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shlex" version = "1.3.0" @@ -8213,6 +8266,18 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + [[package]] name = "tracing-attributes" version = "0.1.27" @@ -8231,6 +8296,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", ] [[package]] @@ -8568,6 +8663,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "value-bag" version = "1.9.0" diff --git a/Cargo.toml b/Cargo.toml index d17c38d1..658b142c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -414,6 +414,8 @@ tokio-util = { version = '0.7', features = ['codec', 'compat', 'time'] } tower = { version = '0.4.13', features = ['timeout'] } tower-http = { version = '0.5.2', features = ['cors', 'trace'] } tracing = '0.1.40' +tracing-appender = "0.2.3" +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } triomphe = '0.1.13' tynm = '0.1.10' typenum = '1.17.0' diff --git a/grandine/Cargo.toml b/grandine/Cargo.toml index e5cde9ae..2b5d3fa9 100644 --- a/grandine/Cargo.toml +++ b/grandine/Cargo.toml @@ -59,6 +59,7 @@ tap = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } tower-http = { workspace = true } +tracing = {workspace = true} types = { workspace = true } validator = { workspace = true } validator_key_cache = { workspace = true } diff --git a/grandine/src/main.rs b/grandine/src/main.rs index aa6e2d75..f12f7a4f 100644 --- a/grandine/src/main.rs +++ b/grandine/src/main.rs @@ -5,7 +5,8 @@ use std::{ process::ExitCode, sync::Arc, }; - +use logging::setup_tracing; +use tracing::{info as tracing_info}; use allocator as _; use anyhow::{bail, ensure, Context as _, Result}; use builder_api::BuilderConfig; @@ -308,6 +309,8 @@ enum Error { } fn main() -> ExitCode { + let _guard = setup_tracing(); + tracing_info!("This is an info message."); if let Err(error) = try_main() { error.downcast_ref().map(ClapError::exit); error!("{error:?}"); diff --git a/logging/Cargo.toml b/logging/Cargo.toml index 52c5fdfa..50dd4b5d 100644 --- a/logging/Cargo.toml +++ b/logging/Cargo.toml @@ -8,3 +8,6 @@ workspace = true [dependencies] derive_more = { workspace = true } +tracing = { workspace = true } +tracing-subscriber = { workspace = true } +tracing-appender = { workspace = true } diff --git a/logging/src/lib.rs b/logging/src/lib.rs index 662ae421..c7d21820 100644 --- a/logging/src/lib.rs +++ b/logging/src/lib.rs @@ -1,6 +1,10 @@ use core::sync::atomic::{AtomicUsize, Ordering}; use derive_more::Display; +use tracing::info; +use tracing_appender::non_blocking::NonBlocking; +use tracing_appender::rolling::{RollingFileAppender, Rotation}; +use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; pub static PEER_LOG_METRICS: PeerLogMetrics = PeerLogMetrics::new(0); @@ -30,3 +34,22 @@ impl PeerLogMetrics { .store(target_peer_count, Ordering::Relaxed) } } + +pub fn setup_tracing() -> impl Drop { + let log_path = "logs/testing.log"; + let log_appender = RollingFileAppender::new(Rotation::DAILY, "", log_path); + let (log_non_blocking, guard) = NonBlocking::new(log_appender); + + let env_filter = EnvFilter::try_from_default_env() + .or_else(|_| EnvFilter::try_new("info")) + .expect("Failed to create EnvFilter"); + + tracing_subscriber::registry() + .with(env_filter) + .with(fmt::layer().with_writer(log_non_blocking).with_ansi(false)) + .try_init() + .expect("Failed to initialize tracing subscriber"); + info!("This is a message from lib.rs."); + println!("Tracing initialized successfully."); + guard +} From 66d053aa38f64673dca554eb830ec217025fba68 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 11:56:00 +0200 Subject: [PATCH 02/27] feat: replace `log` with `tracing` crate in grandine/src/main.rs --- grandine/src/main.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/grandine/src/main.rs b/grandine/src/main.rs index f12f7a4f..c637b35b 100644 --- a/grandine/src/main.rs +++ b/grandine/src/main.rs @@ -5,8 +5,7 @@ use std::{ process::ExitCode, sync::Arc, }; -use logging::setup_tracing; -use tracing::{info as tracing_info}; + use allocator as _; use anyhow::{bail, ensure, Context as _, Result}; use builder_api::BuilderConfig; @@ -20,8 +19,7 @@ use fork_choice_store::StoreConfig; use genesis::AnchorCheckpointProvider; use grandine_version::APPLICATION_VERSION_WITH_PLATFORM; use http_api::HttpApiConfig; -use log::{error, info, warn}; -use logging::PEER_LOG_METRICS; +use logging::{PEER_LOG_METRICS, setup_tracing}; use metrics::MetricsServerConfig; use p2p::{ListenAddr, NetworkConfig}; use reqwest::{Client, ClientBuilder, Url}; @@ -33,6 +31,7 @@ use ssz::SszRead as _; use std_ext::ArcExt as _; use thiserror::Error; use tokio::runtime::Builder; +use tracing::{error, info, warn}; use types::{ config::Config as ChainConfig, phase0::primitives::{ExecutionBlockNumber, Slot}, @@ -310,7 +309,7 @@ enum Error { fn main() -> ExitCode { let _guard = setup_tracing(); - tracing_info!("This is an info message."); + info!("Gradine firing up..."); if let Err(error) = try_main() { error.downcast_ref().map(ClapError::exit); error!("{error:?}"); From 558b6aee244d26fec3055ca13a01898b98d616d3 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 12:14:01 +0200 Subject: [PATCH 03/27] feat: improve tracing setup and add stdout writer --- logging/src/lib.rs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/logging/src/lib.rs b/logging/src/lib.rs index c7d21820..fc8fd047 100644 --- a/logging/src/lib.rs +++ b/logging/src/lib.rs @@ -38,18 +38,24 @@ impl PeerLogMetrics { pub fn setup_tracing() -> impl Drop { let log_path = "logs/testing.log"; let log_appender = RollingFileAppender::new(Rotation::DAILY, "", log_path); - let (log_non_blocking, guard) = NonBlocking::new(log_appender); + let (file_non_blocking, file_guard) = NonBlocking::new(log_appender); + + let stdout_layer = fmt::layer().with_writer(std::io::stdout).with_ansi(true); + + let file_layer = fmt::layer().with_writer(file_non_blocking).with_ansi(false); let env_filter = EnvFilter::try_from_default_env() .or_else(|_| EnvFilter::try_new("info")) .expect("Failed to create EnvFilter"); - tracing_subscriber::registry() + let subscriber = tracing_subscriber::registry() .with(env_filter) - .with(fmt::layer().with_writer(log_non_blocking).with_ansi(false)) - .try_init() + .with(stdout_layer) + .with(file_layer); + + tracing::subscriber::set_global_default(subscriber) .expect("Failed to initialize tracing subscriber"); - info!("This is a message from lib.rs."); - println!("Tracing initialized successfully."); - guard + + info!("Tracing initialized successfully."); + file_guard } From b14b17b8fff8e20b52fd61c522caf601893aa7ff Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 12:49:51 +0200 Subject: [PATCH 04/27] feat: replace all log with tracing in grandine module --- grandine/src/grandine_args.rs | 2 +- grandine/src/grandine_config.rs | 8 ++++---- grandine/src/predefined_network.rs | 2 +- grandine/src/validators.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/grandine/src/grandine_args.rs b/grandine/src/grandine_args.rs index fe8b00b4..bc1300a9 100644 --- a/grandine/src/grandine_args.rs +++ b/grandine/src/grandine_args.rs @@ -30,7 +30,7 @@ use fork_choice_store::{StoreConfig, DEFAULT_CACHE_LOCK_TIMEOUT_MILLIS}; use grandine_version::{APPLICATION_NAME, APPLICATION_NAME_AND_VERSION, APPLICATION_VERSION}; use http_api::HttpApiConfig; use itertools::{EitherOrBoth, Itertools as _}; -use log::warn; +use tracing::warn; use metrics::{MetricsServerConfig, MetricsServiceConfig}; use p2p::{Enr, Multiaddr, NetworkConfig}; use prometheus_metrics::{Metrics, METRICS}; diff --git a/grandine/src/grandine_config.rs b/grandine/src/grandine_config.rs index 0f257764..968587eb 100644 --- a/grandine/src/grandine_config.rs +++ b/grandine/src/grandine_config.rs @@ -6,11 +6,11 @@ use eth1_api::AuthOptions; use features::Feature; use http_api::HttpApiConfig; use itertools::Itertools as _; -use log::info; use p2p::NetworkConfig; use reqwest::Url; use runtime::{MetricsConfig, StorageConfig}; use signer::Web3SignerConfig; +use tracing::info; use types::{ config::Config as ChainConfig, phase0::primitives::{ExecutionAddress, ExecutionBlockNumber, Slot, H256}, @@ -110,7 +110,7 @@ impl GrandineConfig { storage_config.eth1_db_size.to_string_as(true), ); - info!("Eth1 RPC URLs: [{}]", eth1_rpc_urls.iter().format(", ")); + info!("Eth1 RPC URLs: {:?}", eth1_rpc_urls); info!("graffiti: {graffiti:?}"); info!("HTTP API address: {}", http_api_config.address); @@ -151,8 +151,8 @@ impl GrandineConfig { if !web3signer_config.urls.is_empty() { info!( - "using Web3Signer API to sign validator messages (API URLs: [{}])", - web3signer_config.urls.iter().format(", "), + "using Web3Signer API to sign validator messages (API URLs: {:?})", + web3signer_config.urls, ); } diff --git a/grandine/src/predefined_network.rs b/grandine/src/predefined_network.rs index d1e62e05..8595434e 100644 --- a/grandine/src/predefined_network.rs +++ b/grandine/src/predefined_network.rs @@ -5,7 +5,7 @@ use anyhow::{bail, Context as _, Result}; use deposit_tree::DepositTree; use fork_choice_control::checkpoint_sync; use genesis::AnchorCheckpointProvider; -use log::info; +use tracing::info; use p2p::{Enr, NetworkConfig}; use reqwest::{Client, Url}; use ssz::SszRead as _; diff --git a/grandine/src/validators.rs b/grandine/src/validators.rs index 54fcffe1..bae4bde7 100644 --- a/grandine/src/validators.rs +++ b/grandine/src/validators.rs @@ -3,7 +3,7 @@ use std::{collections::HashMap, path::PathBuf, sync::Arc}; use anyhow::{Error, Result}; use bls::{PublicKeyBytes, SecretKey}; use eip_2335::Keystore; -use log::{info, warn}; +use tracing::{info, warn}; use rayon::iter::{IntoParallelIterator as _, ParallelIterator as _}; use signer::KeyOrigin; use std_ext::ArcExt; From 9596fa0ce8f932489c5372f3b540a1100d8dcc3b Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 12:50:43 +0200 Subject: [PATCH 05/27] chore: cleanup unused imports --- Cargo.lock | 1 - grandine/Cargo.toml | 1 - grandine/src/grandine_config.rs | 1 - grandine/src/main.rs | 4 ++-- logging/src/lib.rs | 2 +- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b41e5503..912bcc8a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3052,7 +3052,6 @@ dependencies = [ "http_api", "itertools 0.13.0", "keymanager", - "log", "logging", "metrics", "p2p", diff --git a/grandine/Cargo.toml b/grandine/Cargo.toml index 2b5d3fa9..7b187d38 100644 --- a/grandine/Cargo.toml +++ b/grandine/Cargo.toml @@ -36,7 +36,6 @@ hex-literal = { workspace = true } http_api = { workspace = true } itertools = { workspace = true } keymanager = { workspace = true } -log = { workspace = true } logging = { workspace = true } metrics = { workspace = true } p2p = { workspace = true } diff --git a/grandine/src/grandine_config.rs b/grandine/src/grandine_config.rs index 968587eb..32139021 100644 --- a/grandine/src/grandine_config.rs +++ b/grandine/src/grandine_config.rs @@ -5,7 +5,6 @@ use builder_api::BuilderConfig; use eth1_api::AuthOptions; use features::Feature; use http_api::HttpApiConfig; -use itertools::Itertools as _; use p2p::NetworkConfig; use reqwest::Url; use runtime::{MetricsConfig, StorageConfig}; diff --git a/grandine/src/main.rs b/grandine/src/main.rs index c637b35b..95035f3f 100644 --- a/grandine/src/main.rs +++ b/grandine/src/main.rs @@ -19,7 +19,7 @@ use fork_choice_store::StoreConfig; use genesis::AnchorCheckpointProvider; use grandine_version::APPLICATION_VERSION_WITH_PLATFORM; use http_api::HttpApiConfig; -use logging::{PEER_LOG_METRICS, setup_tracing}; +use logging::{setup_tracing, PEER_LOG_METRICS}; use metrics::MetricsServerConfig; use p2p::{ListenAddr, NetworkConfig}; use reqwest::{Client, ClientBuilder, Url}; @@ -309,7 +309,7 @@ enum Error { fn main() -> ExitCode { let _guard = setup_tracing(); - info!("Gradine firing up..."); + info!("Grandine firing up..."); if let Err(error) = try_main() { error.downcast_ref().map(ClapError::exit); error!("{error:?}"); diff --git a/logging/src/lib.rs b/logging/src/lib.rs index fc8fd047..fb95544f 100644 --- a/logging/src/lib.rs +++ b/logging/src/lib.rs @@ -4,7 +4,7 @@ use derive_more::Display; use tracing::info; use tracing_appender::non_blocking::NonBlocking; use tracing_appender::rolling::{RollingFileAppender, Rotation}; -use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; +use tracing_subscriber::{fmt, layer::SubscriberExt, EnvFilter}; pub static PEER_LOG_METRICS: PeerLogMetrics = PeerLogMetrics::new(0); From eff1618604bc68457d75622ab433b86f960e8d0c Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 16:15:19 +0200 Subject: [PATCH 06/27] feat: replace all log with tracing in attestation_verifier module --- Cargo.lock | 2 +- attestation_verifier/Cargo.toml | 2 +- attestation_verifier/src/attestation_verifier.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 912bcc8a..79c7425c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -565,10 +565,10 @@ dependencies = [ "futures", "helper_functions", "itertools 0.13.0", - "log", "prometheus_metrics", "rayon", "std_ext", + "tracing", "types", ] diff --git a/attestation_verifier/Cargo.toml b/attestation_verifier/Cargo.toml index 79399df9..52fb54e3 100644 --- a/attestation_verifier/Cargo.toml +++ b/attestation_verifier/Cargo.toml @@ -17,8 +17,8 @@ fork_choice_store = { workspace = true } futures = { workspace = true } helper_functions = { workspace = true } itertools = { workspace = true } -log = { workspace = true } prometheus_metrics = { workspace = true } rayon = { workspace = true } std_ext = { workspace = true } +tracing = {workspace = true } types = { workspace = true } diff --git a/attestation_verifier/src/attestation_verifier.rs b/attestation_verifier/src/attestation_verifier.rs index dd21abb7..f6c90fa9 100644 --- a/attestation_verifier/src/attestation_verifier.rs +++ b/attestation_verifier/src/attestation_verifier.rs @@ -22,7 +22,7 @@ use helper_functions::{ verifier::{MultiVerifier, Triple, Verifier}, }; use itertools::Either; -use log::{debug, warn}; +use tracing::{debug, warn}; use prometheus_metrics::Metrics; use rayon::iter::{IntoParallelIterator as _, ParallelBridge as _, ParallelIterator as _}; use std_ext::ArcExt as _; From 6e387dd3b4a4b6c9a7308f046a594792d94cce07 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 16:20:06 +0200 Subject: [PATCH 07/27] feat: replace all log with tracing in ad_hoc_bench module --- Cargo.lock | 2 +- ad_hoc_bench/Cargo.toml | 2 +- ad_hoc_bench/src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 79c7425c..9504fedb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,8 +16,8 @@ dependencies = [ "fork_choice_store", "futures", "jemalloc-ctl", - "log", "rand", + "tracing", "types", ] diff --git a/ad_hoc_bench/Cargo.toml b/ad_hoc_bench/Cargo.toml index f5ea5c3b..d583e9d7 100644 --- a/ad_hoc_bench/Cargo.toml +++ b/ad_hoc_bench/Cargo.toml @@ -17,6 +17,6 @@ fork_choice_control = { workspace = true } fork_choice_store = { workspace = true } futures = { workspace = true } jemalloc-ctl = { workspace = true } -log = { workspace = true } rand = { workspace = true } +tracing = { workspace = true } types = { workspace = true } diff --git a/ad_hoc_bench/src/main.rs b/ad_hoc_bench/src/main.rs index 3254d347..1dd38310 100644 --- a/ad_hoc_bench/src/main.rs +++ b/ad_hoc_bench/src/main.rs @@ -9,7 +9,7 @@ use eth2_cache_utils::{goerli, holesky, holesky_devnet, mainnet, medalla, withdr use fork_choice_control::AdHocBenchController; use fork_choice_store::StoreConfig; use jemalloc_ctl::Result as JemallocResult; -use log::info; +use tracing::info; use rand::seq::SliceRandom as _; use types::{ combined::{BeaconState, SignedBeaconBlock}, From 1292575b6780794a346a592788fd0e7ed2333ddb Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 16:24:49 +0200 Subject: [PATCH 08/27] feat: replace all log with tracing in block_producer module --- Cargo.lock | 2 +- block_producer/Cargo.toml | 2 +- block_producer/src/block_producer.rs | 2 +- block_producer/src/eth1_storage.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9504fedb..671381be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -935,7 +935,6 @@ dependencies = [ "interop", "itertools 0.13.0", "keymanager", - "log", "nonzero_ext", "operation_pools", "prometheus_metrics", @@ -946,6 +945,7 @@ dependencies = [ "tap", "thiserror", "tokio", + "tracing", "transition_functions", "try_from_iterator", "tynm", diff --git a/block_producer/Cargo.toml b/block_producer/Cargo.toml index 26d169e1..97903119 100644 --- a/block_producer/Cargo.toml +++ b/block_producer/Cargo.toml @@ -25,7 +25,6 @@ futures = { workspace = true } helper_functions = { workspace = true } itertools = { workspace = true } keymanager = { workspace = true } -log = { workspace = true } nonzero_ext = { workspace = true } operation_pools = { workspace = true } prometheus_metrics = { workspace = true } @@ -36,6 +35,7 @@ std_ext = { workspace = true } tap = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } +tracing = { workspace = true } transition_functions = { workspace = true } try_from_iterator = { workspace = true } tynm = { workspace = true } diff --git a/block_producer/src/block_producer.rs b/block_producer/src/block_producer.rs index 83caf5cc..50ad8055 100644 --- a/block_producer/src/block_producer.rs +++ b/block_producer/src/block_producer.rs @@ -23,7 +23,7 @@ use futures::{ use helper_functions::{accessors, misc, predicates}; use itertools::{Either, Itertools as _}; use keymanager::ProposerConfigs; -use log::{error, info, warn}; +use tracing::{error, info, warn}; use nonzero_ext::nonzero; use operation_pools::{ AttestationAggPool, BlsToExecutionChangePool, PoolAdditionOutcome, PoolRejectionReason, diff --git a/block_producer/src/eth1_storage.rs b/block_producer/src/eth1_storage.rs index e1f1ec1b..8517e767 100644 --- a/block_producer/src/eth1_storage.rs +++ b/block_producer/src/eth1_storage.rs @@ -13,7 +13,7 @@ use deposit_tree::DepositTree; use eth1::{DepositEvent, Eth1Block, Eth1Chain}; use helper_functions::misc::compute_timestamp_at_slot; use itertools::Itertools as _; -use log::{error, warn}; +use tracing::{error, warn}; use prometheus_metrics::Metrics; use ssz::ContiguousList; use thiserror::Error; From f4e4cfa078df00388e6c6bd9dcb880a8c404e153 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 16:26:53 +0200 Subject: [PATCH 09/27] feat: replace all log with tracing in builder_api module --- Cargo.lock | 2 +- builder_api/Cargo.toml | 2 +- builder_api/src/api.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 671381be..4c00b65a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1046,7 +1046,6 @@ dependencies = [ "helper_functions", "hex-literal", "itertools 0.13.0", - "log", "prometheus_metrics", "reqwest", "serde", @@ -1055,6 +1054,7 @@ dependencies = [ "ssz", "test-case", "thiserror", + "tracing", "typenum", "types", ] diff --git a/builder_api/Cargo.toml b/builder_api/Cargo.toml index acd4f9cc..2b9ebc2d 100644 --- a/builder_api/Cargo.toml +++ b/builder_api/Cargo.toml @@ -14,13 +14,13 @@ derive_more = { workspace = true } helper_functions = { workspace = true } hex-literal = { workspace = true } itertools = { workspace = true } -log = { workspace = true } prometheus_metrics = { workspace = true } reqwest = { workspace = true } serde = { workspace = true } serde_utils = { workspace = true } ssz = { workspace = true } thiserror = { workspace = true } +tracing = { workspace = true } typenum = { workspace = true } types = { workspace = true } diff --git a/builder_api/src/api.rs b/builder_api/src/api.rs index 75ec3012..03aaf68c 100644 --- a/builder_api/src/api.rs +++ b/builder_api/src/api.rs @@ -6,7 +6,7 @@ use bls::PublicKeyBytes; use derive_more::Constructor; use helper_functions::signing::SignForAllForks; use itertools::Itertools as _; -use log::{debug, info}; +use tracing::{debug, info}; use prometheus_metrics::Metrics; use reqwest::{Client, Response, StatusCode, Url}; use ssz::SszHash as _; From 8ccce1c14edf2ff1b18aa46cba74f12651b4dd01 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 16:29:36 +0200 Subject: [PATCH 10/27] feat: replace all log with tracing in database module --- Cargo.lock | 2 +- database/Cargo.toml | 2 +- database/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4c00b65a..aac38815 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1710,7 +1710,6 @@ dependencies = [ "fs-err", "im", "itertools 0.13.0", - "log", "reth-libmdbx", "snap", "std_ext", @@ -1718,6 +1717,7 @@ dependencies = [ "tempfile", "test-case", "thiserror", + "tracing", "unwrap_none", ] diff --git a/database/Cargo.toml b/database/Cargo.toml index b08f2c1e..ada89495 100644 --- a/database/Cargo.toml +++ b/database/Cargo.toml @@ -13,11 +13,11 @@ fs-err = { workspace = true } im = { workspace = true } itertools = { workspace = true } libmdbx = { workspace = true } -log = { workspace = true } snap = { workspace = true } std_ext = { workspace = true } tap = { workspace = true } thiserror = { workspace = true } +tracing = { workspace = true } unwrap_none = { workspace = true } [dev-dependencies] diff --git a/database/src/lib.rs b/database/src/lib.rs index 54eace92..7c65bfd6 100644 --- a/database/src/lib.rs +++ b/database/src/lib.rs @@ -10,7 +10,7 @@ use bytesize::ByteSize; use im::OrdMap; use itertools::Either; use libmdbx::{DatabaseFlags, Environment, Geometry, WriteFlags}; -use log::info; +use tracing::info; use snap::raw::{Decoder, Encoder}; use std_ext::ArcExt as _; use tap::Pipe as _; From 69f3fd58a51cfbf65a9c0a63574a5c5eebf230bd Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 16:40:40 +0200 Subject: [PATCH 11/27] feat: replace all log with tracing in eth1 module --- Cargo.lock | 2 +- eth1/Cargo.toml | 2 +- eth1/src/download_manager.rs | 2 +- eth1/src/eth1_chain.rs | 2 +- eth1/src/genesis.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aac38815..1ece93d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2253,7 +2253,6 @@ dependencies = [ "futures", "genesis", "itertools 0.13.0", - "log", "prometheus_metrics", "reqwest", "ssz", @@ -2261,6 +2260,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", + "tracing", "tynm", "types", "url", diff --git a/eth1/Cargo.toml b/eth1/Cargo.toml index f1a48c48..31ae8d81 100644 --- a/eth1/Cargo.toml +++ b/eth1/Cargo.toml @@ -17,7 +17,6 @@ fs-err = { workspace = true } futures = { workspace = true } genesis = { workspace = true } itertools = { workspace = true } -log = { workspace = true } prometheus_metrics = { workspace = true } reqwest = { workspace = true } ssz = { workspace = true } @@ -25,6 +24,7 @@ std_ext = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } tokio-stream = { workspace = true } +tracing = { workspace = true } tynm = { workspace = true } types = { workspace = true } url = { workspace = true } diff --git a/eth1/src/download_manager.rs b/eth1/src/download_manager.rs index da5f8778..fe8a87e7 100644 --- a/eth1/src/download_manager.rs +++ b/eth1/src/download_manager.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use anyhow::{Context as _, Result}; use eth1_api::{Eth1Api, Eth1ApiToMetrics, Eth1Block}; use futures::channel::mpsc::UnboundedSender; -use log::{info, warn}; +use tracing::{info, warn}; use prometheus_metrics::Metrics; use reqwest::Client; use std_ext::ArcExt as _; diff --git a/eth1/src/eth1_chain.rs b/eth1/src/eth1_chain.rs index b328f896..462a97f6 100644 --- a/eth1/src/eth1_chain.rs +++ b/eth1/src/eth1_chain.rs @@ -8,7 +8,7 @@ use futures::{ channel::mpsc::UnboundedSender, stream::{Stream, TryStreamExt as _}, }; -use log::{error, info}; +use tracing::{error, info}; use prometheus_metrics::Metrics; use reqwest::Client; use std_ext::ArcExt as _; diff --git a/eth1/src/genesis.rs b/eth1/src/genesis.rs index f515044d..86cc232a 100644 --- a/eth1/src/genesis.rs +++ b/eth1/src/genesis.rs @@ -5,7 +5,7 @@ use chrono::{Local, TimeZone as _}; use eth1_api::{DepositEvent, Eth1Block}; use futures::stream::{Stream, TryStreamExt as _}; use genesis::Incremental; -use log::info; +use tracing::info; use ssz::{SszRead as _, SszWrite as _}; use thiserror::Error; use types::{ From bc412e24035efccb367156c19557a3021eb7a91f Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 16:42:58 +0200 Subject: [PATCH 12/27] feat: replace all log with tracing in eth1_api module --- Cargo.lock | 2 +- eth1_api/Cargo.toml | 2 +- eth1_api/src/eth1_api.rs | 2 +- eth1_api/src/eth1_execution_engine.rs | 2 +- eth1_api/src/execution_service.rs | 2 +- eth1_api/src/messages.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1ece93d0..458df680 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2285,7 +2285,6 @@ dependencies = [ "hex-literal", "httpmock", "jwt-simple", - "log", "memoffset", "panics", "prometheus_metrics", @@ -2299,6 +2298,7 @@ dependencies = [ "test-case", "thiserror", "tokio", + "tracing", "typenum", "types", "unwrap_none", diff --git a/eth1_api/Cargo.toml b/eth1_api/Cargo.toml index 6431d57a..71deffa0 100644 --- a/eth1_api/Cargo.toml +++ b/eth1_api/Cargo.toml @@ -21,7 +21,6 @@ futures = { workspace = true } hex = { workspace = true } hex-literal = { workspace = true } jwt-simple = { workspace = true } -log = { workspace = true } memoffset = { workspace = true } panics = { workspace = true } prometheus_metrics = { workspace = true } @@ -33,6 +32,7 @@ static_assertions = { workspace = true } std_ext = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } +tracing = { workspace = true } typenum = { workspace = true } types = { workspace = true } web3 = { workspace = true } diff --git a/eth1_api/src/eth1_api.rs b/eth1_api/src/eth1_api.rs index 476b7c3c..de9acdb6 100644 --- a/eth1_api/src/eth1_api.rs +++ b/eth1_api/src/eth1_api.rs @@ -11,7 +11,7 @@ use execution_engine::{ ForkChoiceUpdatedResponse, PayloadAttributes, PayloadId, PayloadStatusV1, }; use futures::{channel::mpsc::UnboundedSender, lock::Mutex, Future}; -use log::warn; +use tracing::warn; use prometheus_metrics::Metrics; use reqwest::{header::HeaderMap, Client, Url}; use serde::{de::DeserializeOwned, Deserialize}; diff --git a/eth1_api/src/eth1_execution_engine.rs b/eth1_api/src/eth1_execution_engine.rs index c07390c1..0df9d8aa 100644 --- a/eth1_api/src/eth1_execution_engine.rs +++ b/eth1_api/src/eth1_execution_engine.rs @@ -5,7 +5,7 @@ use derive_more::Constructor; use either::Either; use execution_engine::{ExecutionEngine, PayloadAttributes, PayloadId, PayloadStatusV1}; use futures::channel::{mpsc::UnboundedSender, oneshot::Sender}; -use log::{info, warn}; +use tracing::{info, warn}; use tokio::runtime::{Builder, Handle}; use types::{ combined::{ExecutionPayload, ExecutionPayloadParams}, diff --git a/eth1_api/src/execution_service.rs b/eth1_api/src/execution_service.rs index 0827d89e..c77425de 100644 --- a/eth1_api/src/execution_service.rs +++ b/eth1_api/src/execution_service.rs @@ -6,7 +6,7 @@ use either::Either; use execution_engine::{ForkChoiceUpdatedResponse, PayloadAttributes, PayloadStatusV1}; use fork_choice_control::Wait; use futures::{channel::mpsc::UnboundedReceiver, StreamExt as _}; -use log::warn; +use tracing::warn; use types::{ combined::{ExecutionPayload, ExecutionPayloadParams}, nonstandard::Phase, diff --git a/eth1_api/src/messages.rs b/eth1_api/src/messages.rs index 02f02764..da433efd 100644 --- a/eth1_api/src/messages.rs +++ b/eth1_api/src/messages.rs @@ -2,7 +2,7 @@ use anyhow::Result; use either::Either; use execution_engine::{PayloadAttributes, PayloadId, PayloadStatusV1}; use futures::channel::{mpsc::UnboundedSender, oneshot::Sender}; -use log::debug; +use tracing::debug; use types::{ combined::{ExecutionPayload, ExecutionPayloadParams}, nonstandard::Phase, From a84660cf869c9401c513c35d9fee43e03290a488 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 17:17:32 +0200 Subject: [PATCH 13/27] feat: replace all log with tracing in fork_choice_control module --- Cargo.lock | 2 +- fork_choice_control/Cargo.toml | 2 +- fork_choice_control/src/checkpoint_sync.rs | 2 +- fork_choice_control/src/messages.rs | 2 +- fork_choice_control/src/mutator.rs | 2 +- fork_choice_control/src/storage.rs | 2 +- fork_choice_control/src/storage_back_sync.rs | 2 +- fork_choice_control/src/storage_tool.rs | 2 +- fork_choice_control/src/tasks.rs | 2 +- fork_choice_control/src/thread_pool.rs | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 458df680..0de4f157 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2620,7 +2620,6 @@ dependencies = [ "helper_functions", "http_api_utils", "itertools 0.13.0", - "log", "mime", "nonzero_ext", "num_cpus", @@ -2639,6 +2638,7 @@ dependencies = [ "tap", "test-generator", "thiserror", + "tracing", "transition_functions", "tynm", "types", diff --git a/fork_choice_control/Cargo.toml b/fork_choice_control/Cargo.toml index 0f12d8d2..4b706869 100644 --- a/fork_choice_control/Cargo.toml +++ b/fork_choice_control/Cargo.toml @@ -26,7 +26,6 @@ genesis = { workspace = true } helper_functions = { workspace = true } http_api_utils = { workspace = true } itertools = { workspace = true } -log = { workspace = true } mime = { workspace = true } nonzero_ext = { workspace = true } num_cpus = { workspace = true } @@ -42,6 +41,7 @@ std_ext = { workspace = true } strum = { workspace = true } tap = { workspace = true } thiserror = { workspace = true } +tracing = { workspace = true } transition_functions = { workspace = true } tynm = { workspace = true } types = { workspace = true } diff --git a/fork_choice_control/src/checkpoint_sync.rs b/fork_choice_control/src/checkpoint_sync.rs index 3957dacc..b35bffa6 100644 --- a/fork_choice_control/src/checkpoint_sync.rs +++ b/fork_choice_control/src/checkpoint_sync.rs @@ -4,7 +4,7 @@ use std::sync::Arc; use anyhow::{bail, Result}; use helper_functions::misc; use http_api_utils::{BlockId, StateId}; -use log::info; +use tracing::info; use mime::APPLICATION_OCTET_STREAM; use reqwest::{header::ACCEPT, Client, StatusCode, Url}; use ssz::SszRead; diff --git a/fork_choice_control/src/messages.rs b/fork_choice_control/src/messages.rs index 5dbd459c..65e14532 100644 --- a/fork_choice_control/src/messages.rs +++ b/fork_choice_control/src/messages.rs @@ -13,7 +13,7 @@ use fork_choice_store::{ ChainLink, Store, }; use helper_functions::{accessors, misc}; -use log::debug; +use tracing::debug; use serde::Serialize; use tap::Pipe as _; use types::{ diff --git a/fork_choice_control/src/mutator.rs b/fork_choice_control/src/mutator.rs index ea781c8d..41a13432 100644 --- a/fork_choice_control/src/mutator.rs +++ b/fork_choice_control/src/mutator.rs @@ -39,7 +39,7 @@ use fork_choice_store::{ use futures::channel::{mpsc::Sender as MultiSender, oneshot::Sender as OneshotSender}; use helper_functions::{accessors, misc, predicates, verifier::NullVerifier}; use itertools::{Either, Itertools as _}; -use log::{debug, error, info, warn}; +use tracing::{debug, error, info, warn}; use prometheus_metrics::Metrics; use ssz::SszHash as _; use std_ext::ArcExt as _; diff --git a/fork_choice_control/src/storage.rs b/fork_choice_control/src/storage.rs index e3f76670..91f92fc8 100644 --- a/fork_choice_control/src/storage.rs +++ b/fork_choice_control/src/storage.rs @@ -9,7 +9,7 @@ use fork_choice_store::{ChainLink, Store}; use genesis::AnchorCheckpointProvider; use helper_functions::{accessors, misc}; use itertools::Itertools as _; -use log::{debug, info, warn}; +use tracing::{debug, info, warn}; use nonzero_ext::nonzero; use reqwest::{Client, Url}; use ssz::{Ssz, SszRead, SszReadDefault as _, SszWrite}; diff --git a/fork_choice_control/src/storage_back_sync.rs b/fork_choice_control/src/storage_back_sync.rs index 28681161..560b11e2 100644 --- a/fork_choice_control/src/storage_back_sync.rs +++ b/fork_choice_control/src/storage_back_sync.rs @@ -5,7 +5,7 @@ use arithmetic::U64Ext as _; use features::Feature; use genesis::AnchorCheckpointProvider; use helper_functions::misc; -use log::{info, warn}; +use tracing::{info, warn}; use ssz::SszHash as _; use std_ext::ArcExt as _; use transition_functions::combined; diff --git a/fork_choice_control/src/storage_tool.rs b/fork_choice_control/src/storage_tool.rs index 549bed87..6df66e2f 100644 --- a/fork_choice_control/src/storage_tool.rs +++ b/fork_choice_control/src/storage_tool.rs @@ -2,7 +2,7 @@ use std::path::{Path, PathBuf}; use anyhow::Result; use genesis::AnchorCheckpointProvider; -use log::info; +use tracing::info; use ssz::{SszHash as _, SszRead, SszWrite as _}; use std_ext::ArcExt as _; use thiserror::Error; diff --git a/fork_choice_control/src/tasks.rs b/fork_choice_control/src/tasks.rs index 35292c5e..812d977a 100644 --- a/fork_choice_control/src/tasks.rs +++ b/fork_choice_control/src/tasks.rs @@ -17,7 +17,7 @@ use helper_functions::{ accessors, misc, verifier::{MultiVerifier, NullVerifier}, }; -use log::{debug, warn}; +use tracing::{debug, warn}; use prometheus_metrics::Metrics; use types::{ combined::SignedBeaconBlock, diff --git a/fork_choice_control/src/thread_pool.rs b/fork_choice_control/src/thread_pool.rs index f091cc2f..3a6cbd4c 100644 --- a/fork_choice_control/src/thread_pool.rs +++ b/fork_choice_control/src/thread_pool.rs @@ -17,7 +17,7 @@ use anyhow::Result; use derivative::Derivative; use derive_more::From; use execution_engine::ExecutionEngine; -use log::debug; +use tracing::debug; use parking_lot::{Condvar, Mutex}; use std_ext::ArcExt as _; use types::preset::Preset; From 50af7a764c2eaca64b0d5465c47c2c5865405d57 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 17:34:36 +0200 Subject: [PATCH 14/27] feat: replace all log with tracing in http_api module --- Cargo.lock | 2 +- http_api/Cargo.toml | 2 +- http_api/src/standard.rs | 2 +- http_api/src/task.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0de4f157..5ce7e3c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3550,7 +3550,6 @@ dependencies = [ "itertools 0.13.0", "keymanager", "liveness_tracker", - "log", "mediatype", "metrics", "mime", @@ -3582,6 +3581,7 @@ dependencies = [ "tokio", "tokio-stream", "tower-http", + "tracing", "transition_functions", "try_from_iterator", "typenum", diff --git a/http_api/Cargo.toml b/http_api/Cargo.toml index bcf7d6a2..4df98e00 100644 --- a/http_api/Cargo.toml +++ b/http_api/Cargo.toml @@ -26,7 +26,6 @@ helper_functions = { workspace = true } http_api_utils = { workspace = true } itertools = { workspace = true } liveness_tracker = { workspace = true } -log = { workspace = true } mediatype = { workspace = true } metrics = { workspace = true } mime = { workspace = true } @@ -49,6 +48,7 @@ thiserror = { workspace = true } tokio = { workspace = true } tokio-stream = { workspace = true } tower-http = { workspace = true } +tracing = { workspace = true } transition_functions = { workspace = true } try_from_iterator = { workspace = true } typenum = { workspace = true } diff --git a/http_api/src/standard.rs b/http_api/src/standard.rs index f39d9d82..e46d36ff 100644 --- a/http_api/src/standard.rs +++ b/http_api/src/standard.rs @@ -33,7 +33,7 @@ use helper_functions::{accessors, misc}; use http_api_utils::{BlockId, StateId}; use itertools::{izip, Either, Itertools as _}; use liveness_tracker::ApiToLiveness; -use log::{debug, info, warn}; +use tracing::{debug, info, warn}; use operation_pools::{ AttestationAggPool, BlsToExecutionChangePool, Origin, PoolAdditionOutcome, SyncCommitteeAggPool, }; diff --git a/http_api/src/task.rs b/http_api/src/task.rs index 42078ac0..ed5ba7c5 100644 --- a/http_api/src/task.rs +++ b/http_api/src/task.rs @@ -16,7 +16,7 @@ use futures::{ use genesis::AnchorCheckpointProvider; use http_api_utils::ApiMetrics; use liveness_tracker::ApiToLiveness; -use log::{debug, info}; +use tracing::{debug, info}; use metrics::ApiToMetrics; use operation_pools::{ AttestationAggPool, BlsToExecutionChangePool, PoolToApiMessage, SyncCommitteeAggPool, From 0b63a361ee2c04d6a8c4177f1ad5972617add2b0 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 17:38:26 +0200 Subject: [PATCH 15/27] feat: replace all log with tracing in http_api_utils module --- Cargo.lock | 1 - http_api_utils/Cargo.toml | 1 - http_api_utils/src/logging.rs | 2 +- http_api_utils/src/middleware.rs | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5ce7e3c8..41693075 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3600,7 +3600,6 @@ dependencies = [ "hex-literal", "http-body-util", "itertools 0.13.0", - "log", "mime", "parse-display", "prometheus_metrics", diff --git a/http_api_utils/Cargo.toml b/http_api_utils/Cargo.toml index dae1daba..c785016f 100644 --- a/http_api_utils/Cargo.toml +++ b/http_api_utils/Cargo.toml @@ -12,7 +12,6 @@ axum = { workspace = true } features = { workspace = true } http-body-util = { workspace = true } itertools = { workspace = true } -log = { workspace = true } mime = { workspace = true } parse-display = { workspace = true } prometheus_metrics = { workspace = true } diff --git a/http_api_utils/src/logging.rs b/http_api_utils/src/logging.rs index 4fa94028..7e7dd2ad 100644 --- a/http_api_utils/src/logging.rs +++ b/http_api_utils/src/logging.rs @@ -8,7 +8,7 @@ use axum::{ response::Response, }; use features::Feature; -use log::{info, warn}; +use tracing::{info, warn}; use tracing::Span; use crate::{misc::ApiMetrics, ApiError}; diff --git a/http_api_utils/src/middleware.rs b/http_api_utils/src/middleware.rs index 810d3a6f..2374f9aa 100644 --- a/http_api_utils/src/middleware.rs +++ b/http_api_utils/src/middleware.rs @@ -13,7 +13,7 @@ use axum::{ Extension, }; use http_body_util::BodyExt as _; -use log::info; +use tracing::info; use mime::{APPLICATION_JSON, TEXT_EVENT_STREAM}; use crate::{error::Error, misc::Direction}; From 27229c59bf9185bfcd2e24b13f4ca0a41658fa74 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 17:42:04 +0200 Subject: [PATCH 16/27] feat: replace all log with tracing in keymanager module --- Cargo.lock | 2 +- keymanager/Cargo.toml | 2 +- keymanager/src/keystores.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 41693075..f326fa58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4305,7 +4305,6 @@ dependencies = [ "futures", "hex-literal", "itertools 0.13.0", - "log", "reqwest", "serde", "serde_json", @@ -4316,6 +4315,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", + "tracing", "types", "uuid", "validator_key_cache", diff --git a/keymanager/Cargo.toml b/keymanager/Cargo.toml index 35ec2189..798a8861 100644 --- a/keymanager/Cargo.toml +++ b/keymanager/Cargo.toml @@ -15,7 +15,6 @@ eip_2335 = { workspace = true } fs-err = { workspace = true } futures = { workspace = true } itertools = { workspace = true } -log = { workspace = true } reqwest = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } @@ -25,6 +24,7 @@ std_ext = { workspace = true } tap = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } +tracing = { workspace = true } types = { workspace = true } uuid = { workspace = true } validator_key_cache = { workspace = true } diff --git a/keymanager/src/keystores.rs b/keymanager/src/keystores.rs index 626ee9b6..878aad05 100644 --- a/keymanager/src/keystores.rs +++ b/keymanager/src/keystores.rs @@ -9,7 +9,7 @@ use bls::{PublicKeyBytes, SecretKey}; use eip_2335::Keystore; use futures::lock::{MappedMutexGuard, Mutex, MutexGuard}; use itertools::Itertools as _; -use log::{info, warn}; +use tracing::{info, warn}; use serde::Serialize; use signer::{KeyOrigin, Signer}; use slashing_protection::{interchange_format::InterchangeFormat, SlashingProtector}; From 682d74f908039c6a8fd1e390c6215bb52c9a3dc5 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 19:27:07 +0200 Subject: [PATCH 17/27] feat: replace all log with tracing in liveness_tracker module --- Cargo.lock | 2 +- liveness_tracker/Cargo.toml | 2 +- liveness_tracker/src/lib.rs | 2 +- liveness_tracker/src/messages.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f326fa58..2033eb70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4991,9 +4991,9 @@ dependencies = [ "futures", "helper_functions", "itertools 0.13.0", - "log", "operation_pools", "prometheus_metrics", + "tracing", "tynm", "types", "validator", diff --git a/liveness_tracker/Cargo.toml b/liveness_tracker/Cargo.toml index 7bf0d410..b0445e32 100644 --- a/liveness_tracker/Cargo.toml +++ b/liveness_tracker/Cargo.toml @@ -14,9 +14,9 @@ fork_choice_control = { workspace = true } futures = { workspace = true } helper_functions = { workspace = true } itertools = { workspace = true } -log = { workspace = true } operation_pools = { workspace = true } prometheus_metrics = { workspace = true } +tracing = { workspace = true } tynm = { workspace = true } types = { workspace = true } validator = { workspace = true } diff --git a/liveness_tracker/src/lib.rs b/liveness_tracker/src/lib.rs index 71e0e31c..84b636ab 100644 --- a/liveness_tracker/src/lib.rs +++ b/liveness_tracker/src/lib.rs @@ -7,7 +7,7 @@ use fork_choice_control::Wait; use futures::{channel::mpsc::UnboundedReceiver, select, StreamExt as _}; use helper_functions::{accessors, misc}; use itertools::Itertools as _; -use log::{debug, warn}; +use tracing::{debug, warn}; use operation_pools::PoolToLivenessMessage; use prometheus_metrics::Metrics; use types::{ diff --git a/liveness_tracker/src/messages.rs b/liveness_tracker/src/messages.rs index 7be12ed0..f97a918c 100644 --- a/liveness_tracker/src/messages.rs +++ b/liveness_tracker/src/messages.rs @@ -1,6 +1,6 @@ use anyhow::Result; use futures::channel::{mpsc::UnboundedSender, oneshot::Sender}; -use log::debug; +use tracing::debug; use types::phase0::primitives::{Epoch, ValidatorIndex}; pub enum ApiToLiveness { From afb5bcb83d630d1d8c4722da228eb6e1744fcc97 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 19:32:49 +0200 Subject: [PATCH 18/27] feat: replace all log with tracing in metrics module --- Cargo.lock | 2 +- metrics/Cargo.toml | 2 +- metrics/src/beaconchain.rs | 2 +- metrics/src/messages.rs | 2 +- metrics/src/server.rs | 2 +- metrics/src/service.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2033eb70..ce09b4c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5115,7 +5115,6 @@ dependencies = [ "helper_functions", "http_api_utils", "jemalloc-ctl", - "log", "num_threads", "p2p", "prometheus", @@ -5131,6 +5130,7 @@ dependencies = [ "tokio", "tokio-stream", "tower-http", + "tracing", "transition_functions", "types", ] diff --git a/metrics/Cargo.toml b/metrics/Cargo.toml index 69be48e3..340d28da 100644 --- a/metrics/Cargo.toml +++ b/metrics/Cargo.toml @@ -21,7 +21,6 @@ grandine_version = { workspace = true } helper_functions = { workspace = true } http_api_utils = { workspace = true } jemalloc-ctl = { workspace = true } -log = { workspace = true } num_threads = { workspace = true } p2p = { workspace = true } prometheus = { workspace = true } @@ -37,6 +36,7 @@ thiserror = { workspace = true } tokio = { workspace = true } tokio-stream = { workspace = true } tower-http = { workspace = true } +tracing = { workspace = true } transition_functions = { workspace = true } types = { workspace = true } diff --git a/metrics/src/beaconchain.rs b/metrics/src/beaconchain.rs index 4d2a3cc0..f3a590e3 100644 --- a/metrics/src/beaconchain.rs +++ b/metrics/src/beaconchain.rs @@ -12,7 +12,7 @@ use chrono::DateTime; use eth1_api::{Eth1ConnectionData, Eth1Metrics}; use grandine_version::{APPLICATION_NAME, APPLICATION_VERSION}; use helper_functions::{accessors, predicates}; -use log::warn; +use tracing::warn; use p2p::metrics::PEERS_CONNECTED; use prometheus::IntGauge; use psutil::{cpu::CpuTimes, process::Process}; diff --git a/metrics/src/messages.rs b/metrics/src/messages.rs index f5a1c6f2..6c858df6 100644 --- a/metrics/src/messages.rs +++ b/metrics/src/messages.rs @@ -1,6 +1,6 @@ use anyhow::Result; use futures::channel::{mpsc::UnboundedSender, oneshot::Sender}; -use log::debug; +use tracing::debug; use types::nonstandard::SystemStats; pub enum ApiToMetrics { diff --git a/metrics/src/server.rs b/metrics/src/server.rs index 85f6f8ef..ee089e22 100644 --- a/metrics/src/server.rs +++ b/metrics/src/server.rs @@ -21,7 +21,7 @@ use fork_choice_control::Wait; use futures::channel::mpsc::UnboundedSender; use helper_functions::misc; use http_api_utils::ApiError; -use log::{info, warn}; +use tracing::{info, warn}; use prometheus::TextEncoder; use prometheus_client::registry::Registry; use prometheus_metrics::Metrics; diff --git a/metrics/src/service.rs b/metrics/src/service.rs index 87315612..edf011d0 100644 --- a/metrics/src/service.rs +++ b/metrics/src/service.rs @@ -6,7 +6,7 @@ use bls::PublicKeyBytes; use directories::Directories; use eth1_api::{Eth1ApiToMetrics, Eth1Metrics, RealController}; use futures::{channel::mpsc::UnboundedReceiver, future::Either, select, StreamExt as _}; -use log::{debug, info, warn}; +use tracing::{debug, info, warn}; use p2p::SyncToMetrics; use reqwest::{Client, StatusCode, Url}; use serde::Deserialize; From dbd466dff37005ce0fd9e570bb96859c22dd030f Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 19:35:52 +0200 Subject: [PATCH 19/27] feat: replace all log with tracing in operation_pools module --- Cargo.lock | 4 ++-- operation_pools/Cargo.toml | 2 +- operation_pools/src/bls_to_execution_change_pool.rs | 2 +- operation_pools/src/messages.rs | 2 +- operation_pools/src/sync_committee_agg_pool/pool.rs | 2 +- operation_pools/src/sync_committee_agg_pool/tasks.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce09b4c3..71470e86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5565,7 +5565,6 @@ dependencies = [ "good_lp", "helper_functions", "itertools 0.13.0", - "log", "prometheus_metrics", "rayon", "serde", @@ -5574,6 +5573,7 @@ dependencies = [ "strum", "tap", "tokio", + "tracing", "transition_functions", "try_from_iterator", "tynm", @@ -5626,7 +5626,6 @@ dependencies = [ "helper_functions", "igd-next", "itertools 0.13.0", - "log", "logging", "operation_pools", "prometheus-client", @@ -5644,6 +5643,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", + "tracing", "tynm", "typenum", "types", diff --git a/operation_pools/Cargo.toml b/operation_pools/Cargo.toml index cc819cee..cc02e88f 100644 --- a/operation_pools/Cargo.toml +++ b/operation_pools/Cargo.toml @@ -21,7 +21,6 @@ futures = { workspace = true } good_lp = { workspace = true } helper_functions = { workspace = true } itertools = { workspace = true } -log = { workspace = true } prometheus_metrics = { workspace = true } rayon = { workspace = true } serde = { workspace = true } @@ -30,6 +29,7 @@ std_ext = { workspace = true } strum = { workspace = true } tap = { workspace = true } tokio = { workspace = true } +tracing = { workspace = true } transition_functions = { workspace = true } try_from_iterator = { workspace = true } tynm = { workspace = true } diff --git a/operation_pools/src/bls_to_execution_change_pool.rs b/operation_pools/src/bls_to_execution_change_pool.rs index 98cb7028..f52effeb 100644 --- a/operation_pools/src/bls_to_execution_change_pool.rs +++ b/operation_pools/src/bls_to_execution_change_pool.rs @@ -12,7 +12,7 @@ use futures::{ }; use helper_functions::predicates; use itertools::Itertools as _; -use log::{debug, warn}; +use tracing::{debug, warn}; use prometheus_metrics::Metrics; use transition_functions::capella; use types::{ diff --git a/operation_pools/src/messages.rs b/operation_pools/src/messages.rs index aa82fd37..121a30e8 100644 --- a/operation_pools/src/messages.rs +++ b/operation_pools/src/messages.rs @@ -1,6 +1,6 @@ use eth2_libp2p::GossipId; use futures::channel::mpsc::UnboundedSender; -use log::debug; +use tracing::debug; use serde::Serialize; use types::{ altair::containers::SyncCommitteeMessage, capella::containers::SignedBlsToExecutionChange, diff --git a/operation_pools/src/sync_committee_agg_pool/pool.rs b/operation_pools/src/sync_committee_agg_pool/pool.rs index 68e51f59..1bb15ebd 100644 --- a/operation_pools/src/sync_committee_agg_pool/pool.rs +++ b/operation_pools/src/sync_committee_agg_pool/pool.rs @@ -3,7 +3,7 @@ use std::{collections::HashSet, sync::Arc}; use anyhow::{anyhow, Result}; use helper_functions::accessors; use itertools::Itertools as _; -use log::debug; +use tracing::debug; use prometheus_metrics::Metrics; use std_ext::ArcExt as _; use tokio::sync::RwLock; diff --git a/operation_pools/src/sync_committee_agg_pool/tasks.rs b/operation_pools/src/sync_committee_agg_pool/tasks.rs index c69517eb..b9f2edef 100644 --- a/operation_pools/src/sync_committee_agg_pool/tasks.rs +++ b/operation_pools/src/sync_committee_agg_pool/tasks.rs @@ -11,7 +11,7 @@ use helper_functions::{ signing::{SignForSingleFork as _, SignForSingleForkAtSlot as _}, verifier::{MultiVerifier, Verifier as _}, }; -use log::{debug, warn}; +use tracing::{debug, warn}; use prometheus_metrics::Metrics; use typenum::Unsigned as _; use types::{ From 34dd77d685456c1b29c52c7e91373a4f4ddc5c3f Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 21:10:56 +0200 Subject: [PATCH 20/27] feat: replace all log with tracing in prometheus_metrics module --- Cargo.lock | 4 ++-- prometheus_metrics/Cargo.toml | 2 +- prometheus_metrics/src/helpers.rs | 2 +- prometheus_metrics/src/metrics.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 71470e86..79bfbf1e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5626,6 +5626,7 @@ dependencies = [ "helper_functions", "igd-next", "itertools 0.13.0", + "log", "logging", "operation_pools", "prometheus-client", @@ -5643,7 +5644,6 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tracing", "tynm", "typenum", "types", @@ -6191,11 +6191,11 @@ dependencies = [ "anyhow", "features", "futures", - "log", "once_cell", "prometheus", "tokio", "tokio-stream", + "tracing", "types", ] diff --git a/prometheus_metrics/Cargo.toml b/prometheus_metrics/Cargo.toml index 5aff72e8..c765aeed 100644 --- a/prometheus_metrics/Cargo.toml +++ b/prometheus_metrics/Cargo.toml @@ -8,9 +8,9 @@ authors = ["Grandine "] anyhow = { workspace = true } features = { workspace = true } futures = { workspace = true } -log = { workspace = true } once_cell = { workspace = true } prometheus = { workspace = true } tokio = { workspace = true } tokio-stream = { workspace = true } +tracing = { workspace = true } types = { workspace = true } diff --git a/prometheus_metrics/src/helpers.rs b/prometheus_metrics/src/helpers.rs index b0cd16b7..3476ad70 100644 --- a/prometheus_metrics/src/helpers.rs +++ b/prometheus_metrics/src/helpers.rs @@ -1,7 +1,7 @@ use std::time::{Duration, SystemTime}; use anyhow::Result; -use log::warn; +use tracing::warn; use prometheus::{Histogram, HistogramTimer, HistogramVec}; use types::phase0::primitives::UnixSeconds; diff --git a/prometheus_metrics/src/metrics.rs b/prometheus_metrics/src/metrics.rs index 1e5e1965..33ac364f 100644 --- a/prometheus_metrics/src/metrics.rs +++ b/prometheus_metrics/src/metrics.rs @@ -2,7 +2,7 @@ use core::time::Duration; use std::sync::Arc; use anyhow::Result; -use log::warn; +use tracing::warn; use once_cell::sync::OnceCell; use prometheus::{ histogram_opts, opts, Gauge, GaugeVec, Histogram, HistogramVec, IntCounter, IntCounterVec, From 5fb013da5e0c389c630961b07a897aa16ab9baa6 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 21:19:28 +0200 Subject: [PATCH 21/27] feat: replace all log with tracing in runtime module --- Cargo.lock | 2 +- runtime/Cargo.toml | 2 +- runtime/src/runtime.rs | 2 +- runtime/src/schema.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 79bfbf1e..00884455 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6751,7 +6751,6 @@ dependencies = [ "http_api", "keymanager", "liveness_tracker", - "log", "metrics", "nonzero_ext", "num_cpus", @@ -6768,6 +6767,7 @@ dependencies = [ "std_ext", "thiserror", "tokio", + "tracing", "types", "validator", ] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index c669dd6a..870c083f 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -27,7 +27,6 @@ grandine_version = { workspace = true } http_api = { workspace = true } keymanager = { workspace = true } liveness_tracker = { workspace = true } -log = { workspace = true } metrics = { workspace = true } nonzero_ext = { workspace = true } num_cpus = { workspace = true } @@ -44,5 +43,6 @@ slashing_protection = { workspace = true } std_ext = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } +tracing = { workspace = true } types = { workspace = true } validator = { workspace = true } diff --git a/runtime/src/runtime.rs b/runtime/src/runtime.rs index 7cca34be..8cf9c644 100644 --- a/runtime/src/runtime.rs +++ b/runtime/src/runtime.rs @@ -26,7 +26,7 @@ use genesis::AnchorCheckpointProvider; use http_api::{Channels as HttpApiChannels, HttpApi, HttpApiConfig}; use keymanager::KeyManager; use liveness_tracker::LivenessTracker; -use log::{info, warn}; +use tracing::{info, warn}; use metrics::{run_metrics_server, MetricsChannels, MetricsService}; use operation_pools::{ AttestationAggPool, BlsToExecutionChangePool, Manager, SyncCommitteeAggPool, diff --git a/runtime/src/schema.rs b/runtime/src/schema.rs index 198e1ede..325a5627 100644 --- a/runtime/src/schema.rs +++ b/runtime/src/schema.rs @@ -2,7 +2,7 @@ use std::{io::ErrorKind, path::Path}; use anyhow::{bail, ensure, Result}; use grandine_version::APPLICATION_NAME; -use log::info; +use tracing::info; use semver::{Version, VersionReq}; use serde::{Deserialize, Serialize}; use thiserror::Error; From 4bc3bc2158c07206d966463d00fff5151e1a1e68 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 21:22:09 +0200 Subject: [PATCH 22/27] feat: replace all log with tracing in signer module --- Cargo.lock | 2 +- signer/Cargo.toml | 2 +- signer/src/signer.rs | 2 +- signer/src/web3signer/api.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 00884455..c045e49a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7333,7 +7333,6 @@ dependencies = [ "hex-literal", "httpmock", "itertools 0.13.0", - "log", "prometheus_metrics", "rayon", "reqwest", @@ -7345,6 +7344,7 @@ dependencies = [ "std_ext", "thiserror", "tokio", + "tracing", "types", ] diff --git a/signer/Cargo.toml b/signer/Cargo.toml index 787506b7..9736a3de 100644 --- a/signer/Cargo.toml +++ b/signer/Cargo.toml @@ -14,7 +14,6 @@ builder_api = { workspace = true } futures = { workspace = true } helper_functions = { workspace = true } itertools = { workspace = true } -log = { workspace = true } prometheus_metrics = { workspace = true } rayon = { workspace = true } reqwest = { workspace = true } @@ -24,6 +23,7 @@ slashing_protection = { workspace = true } std_ext = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } +tracing = { workspace = true } types = { workspace = true } [dev-dependencies] diff --git a/signer/src/signer.rs b/signer/src/signer.rs index cd7d07eb..5446a91a 100644 --- a/signer/src/signer.rs +++ b/signer/src/signer.rs @@ -13,7 +13,7 @@ use futures::{ }; use helper_functions::misc; use itertools::{izip, Itertools as _}; -use log::{info, warn}; +use tracing::{info, warn}; use prometheus_metrics::Metrics; use rayon::iter::{IntoParallelIterator as _, ParallelIterator as _}; use reqwest::{Client, Url}; diff --git a/signer/src/web3signer/api.rs b/signer/src/web3signer/api.rs index 02978926..d6ec58fb 100644 --- a/signer/src/web3signer/api.rs +++ b/signer/src/web3signer/api.rs @@ -5,7 +5,7 @@ use std::{ use anyhow::Result; use bls::{PublicKeyBytes, SignatureBytes}; -use log::warn; +use tracing::warn; use prometheus_metrics::Metrics; use reqwest::{Client, Url}; use types::{phase0::primitives::H256, preset::Preset}; From cde29c06b1a3c2fd6d6994299a6ecf7c07caac47 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 21:24:04 +0200 Subject: [PATCH 23/27] feat: replace all log with tracing in slasher module --- Cargo.lock | 2 +- slasher/Cargo.toml | 2 +- slasher/src/messages.rs | 2 +- slasher/src/slasher.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c045e49a..b6515b2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7399,11 +7399,11 @@ dependencies = [ "features", "futures", "helper_functions", - "log", "p2p", "serde", "ssz", "thiserror", + "tracing", "types", "unwrap_none", ] diff --git a/slasher/Cargo.toml b/slasher/Cargo.toml index aab5dd38..095fd74c 100644 --- a/slasher/Cargo.toml +++ b/slasher/Cargo.toml @@ -17,11 +17,11 @@ eth1_api = { workspace = true } features = { workspace = true } futures = { workspace = true } helper_functions = { workspace = true } -log = { workspace = true } p2p = { workspace = true } serde = { workspace = true } ssz = { workspace = true } thiserror = { workspace = true } +tracing = { workspace = true } types = { workspace = true } [dev-dependencies] diff --git a/slasher/src/messages.rs b/slasher/src/messages.rs index 880c48ff..b55ca361 100644 --- a/slasher/src/messages.rs +++ b/slasher/src/messages.rs @@ -1,5 +1,5 @@ use futures::channel::mpsc::UnboundedSender; -use log::warn; +use tracing::warn; use types::{ phase0::{ containers::{AttesterSlashing, ProposerSlashing}, diff --git a/slasher/src/slasher.rs b/slasher/src/slasher.rs index b0ceb702..6124437a 100644 --- a/slasher/src/slasher.rs +++ b/slasher/src/slasher.rs @@ -11,7 +11,7 @@ use futures::{ stream::StreamExt, }; use helper_functions::{accessors, misc}; -use log::{debug, info, warn}; +use tracing::{debug, info, warn}; use p2p::P2pToSlasher; use thiserror::Error; use types::{ From d8f8f7e5aa2e79fa0f03b5b990a7e71a4c3f47ff Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 21:26:37 +0200 Subject: [PATCH 24/27] feat: replace all log with tracing in slashing_protection module --- Cargo.lock | 2 +- slashing_protection/Cargo.toml | 2 +- slashing_protection/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6515b2d..eaa68089 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7423,7 +7423,6 @@ dependencies = [ "helper_functions", "hex-literal", "itertools 0.13.0", - "log", "refinery", "rusqlite", "serde", @@ -7434,6 +7433,7 @@ dependencies = [ "test-case", "test-generator", "thiserror", + "tracing", "types", ] diff --git a/slashing_protection/Cargo.toml b/slashing_protection/Cargo.toml index 5752600c..8109a3b4 100644 --- a/slashing_protection/Cargo.toml +++ b/slashing_protection/Cargo.toml @@ -15,7 +15,6 @@ fs-err = { workspace = true } glob = { workspace = true } helper_functions = { workspace = true } itertools = { workspace = true } -log = { workspace = true } refinery = { workspace = true } rusqlite = { workspace = true } serde = { workspace = true } @@ -23,6 +22,7 @@ serde_json = { workspace = true } serde_utils = { workspace = true } ssz = { workspace = true } thiserror = { workspace = true } +tracing = { workspace = true } types = { workspace = true } [dev-dependencies] diff --git a/slashing_protection/src/lib.rs b/slashing_protection/src/lib.rs index 3a456536..1e016b07 100644 --- a/slashing_protection/src/lib.rs +++ b/slashing_protection/src/lib.rs @@ -7,7 +7,7 @@ use derivative::Derivative; use fs_err::File; use helper_functions::{accessors, misc}; use itertools::Itertools as _; -use log::{debug, info, warn}; +use tracing::{debug, info, warn}; use rusqlite::{Connection, OptionalExtension, Rows, Transaction, TransactionBehavior}; use ssz::{SszReadDefault as _, SszWrite as _}; use thiserror::Error; From 99390a4b0e86593e21ddaaaaf8d88efedea8f0b8 Mon Sep 17 00:00:00 2001 From: Karrenbelt Date: Wed, 4 Sep 2024 21:28:36 +0200 Subject: [PATCH 25/27] feat: replace all log with tracing in state_cache module --- Cargo.lock | 2 +- state_cache/Cargo.toml | 2 +- state_cache/src/state_cache.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eaa68089..5e94a025 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7674,11 +7674,11 @@ version = "0.1.0" dependencies = [ "anyhow", "im", - "log", "parking_lot 0.12.3", "std_ext", "tap", "thiserror", + "tracing", "types", ] diff --git a/state_cache/Cargo.toml b/state_cache/Cargo.toml index 5cca36f1..c3793c9b 100644 --- a/state_cache/Cargo.toml +++ b/state_cache/Cargo.toml @@ -10,9 +10,9 @@ workspace = true [dependencies] anyhow = { workspace = true } im = { workspace = true } -log = { workspace = true } parking_lot = { workspace = true } std_ext = { workspace = true } tap = { workspace = true } thiserror = { workspace = true } +tracing = { workspace = true } types = { workspace = true } diff --git a/state_cache/src/state_cache.rs b/state_cache/src/state_cache.rs index d2879b3f..a5146ffa 100644 --- a/state_cache/src/state_cache.rs +++ b/state_cache/src/state_cache.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use anyhow::{anyhow, Result}; use im::{HashMap, OrdMap}; -use log::{info, warn}; +use tracing::{info, warn}; use parking_lot::{Mutex, MutexGuard}; use std_ext::ArcExt as _; use tap::Pipe as _; From 41a7309c7e524d4fc57c86a86f9adc7745384bcd Mon Sep 17 00:00:00 2001 From: Mercy Boma Naps Nkari Date: Sat, 7 Sep 2024 11:23:33 +0000 Subject: [PATCH 26/27] draft tracing --- logs/testing.log.2024-09-07 | 169 ++++++++++++++++++++++++++++++++++++ metrics/Cargo.toml | 1 + metrics/src/lib.rs | 5 ++ metrics/src/server.rs | 1 + metrics/src/service.rs | 3 + 5 files changed, 179 insertions(+) create mode 100644 logs/testing.log.2024-09-07 diff --git a/logs/testing.log.2024-09-07 b/logs/testing.log.2024-09-07 new file mode 100644 index 00000000..c7827c47 --- /dev/null +++ b/logs/testing.log.2024-09-07 @@ -0,0 +1,169 @@ +2024-09-07T11:14:37.473981Z INFO logging: Tracing initialized successfully. +2024-09-07T11:14:37.474180Z INFO grandine: Grandine firing up... +2024-09-07T11:14:37.515494Z INFO grandine: starting beacon node +2024-09-07T11:14:37.515604Z INFO grandine::grandine_config: network: mainnet +2024-09-07T11:14:37.515672Z INFO grandine::grandine_config: data directory: "/home/gitpod/.grandine/mainnet" +2024-09-07T11:14:37.515727Z INFO grandine::grandine_config: Eth2 database upper limit: 256.0 GiB +2024-09-07T11:14:37.515773Z INFO grandine::grandine_config: Eth1 database upper limit: 16.0 GiB +2024-09-07T11:14:37.515840Z INFO grandine::grandine_config: Eth1 RPC URLs: [] +2024-09-07T11:14:37.515934Z INFO grandine::grandine_config: graffiti: [0x4772616e64696e652f302e342e312d3939333930613400000000000000000000] +2024-09-07T11:14:37.515976Z INFO grandine::grandine_config: HTTP API address: 127.0.0.1:5052 +2024-09-07T11:14:37.516007Z INFO grandine::grandine_config: validator API disabled +2024-09-07T11:14:37.516033Z INFO grandine::grandine_config: archival interval: 32 epochs +2024-09-07T11:14:37.516082Z INFO grandine::grandine_config: slasher enabled: false +2024-09-07T11:14:37.516116Z INFO grandine::grandine_config: client version: Grandine/0.4.1-99390a4/x86_64-linux +2024-09-07T11:14:37.516155Z INFO grandine::grandine_config: suggested fee recipient: 0xe7cf…1f1b +2024-09-07T11:14:37.516193Z INFO grandine::grandine_config: back sync enabled: false +2024-09-07T11:14:37.517612Z INFO runtime::schema: initialized data directory with schema version 0.2.3 +2024-09-07T11:14:37.707915Z INFO database: database: /home/gitpod/.grandine/mainnet/beacon/eth1_cache with name eth1 +2024-09-07T11:14:39.860526Z INFO database: database: /home/gitpod/.grandine/mainnet/beacon/beacon_fork_choice with name beacon_fork_choice +2024-09-07T11:14:39.861706Z INFO fork_choice_control::storage: latest state checkpoint was not found; attempting to find stored state by iteration +2024-09-07T11:14:39.862167Z INFO fork_choice_control::storage: loaded state at slot 0 +2024-09-07T11:14:40.092087Z INFO database: database: /home/gitpod/.grandine/mainnet/beacon/sync with name sync +2024-09-07T11:14:40.095561Z INFO database: database: /home/gitpod/.grandine/mainnet/validator with name proposer-configs +2024-09-07T11:14:40.112864Z INFO discv5::service: Discv5 Service started mode=Ip4 +2024-09-07T11:14:40.120070Z INFO libp2p_swarm: local_peer_id=16Uiu2HAkvZSwAzk9pYp5vd8duNWWow6D36NuAULJJnVP7ZsFRPRA +2024-09-07T11:14:50.206968Z INFO http_api::task: HTTP server listening on 127.0.0.1:5052 +2024-09-07T11:15:07.005044Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 96) +2024-09-07T11:15:08.454103Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 2, root: 0xace2240dfe1fd056fba17e84e617578c5ec2dd96f6190009b32116dc7b9aae67, head slot: 121, head root: 0x53dab559e4382a2e196d256e70cbc566147406cbad2461d2145d05ed2b3f1f62) +2024-09-07T11:15:09.076906Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:15:11.831592Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 96 +2024-09-07T11:15:11.833274Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 3, root: 0xd924a743f197bde8672015aac88fcad90aa599b0a3a2076740d062c05f536600, head slot: 154, head root: 0x8cff0e1339949127df4c2f1a1331498840f899efb663307e47be800da574c655) +2024-09-07T11:15:11.962757Z INFO fork_choice_control::storage: saving state in slot 0 +2024-09-07T11:15:14.940971Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 4, root: 0x944b198acd9cb2defa4a717736166ed6219a6b110b080c85c021c219a7a9a0dc, head slot: 185, head root: 0xb889263cda93241c37fa18a734e48036170210558c125d5f0b9305a901ee87a6) +2024-09-07T11:15:15.239718Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 128 +2024-09-07T11:15:15.542586Z INFO runtime::runtime: saving current chain before exit… +2024-09-07T11:15:15.684126Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 192) +2024-09-07T11:15:16.131274Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 128 +2024-09-07T11:15:16.418620Z INFO fork_choice_control::mutator: chain saved (finalized blocks: 1, unfinalized blocks: 52) +2024-09-07T11:20:26.116616Z INFO logging: Tracing initialized successfully. +2024-09-07T11:20:26.116787Z INFO grandine: Grandine firing up... +2024-09-07T11:20:26.156175Z INFO grandine: starting beacon node +2024-09-07T11:20:26.156252Z INFO grandine::grandine_config: network: mainnet +2024-09-07T11:20:26.156297Z INFO grandine::grandine_config: data directory: "/home/gitpod/.grandine/mainnet" +2024-09-07T11:20:26.156338Z INFO grandine::grandine_config: Eth2 database upper limit: 256.0 GiB +2024-09-07T11:20:26.156374Z INFO grandine::grandine_config: Eth1 database upper limit: 16.0 GiB +2024-09-07T11:20:26.156439Z INFO grandine::grandine_config: Eth1 RPC URLs: [] +2024-09-07T11:20:26.156548Z INFO grandine::grandine_config: graffiti: [0x4772616e64696e652f302e342e312d3939333930613400000000000000000000] +2024-09-07T11:20:26.156597Z INFO grandine::grandine_config: HTTP API address: 127.0.0.1:5052 +2024-09-07T11:20:26.156626Z INFO grandine::grandine_config: validator API disabled +2024-09-07T11:20:26.156658Z INFO grandine::grandine_config: archival interval: 32 epochs +2024-09-07T11:20:26.156713Z INFO grandine::grandine_config: slasher enabled: false +2024-09-07T11:20:26.156747Z INFO grandine::grandine_config: client version: Grandine/0.4.1-99390a4/x86_64-linux +2024-09-07T11:20:26.156788Z INFO grandine::grandine_config: suggested fee recipient: 0xe7cf…1f1b +2024-09-07T11:20:26.156812Z INFO grandine::grandine_config: back sync enabled: false +2024-09-07T11:20:26.179968Z INFO database: database: /home/gitpod/.grandine/mainnet/beacon/eth1_cache with name eth1 +2024-09-07T11:20:28.079054Z INFO database: database: /home/gitpod/.grandine/mainnet/beacon/beacon_fork_choice with name beacon_fork_choice +2024-09-07T11:20:28.233843Z INFO fork_choice_control::storage: loaded state at slot 128 +2024-09-07T11:20:30.656126Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:30.873694Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:30.979894Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.000633Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.023890Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.047316Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.090439Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.118503Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.140456Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.165866Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.190145Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.230793Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.255878Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.297419Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.321385Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.346046Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.370306Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.404208Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:31.429512Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T11:20:32.339209Z INFO database: database: /home/gitpod/.grandine/mainnet/beacon/sync with name sync +2024-09-07T11:20:32.341678Z INFO database: database: /home/gitpod/.grandine/mainnet/validator with name proposer-configs +2024-09-07T11:20:32.359900Z INFO discv5::service: Discv5 Service started mode=Ip4 +2024-09-07T11:20:32.367151Z INFO libp2p_swarm: local_peer_id=16Uiu2HAkvZSwAzk9pYp5vd8duNWWow6D36NuAULJJnVP7ZsFRPRA +2024-09-07T11:20:32.638982Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 192) +2024-09-07T11:20:42.454119Z INFO http_api::task: HTTP server listening on 127.0.0.1:5052 +2024-09-07T11:20:54.568877Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 5, root: 0x54ef28a8a9f863d5b4ee91a1defd2879f4029862e25b3a7d33019fc43fb76e23, head slot: 217, head root: 0x0e42e7ffe65473f142dde4030841b9afd890bfda3cf228ad7a7f1ec66f9b5c97) +2024-09-07T11:20:55.021458Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 224) +2024-09-07T11:20:56.352986Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 6, root: 0x922728a1a20301e518d41f09884a34fc50c9f0d2fcf8894c7db654f0aea0f328, head slot: 249, head root: 0x4e122c95ee0480277462c7f3f69856bec77c11b3b5ec1aa1778cf65979f86c7b) +2024-09-07T11:20:56.543011Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 192 +2024-09-07T11:20:57.148940Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 256) +2024-09-07T11:20:58.357505Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 7, root: 0x298771e7ee0af390393a7c354de1b625c7407a9cc8f29ff4687c8495c601ec92, head slot: 282, head root: 0xffd35c38df4193161238128a2271aef6e1fa5e1f41ed2889df094f2dff7e1e1d) +2024-09-07T11:20:58.570342Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 224 +2024-09-07T11:20:58.937445Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 288) +2024-09-07T11:21:00.250524Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 8, root: 0x9cd3a9048a8e37e21f67485421edc4b95b73077eba1621cb446b0ce1ab5f1f57, head slot: 313, head root: 0xca7900fea0b946241846d24a2b49d2020dfb0b84521bf31c9202c731fd5217f9) +2024-09-07T11:21:00.524309Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 256 +2024-09-07T11:21:01.043328Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 320) +2024-09-07T11:21:02.888953Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 9, root: 0x1e69b805836952b1b79e0a12cf94f3495ea59ca4a632a3c5997999cb5f9cd5d0, head slot: 346, head root: 0x04b94dd297a640b926f6c762e16ab8b303e54543e1b97407ae32c18d7f68f205) +2024-09-07T11:21:03.215386Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 288 +2024-09-07T11:21:03.488906Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 352) +2024-09-07T11:21:05.421468Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 10, root: 0x76ed0a81c6bf78152015153137a8c037d628022b5b4c258c52ae92ba2b6bc54d, head slot: 377, head root: 0x96c9842f81880741d3c5965524d1c8f0d3d1d4380a3af6fa61207d74f9ee44a3) +2024-09-07T11:21:05.719865Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 320 +2024-09-07T11:21:06.063992Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 384) +2024-09-07T11:21:07.481333Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 11, root: 0x03409dd1ea96a11296515cdf319c2b1c939c99af8de9fec56165f05e1217651e, head slot: 409, head root: 0xdbaa1e690576380834238bac0578f7ff95b708d822e62e8c3d6f403fd347956c) +2024-09-07T11:21:07.758095Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 352 +2024-09-07T11:21:09.054129Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 12, root: 0x9d09d82044ff765c193b0d787a38a595b1fcc47f4a5e9b5b13a656b5aee18e21, head slot: 442, head root: 0xdd71740b61c7739990cc8e3ae2c7cb36cca77cd091904421247d9158218820cb) +2024-09-07T11:21:09.242300Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 384 +2024-09-07T11:21:09.377346Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 448) +2024-09-07T11:21:10.622999Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 13, root: 0xc6b7c41c87b4bf0fc24e4d744312d82e0fe88a4c1ecccac923332eeb9bfe33c5, head slot: 472, head root: 0xf0e3dc342f6c2c92c41c06a250221d5974c505256fcbfc3c7d9cdcf78f4399f8) +2024-09-07T11:21:12.938085Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 14, root: 0x47744037077ef657a36539aecf2dd179ff7f150b879a2ec29b4e21e69c6e7e50, head slot: 504, head root: 0xe31d6c6ef6e6938d4e2b10c3a25947e34e6446c0f9d0de06576d3bdb44630401) +2024-09-07T11:21:13.421136Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 448 +2024-09-07T11:21:15.261458Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 15, root: 0x4cb9f72cef82a2799d7b6ca8724e23f95e597b7b67331955d203885a4394c8e6, head slot: 536, head root: 0xcd8adc55b1024f77261d3b6c8713f217750507b008ab08a9ff054698f8a84f24) +2024-09-07T11:21:15.816194Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 544) +2024-09-07T11:21:17.650540Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 16, root: 0xdf6c026f30ebc81ce3bd5add17fab099f95912658f4e0212895ab7c8cf7f6140, head slot: 568, head root: 0x50f39e4f0717125f4723e2e9ed467b194fd597abe3bf915309f46af41dc67567) +2024-09-07T11:21:19.798303Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 17, root: 0x3b6b52e4ea17c263a57f4aa4feba38694f7d7ff820e582aa78d666e9b7ce09ce, head slot: 600, head root: 0xeb5df8615825482d6b824049a867045e46f7b19e135fcecb959ec4fcb45e5563) +2024-09-07T11:21:20.056135Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 544 +2024-09-07T11:21:20.652858Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 608) +2024-09-07T11:21:22.244873Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 18, root: 0x98bcae964aff154e72864af77e792fd187e573c57246b3494c1339490f4f87ac, head slot: 633, head root: 0x7dff19ae41cec51639c33bd4feb325e68894a5a5b35effce1e6a7c0c6e3d233c) +2024-09-07T11:21:22.727207Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 640) +2024-09-07T11:21:23.798189Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 19, root: 0xa854c641facc238c22b16b5722d8678e271d788a2d3cd5015429192066b0273b, head slot: 663, head root: 0xfbdaa65657f82bea07055d32f0f4e766df18f872312a3df14c08a2f49edbf4c9) +2024-09-07T11:21:23.977227Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 608 +2024-09-07T11:21:24.285785Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 672) +2024-09-07T11:21:25.067611Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 20, root: 0x23bbcc5e453f5b13e86904d7cc831aea21c24c9375e1e7e4bc21f53c82216672, head slot: 695, head root: 0x13d6ee13baf9aa775be7b868639abd19611de9e22b2d960454fcae14b83bdca9) +2024-09-07T11:21:25.274045Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 640 +2024-09-07T11:21:25.721969Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 704) +2024-09-07T11:21:27.728910Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 21, root: 0x95c53600001676b34a3e615a0c71fc272b6fd9d5a8e8bd9b8d248399d30b4e7f, head slot: 729, head root: 0xb480edf3335a15f56f4cb7498279ccb28abc3f4590718ba4d28b6c862cc1ea68) +2024-09-07T11:21:27.968364Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 672 +2024-09-07T11:21:28.233060Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 736) +2024-09-07T11:21:29.205492Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 22, root: 0x2c0e1109cff8c127f59eeae5c692590301980424312ffff65531daa669618dcf, head slot: 760, head root: 0xb8758b2a9f8e5d975761ca6521b5963097f11881c23c65bcba480ccad1b69731) +2024-09-07T11:21:29.675843Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 704 +2024-09-07T11:21:31.414180Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 23, root: 0x872392b690517caba6916e476b5c74f9f80cf4f1c0a1038644a3a7d0b71256b5, head slot: 791, head root: 0x0511fc6cb26cf9d22f07cafe472e03cadd5ac2fdac1b14b42067b1623c38e764) +2024-09-07T11:21:31.616653Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 736 +2024-09-07T11:21:33.037750Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 24, root: 0x6af78144624a2401b75d3fc89254ad05d2fbfa652fa8ad930f6d0a1601f9abc4, head slot: 823, head root: 0xe25eda53d1f9aec46ac4748e623abc4544a800dd791d6116eae3cc883745d881) +2024-09-07T11:21:33.588076Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 832) +2024-09-07T11:21:34.602078Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 25, root: 0x425c52e1cacda7e5bdbf080e7b95a522259fc08bdc9df4e61b23c0b6ed8da1f0, head slot: 855, head root: 0xdc2cbe24aba5eb51d7abdb98030587d047330c1b0d2a949e6258105c9cf81332) +2024-09-07T11:21:34.984902Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 864) +2024-09-07T11:21:36.217926Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 26, root: 0x4c0bc9b664d1199aac7bb8659cd850dd57b782bfaca1fdabfc750bf8c5c8f343, head slot: 888, head root: 0xb2434f99ddf46b0c58cbd2e45a0dab931e47f7b5f136891faa208c8efef87c5f) +2024-09-07T11:21:36.642155Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 832 +2024-09-07T11:21:37.139954Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 896) +2024-09-07T11:21:38.329550Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 27, root: 0x4720242331dff12985febad2704bebd454294f3ff8c0d9fc90a3d50ceb8d80f2, head slot: 920, head root: 0x85e4db6a98c42e856fa6b4cd9b761c48621e6200a99c60bae7ef2e424701ad62) +2024-09-07T11:21:38.624200Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 864 +2024-09-07T11:21:40.071398Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 28, root: 0xd23b46b4496c07f99efdaaeaff2bac9df250bfe30acc9bf34ebff678caa17df0, head slot: 951, head root: 0xb6d9ded6993390fdf043a5ca869cb0570459cb90bec93968f1875959bc1a31dd) +2024-09-07T11:21:40.325323Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 896 +2024-09-07T11:21:40.931778Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 960) +2024-09-07T11:21:41.846507Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 29, root: 0xeb1ab0e965b482ccc772274fd4cb8b8545547e4ff40661a07d48f33958d18437, head slot: 983, head root: 0x0dfe0d9d3a9a2c4fcc83cf3da4d6aa17d759d46a54cf88751794be08be70aa09) +2024-09-07T11:21:42.240492Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 992) +2024-09-07T11:21:43.306562Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 30, root: 0xd75c5bb2b2ddc7425511051f59d2480ab6f55a8c0ff8459c291289dea7092214, head slot: 1015, head root: 0x5c17a136d3e527b4352ced0be25e6a6249701e9f2aea1953a28712c87a981ccb) +2024-09-07T11:21:43.474977Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 960 +2024-09-07T11:21:43.833155Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1024) +2024-09-07T11:21:44.949748Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 31, root: 0xe1ac1ef51acf1c82e6eae33c724767fc6d6cd684b7170a7e1dc6f9f24e746eea, head slot: 1047, head root: 0x28abb44f0572388eede7c73ec63a0ad35600fb5cdb054bc89034794ad30704e0) +2024-09-07T11:21:45.169283Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 992 +2024-09-07T11:21:47.275638Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 32, root: 0x2622c3026b6617667c59692d14f20249d43ff842b0f15f863e48af9487dc3a23, head slot: 1079, head root: 0xac61dcb808551e9b1a4578a3163907c21f4930fc12d859a700e9e22077e3a33b) +2024-09-07T11:21:47.526367Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1024 +2024-09-07T11:21:47.666043Z INFO fork_choice_control::storage: saving state in slot 1024 +2024-09-07T11:21:47.923846Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1088) +2024-09-07T11:21:50.232987Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 33, root: 0x952851d8c8bb216796b7ebb0e6048194650a08c46894f25cab97b0db1f25ceac, head slot: 1111, head root: 0x8b1201efe87739697c1150f93324da0e861822888a00c5ac395368854ce1f811) +2024-09-07T11:21:51.841876Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1120) +2024-09-07T11:21:55.737804Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 34, root: 0x946dd56127121d321043e906927b5eb6556267c6eb9db6b1b7450f23e52eff33, head slot: 1143, head root: 0x186f6fa9a5fbcf28f95a30d261a9c70d5cb6440aabb4712f68a4cf2965de8f00) +2024-09-07T11:21:56.639544Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1088 +2024-09-07T11:21:57.125062Z INFO fork_choice_control::storage: saving state in slot 1024 +2024-09-07T11:21:58.145464Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1152) +2024-09-07T11:22:02.027943Z WARN discv5::handler: Authentication response already sent. Dropping session. Node: Node: 0xedf4..b1ff, addr: 34.31.2.184:5050 +2024-09-07T11:22:02.031492Z WARN discv5::service: RPC Request failed: id: 054e2fa7edff9e09, error InvalidRemotePacket +2024-09-07T11:22:02.031855Z WARN discv5::service: RPC Request failed: id: 34fe6193a48372e1, error InvalidRemotePacket +2024-09-07T11:22:02.033471Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 35, root: 0x2f2c7a323b7bdb02417b7fa41ad617e9de1bfd36d6173770a899ee4b01720151, head slot: 1175, head root: 0x4ed4960085a70c1f4c1ecd71230e364fddd347e88327a3aa7fd7bc56864b6ba0) +2024-09-07T11:22:02.728807Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1120 +2024-09-07T11:22:03.920277Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1184) +2024-09-07T11:22:06.617474Z INFO runtime::runtime: saving current chain before exit… +2024-09-07T11:22:06.634644Z WARN discv5::handler: Failed to inform of response channel closed +2024-09-07T11:22:06.641257Z WARN discv5::handler: Failed to inform of response channel closed +2024-09-07T11:22:06.721862Z WARN discv5::handler: Failed to inform of response channel closed +2024-09-07T11:22:07.231485Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1120 +2024-09-07T11:22:07.556818Z INFO fork_choice_control::mutator: chain saved (finalized blocks: 1, unfinalized blocks: 78) diff --git a/metrics/Cargo.toml b/metrics/Cargo.toml index 340d28da..f28a9e18 100644 --- a/metrics/Cargo.toml +++ b/metrics/Cargo.toml @@ -37,6 +37,7 @@ tokio = { workspace = true } tokio-stream = { workspace = true } tower-http = { workspace = true } tracing = { workspace = true } +tracing-subscriber = { workspace = true } transition_functions = { workspace = true } types = { workspace = true } diff --git a/metrics/src/lib.rs b/metrics/src/lib.rs index 891cd4cb..4977373f 100644 --- a/metrics/src/lib.rs +++ b/metrics/src/lib.rs @@ -3,6 +3,11 @@ pub use crate::{ server::{run_metrics_server, MetricsServerConfig}, service::{MetricsChannels, MetricsService, MetricsServiceConfig}, }; +pub fn initialize_metrics_module() { + tracing_subscriber::fmt() + .with_max_level(tracing::Level::INFO) // Adjust log level as needed + .init(); +} mod beaconchain; mod gui; diff --git a/metrics/src/server.rs b/metrics/src/server.rs index ee089e22..1186a24f 100644 --- a/metrics/src/server.rs +++ b/metrics/src/server.rs @@ -22,6 +22,7 @@ use futures::channel::mpsc::UnboundedSender; use helper_functions::misc; use http_api_utils::ApiError; use tracing::{info, warn}; +use tracing_subscriber::{fmt, EnvFilter}; use prometheus::TextEncoder; use prometheus_client::registry::Registry; use prometheus_metrics::Metrics; diff --git a/metrics/src/service.rs b/metrics/src/service.rs index edf011d0..70636139 100644 --- a/metrics/src/service.rs +++ b/metrics/src/service.rs @@ -63,6 +63,9 @@ impl MetricsService

{ validator_keys: Arc>, channels: MetricsChannels, ) -> Self { + tracing_subscriber::fmt() + .with_max_level(tracing::Level::DEBUG) // More detailed logging + .init(); Self { config, controller, From b3b38fa8c283c6c7cc19d3ada190e833004f29d2 Mon Sep 17 00:00:00 2001 From: Mercy Boma Naps Nkari Date: Sat, 7 Sep 2024 18:53:26 +0000 Subject: [PATCH 27/27] Tracing draft --- Cargo.lock | 1 + logs/testing.log.2024-09-07 | 232 +++++++++++++++++++++++++++++++++ metrics/src/lib.rs | 2 +- metrics/src/server.rs | 2 +- p2p/src/attestation_subnets.rs | 48 ++++--- 5 files changed, 267 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5e94a025..3562ad6b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5131,6 +5131,7 @@ dependencies = [ "tokio-stream", "tower-http", "tracing", + "tracing-subscriber", "transition_functions", "types", ] diff --git a/logs/testing.log.2024-09-07 b/logs/testing.log.2024-09-07 index c7827c47..7585f71e 100644 --- a/logs/testing.log.2024-09-07 +++ b/logs/testing.log.2024-09-07 @@ -1,3 +1,4 @@ +git push --set-upstream origin Tracing_Events:feat/tracing 2024-09-07T11:14:37.473981Z INFO logging: Tracing initialized successfully. 2024-09-07T11:14:37.474180Z INFO grandine: Grandine firing up... 2024-09-07T11:14:37.515494Z INFO grandine: starting beacon node @@ -167,3 +168,234 @@ 2024-09-07T11:22:06.721862Z WARN discv5::handler: Failed to inform of response channel closed 2024-09-07T11:22:07.231485Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1120 2024-09-07T11:22:07.556818Z INFO fork_choice_control::mutator: chain saved (finalized blocks: 1, unfinalized blocks: 78) +2024-09-07T18:46:30.561235Z INFO logging: Tracing initialized successfully. +2024-09-07T18:46:30.561349Z INFO grandine: Grandine firing up... +2024-09-07T18:46:30.602722Z INFO grandine: starting beacon node +2024-09-07T18:46:30.602773Z INFO grandine::grandine_config: network: mainnet +2024-09-07T18:46:30.602798Z INFO grandine::grandine_config: data directory: "/home/gitpod/.grandine/mainnet" +2024-09-07T18:46:30.602826Z INFO grandine::grandine_config: Eth2 database upper limit: 256.0 GiB +2024-09-07T18:46:30.602857Z INFO grandine::grandine_config: Eth1 database upper limit: 16.0 GiB +2024-09-07T18:46:30.602941Z INFO grandine::grandine_config: Eth1 RPC URLs: [] +2024-09-07T18:46:30.603054Z INFO grandine::grandine_config: graffiti: [0x4772616e64696e652f302e342e312d3939333930613400000000000000000000] +2024-09-07T18:46:30.603114Z INFO grandine::grandine_config: HTTP API address: 127.0.0.1:5052 +2024-09-07T18:46:30.603153Z INFO grandine::grandine_config: validator API disabled +2024-09-07T18:46:30.603198Z INFO grandine::grandine_config: archival interval: 32 epochs +2024-09-07T18:46:30.603261Z INFO grandine::grandine_config: slasher enabled: false +2024-09-07T18:46:30.603313Z INFO grandine::grandine_config: client version: Grandine/0.4.1-99390a4/x86_64-linux +2024-09-07T18:46:30.603363Z INFO grandine::grandine_config: suggested fee recipient: 0xe7cf…1f1b +2024-09-07T18:46:30.603397Z INFO grandine::grandine_config: back sync enabled: false +2024-09-07T18:46:30.604515Z INFO runtime::schema: initialized data directory with schema version 0.2.3 +2024-09-07T18:46:30.619617Z INFO database: database: /home/gitpod/.grandine/mainnet/beacon/eth1_cache with name eth1 +2024-09-07T18:46:32.546782Z INFO database: database: /home/gitpod/.grandine/mainnet/beacon/beacon_fork_choice with name beacon_fork_choice +2024-09-07T18:46:32.547988Z INFO fork_choice_control::storage: latest state checkpoint was not found; attempting to find stored state by iteration +2024-09-07T18:46:32.548338Z INFO fork_choice_control::storage: loaded state at slot 0 +2024-09-07T18:46:32.759432Z INFO database: database: /home/gitpod/.grandine/mainnet/beacon/sync with name sync +2024-09-07T18:46:32.762400Z INFO database: database: /home/gitpod/.grandine/mainnet/validator with name proposer-configs +2024-09-07T18:46:32.777047Z INFO discv5::service: Discv5 Service started mode=Ip4 +2024-09-07T18:46:32.783844Z INFO libp2p_swarm: local_peer_id=16Uiu2HAmQUDAiAF97QrXgUHiYavRn7T6jNditSMphiywvHCdMpdR +2024-09-07T18:46:42.907438Z INFO http_api::task: HTTP server listening on 127.0.0.1:5052 +2024-09-07T18:46:58.635511Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 96) +2024-09-07T18:46:59.529921Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 2, root: 0xace2240dfe1fd056fba17e84e617578c5ec2dd96f6190009b32116dc7b9aae67, head slot: 121, head root: 0x53dab559e4382a2e196d256e70cbc566147406cbad2461d2145d05ed2b3f1f62) +2024-09-07T18:46:59.826335Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 128) +2024-09-07T18:47:00.550708Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 96 +2024-09-07T18:47:00.553044Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 3, root: 0xd924a743f197bde8672015aac88fcad90aa599b0a3a2076740d062c05f536600, head slot: 154, head root: 0x8cff0e1339949127df4c2f1a1331498840f899efb663307e47be800da574c655) +2024-09-07T18:47:00.632049Z INFO fork_choice_control::storage: saving state in slot 0 +2024-09-07T18:47:01.873143Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 4, root: 0x944b198acd9cb2defa4a717736166ed6219a6b110b080c85c021c219a7a9a0dc, head slot: 185, head root: 0xb889263cda93241c37fa18a734e48036170210558c125d5f0b9305a901ee87a6) +2024-09-07T18:47:02.074292Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 128 +2024-09-07T18:47:02.182468Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 192) +2024-09-07T18:47:14.032451Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 5, root: 0x54ef28a8a9f863d5b4ee91a1defd2879f4029862e25b3a7d33019fc43fb76e23, head slot: 217, head root: 0x0e42e7ffe65473f142dde4030841b9afd890bfda3cf228ad7a7f1ec66f9b5c97) +2024-09-07T18:47:14.409370Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 224) +2024-09-07T18:47:20.763100Z WARN discv5::service: ENRs received of unsolicited distances. Blacklisting node_id=0x07d6..d95a addr=103.161.224.134:30306 +2024-09-07T18:47:26.983600Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 6, root: 0x922728a1a20301e518d41f09884a34fc50c9f0d2fcf8894c7db654f0aea0f328, head slot: 249, head root: 0x4e122c95ee0480277462c7f3f69856bec77c11b3b5ec1aa1778cf65979f86c7b) +2024-09-07T18:47:27.128747Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 192 +2024-09-07T18:47:27.312265Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 256) +2024-09-07T18:47:28.812617Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 7, root: 0x298771e7ee0af390393a7c354de1b625c7407a9cc8f29ff4687c8495c601ec92, head slot: 282, head root: 0xffd35c38df4193161238128a2271aef6e1fa5e1f41ed2889df094f2dff7e1e1d) +2024-09-07T18:47:29.018632Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 224 +2024-09-07T18:47:29.135720Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 288) +2024-09-07T18:47:29.886010Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 8, root: 0x9cd3a9048a8e37e21f67485421edc4b95b73077eba1621cb446b0ce1ab5f1f57, head slot: 313, head root: 0xca7900fea0b946241846d24a2b49d2020dfb0b84521bf31c9202c731fd5217f9) +2024-09-07T18:47:30.046217Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 256 +2024-09-07T18:47:30.178109Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 320) +2024-09-07T18:47:30.845290Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 9, root: 0x1e69b805836952b1b79e0a12cf94f3495ea59ca4a632a3c5997999cb5f9cd5d0, head slot: 346, head root: 0x04b94dd297a640b926f6c762e16ab8b303e54543e1b97407ae32c18d7f68f205) +2024-09-07T18:47:30.988891Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 288 +2024-09-07T18:47:31.074084Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 352) +2024-09-07T18:47:31.859823Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 10, root: 0x76ed0a81c6bf78152015153137a8c037d628022b5b4c258c52ae92ba2b6bc54d, head slot: 377, head root: 0x96c9842f81880741d3c5965524d1c8f0d3d1d4380a3af6fa61207d74f9ee44a3) +2024-09-07T18:47:32.004246Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 320 +2024-09-07T18:47:32.141031Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 384) +2024-09-07T18:47:33.038929Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 11, root: 0x03409dd1ea96a11296515cdf319c2b1c939c99af8de9fec56165f05e1217651e, head slot: 409, head root: 0xdbaa1e690576380834238bac0578f7ff95b708d822e62e8c3d6f403fd347956c) +2024-09-07T18:47:33.228470Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 352 +2024-09-07T18:47:34.382952Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 12, root: 0x9d09d82044ff765c193b0d787a38a595b1fcc47f4a5e9b5b13a656b5aee18e21, head slot: 442, head root: 0xdd71740b61c7739990cc8e3ae2c7cb36cca77cd091904421247d9158218820cb) +2024-09-07T18:47:34.562087Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 384 +2024-09-07T18:47:34.703798Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 448) +2024-09-07T18:47:35.658319Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 13, root: 0xc6b7c41c87b4bf0fc24e4d744312d82e0fe88a4c1ecccac923332eeb9bfe33c5, head slot: 472, head root: 0xf0e3dc342f6c2c92c41c06a250221d5974c505256fcbfc3c7d9cdcf78f4399f8) +2024-09-07T18:47:36.996012Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 14, root: 0x47744037077ef657a36539aecf2dd179ff7f150b879a2ec29b4e21e69c6e7e50, head slot: 504, head root: 0xe31d6c6ef6e6938d4e2b10c3a25947e34e6446c0f9d0de06576d3bdb44630401) +2024-09-07T18:47:37.307261Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 448 +2024-09-07T18:47:39.402433Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 15, root: 0x4cb9f72cef82a2799d7b6ca8724e23f95e597b7b67331955d203885a4394c8e6, head slot: 536, head root: 0xcd8adc55b1024f77261d3b6c8713f217750507b008ab08a9ff054698f8a84f24) +2024-09-07T18:47:39.886151Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 544) +2024-09-07T18:47:40.600066Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 16, root: 0xdf6c026f30ebc81ce3bd5add17fab099f95912658f4e0212895ab7c8cf7f6140, head slot: 568, head root: 0x50f39e4f0717125f4723e2e9ed467b194fd597abe3bf915309f46af41dc67567) +2024-09-07T18:47:41.686303Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 17, root: 0x3b6b52e4ea17c263a57f4aa4feba38694f7d7ff820e582aa78d666e9b7ce09ce, head slot: 600, head root: 0xeb5df8615825482d6b824049a867045e46f7b19e135fcecb959ec4fcb45e5563) +2024-09-07T18:47:41.838967Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 544 +2024-09-07T18:47:42.021908Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 608) +2024-09-07T18:47:42.777135Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 18, root: 0x98bcae964aff154e72864af77e792fd187e573c57246b3494c1339490f4f87ac, head slot: 633, head root: 0x7dff19ae41cec51639c33bd4feb325e68894a5a5b35effce1e6a7c0c6e3d233c) +2024-09-07T18:47:43.257632Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 640) +2024-09-07T18:47:44.002416Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 19, root: 0xa854c641facc238c22b16b5722d8678e271d788a2d3cd5015429192066b0273b, head slot: 663, head root: 0xfbdaa65657f82bea07055d32f0f4e766df18f872312a3df14c08a2f49edbf4c9) +2024-09-07T18:47:44.167519Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 608 +2024-09-07T18:47:44.354286Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 672) +2024-09-07T18:47:45.008588Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 20, root: 0x23bbcc5e453f5b13e86904d7cc831aea21c24c9375e1e7e4bc21f53c82216672, head slot: 695, head root: 0x13d6ee13baf9aa775be7b868639abd19611de9e22b2d960454fcae14b83bdca9) +2024-09-07T18:47:45.162574Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 640 +2024-09-07T18:47:45.318296Z WARN quinn_udp: sendmsg error: Os { code: 101, kind: NetworkUnreachable, message: "Network is unreachable" }, Transmit: { destination: [2a01:4f8:1c1c:e264::1]:9001, src_ip: None, enc: Some(Ect0), len: 1200, segment_size: None } +2024-09-07T18:47:45.382456Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 704) +2024-09-07T18:47:46.082645Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 21, root: 0x95c53600001676b34a3e615a0c71fc272b6fd9d5a8e8bd9b8d248399d30b4e7f, head slot: 729, head root: 0xb480edf3335a15f56f4cb7498279ccb28abc3f4590718ba4d28b6c862cc1ea68) +2024-09-07T18:47:46.235479Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 672 +2024-09-07T18:47:46.396694Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 736) +2024-09-07T18:47:47.144997Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 22, root: 0x2c0e1109cff8c127f59eeae5c692590301980424312ffff65531daa669618dcf, head slot: 760, head root: 0xb8758b2a9f8e5d975761ca6521b5963097f11881c23c65bcba480ccad1b69731) +2024-09-07T18:47:47.327777Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 704 +2024-09-07T18:47:47.470526Z WARN discv5::handler: Authentication response already sent. Dropping session. Node: Node: 0xc77f..dc0b, addr: 95.43.68.156:30304 +2024-09-07T18:47:47.471077Z WARN discv5::service: RPC Request failed: id: e1c8013c07d2caeb, error InvalidRemotePacket +2024-09-07T18:47:47.471340Z WARN discv5::service: RPC Request failed: id: 585e7507fe6c4afb, error InvalidRemotePacket +2024-09-07T18:47:48.823081Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 23, root: 0x872392b690517caba6916e476b5c74f9f80cf4f1c0a1038644a3a7d0b71256b5, head slot: 791, head root: 0x0511fc6cb26cf9d22f07cafe472e03cadd5ac2fdac1b14b42067b1623c38e764) +2024-09-07T18:47:49.103355Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 736 +2024-09-07T18:47:50.398562Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 24, root: 0x6af78144624a2401b75d3fc89254ad05d2fbfa652fa8ad930f6d0a1601f9abc4, head slot: 823, head root: 0xe25eda53d1f9aec46ac4748e623abc4544a800dd791d6116eae3cc883745d881) +2024-09-07T18:47:50.701540Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 832) +2024-09-07T18:48:12.010975Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 25, root: 0x425c52e1cacda7e5bdbf080e7b95a522259fc08bdc9df4e61b23c0b6ed8da1f0, head slot: 855, head root: 0xdc2cbe24aba5eb51d7abdb98030587d047330c1b0d2a949e6258105c9cf81332) +2024-09-07T18:48:12.364227Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 864) +2024-09-07T18:48:13.337640Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 26, root: 0x4c0bc9b664d1199aac7bb8659cd850dd57b782bfaca1fdabfc750bf8c5c8f343, head slot: 888, head root: 0xb2434f99ddf46b0c58cbd2e45a0dab931e47f7b5f136891faa208c8efef87c5f) +2024-09-07T18:48:13.708407Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 832 +2024-09-07T18:48:14.132309Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 896) +2024-09-07T18:48:15.326142Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 27, root: 0x4720242331dff12985febad2704bebd454294f3ff8c0d9fc90a3d50ceb8d80f2, head slot: 920, head root: 0x85e4db6a98c42e856fa6b4cd9b761c48621e6200a99c60bae7ef2e424701ad62) +2024-09-07T18:48:15.721032Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 864 +2024-09-07T18:48:16.495194Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 28, root: 0xd23b46b4496c07f99efdaaeaff2bac9df250bfe30acc9bf34ebff678caa17df0, head slot: 951, head root: 0xb6d9ded6993390fdf043a5ca869cb0570459cb90bec93968f1875959bc1a31dd) +2024-09-07T18:48:16.654288Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 896 +2024-09-07T18:48:17.015999Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 960) +2024-09-07T18:48:17.780912Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 29, root: 0xeb1ab0e965b482ccc772274fd4cb8b8545547e4ff40661a07d48f33958d18437, head slot: 983, head root: 0x0dfe0d9d3a9a2c4fcc83cf3da4d6aa17d759d46a54cf88751794be08be70aa09) +2024-09-07T18:48:18.340263Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 992) +2024-09-07T18:48:19.324953Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 30, root: 0xd75c5bb2b2ddc7425511051f59d2480ab6f55a8c0ff8459c291289dea7092214, head slot: 1015, head root: 0x5c17a136d3e527b4352ced0be25e6a6249701e9f2aea1953a28712c87a981ccb) +2024-09-07T18:48:19.516461Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 960 +2024-09-07T18:48:19.725380Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1024) +2024-09-07T18:48:20.441259Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 31, root: 0xe1ac1ef51acf1c82e6eae33c724767fc6d6cd684b7170a7e1dc6f9f24e746eea, head slot: 1047, head root: 0x28abb44f0572388eede7c73ec63a0ad35600fb5cdb054bc89034794ad30704e0) +2024-09-07T18:48:20.587991Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 992 +2024-09-07T18:48:21.815786Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 32, root: 0x2622c3026b6617667c59692d14f20249d43ff842b0f15f863e48af9487dc3a23, head slot: 1079, head root: 0xac61dcb808551e9b1a4578a3163907c21f4930fc12d859a700e9e22077e3a33b) +2024-09-07T18:48:22.021712Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1024 +2024-09-07T18:48:22.114187Z INFO fork_choice_control::storage: saving state in slot 1024 +2024-09-07T18:48:22.252501Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1088) +2024-09-07T18:48:23.606058Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 33, root: 0x952851d8c8bb216796b7ebb0e6048194650a08c46894f25cab97b0db1f25ceac, head slot: 1111, head root: 0x8b1201efe87739697c1150f93324da0e861822888a00c5ac395368854ce1f811) +2024-09-07T18:48:23.974899Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1120) +2024-09-07T18:48:25.136392Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 34, root: 0x946dd56127121d321043e906927b5eb6556267c6eb9db6b1b7450f23e52eff33, head slot: 1143, head root: 0x186f6fa9a5fbcf28f95a30d261a9c70d5cb6440aabb4712f68a4cf2965de8f00) +2024-09-07T18:48:25.348126Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1088 +2024-09-07T18:48:25.440285Z INFO fork_choice_control::storage: saving state in slot 1024 +2024-09-07T18:48:25.815561Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1152) +2024-09-07T18:48:27.137870Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 35, root: 0x2f2c7a323b7bdb02417b7fa41ad617e9de1bfd36d6173770a899ee4b01720151, head slot: 1175, head root: 0x4ed4960085a70c1f4c1ecd71230e364fddd347e88327a3aa7fd7bc56864b6ba0) +2024-09-07T18:48:27.499458Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1120 +2024-09-07T18:48:28.354527Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1184) +2024-09-07T18:48:29.435535Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 36, root: 0x919850bf1ff8941ca331f6b5b914085c07c81b87b1e6c5228ed9b29d19ca64de, head slot: 1207, head root: 0xa6b600b9f572834524e4184d9dda23904ec56667f7efd70929ec6af5da6baeae) +2024-09-07T18:48:29.580386Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1152 +2024-09-07T18:48:30.814663Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 37, root: 0x6642f12e389957ac9662ff61d4113c3b85f9bf24a2eb34e1272bff27189736f8, head slot: 1239, head root: 0x98849c13543d8f5c07f87ac0485bf8ca757bdf9ec2f402271f0a336f6c509982) +2024-09-07T18:48:30.974318Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1184 +2024-09-07T18:48:32.962948Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 38, root: 0x70c7fa9e71a17ce905a4c2da68b47a39c49b9178001cb07da7c0c76e81d1e77e, head slot: 1271, head root: 0x20b0c3f1dddbb8ba277e7c1fe4ec66d7e100fbb5737f18a2c41c431e541d6c26) +2024-09-07T18:48:33.581855Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1280) +2024-09-07T18:48:35.333444Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 39, root: 0xef06c18fb968d745f8aa62360f89edae7a1aa8ca8125f13e8752681cf94980ae, head slot: 1303, head root: 0x4bc51da88b753a75f448203d29a14450d71ab16506dbd82beaa3161612ec2dcc) +2024-09-07T18:48:36.022550Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1312) +2024-09-07T18:48:37.009371Z WARN discv5::service: FINDNODE request failed with partial results node_id=0x29bf..bf7e addr=3.64.117.223:9100 error=Timeout received=6 expected=3 +2024-09-07T18:48:38.401476Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 40, root: 0x5f7466ff5c3ec3084485903c02c7fe701d77bb0214731873124416d4cc1b7330, head slot: 1335, head root: 0x910c4a998c9286fdf234ebe6257ebcd668c454d2de6967d3be5c45b5e01a184f) +2024-09-07T18:48:38.634578Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1280 +2024-09-07T18:48:42.001545Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 41, root: 0x09c36b794dac18b8dcae17b815e4bc7a45582d50e30db9761253cd4bdd55941d, head slot: 1367, head root: 0x1164dbbdadb06df9b422883f113d63e46c1de690ccbb5de8b587203d905a9139) +2024-09-07T18:48:42.161207Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1312 +2024-09-07T18:48:42.624734Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1376) +2024-09-07T18:48:44.209195Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 42, root: 0x19d20e293b7e6c29a4b09fbc15cf44b039bcf7702b75c237b51c55c1618b5114, head slot: 1399, head root: 0x19cdefcf6093504a8ecded0e418efeb72b37deb289af2f5da5019f11792ea1d9) +2024-09-07T18:48:44.742835Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1408) +2024-09-07T18:48:45.769146Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 43, root: 0x1c6b0e854533f7824c8de6e8747567dd0737637f4170c08dd8437e18f7ba71d1, head slot: 1431, head root: 0xedac6acc7f65396aa497db50638b5fe21fb44ec0465056a0caa30f4c27bbf98e) +2024-09-07T18:48:45.925504Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1376 +2024-09-07T18:48:47.271778Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 44, root: 0x9a790dd0acc27f40fa61d3e45393590d21a7a841ce7fa08d3d3c78b4b68a6e75, head slot: 1463, head root: 0xe0e8f658d3aa702a8519e4c95c6809be546dcaa177006c1a528be87d254fc7dd) +2024-09-07T18:48:47.448915Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1408 +2024-09-07T18:48:47.819351Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1472) +2024-09-07T18:48:49.197397Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 45, root: 0xa35e75bf8bc3316d4c33fda7fadec35c363774467455def4591aa283511af52c, head slot: 1495, head root: 0xdbf81c78db833280d1e4e7ea2a1c56fae628f166baade1440dee596da9b85f26) +2024-09-07T18:48:49.711311Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1504) +2024-09-07T18:48:51.206765Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 46, root: 0x8ae4f19959486b4d4ca791a5dd451af639391a39df0675c3e0aec8a3c402ed51, head slot: 1527, head root: 0xeae26952b0aeb7b2dc0a8e6c6c7b4df948a38a2e6a84a4fef17f069e1eb2ff11) +2024-09-07T18:48:51.922877Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1472 +2024-09-07T18:48:53.535673Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1536) +2024-09-07T18:48:55.061192Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 47, root: 0xecac42e531570d287eb945ff901fa27e4d778aa5b60e27410192ac5434e4b4dc, head slot: 1559, head root: 0xb42239dc3ca2cdbe7d29507b0aad48f6b2126c39889d9243eaab0cfd47853515) +2024-09-07T18:48:55.228988Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1504 +2024-09-07T18:48:56.625539Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 48, root: 0xd7e8bc18fd978e6ae3b5f85a5ad7df5ed1f3bb2464ae0e52e9e053a27389770d, head slot: 1591, head root: 0x69ce848326ed1f62e1e660bff5938f36ae53a1d07b580250a73d01938c5a6fa9) +2024-09-07T18:48:57.115641Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1536 +2024-09-07T18:48:57.680340Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1600) +2024-09-07T18:48:58.949906Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 49, root: 0x84e5a1e32b6d7773a68442ff7870f5a4c1bf1774b4ad6e6b1fe975cbddd6a050, head slot: 1623, head root: 0xdc97b390b9571b699270cc007353e4bcbbb89528fe324b95cc01b393aec64159) +2024-09-07T18:48:59.513101Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1632) +2024-09-07T18:49:00.624092Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 50, root: 0x9c5f9c2d42586cf3a2849f93c9d280f3d6f9c92d9dd3254f390066492dc9f89a, head slot: 1655, head root: 0x70f3334a6d798ef48bf295a23a640dc43706f4fe4fec0bcf95edde7bfae5c9c6) +2024-09-07T18:49:00.803211Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1600 +2024-09-07T18:49:01.064771Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1664) +2024-09-07T18:49:21.130748Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 51, root: 0x42d74d7105116e1ba23ff724d530bc670ae74481df551047dda03a3fcaddd55e, head slot: 1688, head root: 0xc2ed9aba06ea8c726eb12f65966a13f85d3e058163b1fe992d4d733b62da57c8) +2024-09-07T18:49:21.329604Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1632 +2024-09-07T18:49:21.529712Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1696) +2024-09-07T18:49:22.549131Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 52, root: 0x0ffe314d7304761899f25bb4f8697dc5178c0be5cdea8e846ba4670accb3788b, head slot: 1719, head root: 0xb7136efbf1d9d7d061fb51585ba28e4f1c111cb4e0bbb50d9589c149e48afd8d) +2024-09-07T18:49:22.820844Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1664 +2024-09-07T18:49:23.307293Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1728) +2024-09-07T18:49:24.418283Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 53, root: 0x6c46590297190c58f7b6580f4989d32c71137d46e73ad53bd8b9a01f75b142ed, head slot: 1751, head root: 0xbf54fe5062402221638fa3c7c7a2f963f518a0b2de0af9340a380168abb8cfdd) +2024-09-07T18:49:24.632539Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1696 +2024-09-07T18:49:24.897622Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1760) +2024-09-07T18:49:25.834665Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 54, root: 0xddee7300a71be5d5a91924f3bafbf68af47f7602f214f6400040b0f15facdb97, head slot: 1784, head root: 0x99a3167692ff0c2db4f718a30494ffabcbc8decccbec7a998b657d445178fffb) +2024-09-07T18:49:26.145112Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1728 +2024-09-07T18:49:26.397995Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1792) +2024-09-07T18:49:27.826526Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 55, root: 0x7b237795f893267820ecd911a9b43e05c485b5c15b6d42996cc3242c5454319d, head slot: 1816, head root: 0xfb82f7fae0152729ed7d9533111a79185cac0e87bd283c08bd452802fafdd8ee) +2024-09-07T18:49:28.298575Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1760 +2024-09-07T18:49:28.467450Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1824) +2024-09-07T18:49:29.742170Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 56, root: 0x6da65a40d5e9beee83d246979b6d96164230845595e9b5cd8cc83630d1fb6bd5, head slot: 1847, head root: 0x06556edc57bb024eeaeb10fb336f38d7d00b77b4ed8d1730f15b871979444e4f) +2024-09-07T18:49:29.963653Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1792 +2024-09-07T18:49:30.142637Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1856) +2024-09-07T18:49:30.829592Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 57, root: 0xd99bbeb3e1e577de91692eafde5adb348268515ac34070f9e721198b443e74cb, head slot: 1879, head root: 0x72c2505617e0f7f6e369b708e8e92af41fab9f1c3d7945e01bf986909ec1d284) +2024-09-07T18:49:31.007740Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1824 +2024-09-07T18:49:31.193476Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1888) +2024-09-07T18:49:31.818173Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 58, root: 0xb3a6c4367e809e01b9cd5c1724cfa47e44a1689dd95bc59b2484a8dfdd63c9e6, head slot: 1911, head root: 0x02b99f8bc5c227baf4125e2e8c7bbf6b5ccb7fda2ac41559159f87185e76c20a) +2024-09-07T18:49:31.992443Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1856 +2024-09-07T18:49:32.167606Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1920) +2024-09-07T18:49:32.936332Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 59, root: 0x98c8d91f3112aa062b402158ab612a055e1829421e2e7d4d35e7961323560f6d, head slot: 1943, head root: 0xb7d18ec58eb85f8ac406ae74a2697387e3dd638dbf95108c100364f7de01022e) +2024-09-07T18:49:33.183213Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1888 +2024-09-07T18:49:33.396808Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1952) +2024-09-07T18:49:34.354481Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 60, root: 0xdde1a406d488ffbc554c07dcdbd12168a03931b1711a79ced6aa06688fd5f82d, head slot: 1975, head root: 0xab4d9e2ba958bfb9f850ce1dcb97425ba00c79c3c5ffffd9f906d6af2b97597b) +2024-09-07T18:49:34.610678Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1920 +2024-09-07T18:49:35.236897Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 1984) +2024-09-07T18:49:36.239984Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 61, root: 0xeb6da2c7d76dcadaf189e02776b1b1bf6ce9373645d8056a067417ef89677580, head slot: 2008, head root: 0xceb4488c287ea807683bdc0f6e225d4a3ac4a460bba6757d9a88580cc745733f) +2024-09-07T18:49:36.432076Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1952 +2024-09-07T18:49:36.579682Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2016) +2024-09-07T18:49:37.797625Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 62, root: 0xf0d878dbb9a085063b1bf0a6f72df5f8e13ff0eab4aa10595c4d1f6218b94cd8, head slot: 2039, head root: 0x339d14dca377dfd0b1905ad4b79edaa4b5515a941278687e778413f4ebaa2433) +2024-09-07T18:49:38.246247Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 1984 +2024-09-07T18:49:38.596084Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2048) +2024-09-07T18:49:40.053807Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 63, root: 0x229544f9930cf513e6fe33ca7b655d198f8e4ea4c278363ff95291ba9d699872, head slot: 2071, head root: 0xd5d560e70a4ec870882cc8c024a16149bdb54b490a3e2a77fcdac64a3e996239) +2024-09-07T18:49:40.406475Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2016 +2024-09-07T18:49:40.706635Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2080) +2024-09-07T18:49:42.419232Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 64, root: 0xa873f2bb9e0aa19add9a65bcad38835b5e7bb331ffdebf8f0b51604f8baad904, head slot: 2103, head root: 0x48428d9d029d053b5c0c9413c8c822dd9ee84389821e83ce91c207578979a681) +2024-09-07T18:49:42.739608Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2048 +2024-09-07T18:49:42.917128Z INFO fork_choice_control::storage: saving state in slot 2048 +2024-09-07T18:49:43.300777Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2112) +2024-09-07T18:49:44.304083Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 65, root: 0x15af014a2ca0637edc3826457a32e94f2bf8217c5d9f7350b03beb80ac6c2cbe, head slot: 2135, head root: 0x79e82699826ea345319eafe017214438f383db1c3f0d84829370a73b867dce80) +2024-09-07T18:49:44.535826Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2080 +2024-09-07T18:49:44.642921Z INFO fork_choice_control::storage: saving state in slot 2048 +2024-09-07T18:49:44.758229Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2144) +2024-09-07T18:49:45.598401Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 66, root: 0x12d51bdf609c9687288dcc22a5c3312cc2a526d3edaa9d9dd8eb41c2574d98cf, head slot: 2167, head root: 0xbaed3749793366550458441131ba4d061ef8826f5b5f5c3d1a416b63adc4d3b4) +2024-09-07T18:49:45.815988Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2112 +2024-09-07T18:49:45.996280Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2176) +2024-09-07T18:49:46.785486Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 67, root: 0x71dff2dc1185b1da9cdf7ecc056774f2a8dad6f0b7220c289660ce98b8692407, head slot: 2199, head root: 0x4a6d29fc35be371a12aebc14b41bdf0a3de27a291ca68cf92886dbe6d2a760f8) +2024-09-07T18:49:47.009787Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2144 +2024-09-07T18:49:47.218594Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2208) +2024-09-07T18:49:48.558653Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 68, root: 0x003f18053330b3a95203b16a406b28e00f43f1d3f35121157899aaa4952257b1, head slot: 2231, head root: 0x93f88f8949bd5ca7fa31d772c300a4a1c66dd59b1208519e4c3d0c88e80faae6) +2024-09-07T18:49:48.922625Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2176 +2024-09-07T18:49:49.197336Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2240) +2024-09-07T18:49:50.103609Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 69, root: 0x19af17d412df3801ed144ee99182892f2c414df7b43f139d5e3e88f3c6841bbb, head slot: 2263, head root: 0x9302cfbbe557a669a9d88f29f86d3dc7662772f806f67119d1fc07928c15b241) +2024-09-07T18:49:50.603706Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2208 +2024-09-07T18:49:51.002326Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2272) +2024-09-07T18:49:51.915980Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 70, root: 0x76d6c85c7bbe42ab9ac8f6cbd59bb31e74174fb4ae1b0cedddfbc4d6334ce4a0, head slot: 2295, head root: 0xc3ca07917bb0298fa5a5158c1bbfadd7ccb04600e04bf0e089df60f27862807a) +2024-09-07T18:49:52.200649Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2240 +2024-09-07T18:49:52.352834Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2304) +2024-09-07T18:49:53.348843Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 71, root: 0x959edd33b9ed1ca5f87c202dac38f855db0759bbab97484493d5ad03c8251e99, head slot: 2327, head root: 0xd1d4b03f307fc220996cabcd86d1e89bd7314955ecdb25e91c85573a2a327414) +2024-09-07T18:49:53.609080Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2272 +2024-09-07T18:49:53.866321Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2336) +2024-09-07T18:49:54.605898Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 72, root: 0x08568877ac3702a5fe48c1300903c67b79210f0aba4a2db2c6f589e99a996683, head slot: 2359, head root: 0x5fcf629f757d6493d104bce62984a4643a515edf9adb3271c6c8a037b34f70f8) +2024-09-07T18:49:54.859351Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2304 +2024-09-07T18:49:55.128692Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2368) +2024-09-07T18:49:55.855098Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 73, root: 0x8a48ca26604bf4a41da3630787f5487d899b6be512fa0c8d2ae372a5d9158ef0, head slot: 2391, head root: 0x87815c55bc9f2bc9b84b5197f397bdb53b1212539283f8fa03ff30af62c7299e) +2024-09-07T18:49:56.051044Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2336 +2024-09-07T18:49:56.250338Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2400) +2024-09-07T18:49:57.362742Z INFO fork_choice_control::mutator: new finalized checkpoint (epoch: 74, root: 0xfd4486b579007064eef3a0af7874de1a38ac00a16c57fda73c58b178bfbcc542, head slot: 2423, head root: 0x2b507bc8c45a47d8c316102b9cbd014758f55715d79e3d70396f10d7c653451a) +2024-09-07T18:49:57.656687Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2368 +2024-09-07T18:49:58.141315Z INFO runtime::runtime: saving current chain before exit… +2024-09-07T18:49:58.299309Z INFO fork_choice_control::mutator: unloading old beacon states (head slot: 2432) +2024-09-07T18:49:59.205461Z INFO fork_choice_control::storage: saving checkpoint block & state in slot 2368 +2024-09-07T18:49:59.422002Z INFO fork_choice_control::mutator: chain saved (finalized blocks: 1, unfinalized blocks: 79) diff --git a/metrics/src/lib.rs b/metrics/src/lib.rs index 4977373f..eabc9151 100644 --- a/metrics/src/lib.rs +++ b/metrics/src/lib.rs @@ -5,7 +5,7 @@ pub use crate::{ }; pub fn initialize_metrics_module() { tracing_subscriber::fmt() - .with_max_level(tracing::Level::INFO) // Adjust log level as needed + .with_max_level(tracing::Level::INFO) // log level .init(); } diff --git a/metrics/src/server.rs b/metrics/src/server.rs index 1186a24f..98b85a95 100644 --- a/metrics/src/server.rs +++ b/metrics/src/server.rs @@ -22,7 +22,7 @@ use futures::channel::mpsc::UnboundedSender; use helper_functions::misc; use http_api_utils::ApiError; use tracing::{info, warn}; -use tracing_subscriber::{fmt, EnvFilter}; +use tracing_subscriber::{fmt, EnvFilter};// yet to implement use prometheus::TextEncoder; use prometheus_client::registry::Registry; use prometheus_metrics::Metrics; diff --git a/p2p/src/attestation_subnets.rs b/p2p/src/attestation_subnets.rs index 947b4248..7b09ce1a 100644 --- a/p2p/src/attestation_subnets.rs +++ b/p2p/src/attestation_subnets.rs @@ -4,6 +4,7 @@ use anyhow::Result; use features::Feature; use helper_functions::misc; use itertools::izip; +use tracing::{info, debug, instrument}; use typenum::Unsigned as _; use types::{ config::Config, @@ -243,29 +244,44 @@ impl AttestationSubnets

{ *subnet_state = match subnet_state { // If persistent subscription exists at current slot, do not change anything - Persistent { expiration } => Persistent { - expiration: *expiration, - }, + Persistent { expiration } => { + debug!(subnet_id, ?expiration, "State remains persistent"); + Persistent { + expiration: *expiration, + } + } // If validator is aggregator, subscribe to subnet or extend existing subscription // (except if persistent subscription already exists) - Subscribed { expiration } if is_aggregator => Subscribed { - expiration: (*expiration).max(slot + 1), - }, + Subscribed { expiration } if is_aggregator => { + debug!(subnet_id, ?expiration, "Aggregator extending subscription"); + Subscribed { + expiration: (*expiration).max(slot + 1), + } + } // Ignore DiscoveringPeers expiration for the new subscription - Irrelevant | DiscoveringPeers { .. } if is_aggregator => Subscribed { - expiration: slot + 1, - }, + Irrelevant | DiscoveringPeers { .. } if is_aggregator => { + info!(subnet_id, "Aggregator subscribing to subnet"); + Subscribed { + expiration: slot + 1, + } + } // If validator is not an aggregator, and subscription exists at current slot, do not change anything - Subscribed { expiration } => Subscribed { - expiration: *expiration, - }, + Subscribed { expiration } => { + debug!(subnet_id, ?expiration, "Non-aggregator keeping subscription"); + Subscribed { + expiration: *expiration, + } + } // If validator is not an aggregator, discover peers in subnet - Irrelevant | DiscoveringPeers { .. } => DiscoveringPeers { - expiration: subnet_state.max_expiration(slot + 1), - }, + Irrelevant | DiscoveringPeers { .. } => { + debug!(subnet_id, "Discovering peers for subnet"); + DiscoveringPeers { + expiration: subnet_state.max_expiration(slot + 1), + } + } }; } Ok(()) } -} +} \ No newline at end of file