Bitcoin Forum
December 10, 2016, 01:04:00 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How does bitcoin know what time it is?  (Read 1224 times)
Fuzzy
Hero Member
*****
Offline Offline

Activity: 560



View Profile
June 07, 2012, 11:46:47 AM
 #1

Since the bitcoin network requires a point of reference to see how far apart the ends of a 2016 block cycle are, what source does it use to tell time? At the end of whatever convoluted process it uses, there is a clock/timer somewhere that is used for reference.

I'm asking because that would be a potential weakness in the bitcoin protocol.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481375040
Hero Member
*
Offline Offline

Posts: 1481375040

View Profile Personal Message (Offline)

Ignore
1481375040
Reply with quote  #2

1481375040
Report to moderator
1481375040
Hero Member
*
Offline Offline

Posts: 1481375040

View Profile Personal Message (Offline)

Ignore
1481375040
Reply with quote  #2

1481375040
Report to moderator
1481375040
Hero Member
*
Offline Offline

Posts: 1481375040

View Profile Personal Message (Offline)

Ignore
1481375040
Reply with quote  #2

1481375040
Report to moderator
drakahn
Hero Member
*****
Offline Offline

Activity: 504



View Profile
June 07, 2012, 11:56:09 AM
 #2

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.
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.

https://en.bitcoin.it/wiki/Block_timestamp

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
Fuzzy
Hero Member
*****
Offline Offline

Activity: 560



View Profile
June 07, 2012, 12:01:28 PM
 #3

Thanks! Might as well quote it here:

Quote
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. 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.


That Satoshi is one smart cookie  Smiley
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
June 07, 2012, 12:35:29 PM
 #4

Quote
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. 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.

They better start working on it lol

Hexadecibel
Human Intranet Liason
VIP
Hero Member
*
Offline Offline

Activity: 536


I still <3 u Satoshi


View Profile
June 09, 2012, 04:50:03 AM
 #5

I have grand plans of being alive when the last block in mined, and buying a portal gun with 1BTC
Fuzzy
Hero Member
*****
Offline Offline

Activity: 560



View Profile
June 12, 2012, 06:16:40 AM
 #6

I have grand plans of being alive when the last block in mined, and buying a portal gun with 1BTC

You plan on spending 1/21,000,000th of the worlds only trusted currency on a gadget? How immature.
I'm gonna use my Bitcoin to buy a small cottage on mars.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!