1

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 1

2

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");
}

via src/validation.cpp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.