1

According to bitcoin.org, full nodes have a strict requirement on the deviation of time within certain boundaries.

The block time is a Unix epoch time when the miner started hashing the header (according to the miner). Must be strictly greater than the median time of the previous 11 blocks. Full nodes will not accept blocks with headers more than two hours in the future according to their clock.

However, if given a certain circumstance, it appears the blockchain is at risk of rejecting all blocks due to conflicting validation parameters.

For example, in the instance of a severe difficulty drop. Difficulty in bitcoin is revaluated every 2016 blocks. If the difficulty drops drastically enough, it could be hours or days until the next valid block is found since the network is operating with reduced mining capacity at a difficulty level intended for much greater. If the next block is mined more than two hours after the current block, would this not stall the blockchain? What would happen in this given scenario?

How strict are the time validation rules?

7

How strict are the time validation rules?

Very.

If the next block is mined more than 2 hours after the current block, would this not stall the blockchain?

No.

It doesn't break the rule "Full nodes will not accept blocks with headers more than two hours in the future according to their clock."

Nor does it break the rule "Must be strictly greater than the median time of the previous 11 blocks."


The above should be clear I hope, but in case it isn't, lets make an example:

Event Time
Last block mined 08:00
Median time of last 11 blocks 07:00
Current time on my clock 11:00
Time on block arriving now 12:59
Rule Result
(12:59 - 11:00) < 2 OK
12:59 > 07:00 OK

So no problem even though there's been a three hour gap instead of 10 minutes and even though the block has a timestamp that I think is nearly two hours in the future!

Note that these particular rules are not broken if there is a huge (e.g. 50 year) gap between blocks. In theory everything would continue (though it seems likely there would be other issues preventing this)

2
  • Fair enough, miners aren't restricted to putting in a certain time
    – arshbot
    Jul 23 at 11:12
  • @arshbot That's true, but not relevant I think. Even if the timestamps in blocks are always exactly equal to the time the block is produced, there is no problem. Jul 23 at 14:12
6

I think you have a misconception about what this clause means:

Full nodes will not accept blocks with headers more than two hours in the future according to their clock.

You appear to be interpreting this as, if a new block is more than two hours later than the previous block, then do not accept it. That is incorrect. This clause is not about gaps in time between blocks.

The actual meaning of this clause is that, if a new block says it's literally from the future, from a time that the universe has not yet reached, then do not accept it. This clause is about preventing manipulation of the blockchain via falsified timestamps.

This comparison is between the new block's timestamp and your clock, not the new block's timestamp and the previous block's timestamp.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.