Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: rjcesq on December 22, 2014, 04:44:38 PM



Title: Confirmation timing
Post by: rjcesq on December 22, 2014, 04:44:38 PM
Can someone explain how this happens?

335275 (Main Chain)    2014-12-21 19:16:35    00000000000000000f4656f29e1e4a25d93ff9f8c7f87fe352979d707255d615
335276 (Main Chain)    2014-12-21 19:16:28    000000000000000009b568b45be21664352b90e1bc587f324009abcf9b51d11e

https://blockchain.info/blocks/1419167263187

It appears that block 335276 confirmed 7 seconds before the previous block. Is this just a matter of miner's clocks being out of sync?



Title: Re: Confirmation timing
Post by: domob on December 22, 2014, 05:19:34 PM
Yes, exactly.  The block time is set by the miner, and there's some window of clock differences that are accepted by the nodes (I think it is two hours, but that may be wrong).  So if the clocks are a few seconds out of sync, it happens from time to time that blocks appear "out of order" by a little while.


Title: Re: Confirmation timing
Post by: Sonny on December 22, 2014, 05:35:39 PM
https://bitcoin.org/en/developer-reference#block-headers

Quote
The block time is a Unix epoch time when the miner started hashing the header (according to the miner). Must be greater than or equal to 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.

So yes, the block time depends on the system time of the miner, but it can't be off too much or the block will be rejected by the network.


Title: Re: Confirmation timing
Post by: rjcesq on December 22, 2014, 08:40:38 PM
Awesome. Thank you for the quick response.