diff --git a/Cargo.lock b/Cargo.lock index 1cf523e3e6..7e03110340 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2722,6 +2722,7 @@ dependencies = [ "ssz_types", "test_random_derive", "tokio", + "tracing", "types", "zeroize", ] diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index bbdf1a054b..8bbd2f9257 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -130,7 +130,7 @@ impl TryFrom> for ProvenancedPayload MockBuilder { .ok_or_else(|| "missing payload for tx root".to_string())?; let (payload, blobs) = payload.deconstruct(); + debug!( + payload_type=%payload.fork_name(), + "Fork name for received payload" + ); let full_block = block .try_into_full_block(Some(payload.clone())) .ok_or("Internal error, just provided a payload")?; debug!( txs_count = payload.transactions().len(), + fork = %full_block.fork_name_unchecked(), blob_count = blobs.as_ref().map(|b| b.commitments.len()), "Got full payload, sending to local beacon node for propagation" ); diff --git a/beacon_node/http_api/src/publish_blocks.rs b/beacon_node/http_api/src/publish_blocks.rs index b613cf8467..4f05c95709 100644 --- a/beacon_node/http_api/src/publish_blocks.rs +++ b/beacon_node/http_api/src/publish_blocks.rs @@ -99,7 +99,7 @@ pub async fn publish_block>( }; let block = unverified_block.inner_block(); - debug!(slot = %block.slot(), "Signed block received in HTTP API"); + debug!(slot = %block.slot(), fork=%block.fork_name_unchecked(), provenance, "Signed block received in HTTP API"); /* actually publish a block */ let publish_block_p2p = move |block: Arc>, diff --git a/common/eth2/Cargo.toml b/common/eth2/Cargo.toml index 5d0ad1f45e..3666c8394e 100644 --- a/common/eth2/Cargo.toml +++ b/common/eth2/Cargo.toml @@ -30,6 +30,7 @@ ssz_types = { workspace = true } test_random_derive = { path = "../../common/test_random_derive" } types = { workspace = true } zeroize = { workspace = true } +tracing = { workspace = true } [dev-dependencies] tokio = { workspace = true } diff --git a/common/eth2/src/lib.rs b/common/eth2/src/lib.rs index fc12a4c5f3..a6519f46a3 100644 --- a/common/eth2/src/lib.rs +++ b/common/eth2/src/lib.rs @@ -28,6 +28,7 @@ use reqwest::{ header::{HeaderMap, HeaderValue}, Body, IntoUrl, RequestBuilder, Response, }; +use tracing::debug; pub use reqwest::{StatusCode, Url}; use reqwest_eventsource::{Event, EventSource}; pub use sensitive_url::{SensitiveError, SensitiveUrl}; @@ -1099,11 +1100,13 @@ impl BeaconNodeHttpClient { block_contents: &PublishBlockRequest, validation_level: Option, ) -> Result<(), Error> { + let fork_name = block_contents.signed_block().message().body().fork_name(); + debug!(%fork_name, "Posting beacon block"); self.post_generic_with_consensus_version( self.post_beacon_blocks_v2_path(validation_level)?, block_contents, Some(self.timeouts.proposal), - block_contents.signed_block().message().body().fork_name(), + fork_name, ) .await?;