Skip to main content
Share Your Experience: Take the 2024 Developer Survey
8 votes
Accepted

Would a series of reorgs cause Bitcoin to break because of the 2-hour block time difference restriction?

No. There are two restrictions on the timestamp of blocks: A consensus rule that the timestamp of a block must be strictly larger than the median timestamp of its 11 predecessors (parent, grandparent,...
Pieter Wuille's user avatar
4 votes
Accepted

Why isn't the upper bound (+2h) on the block timestamp set as a consensus rule?

the upper bound is +2h relative to that value? Under such a rule, miners could just set every block timestamp to 20 minutes later than the previous block timestamp - ignoring real world time entirely ...
Pieter Wuille's user avatar
4 votes
Accepted

How exactly is the timestamp calculated for the +2h acceptance rule and do I have to implement it in my Bitcoin node for the node to still be valid?

I consider the "max two hours in the future rule" to be an essential network rule of the Bitcoin network; without it, the system would be woefully insecure. It is not a mere policy rule, but ...
Pieter Wuille's user avatar
4 votes

Would a series of reorgs cause Bitcoin to break because of the 2-hour block time difference restriction?

No. The 2-hours rule is checking if the timestamp of a block is not more than 2 hours in the future. A valid timestamp for a given tip cannot become invalid as time passes. I think you are confusing ...
Antoine Poinsot's user avatar
3 votes
Accepted

What does the block time represent?

I've always been under the impression that a block's timestamp represents the second at which a block was found. It is, though not with that much accuracy. The protocol allows for a roughly 3-hour ...
Pieter Wuille's user avatar
3 votes

What is the difference between the Time and Mtime fields?

time is when the tx is confirmed in a block (the block timestamp) and mtime is the clock-on-the-wall timestamp when the node first sees the tx (aka "mempool" time)
pinhead's user avatar
  • 5,154
2 votes

Would a series of reorgs cause Bitcoin to break because of the 2-hour block time difference restriction?

My understanding of the 2-hour rule was incorrect. I thought the 2 hours was in relation to the timestamp of the previous block, but it is in relation to the timestamp of the local clock of whoever is ...
fiatjaf's user avatar
  • 611
2 votes

Why does the median-past time average the last 11 block timestamps and not the last 12?

For posterity, I want to share what I now believe to be the reason why 11-blocks was chosen for the median_timestamp calculation. By calculating a median timestamp value of the previous 11 blocks, we ...
sha2fiddy's user avatar
1 vote
Accepted

What determines the block's timestamp?

The timestamp of a block must be higher than the median of the timestamps of the past 11 blocks. It also needs to be less than 2 hours in the future (wall clock) at the time of validation. Note how a ...
Antoine Poinsot's user avatar
1 vote

Using Bitcoin as a trusted clock?

the blockchain can be taken as a trustworthy log of past timestamps, the latest of which give a rough estimate of the current time. Very very rough. Instead of tens of milliseconds with NTP you are ...
RedGrittyBrick's user avatar
1 vote
Accepted

Miners setting timestamps up to 2h into the Future

Yes, the network would accept blocks that are dated up to 2h into the future. If close to or more than half the hashrate generally dated blocks two hours into the future, miners using an accurate ...
Murch's user avatar
  • 75.7k

Only top scored, non community-wiki answers of a minimum length are eligible