The 2-Hour Future Rule
The 2-Hour Rule: Network Time Drift
While Median Time Past (MTP) sets a minimum time for a block, Bitcoin also enforces a maximum time. This is known as the 2-Hour Rule, and it defines how far into the future a block's timestamp can be.
1. The Consensus Rule
A node will reject a block if its timestamp is more than 2 hours ahead of the node's current "Network Adjusted Time."
2. Network Adjusted Time
Nodes don't just use their own computer's clock. When a node connects to peers, it receives their local timestamps. 1. The node calculates the offset between its clock and its peers. 2. If the median offset of all connected peers is less than 70 minutes, the node adjusts its "internal clock" to match the network median. 3. This "Network Adjusted Time" is what the node uses to check the 2-hour limit.
3. Why Allow Future Blocks?
Bitcoin allows for some "drift" because it is impossible to synchronize every computer in a decentralized network perfectly. Network latency, hardware errors, and different time zones mean that a miner in China and a node in the USA might have clocks that are a few minutes apart.
4. Acceptance vs. Permanent Rejection
If a block arrives with a timestamp 2 hours and 5 minutes in the future: * The node will temporarily reject the block. * However, 5 minutes later, once the node's own clock catch up, the block will fall within the 2-hour window. * The node can then re-validate and accept the block.
If a miner consistently mines blocks with timestamps far in the future, they are "Time-Warping." This can be used to trick the Difficulty Adjustment into thinking blocks are being found slower than they actually are, making mining easier than it should be.
Next, we will explore the theoretical dangers of Timestamp Manipulation and Timejacking.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: