Bitcoin Forum
April 16, 2024, 07:51:52 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does bitcoin know what time it is?  (Read 1421 times)
Fuzzy (OP)
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500



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.
drakahn
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500



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 (OP)
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500



View Profile
June 07, 2012, 12:01:28 PM
Last edit: June 12, 2012, 07:07:31 AM by Fuzzy
 #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: 1358
Merit: 1002



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: 571
Merit: 504


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 (OP)
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500



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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!