mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: reintroduce receipts verification debug log (#8662)
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -6768,6 +6768,7 @@ dependencies = [
|
|||||||
"reth-consensus",
|
"reth-consensus",
|
||||||
"reth-consensus-common",
|
"reth-consensus-common",
|
||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -7391,6 +7392,7 @@ dependencies = [
|
|||||||
"reth-consensus",
|
"reth-consensus",
|
||||||
"reth-consensus-common",
|
"reth-consensus-common",
|
||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@ -16,5 +16,7 @@ reth-consensus-common.workspace = true
|
|||||||
reth-primitives.workspace = true
|
reth-primitives.workspace = true
|
||||||
reth-consensus.workspace = true
|
reth-consensus.workspace = true
|
||||||
|
|
||||||
|
tracing.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
optimism = ["reth-primitives/optimism"]
|
optimism = ["reth-primitives/optimism"]
|
||||||
|
|||||||
@ -19,7 +19,12 @@ pub fn validate_block_post_execution(
|
|||||||
// transaction This was replaced with is_success flag.
|
// transaction This was replaced with is_success flag.
|
||||||
// See more about EIP here: https://eips.ethereum.org/EIPS/eip-658
|
// See more about EIP here: https://eips.ethereum.org/EIPS/eip-658
|
||||||
if chain_spec.is_byzantium_active_at_block(block.header.number) {
|
if chain_spec.is_byzantium_active_at_block(block.header.number) {
|
||||||
verify_receipts(block.header.receipts_root, block.header.logs_bloom, receipts)?;
|
if let Err(error) =
|
||||||
|
verify_receipts(block.header.receipts_root, block.header.logs_bloom, receipts)
|
||||||
|
{
|
||||||
|
tracing::debug!(%error, ?receipts, "receipts verification failed");
|
||||||
|
return Err(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if gas used matches the value set in header.
|
// Check if gas used matches the value set in header.
|
||||||
|
|||||||
@ -17,7 +17,7 @@ reth-consensus-common.workspace = true
|
|||||||
reth-primitives.workspace = true
|
reth-primitives.workspace = true
|
||||||
reth-consensus.workspace = true
|
reth-consensus.workspace = true
|
||||||
|
|
||||||
|
tracing.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
optimism = [
|
optimism = ["reth-primitives/optimism"]
|
||||||
"reth-primitives/optimism",
|
|
||||||
]
|
|
||||||
|
|||||||
@ -18,13 +18,16 @@ pub fn validate_block_post_execution(
|
|||||||
// transaction This was replaced with is_success flag.
|
// transaction This was replaced with is_success flag.
|
||||||
// See more about EIP here: https://eips.ethereum.org/EIPS/eip-658
|
// See more about EIP here: https://eips.ethereum.org/EIPS/eip-658
|
||||||
if chain_spec.is_byzantium_active_at_block(block.header.number) {
|
if chain_spec.is_byzantium_active_at_block(block.header.number) {
|
||||||
verify_receipts(
|
if let Err(error) = verify_receipts(
|
||||||
block.header.receipts_root,
|
block.header.receipts_root,
|
||||||
block.header.logs_bloom,
|
block.header.logs_bloom,
|
||||||
receipts,
|
receipts,
|
||||||
chain_spec,
|
chain_spec,
|
||||||
block.timestamp,
|
block.timestamp,
|
||||||
)?;
|
) {
|
||||||
|
tracing::debug!(%error, ?receipts, "receipts verification failed");
|
||||||
|
return Err(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if gas used matches the value set in header.
|
// Check if gas used matches the value set in header.
|
||||||
|
|||||||
Reference in New Issue
Block a user