Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tree): make tree trace targets all engine::tree #11227

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading