chore: rm todos that are nofixes (#14082)

This commit is contained in:
Matthias Seitz
2025-01-29 23:41:29 +01:00
committed by GitHub
parent 2216c8a8ba
commit 5ab9b9159c

View File

@ -214,12 +214,10 @@ where
self.chain_spec.is_paris_active_at_block(header.number()).is_some_and(|active| active);
if is_post_merge {
// TODO: add `is_zero_difficulty` to `alloy_consensus::BlockHeader` trait
if !header.difficulty().is_zero() {
return Err(ConsensusError::TheMergeDifficultyIsNotZero)
}
// TODO: helper fn in `alloy_consensus::BlockHeader` trait
if !header.nonce().is_some_and(|nonce| nonce.is_zero()) {
return Err(ConsensusError::TheMergeNonceIsNotZero)
}
@ -242,15 +240,14 @@ where
// mixHash is used instead of difficulty inside EVM
// https://eips.ethereum.org/EIPS/eip-4399#using-mixhash-field-instead-of-difficulty
} else {
// TODO Consensus checks for old blocks:
// * difficulty, mix_hash & nonce aka PoW stuff
// low priority as syncing is done in reverse order
// Note: This does not perform any pre merge checks for difficulty, mix_hash & nonce
// because those are deprecated and the expectation is that a reth node syncs in reverse
// order, making those checks obsolete.
// Check if timestamp is in the future. Clock can drift but this can be consensus issue.
let present_timestamp =
SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_secs();
// TODO: move this to `alloy_consensus::BlockHeader`
if header.timestamp() > present_timestamp + ALLOWED_FUTURE_BLOCK_TIME_SECONDS {
return Err(ConsensusError::TimestampIsInFuture {
timestamp: header.timestamp(),