diff --git a/crates/networking/rpc/engine/fork_choice.rs b/crates/networking/rpc/engine/fork_choice.rs index 81632613f7c..afeb31c78fa 100644 --- a/crates/networking/rpc/engine/fork_choice.rs +++ b/crates/networking/rpc/engine/fork_choice.rs @@ -6,7 +6,7 @@ use ethrex_blockchain::{ use ethrex_common::types::{BlockHeader, ELASTICITY_MULTIPLIER}; use ethrex_p2p::sync::SyncMode; use serde_json::Value; -use tracing::{debug, info, warn}; +use tracing::{info, warn}; use crate::{ rpc::{RpcApiContext, RpcHandler}, @@ -170,12 +170,12 @@ async fn handle_forkchoice( context: RpcApiContext, version: usize, ) -> Result<(Option, ForkChoiceResponse), RpcErr> { - debug!( - "New fork choice request v{} with head: {:#x}, safe: {:#x}, finalized: {:#x}.", - version, - fork_choice_state.head_block_hash, - fork_choice_state.safe_block_hash, - fork_choice_state.finalized_block_hash + info!( + version = %format!("v{}", version), + head = %format!("{:#x}", fork_choice_state.head_block_hash), + safe = %format!("{:#x}", fork_choice_state.safe_block_hash), + finalized = %format!("v{:#x}", fork_choice_state.finalized_block_hash), + "New fork choice update", ); if let Some(latest_valid_hash) = context @@ -369,7 +369,6 @@ async fn build_payload( fork_choice_state: &ForkChoiceState, version: u8, ) -> Result { - info!("Fork choice updated includes payload attributes. Creating a new payload."); let args = BuildPayloadArgs { parent: fork_choice_state.head_block_hash, timestamp: attributes.timestamp, @@ -384,6 +383,11 @@ async fn build_payload( let payload_id = args .id() .map_err(|error| RpcErr::Internal(error.to_string()))?; + + info!( + id = payload_id, + "Fork choice updated includes payload attributes. Creating a new payload" + ); let payload = match create_payload(&args, &context.storage, context.node_data.extra_data) { Ok(payload) => payload, Err(ChainError::EvmError(error)) => return Err(error.into()), diff --git a/crates/networking/rpc/engine/payload.rs b/crates/networking/rpc/engine/payload.rs index 233a80dbd15..1ecfeed8a9a 100644 --- a/crates/networking/rpc/engine/payload.rs +++ b/crates/networking/rpc/engine/payload.rs @@ -604,7 +604,7 @@ async fn handle_new_payload_v1_v2( let latest_valid_hash = block.header.parent_hash; if context.syncer.sync_mode() == SyncMode::Snap { - warn!("Snap sync in progress, skipping new payload validation"); + debug!("Snap sync in progress, skipping new payload validation"); return Ok(PayloadStatus::syncing()); } @@ -783,7 +783,10 @@ fn validate_fork(block: &Block, fork: Fork, context: &RpcApiContext) -> Result<( } async fn get_payload(payload_id: u64, context: &RpcApiContext) -> Result { - debug!("Requested payload with id: {:#018x}", payload_id); + info!( + id = %format!("{:#018x}", payload_id), + "Requested payload with" + ); let (blobs_bundle, requests, block_value, block) = { let PayloadBuildResult { blobs_bundle,