Difference between revisions of "Block timestamp"

m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=DISCLAIMER=
+
Each block contains a [http://en.wikipedia.org/wiki/Unix_time Unix time], timestamp. In addition to serving as a source of variation for the [[Block_hashing_algorithm|block hash]], these timestamps serve as proof of existence for the information stored in the transactions that the block validates.
  
This article is a direct copy of the original https://en.bitcoin.it/wiki/Block_timestamp and has not been checked for correctness or edited.
+
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. As a result, block timestamps are not exactly accurate, and they do not need to be. Block times are accurate only to within an hour or two.
  
11 October 2019
+
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. Network time is never adjusted more than 70 minutes from local system time, however.
  
Expected review by: 25 October 2019
+
Bitcoin uses an unsigned integer for the timestamp, so the [[:Wikipedia:Year_2038_problem|year 2038 problem]] is delayed for another 68 years.
  
Reviewed Brendan Lee 22 October. Minor edits
+
==Attribution==
 
+
This content is based on content sourced from https://en.bitcoin.it/wiki/Block_timestamp under [https://creativecommons.org/licenses/by/3.0/ Creative Commons Attribution 3.0]. Although it may have been extensively revised and updated, we acknowledge the original authors.
 
 
 
 
 
 
Each block contains a [http://en.wikipedia.org/wiki/Unix_time Unix time] timestamp. In addition to serving as a source of variation for the [[Block_hashing_algorithm|block hash]], they also 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. As a result block timestamps are not exactly accurate, and they do not need to be. Block times are accurate only to within an hour or two.
 
 
 
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. Network time is never adjusted more than 70 minutes from local system time, however.
 
 
 
Bitcoin uses an unsigned integer for the timestamp, so the [[:Wikipedia:Year_2038_problem|year 2038 problem]] is delayed for another 68 years.
 

Latest revision as of 01:53, 27 October 2020

Each block contains a Unix time, timestamp. In addition to serving as a source of variation for the block hash, these timestamps serve as proof of existence for the information stored in the transactions that the block validates.

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. As a result, block timestamps are not exactly accurate, and they do not need to be. Block times are accurate only to within an hour or two.

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. Network time is never adjusted more than 70 minutes from local system time, however.

Bitcoin uses an unsigned integer for the timestamp, so the year 2038 problem is delayed for another 68 years.

Attribution

This content is based on content sourced from https://en.bitcoin.it/wiki/Block_timestamp under Creative Commons Attribution 3.0. Although it may have been extensively revised and updated, we acknowledge the original authors.