Bitcoin Forum
July 06, 2024, 06:42:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why didn't the difficulty change at block 2016?  (Read 407 times)
nathan_24 (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 3


View Profile
August 10, 2017, 10:58:18 AM
 #1

As far as I know, the difficulty must be re-targeted every 2,016 blocks. It is increased or decreased depending on how long it took to process the previous 2,016 blocks.

Block 0 (genesis) has a timestamp of 1231006505, and block 2,015, has 1233061996. That makes a difference of 2055491 seconds, which is roughly 23-24 days. That is more than 2 weeks (14 days) so, the difficulty should have been decreased a little at block 2,016, but it didn't. It remained exactly at 486604799.

It also didn't change at blocks 4,032, 6,048, 8,064, 10,080... and I haven't checked anymore.

What kind of Dark Magic is behind this anomaly?
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
August 10, 2017, 11:19:53 AM
Last edit: August 10, 2017, 12:07:01 PM by ranochigo
 #2

There's nothing wrong with that. At that time, there were only a few machines (presumably only satoshi's)* running to mine Bitcoins.

The network does try to keep the blocks at an interval of 10 minutes. At that time, the difficulty was set at 1 and it is impossible to go lower than that, as per the algorithm that calculates the difficulty.

**Lol actually nevermind, I thought Hal Finney had his transaction a lot later than that. I would still say that only a few people mined Bitcoins at that time.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
nathan_24 (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 3


View Profile
August 10, 2017, 11:37:18 AM
 #3

There's nothing wrong with that. At that time, there were only a few machines (presumably only satoshi's) running to mine Bitcoins.

The network does try to keep the blocks at an interval of 10 minutes. At that time, the difficulty was set at 1 and it is impossible to go lower than that, as per the algorithm that calculates the difficulty.

You say that difficulty can't go lower than that because of the algorithm, but it is much lower in the testnet, for example.

Is there a hard-coded minimum difficulty then?
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
August 10, 2017, 11:55:02 AM
 #4

You say that difficulty can't go lower than that because of the algorithm, but it is much lower in the testnet, for example.

Is there a hard-coded minimum difficulty then?
Testnet does have a minimum difficulty of 1 though it is not equivalent to the difficulty on the mainnet.

Yes, the lowest possible target is hardcoded into the client.[1]

[1] https://github.com/bitcoin/bitcoin/blob/1b046603b30ebfab6199a2f92015d507b248b590/src/pow.cpp#L82

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
aleksej996
Sr. Member
****
Offline Offline

Activity: 490
Merit: 389


Do not trust the government


View Profile
August 10, 2017, 12:01:59 PM
 #5

There's nothing wrong with that. At that time, there were only a few machines (presumably only satoshi's) running to mine Bitcoins.

The network does try to keep the blocks at an interval of 10 minutes. At that time, the difficulty was set at 1 and it is impossible to go lower than that, as per the algorithm that calculates the difficulty.

So no one mined other then Satoshi for more then 2 months. I know it was a very new concept, but not even to try it? Weird.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3430
Merit: 4681



View Profile
August 10, 2017, 01:32:00 PM
 #6

So no one mined other then Satoshi for more then 2 months. I know it was a very new concept, but not even to try it? Weird.

Others (such as Hal Finney) were also mining at that time. Not very many people had heard of it yet, and many of those that had heard of it didn't think it would succeed or that it was very interesting.  Even many of those that thought it was interesting didn't waste a lot of time mining since it wasn't really useful for anything.  It was just free novelty imaginary money that had no value and couldn't be exchanged for anything.

- snip -
It also didn't change at blocks 4,032, 6,048, 8,064, 10,080... and I haven't checked anymore.
- snip -

The first difficulty adjustment finally happened on 2009 December 30 at approximately 06:11 UTC with block 32,256
nathan_24 (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 3


View Profile
August 10, 2017, 01:37:30 PM
 #7

You say that difficulty can't go lower than that because of the algorithm, but it is much lower in the testnet, for example.

Is there a hard-coded minimum difficulty then?
Testnet does have a minimum difficulty of 1 though it is not equivalent to the difficulty on the mainnet.

Yes, the lowest possible target is hardcoded into the client.[1]

[1] https://github.com/bitcoin/bitcoin/blob/1b046603b30ebfab6199a2f92015d507b248b590/src/pow.cpp#L82

That's it! I could read in the code that the minimum difficulty target is 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff. That is transformed into 486604799 when compressed. Then that's why the difficulty never went lower, even when the blocks were produced slower than 2,016 blocks per 2 weeks.

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