Skip to content

Commit 264a295

Browse files
authored
Merge of #8300
2 parents 713e477 + 2bb94c8 commit 264a295

File tree

7 files changed

+26
-25
lines changed

7 files changed

+26
-25
lines changed

beacon_node/lighthouse_network/src/types/globals.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use network_utils::enr_ext::EnrExt;
99
use parking_lot::RwLock;
1010
use std::collections::HashSet;
1111
use std::sync::Arc;
12-
use tracing::error;
12+
use tracing::{debug, error};
1313
use types::data_column_custody_group::{compute_subnets_from_custody_group, get_custody_groups};
1414
use types::{ChainSpec, ColumnIndex, DataColumnSubnetId, EthSpec};
1515

@@ -79,7 +79,7 @@ impl<E: EthSpec> NetworkGlobals<E> {
7979
sampling_subnets.extend(subnets);
8080
}
8181

82-
tracing::debug!(
82+
debug!(
8383
cgc = custody_group_count,
8484
?sampling_subnets,
8585
"Starting node with custody params"

beacon_node/lighthouse_network/tests/rpc_tests.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::sync::Arc;
1212
use std::time::{Duration, Instant};
1313
use tokio::runtime::Runtime;
1414
use tokio::time::sleep;
15-
use tracing::{Instrument, debug, error, info_span, warn};
15+
use tracing::{Instrument, debug, error, info, info_span, warn};
1616
use types::{
1717
BeaconBlock, BeaconBlockAltair, BeaconBlockBase, BeaconBlockBellatrix, BeaconBlockHeader,
1818
BlobSidecar, ChainSpec, DataColumnSidecar, DataColumnsByRootIdentifier, EmptyBlock, Epoch,
@@ -1039,7 +1039,7 @@ fn test_tcp_columns_by_root_chunked_rpc() {
10391039
loop {
10401040
match sender.next_event().await {
10411041
NetworkEvent::PeerConnectedOutgoing(peer_id) => {
1042-
tracing::info!("Sending RPC");
1042+
info!("Sending RPC");
10431043
tokio::time::sleep(Duration::from_secs(1)).await;
10441044
sender
10451045
.send_request(peer_id, AppRequestId::Router, rpc_request.clone())
@@ -1053,7 +1053,7 @@ fn test_tcp_columns_by_root_chunked_rpc() {
10531053
Response::DataColumnsByRoot(Some(sidecar)) => {
10541054
assert_eq!(sidecar, data_column.clone());
10551055
messages_received += 1;
1056-
tracing::info!("Chunk received");
1056+
info!("Chunk received");
10571057
}
10581058
Response::DataColumnsByRoot(None) => {
10591059
// should be exactly messages_to_send
@@ -1080,27 +1080,27 @@ fn test_tcp_columns_by_root_chunked_rpc() {
10801080
} => {
10811081
if request_type == rpc_request {
10821082
// send the response
1083-
tracing::info!("Receiver got request");
1083+
info!("Receiver got request");
10841084

10851085
for _ in 0..messages_to_send {
10861086
receiver.send_response(
10871087
peer_id,
10881088
inbound_request_id,
10891089
rpc_response.clone(),
10901090
);
1091-
tracing::info!("Sending message");
1091+
info!("Sending message");
10921092
}
10931093
// send the stream termination
10941094
receiver.send_response(
10951095
peer_id,
10961096
inbound_request_id,
10971097
Response::DataColumnsByRoot(None),
10981098
);
1099-
tracing::info!("Send stream term");
1099+
info!("Send stream term");
11001100
}
11011101
}
11021102
e => {
1103-
tracing::info!(?e, "Got event");
1103+
info!(?e, "Got event");
11041104
} // Ignore other events
11051105
}
11061106
}
@@ -1184,7 +1184,7 @@ fn test_tcp_columns_by_range_chunked_rpc() {
11841184
loop {
11851185
match sender.next_event().await {
11861186
NetworkEvent::PeerConnectedOutgoing(peer_id) => {
1187-
tracing::info!("Sending RPC");
1187+
info!("Sending RPC");
11881188
sender
11891189
.send_request(peer_id, AppRequestId::Router, rpc_request.clone())
11901190
.unwrap();
@@ -1197,7 +1197,7 @@ fn test_tcp_columns_by_range_chunked_rpc() {
11971197
Response::DataColumnsByRange(Some(sidecar)) => {
11981198
assert_eq!(sidecar, data_column.clone());
11991199
messages_received += 1;
1200-
tracing::info!("Chunk received");
1200+
info!("Chunk received");
12011201
}
12021202
Response::DataColumnsByRange(None) => {
12031203
// should be exactly messages_to_send
@@ -1224,23 +1224,23 @@ fn test_tcp_columns_by_range_chunked_rpc() {
12241224
} => {
12251225
if request_type == rpc_request {
12261226
// send the response
1227-
tracing::info!("Receiver got request");
1227+
info!("Receiver got request");
12281228

12291229
for _ in 0..messages_to_send {
12301230
receiver.send_response(
12311231
peer_id,
12321232
inbound_request_id,
12331233
rpc_response.clone(),
12341234
);
1235-
tracing::info!("Sending message");
1235+
info!("Sending message");
12361236
}
12371237
// send the stream termination
12381238
receiver.send_response(
12391239
peer_id,
12401240
inbound_request_id,
12411241
Response::DataColumnsByRange(None),
12421242
);
1243-
tracing::info!("Send stream term");
1243+
info!("Send stream term");
12441244
}
12451245
}
12461246
_ => {} // Ignore other events

beacon_node/network/src/sync/backfill_sync/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
346346
}
347347
}
348348
CouplingError::BlobPeerFailure(msg) => {
349-
tracing::debug!(?batch_id, msg, "Blob peer failure");
349+
debug!(?batch_id, msg, "Blob peer failure");
350350
}
351351
CouplingError::InternalError(msg) => {
352352
error!(?batch_id, msg, "Block components coupling internal error");

beacon_node/network/src/sync/block_sidecar_coupling.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
356356
// we request the data from.
357357
// If there are duplicated indices, its likely a peer sending us the same index multiple times.
358358
// However we can still proceed even if there are extra columns, just log an error.
359-
tracing::debug!(?block_root, ?index, "Repeated column for block_root");
359+
debug!(?block_root, ?index, "Repeated column for block_root");
360360
continue;
361361
}
362362
}
@@ -407,7 +407,7 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
407407
if !data_columns_by_index.is_empty() {
408408
let remaining_indices = data_columns_by_index.keys().collect::<Vec<_>>();
409409
// log the error but don't return an error, we can still progress with extra columns.
410-
tracing::debug!(
410+
debug!(
411411
?block_root,
412412
?remaining_indices,
413413
"Not all columns consumed for block"
@@ -427,7 +427,7 @@ impl<E: EthSpec> RangeBlockComponentsRequest<E> {
427427
let remaining_roots = data_columns_by_block.keys().collect::<Vec<_>>();
428428
// log the error but don't return an error, we can still progress with responses.
429429
// this is most likely an internal error with overrequesting or a client bug.
430-
tracing::debug!(?remaining_roots, "Not all columns consumed for block");
430+
debug!(?remaining_roots, "Not all columns consumed for block");
431431
}
432432

433433
Ok(rpc_blocks)

beacon_node/network/src/sync/range_sync/chain.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::collections::{BTreeMap, HashSet, btree_map::Entry};
1818
use std::hash::{Hash, Hasher};
1919
use std::marker::PhantomData;
2020
use strum::IntoStaticStr;
21-
use tracing::{Span, debug, instrument, warn};
21+
use tracing::{Span, debug, error, instrument, warn};
2222
use types::{ColumnIndex, Epoch, EthSpec, Hash256, Slot};
2323

2424
/// Blocks are downloaded in batches from peers. This constant specifies how many epochs worth of
@@ -942,10 +942,10 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
942942
}
943943
}
944944
CouplingError::BlobPeerFailure(msg) => {
945-
tracing::debug!(?batch_id, msg, "Blob peer failure");
945+
debug!(?batch_id, msg, "Blob peer failure");
946946
}
947947
CouplingError::InternalError(msg) => {
948-
tracing::error!(?batch_id, msg, "Block components coupling internal error");
948+
error!(?batch_id, msg, "Block components coupling internal error");
949949
}
950950
}
951951
}

boot_node/src/config.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use ssz::Encode;
1414
use std::net::{SocketAddrV4, SocketAddrV6};
1515
use std::time::Duration;
1616
use std::{marker::PhantomData, path::PathBuf};
17+
use tracing::{info, warn};
1718
use types::EthSpec;
1819

1920
/// A set of configuration parameters for the bootnode, established from CLI arguments.
@@ -117,15 +118,15 @@ impl<E: EthSpec> BootNodeConfig<E> {
117118
let genesis_state_root = genesis_state
118119
.canonical_root()
119120
.map_err(|e| format!("Error hashing genesis state: {e:?}"))?;
120-
tracing::info!(root = ?genesis_state_root, "Genesis state found");
121+
info!(root = ?genesis_state_root, "Genesis state found");
121122
let enr_fork = spec.enr_fork_id::<E>(
122123
types::Slot::from(0u64),
123124
genesis_state.genesis_validators_root(),
124125
);
125126

126127
Some(enr_fork.as_ssz_bytes())
127128
} else {
128-
tracing::warn!("No genesis state provided. No Eth2 field added to the ENR");
129+
warn!("No genesis state provided. No Eth2 field added to the ENR");
129130
None
130131
}
131132
};

lighthouse/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use std::path::PathBuf;
2828
use std::process::exit;
2929
use std::sync::LazyLock;
3030
use task_executor::ShutdownReason;
31-
use tracing::{Level, info};
31+
use tracing::{Level, info, warn};
3232
use tracing_subscriber::{Layer, filter::EnvFilter, layer::SubscriberExt, util::SubscriberInitExt};
3333
use types::{EthSpec, EthSpecId};
3434
use validator_client::ProductionValidatorClient;
@@ -730,7 +730,7 @@ fn run<E: EthSpec>(
730730

731731
#[cfg(all(feature = "modern", target_arch = "x86_64"))]
732732
if !std::is_x86_feature_detected!("adx") {
733-
tracing::warn!(
733+
warn!(
734734
advice = "If you get a SIGILL, please try Lighthouse portable build",
735735
"CPU seems incompatible with optimized Lighthouse build"
736736
);

0 commit comments

Comments
 (0)