DEV Community

Discussion on: What is "bitcoin mining"?

Collapse
 
rkfg profile image
rkfg • Edited

In bitcoin, the criteria are dynamic and become harder and harder to meet. For example first it may have been "hash must start with f". Later, to make it harder, it would be "hash must start with 5 f's". The more bitcoin have been mined, the more difficult the criteria will become.

This part is wrong:

  1. the hash should actually start with zeroes, not ones, so that you have to find a value that's lower than the "target", the absolute maximum acceptable hash value. SHA256 produces 32 byte long hash (hence the name), interpret it as a looooong number and that's your "guess". If it's less than the target, you've mined a block, if not, rinse&repeat.
  2. the target and difficulty (which is a more human-readable inverse representation of the target) are not connected with the amount of bitcoins mined in any way. It's not mentioned in the article, and it's very important, that each block contains a timestamp when it has been generated. Each miner looks how much time has been spent on generating the last 2016 blocks by subtracting the last known block (number n) timestamp and the timestamp of (n-2016)th block. A block should be generated every 10 minutes, so 6 blocks/hour, 144 blocks/day, 2016 blocks/2 weeks. Then the difficulty is raised (in other words, the target is lowered) or lowered (or the target is raised) according to that. If 2016 blocks were generated in one week, the difficulty is doubled. If it would require 4 weeks, the difficulty is halved and so on. Of course, usually it doesn't change that dramatically but only for several percents up or down. So, the difficulty represents how much computing power is dedicated to the Bitcoin network, the more power is used the less bitcoins per hash miners get.
  3. what actually depends on the total amount of bitcoins mined is the amount of bitcoins awarded per block. It was 50 in the beginning, now it's 12.5.
Collapse
 
lenoir_aaron profile image
Aaron

Hi, I have updated the article to reflect your remarks. Hopefully everything still makes sense :)

The information you provided cleared a few things up. Thanks a lot for taking the time to comment! Much appreciated.

Collapse
 
rkfg profile image
rkfg

Yes, now it's good. I'm not sure about the term "noun" you used, it's actually called nonce.