[Ethereum] How does Ethereum avoid inaccurate timestamps in blocks

blocksminertimestamp

A contract can reference the currently being mined contract's timestamp. This means that changing the timestamp of an in-progress to be mined block requires executing all contracts referencing that timestamp. How exactly does Ethereum avoid miners being incentivized to keep old (inaccurate) timestamps within their blocks due to this? Or am I misunderstanding how contracts and blocks tend to interact?

Best Answer

The timestamps are saved into the blockheader. They don't get updated but they are part of the consensus and can't get altered after mined.

We can't consider the timestamp exact at all, but the information you get out of the timestamp is not super interesting. "When exactly was this block mined?" A question with limited practical use, given that they must fall into a limited interval.
Important is that the sequence of blocks is not messed up and that the block height is correlated with a certain time so that on average we have linear block times.

Related Topic