Pages:
Author

Topic: Is calendar time used in the Bitcoin network? - page 2. (Read 2043 times)

full member
Activity: 126
Merit: 100
September 21, 2014, 12:42:43 PM
#7
The "current time" on the Bitcoin network is a median of the time of last 11 blocks.

Note the cute duality: median of 11 is a 6th element in a sorted array, so "time hasn't moved forward until median time of 11 last blocks has increased " and "money transfer not confirmed until 6 confirmations are seen" are mathematically dual.


But what are the rules for calendar time check of the individual blocks? Can a 55% attack on timestamps be done to mess up the blockchain? Cheesy
legendary
Activity: 2128
Merit: 1073
September 21, 2014, 12:31:26 PM
#6
The "current time" on the Bitcoin network is a median of the time of last 11 blocks.

Note the cute duality: median of 11 is a 6th element in a sorted array, so "time hasn't moved forward until median time of 11 last blocks has increased " and "money transfer not confirmed until 6 confirmations are seen" are mathematically dual.
full member
Activity: 126
Merit: 100
September 21, 2014, 12:25:22 PM
#5
I read that: "The difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks." -- https://en.bitcoin.it/wiki/Difficulty

(In reality it's at the moment actually 2015 blocks, but anyway.)

Based on time? Calendar time? Global time server? Consensus calendar time algorithm among nodes?

Miners include a timestamp in each block. This is used to determine the size of the difficulty adjustment. The timestamps included are just the local clocks of the miners machines. These are not accurate, but that's okay. The protocol specifies a relatively large maximum tolerance on these timestamps, which means it can happen that block N has a later timestamp than block N+1.

Yes, I guessed that the miner getting the reward used a local clock. But yikes, can the calendar timestamps be put into the blockchain in wrong order? It works because the change of difficulty is on average every two weeks, but what if that time period is reduced in later versions of the code?
full member
Activity: 126
Merit: 100
September 21, 2014, 12:21:37 PM
#4
every block has timestamp which is checked by some rules
so it is easy to calculate time diff between last block and block #(last-2016)


So the miner that gets the reward sets the timestamp? Seems a bit shaky, but I guess the nodes do some kind of calendar time check to see if the timestamp seems reasonable.
hero member
Activity: 728
Merit: 500
September 21, 2014, 12:14:21 PM
#3
I read that: "The difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks." -- https://en.bitcoin.it/wiki/Difficulty

(In reality it's at the moment actually 2015 blocks, but anyway.)

Based on time? Calendar time? Global time server? Consensus calendar time algorithm among nodes?

Miners include a timestamp in each block. This is used to determine the size of the difficulty adjustment. The timestamps included are just the local clocks of the miners machines. These are not accurate, but that's okay. The protocol specifies a relatively large maximum tolerance on these timestamps, which means it can happen that block N has a later timestamp than block N+1.
legendary
Activity: 1260
Merit: 1019
September 21, 2014, 12:13:05 PM
#2
every block has timestamp which is checked by some rules
so it is easy to calculate time diff between last block and block #(last-2016)
full member
Activity: 126
Merit: 100
September 21, 2014, 12:04:28 PM
#1
I read that: "The difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks." -- https://en.bitcoin.it/wiki/Difficulty

(In reality it's at the moment actually 2015 blocks, but anyway.)

Based on time? Calendar time? Global time server? Consensus calendar time algorithm among nodes?
Pages:
Jump to: