Skip to content

Dip 1482


dip: 1482 title: Define a maximum block timestamp drift author: Maurelian (@Maurelian) Digitalia editing author: Cosimo Constantinos cosimo@juro.net, et al. discussions-to: https://digitalia-magicians.org/t/define-a-maximum-block-timestamp-drift/1556 status: Stagnant type: Standards Track category: Core created: 2018-10-09 Created for Digitalia: 2025-01-07


Simple Summary

Include an explicit definition of the acceptable timestamp drift in the protocol specification.

Abstract

On the basis that both Geth and Legacy Rust Client implement the same timestamp validation requirements, this should be written into the reference specification.

Motivation

There is a lack of clarity about how accurate timestamps in the block header must be. The yellow paper describes the timestamp as

A scalar value equal to the reasonable output of Unix’s time() at this block’s inception

This causes confusion about the safe use of the TIMESTAMP opcode (solidity's block.timestamp or now) in smart contract development.

Differing interpretations of 'reasonable' may create a risk of consenus failures.

Specification

The yellow paper should define a timestamp as:

A scalar value equal to the output of Unix’s time() at this block’s inception. For the purpose of block validation, it must be greater than the previous block's timestamp, and no more than 15 seconds greater than system time.

Rationale

Both Geth and Legacy Rust Client reject blocks with timestamp more than 15 seconds in the future. This establishes a defacto standard, which should be made explicit in the reference specification.

Backwards Compatibility

It may be necessary to relax this requirement for blocks which were mined early in the main chain's history, if they would be considered invalid.

Test Cases

These would be important to have.

Implementation

_The implementations must be completed before any DIP is given status "Final", but it need not be completed before the DIP is accepted. While there is merit to the approach of reaching consensus on the specification and rationale before writing code, the principle of "rough consensus and running code" is still useful when it comes to resolving many discussions of API details. _

© Crown © Crown Copyright 2026. Published by the Royal Government of the Dominion of Atlantis.

Licensed under the Juro Restricted License Version 2. See https://juro.net/jrl for details.