{"eip":1482,"title":"Define a maximum block timestamp drift","description":"Include an explicit definition of the acceptable timestamp drift in the protocol specification.","authors":["Maurelian (@Maurelian)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2018-10-09","discussionsTo":"https://ethereum-magicians.org/t/define-a-maximum-block-timestamp-drift/1556","repo":"EIPs","label":"EIP-1482","officialUrl":"https://eips.ethereum.org/EIPS/eip-1482","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1482.md","url":"https://eips.huatuo.xyz/eip-1482/","tldr":{"en":"Proposed writing down an explicit rule for block timestamps: later than the parent block and at most 15 seconds ahead of the validator's clock, matching what Geth and Parity already enforced.","ja":"ブロックのタイムスタンプに明示的なルールを書き残すことを提案した。親ブロックより後で、かつバリデーターの時計より最大 15 秒先まで。Geth と Parity がすでに強制していた内容と一致する。","ko":"블록 타임스탬프에 명시적인 규칙을 적어두자고 제안했다. 부모 블록보다 늦고 검증자의 시계보다 최대 15초까지만 앞설 수 있으며, 이는 Geth와 Parity가 이미 강제하던 내용과 같다.","zh":"提议为区块时间戳写下明确的规则：晚于父区块，且最多比验证者的时钟超前 15 秒，与 Geth 和 Parity 已经执行的规则一致。"},"tags":["consensus","timestamp","core","specification"],"explainers":{"en":{"lang":"en","tldr":"Proposed writing down an explicit rule for block timestamps: later than the parent block and at most 15 seconds ahead of the validator's clock, matching what Geth and Parity already enforced.","tags":["consensus","timestamp","core","specification"],"related":[1985,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1482/","markdown":"## What problem does it solve?\n\nThe Yellow Paper defined a block's timestamp as \"the reasonable output of Unix's time() at this block's inception\". What counts as \"reasonable\" was never specified. That left smart contract developers unsure how much they could trust `block.timestamp`, and in principle allowed different clients to disagree about which blocks are valid.\n\nIn practice the two major clients of the time, Geth and Parity, already applied the same check. EIP-1482 proposes making that de facto rule part of the specification.\n\n## How it works\n\nNo new behaviour, just an explicit definition. For block validation a timestamp must:\n\n1. be **strictly greater** than the parent block's timestamp, and\n2. be **no more than 15 seconds** ahead of the validating node's own system time.\n\nA block that is too far in the future is rejected (clients may hold it until it becomes valid). A block producer therefore has some freedom to choose the timestamp, but only within a narrow window.\n\n## Sample code\n\nThe validation rule as pseudocode:\n\n```python\nMAX_FUTURE_DRIFT = 15  # seconds\n\ndef validate_timestamp(block, parent, now):\n    if block.timestamp \u003c= parent.timestamp:\n        raise InvalidBlock(\"timestamp not after parent\")\n    if block.timestamp \u003e now + MAX_FUTURE_DRIFT:\n        raise FutureBlock(\"timestamp too far in the future\")\n```\n\nWhat this means for contract authors: treat `block.timestamp` as approximate.\n\n```solidity\n// Fine: deadlines measured in minutes, hours or days\nrequire(block.timestamp \u003c= auctionEnd, \"auction over\");\n\n// Risky: logic that depends on the exact second (e.g. randomness, sub-minute windows)\n```\n\n## Things to know\n\n- Status is **Stagnant**; it was never adopted as a formal specification change.\n- The spec notes that some very early mainnet blocks might break the rule, so it might need to be relaxed for historical blocks.\n- Since the move to proof-of-stake ([EIP-3675](/eip-3675/)), execution-layer block timestamps are tied to the beacon chain's fixed slot times, so producers no longer have the free choice this EIP was trying to bound. The general advice still holds: never use timestamps as a source of randomness.\n- [EIP-1985](/eip-1985/) separately proposed an upper range for timestamp values in the EVM.\n"},"ja":{"lang":"ja","tldr":"ブロックのタイムスタンプに明示的なルールを書き残すことを提案した。親ブロックより後で、かつバリデーターの時計より最大 15 秒先まで。Geth と Parity がすでに強制していた内容と一致する。","tags":["consensus","timestamp","core","specification"],"related":[1985,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1482/","markdown":"## 何を解決するのか\n\nイエローペーパーは、ブロックのタイムスタンプを「このブロックの開始時点における Unix の time() の妥当な出力」と定義していました。何が「妥当」なのかは一度も規定されませんでした。そのため、スマートコントラクトの開発者は `block.timestamp` をどこまで信頼できるのか判断がつかず、原理的には、どのブロックが有効かについてクライアント間で意見が分かれる余地もありました。\n\n実際には、当時の 2 大クライアントである Geth と Parity は、すでに同じチェックを適用していました。EIP-1482 は、その事実上のルールを仕様の一部にすることを提案します。\n\n## 仕組み\n\n新しい挙動はなく、明示的な定義だけです。ブロック検証において、タイムスタンプは次の条件を満たさなければなりません。\n\n1. 親ブロックのタイムスタンプより**厳密に大きい**こと。\n2. 検証ノード自身のシステム時刻より**15 秒を超えて先**でないこと。\n\n未来すぎるブロックは拒否されます（クライアントは有効になるまで保留してもかまいません）。そのため、ブロック生成者はタイムスタンプをある程度自由に選べますが、狭い範囲に限られます。\n\n## サンプルコード\n\n検証ルールを擬似コードで示します。\n\n```python\nMAX_FUTURE_DRIFT = 15  # seconds\n\ndef validate_timestamp(block, parent, now):\n    if block.timestamp \u003c= parent.timestamp:\n        raise InvalidBlock(\"timestamp not after parent\")\n    if block.timestamp \u003e now + MAX_FUTURE_DRIFT:\n        raise FutureBlock(\"timestamp too far in the future\")\n```\n\nコントラクト作成者にとっての意味: `block.timestamp` は概算値として扱ってください。\n\n```solidity\n// Fine: deadlines measured in minutes, hours or days\nrequire(block.timestamp \u003c= auctionEnd, \"auction over\");\n\n// Risky: logic that depends on the exact second (e.g. randomness, sub-minute windows)\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。正式な仕様変更として採用されることはありませんでした。\n- 仕様は、ごく初期のメインネットのブロックの一部がこのルールに違反している可能性があり、過去のブロックについては緩和が必要かもしれないと述べています。\n- PoS への移行（[EIP-3675](/eip-3675/)）以降、実行レイヤーのブロックのタイムスタンプはビーコンチェーンの固定のスロット時刻に結び付けられており、この EIP が制限しようとしていた生成者の自由な選択はなくなりました。一般的な助言は今も有効です。タイムスタンプを乱数の源として使ってはいけません。\n- [EIP-1985](/eip-1985/) は別途、EVM におけるタイムスタンプ値の上限範囲を提案しました。\n"},"ko":{"lang":"ko","tldr":"블록 타임스탬프에 명시적인 규칙을 적어두자고 제안했다. 부모 블록보다 늦고 검증자의 시계보다 최대 15초까지만 앞설 수 있으며, 이는 Geth와 Parity가 이미 강제하던 내용과 같다.","tags":["consensus","timestamp","core","specification"],"related":[1985,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1482/","markdown":"## 어떤 문제를 해결하나요?\n\n옐로 페이퍼는 블록의 타임스탬프를 \"이 블록이 시작된 시점의 Unix time()의 합리적인 출력\"으로 정의했습니다. 무엇이 \"합리적\"인지는 한 번도 규정되지 않았습니다. 그 때문에 스마트 컨트랙트 개발자는 `block.timestamp`를 얼마나 신뢰할 수 있는지 알 수 없었고, 원칙적으로는 어떤 블록이 유효한지에 대해 클라이언트마다 의견이 갈릴 여지도 있었습니다.\n\n실제로는 당시 주요 클라이언트 두 개인 Geth와 Parity가 이미 같은 검사를 적용하고 있었습니다. EIP-1482는 그 사실상의 규칙을 명세의 일부로 만들자고 제안합니다.\n\n## 어떻게 동작하나요?\n\n새로운 동작은 없고 명시적인 정의만 있습니다. 블록 검증 시 타임스탬프는 다음을 만족해야 합니다.\n\n1. 부모 블록의 타임스탬프보다 **엄격히 커야** 하고,\n2. 검증하는 노드 자신의 시스템 시각보다 **15초를 넘게 앞서지** 않아야 합니다.\n\n너무 먼 미래의 블록은 거부됩니다(클라이언트는 유효해질 때까지 보관할 수 있습니다). 따라서 블록 생성자는 타임스탬프를 어느 정도 자유롭게 고를 수 있지만 좁은 범위 안에서만 가능합니다.\n\n## 샘플 코드\n\n검증 규칙을 의사 코드로 나타내면 다음과 같습니다.\n\n```python\nMAX_FUTURE_DRIFT = 15  # seconds\n\ndef validate_timestamp(block, parent, now):\n    if block.timestamp \u003c= parent.timestamp:\n        raise InvalidBlock(\"timestamp not after parent\")\n    if block.timestamp \u003e now + MAX_FUTURE_DRIFT:\n        raise FutureBlock(\"timestamp too far in the future\")\n```\n\n컨트랙트 작성자에게 이것이 의미하는 바: `block.timestamp`를 근사값으로 취급하세요.\n\n```solidity\n// Fine: deadlines measured in minutes, hours or days\nrequire(block.timestamp \u003c= auctionEnd, \"auction over\");\n\n// Risky: logic that depends on the exact second (e.g. randomness, sub-minute windows)\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. 공식 명세 변경으로 채택된 적이 없습니다.\n- 명세는 메인넷의 아주 초기 블록 중 일부가 이 규칙을 위반할 수 있으므로, 과거 블록에 대해서는 규칙을 완화해야 할 수도 있다고 밝힙니다.\n- 지분증명으로 전환([EIP-3675](/eip-3675/))한 이후 실행 계층 블록 타임스탬프는 비콘 체인의 고정된 슬롯 시간에 묶여 있으므로, 이 EIP가 제한하려던 생성자의 자유로운 선택은 더 이상 없습니다. 일반적인 조언은 여전히 유효합니다. 타임스탬프를 난수의 원천으로 쓰지 마세요.\n- [EIP-1985](/eip-1985/)는 별도로 EVM에서 타임스탬프 값의 상한 범위를 제안했습니다.\n"},"zh":{"lang":"zh","tldr":"提议为区块时间戳写下明确的规则：晚于父区块，且最多比验证者的时钟超前 15 秒，与 Geth 和 Parity 已经执行的规则一致。","tags":["consensus","timestamp","core","specification"],"related":[1985,3675],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1482/","markdown":"## 它解决什么问题？\n\n黄皮书把区块的时间戳定义为\"该区块创建时 Unix time() 的合理输出\"。什么算\"合理\"，从未被明确规定。这让智能合约开发者不确定能在多大程度上信任 `block.timestamp`，原则上也允许不同客户端对哪些区块有效产生分歧。\n\n实际上，当时的两大主流客户端 Geth 和 Parity 已经应用了同样的检查。EIP-1482 提议把这条事实上的规则写入规范。\n\n## 它如何运作\n\n没有新的行为，只是一个明确的定义。在区块验证时，时间戳必须：\n\n1. **严格大于**父区块的时间戳，并且\n2. 比验证节点自身的系统时间**超前不超过 15 秒**。\n\n超前太多的区块会被拒绝（客户端可以先保留它，直到它变为有效）。因此区块生产者在选择时间戳上有一定自由，但只能在很窄的窗口内。\n\n## 示例代码\n\n验证规则的伪代码：\n\n```python\nMAX_FUTURE_DRIFT = 15  # seconds\n\ndef validate_timestamp(block, parent, now):\n    if block.timestamp \u003c= parent.timestamp:\n        raise InvalidBlock(\"timestamp not after parent\")\n    if block.timestamp \u003e now + MAX_FUTURE_DRIFT:\n        raise FutureBlock(\"timestamp too far in the future\")\n```\n\n这对合约作者意味着什么：请把 `block.timestamp` 视为近似值。\n\n```solidity\n// Fine: deadlines measured in minutes, hours or days\nrequire(block.timestamp \u003c= auctionEnd, \"auction over\");\n\n// Risky: logic that depends on the exact second (e.g. randomness, sub-minute windows)\n```\n\n## 需要注意\n\n- 状态是 **Stagnant**；它从未作为正式的规范变更被采纳。\n- 规范指出，主网最早期的一些区块可能违反这一规则，因此对历史区块可能需要放宽。\n- 自转向权益证明（[EIP-3675](/eip-3675/)）以来，执行层区块的时间戳与信标链固定的槽位时间绑定，生产者不再拥有这个 EIP 试图限制的自由选择权。通用的建议依然成立：永远不要把时间戳当作随机性的来源。\n- [EIP-1985](/eip-1985/) 另行提议了 EVM 中时间戳值的上限范围。\n"}}}
