Author

Topic: What clock is used by bitcoin? (Read 549 times)

hero member
Activity: 770
Merit: 504
April 16, 2014, 02:14:02 PM
#4
Thanks TierNolan!
legendary
Activity: 1232
Merit: 1094
April 16, 2014, 01: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. 
sr. member
Activity: 434
Merit: 250
April 16, 2014, 01: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
hero member
Activity: 770
Merit: 504
April 16, 2014, 01: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?
Jump to: