1

I have readed an ethereum post from 2015 where it states that miners can manipulate the block timestamp up to 900 seconds. Can they in 2021 still do it and, if yes, can users see this and did this happen in the past? Would i.e. Etherscan show the manipulated timestamp too?

1 Answer 1

2

When verifying the block header, the Geth client runs the following check:

// Verify the header's timestamp
if !uncle {
    if header.Time > uint64(unixNow+allowedFutureBlockTimeSeconds) {
        return consensus.ErrFutureBlock
    }
}

allowedFutureBlockTimeSeconds is defined as:

allowedFutureBlockTimeSeconds = int64(15)

So 15 seconds in the future, otherwise a consensus error is raised.

There are game theoretic reasons why a miner would want to keep the timestamp as close to the current time as possible.

1
  • Thanks alot! This is helpful. What if in that 15 seconds no block is mined?
    – dkb
    Commented May 21, 2021 at 22:27

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.