Bitcoin Forum
May 11, 2024, 02:35:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What clock is used by bitcoin?  (Read 536 times)
wingding (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 504



View Profile
April 16, 2014, 06:21:53 PM
 #1

I understand that the bitcoin algorithm adjust difficulty by measuring the time it took to find the last 2016 blocks. What clock is used?
1715438111
Hero Member
*
Offline Offline

Posts: 1715438111

View Profile Personal Message (Offline)

Ignore
1715438111
Reply with quote  #2

1715438111
Report to moderator
1715438111
Hero Member
*
Offline Offline

Posts: 1715438111

View Profile Personal Message (Offline)

Ignore
1715438111
Reply with quote  #2

1715438111
Report to moderator
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715438111
Hero Member
*
Offline Offline

Posts: 1715438111

View Profile Personal Message (Offline)

Ignore
1715438111
Reply with quote  #2

1715438111
Report to moderator
1715438111
Hero Member
*
Offline Offline

Posts: 1715438111

View Profile Personal Message (Offline)

Ignore
1715438111
Reply with quote  #2

1715438111
Report to moderator
DubFX
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
April 16, 2014, 06:25:53 PM
 #2

I understand that the bitcoin algorithm adjust difficulty by measuring the time it took to find the last 2016 blocks. What clock is used?
Here you go:https://en.bitcoin.it/wiki/Difficulty
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


View Profile
April 16, 2014, 06:31:25 PM
 #3

I understand that the bitcoin algorithm adjust difficulty by measuring the time it took to find the last 2016 blocks. What clock is used?

Each miner determines his own clock.  

There are 2 "clocks" actually.

- the miner's system clock
- the median of the timestamp when peers connect

At least one of the first five peers you connect to must have a clock within 5 minutes of your computer or it displays a warning to fix your system clock.

If the median of the other peers is within 70 minutes, it uses that time as your time.

This is the code.

Each miner decides what timestamp to add to its block.  It can set it to anything but if it is more than 2 hours in the future, the block will not be accepted.

If it is to far in the past, it will also not be accepted.  A block's timestamp must be later than then median time of the 11 blocks before the block.

This gives a short time window of acceptable times. 

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
wingding (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 504



View Profile
April 16, 2014, 07:14:02 PM
 #4

Thanks TierNolan!
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!