Block timestamp

From Bitcoin Wiki
Revision as of 17:41, 13 January 2011 by Nanotube (talk | contribs) (create block timestamp article.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Each block contains a Unix time timestamp. In addition to serving as a source of variation for the block hash, there are also validity checks, that make it more difficult for an adversary to manipulate the block chain.

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.

Whenever a node connects to another node, it gets a UTC timestamp from it, and stores its offset from node-local UTC. The network-adjusted time is then the node-local UTC plus the median offset from all connected nodes.