Skip to content

Commit

Permalink
chore(tree): make tree trace targets all engine::tree (paradigmxyz#11227
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Rjected committed Sep 25, 2024
1 parent 653c089 commit 3503406
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ where
if let Err(err) =
tx.send(output.map(|o| o.outcome).map_err(Into::into))
{
error!("Failed to send event: {err:?}");
error!(target: "engine::tree", "Failed to send event: {err:?}");
}
}
BeaconEngineMessage::NewPayload { payload, cancun_fields, tx } => {
Expand All @@ -1224,7 +1224,7 @@ where
Box::new(e),
)
})) {
error!("Failed to send event: {err:?}");
error!(target: "engine::tree", "Failed to send event: {err:?}");
}
}
BeaconEngineMessage::TransitionConfigurationExchanged => {
Expand Down Expand Up @@ -1411,10 +1411,9 @@ where
debug!(target: "engine::tree", "emitting backfill action event");
}

let _ = self
.outgoing
.send(event)
.inspect_err(|err| error!("Failed to send internal event: {err:?}"));
let _ = self.outgoing.send(event).inspect_err(
|err| error!(target: "engine::tree", "Failed to send internal event: {err:?}"),
);
}

/// Returns true if the canonical chain length minus the last persisted
Expand Down Expand Up @@ -1701,6 +1700,7 @@ where
fn validate_block(&self, block: &SealedBlockWithSenders) -> Result<(), ConsensusError> {
if let Err(e) = self.consensus.validate_header_with_total_difficulty(block, U256::MAX) {
error!(
target: "engine::tree",
?block,
"Failed to validate total difficulty for block {}: {e}",
block.header.hash()
Expand All @@ -1709,12 +1709,12 @@ where
}

if let Err(e) = self.consensus.validate_header(block) {
error!(?block, "Failed to validate header {}: {e}", block.header.hash());
error!(target: "engine::tree", ?block, "Failed to validate header {}: {e}", block.header.hash());
return Err(e)
}

if let Err(e) = self.consensus.validate_block_pre_execution(block) {
error!(?block, "Failed to validate block {}: {e}", block.header.hash());
error!(target: "engine::tree", ?block, "Failed to validate block {}: {e}", block.header.hash());
return Err(e)
}

Expand Down Expand Up @@ -2148,7 +2148,7 @@ where
))
})?;
if let Err(e) = self.consensus.validate_header_against_parent(&block, &parent_block) {
warn!(?block, "Failed to validate header {} against parent: {e}", block.header.hash());
warn!(target: "engine::tree", ?block, "Failed to validate header {} against parent: {e}", block.header.hash());
return Err(e.into())
}

Expand Down Expand Up @@ -2199,7 +2199,7 @@ where
{
Ok((state_root, trie_output)) => Some((state_root, trie_output)),
Err(AsyncStateRootError::Provider(ProviderError::ConsistentView(error))) => {
debug!(target: "engine", %error, "Async state root computation failed consistency check, falling back");
debug!(target: "engine::tree", %error, "Async state root computation failed consistency check, falling back");
None
}
Err(error) => return Err(InsertBlockErrorKindTwo::Other(Box::new(error))),
Expand Down

0 comments on commit 3503406

Please sign in to comment.