Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/engine/tree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ reth-ethereum-primitives.workspace = true
reth-provider.workspace = true
reth-prune.workspace = true
reth-revm.workspace = true
reth-rpc-convert.workspace = true
reth-stages-api.workspace = true
reth-tasks.workspace = true
reth-trie-db.workspace = true
Expand Down
6 changes: 4 additions & 2 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ use reth_provider::{
StateRootProvider, TransactionVariant,
};
use reth_revm::database::StateProviderDatabase;
use reth_rpc_convert::calculate_millisecond_timestamp;
use reth_stages_api::ControlFlow;
use reth_trie::{HashedPostState, TrieInput};
use reth_trie_db::DatabaseHashedPostState;
Expand Down Expand Up @@ -2380,10 +2381,11 @@ where
let executed = execute(&mut self.payload_validator, input, ctx)?;

let gas_used = executed.sealed_block().header().gas_used();
let block_timestamp = executed.sealed_block().header().timestamp();
let block_timestamp_millis =
calculate_millisecond_timestamp(executed.sealed_block().header());

// Calculate block insertion timestamp delay in nanoseconds
let block_timestamp_nanos = block_timestamp as u128 * 1_000_000_000;
let block_timestamp_nanos = (block_timestamp_millis as u128) * 1_000_000;
let timestamp_delay_nanos =
current_timestamp_nanos.saturating_sub(block_timestamp_nanos) as f64;

Expand Down
Loading