diff --git a/beacon_node/lighthouse_network/src/types/globals.rs b/beacon_node/lighthouse_network/src/types/globals.rs index f46eb05ceb0..3217f41f61a 100644 --- a/beacon_node/lighthouse_network/src/types/globals.rs +++ b/beacon_node/lighthouse_network/src/types/globals.rs @@ -9,7 +9,7 @@ use network_utils::enr_ext::EnrExt; use parking_lot::RwLock; use std::collections::HashSet; use std::sync::Arc; -use tracing::error; +use tracing::{debug, error}; use types::data_column_custody_group::{compute_subnets_from_custody_group, get_custody_groups}; use types::{ChainSpec, ColumnIndex, DataColumnSubnetId, EthSpec}; @@ -79,7 +79,7 @@ impl NetworkGlobals { sampling_subnets.extend(subnets); } - tracing::debug!( + debug!( cgc = custody_group_count, ?sampling_subnets, "Starting node with custody params" diff --git a/beacon_node/lighthouse_network/tests/rpc_tests.rs b/beacon_node/lighthouse_network/tests/rpc_tests.rs index 60e3e3da972..d74f04a85de 100644 --- a/beacon_node/lighthouse_network/tests/rpc_tests.rs +++ b/beacon_node/lighthouse_network/tests/rpc_tests.rs @@ -12,7 +12,7 @@ use std::sync::Arc; use std::time::{Duration, Instant}; use tokio::runtime::Runtime; use tokio::time::sleep; -use tracing::{Instrument, debug, error, info_span, warn}; +use tracing::{Instrument, debug, error, info, info_span, warn}; use types::{ BeaconBlock, BeaconBlockAltair, BeaconBlockBase, BeaconBlockBellatrix, BeaconBlockHeader, BlobSidecar, ChainSpec, DataColumnSidecar, DataColumnsByRootIdentifier, EmptyBlock, Epoch, @@ -1039,7 +1039,7 @@ fn test_tcp_columns_by_root_chunked_rpc() { loop { match sender.next_event().await { NetworkEvent::PeerConnectedOutgoing(peer_id) => { - tracing::info!("Sending RPC"); + info!("Sending RPC"); tokio::time::sleep(Duration::from_secs(1)).await; sender .send_request(peer_id, AppRequestId::Router, rpc_request.clone()) @@ -1053,7 +1053,7 @@ fn test_tcp_columns_by_root_chunked_rpc() { Response::DataColumnsByRoot(Some(sidecar)) => { assert_eq!(sidecar, data_column.clone()); messages_received += 1; - tracing::info!("Chunk received"); + info!("Chunk received"); } Response::DataColumnsByRoot(None) => { // should be exactly messages_to_send @@ -1080,7 +1080,7 @@ fn test_tcp_columns_by_root_chunked_rpc() { } => { if request_type == rpc_request { // send the response - tracing::info!("Receiver got request"); + info!("Receiver got request"); for _ in 0..messages_to_send { receiver.send_response( @@ -1088,7 +1088,7 @@ fn test_tcp_columns_by_root_chunked_rpc() { inbound_request_id, rpc_response.clone(), ); - tracing::info!("Sending message"); + info!("Sending message"); } // send the stream termination receiver.send_response( @@ -1096,11 +1096,11 @@ fn test_tcp_columns_by_root_chunked_rpc() { inbound_request_id, Response::DataColumnsByRoot(None), ); - tracing::info!("Send stream term"); + info!("Send stream term"); } } e => { - tracing::info!(?e, "Got event"); + info!(?e, "Got event"); } // Ignore other events } } @@ -1184,7 +1184,7 @@ fn test_tcp_columns_by_range_chunked_rpc() { loop { match sender.next_event().await { NetworkEvent::PeerConnectedOutgoing(peer_id) => { - tracing::info!("Sending RPC"); + info!("Sending RPC"); sender .send_request(peer_id, AppRequestId::Router, rpc_request.clone()) .unwrap(); @@ -1197,7 +1197,7 @@ fn test_tcp_columns_by_range_chunked_rpc() { Response::DataColumnsByRange(Some(sidecar)) => { assert_eq!(sidecar, data_column.clone()); messages_received += 1; - tracing::info!("Chunk received"); + info!("Chunk received"); } Response::DataColumnsByRange(None) => { // should be exactly messages_to_send @@ -1224,7 +1224,7 @@ fn test_tcp_columns_by_range_chunked_rpc() { } => { if request_type == rpc_request { // send the response - tracing::info!("Receiver got request"); + info!("Receiver got request"); for _ in 0..messages_to_send { receiver.send_response( @@ -1232,7 +1232,7 @@ fn test_tcp_columns_by_range_chunked_rpc() { inbound_request_id, rpc_response.clone(), ); - tracing::info!("Sending message"); + info!("Sending message"); } // send the stream termination receiver.send_response( @@ -1240,7 +1240,7 @@ fn test_tcp_columns_by_range_chunked_rpc() { inbound_request_id, Response::DataColumnsByRange(None), ); - tracing::info!("Send stream term"); + info!("Send stream term"); } } _ => {} // Ignore other events diff --git a/beacon_node/network/src/sync/backfill_sync/mod.rs b/beacon_node/network/src/sync/backfill_sync/mod.rs index 6c0cbd7e554..9802ec56a16 100644 --- a/beacon_node/network/src/sync/backfill_sync/mod.rs +++ b/beacon_node/network/src/sync/backfill_sync/mod.rs @@ -346,7 +346,7 @@ impl BackFillSync { } } CouplingError::BlobPeerFailure(msg) => { - tracing::debug!(?batch_id, msg, "Blob peer failure"); + debug!(?batch_id, msg, "Blob peer failure"); } CouplingError::InternalError(msg) => { error!(?batch_id, msg, "Block components coupling internal error"); diff --git a/beacon_node/network/src/sync/block_sidecar_coupling.rs b/beacon_node/network/src/sync/block_sidecar_coupling.rs index 01929cbf906..6d2896c604f 100644 --- a/beacon_node/network/src/sync/block_sidecar_coupling.rs +++ b/beacon_node/network/src/sync/block_sidecar_coupling.rs @@ -356,7 +356,7 @@ impl RangeBlockComponentsRequest { // we request the data from. // If there are duplicated indices, its likely a peer sending us the same index multiple times. // However we can still proceed even if there are extra columns, just log an error. - tracing::debug!(?block_root, ?index, "Repeated column for block_root"); + debug!(?block_root, ?index, "Repeated column for block_root"); continue; } } @@ -407,7 +407,7 @@ impl RangeBlockComponentsRequest { if !data_columns_by_index.is_empty() { let remaining_indices = data_columns_by_index.keys().collect::>(); // log the error but don't return an error, we can still progress with extra columns. - tracing::debug!( + debug!( ?block_root, ?remaining_indices, "Not all columns consumed for block" @@ -427,7 +427,7 @@ impl RangeBlockComponentsRequest { let remaining_roots = data_columns_by_block.keys().collect::>(); // log the error but don't return an error, we can still progress with responses. // this is most likely an internal error with overrequesting or a client bug. - tracing::debug!(?remaining_roots, "Not all columns consumed for block"); + debug!(?remaining_roots, "Not all columns consumed for block"); } Ok(rpc_blocks) diff --git a/beacon_node/network/src/sync/range_sync/chain.rs b/beacon_node/network/src/sync/range_sync/chain.rs index 014d728ffe4..dc33983866f 100644 --- a/beacon_node/network/src/sync/range_sync/chain.rs +++ b/beacon_node/network/src/sync/range_sync/chain.rs @@ -18,7 +18,7 @@ use std::collections::{BTreeMap, HashSet, btree_map::Entry}; use std::hash::{Hash, Hasher}; use std::marker::PhantomData; use strum::IntoStaticStr; -use tracing::{Span, debug, instrument, warn}; +use tracing::{Span, debug, error, instrument, warn}; use types::{ColumnIndex, Epoch, EthSpec, Hash256, Slot}; /// Blocks are downloaded in batches from peers. This constant specifies how many epochs worth of @@ -942,10 +942,10 @@ impl SyncingChain { } } CouplingError::BlobPeerFailure(msg) => { - tracing::debug!(?batch_id, msg, "Blob peer failure"); + debug!(?batch_id, msg, "Blob peer failure"); } CouplingError::InternalError(msg) => { - tracing::error!(?batch_id, msg, "Block components coupling internal error"); + error!(?batch_id, msg, "Block components coupling internal error"); } } } diff --git a/boot_node/src/config.rs b/boot_node/src/config.rs index fb0daf52641..5b13b95c973 100644 --- a/boot_node/src/config.rs +++ b/boot_node/src/config.rs @@ -14,6 +14,7 @@ use ssz::Encode; use std::net::{SocketAddrV4, SocketAddrV6}; use std::time::Duration; use std::{marker::PhantomData, path::PathBuf}; +use tracing::{info, warn}; use types::EthSpec; /// A set of configuration parameters for the bootnode, established from CLI arguments. @@ -117,7 +118,7 @@ impl BootNodeConfig { let genesis_state_root = genesis_state .canonical_root() .map_err(|e| format!("Error hashing genesis state: {e:?}"))?; - tracing::info!(root = ?genesis_state_root, "Genesis state found"); + info!(root = ?genesis_state_root, "Genesis state found"); let enr_fork = spec.enr_fork_id::( types::Slot::from(0u64), genesis_state.genesis_validators_root(), @@ -125,7 +126,7 @@ impl BootNodeConfig { Some(enr_fork.as_ssz_bytes()) } else { - tracing::warn!("No genesis state provided. No Eth2 field added to the ENR"); + warn!("No genesis state provided. No Eth2 field added to the ENR"); None } }; diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index c93016a0f54..fc6e77b9f5b 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -28,7 +28,7 @@ use std::path::PathBuf; use std::process::exit; use std::sync::LazyLock; use task_executor::ShutdownReason; -use tracing::{Level, info}; +use tracing::{Level, info, warn}; use tracing_subscriber::{Layer, filter::EnvFilter, layer::SubscriberExt, util::SubscriberInitExt}; use types::{EthSpec, EthSpecId}; use validator_client::ProductionValidatorClient; @@ -730,7 +730,7 @@ fn run( #[cfg(all(feature = "modern", target_arch = "x86_64"))] if !std::is_x86_feature_detected!("adx") { - tracing::warn!( + warn!( advice = "If you get a SIGILL, please try Lighthouse portable build", "CPU seems incompatible with optimized Lighthouse build" );