Bitcoin Forum

Other => Beginners & Help => Topic started by: rosemaryy on January 15, 2014, 04:11:43 PM



Title: how network time data is it enforced in the blockchain?
Post by: rosemaryy on January 15, 2014, 04:11:43 PM
I've seen how nodes gather network time data, but how is it enforced in the blockchain?


Title: Re: how network time data is it enforced in the blockchain?
Post by: DannyHamilton on January 15, 2014, 04:32:02 PM
I've seen how nodes gather network time data, but how is it enforced in the blockchain?

Each node checks the timestamp of the block before forwarding it to any peers:

https://en.bitcoin.it/wiki/Block_timestamp
Quote
A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours. "Network-adjusted time" is the median of the timestamps returned by all nodes connected to you

If the timestamp is found to be invalid, then the block is invalid and is not relayed to any peers.