One of the acceptance rule for the blocks is that the block timestamp cannot be more than 2 hours in the future. What happens to blocks whose timestamp does not meet this rule, i.e. blocks that generally do not meet the acceptance rules (not consensus rules)? Are they rejected as if they had never been seen?
1 Answer
A block with a timestamp too far in the future is invalid. This seems to be discovered during ProcessNewBlockHeaders
when learning about the block header. The node discards the invalid block header.
// Check timestamp
if (block.Time() > now + std::chrono::seconds{MAX_FUTURE_BLOCK_TIME}) {
return state.Invalid(BlockValidationResult::BLOCK_TIME_FUTURE, "time-too-new", "block timestamp too far in the future");
}