Post
Topic
Board Development & Technical Discussion
Re: Where can I learn in more detail exactly what the computers are doing to mine?
by
kjj
on 26/03/2013, 13:39:20 UTC
I keep seeing over and over that "to mine bitcoins your computer has to solve mathematical puzzels".  OK that's a little vague.  Where can I learn more about what exactly is required to generate a block and how the difficulty changes?  I wouldn't understand the code itself but a technical paper with some diagrams would be interesting.
Start with this picture:
http://spectrum.ieee.org/img/06Bitcoin-1338412974774.jpg

Then read up on the topics that interest you the most.

That's exactly what I'm looking for but I got lost on 'nonces' and what data it's being added to to change the hash value and why.  Moving right a long though to way over simply is this the problem that's being solved:

1.) There is some existing data based on all passed transactions.

2.) Everyone collectively in the network is taking that existing data, adding a nonce to it and creating a hash - completely at random.

3.) They're looking for the hash that starts with X 0's that's created by a set of existing data plus a random nonce.  I can't tell what the character combination is exactly but looks like upper case, lower case and numbers - 62 combinations?  This means that each difficulty step can be accomplished by adding more leading 0's.  Each success leading zero is an exponential (or is it logarithmic?) step up in difficulty because it becomes 0 - 62 possible combinations 00 - 62 * 62 possible combinations 000 - 62 * 62 * 62 possible combinations and so on.

Is that right?

Close.

The output of the hash is 256 bits, not an ASCII string.  Basically, the hash is a number between 0 and 115792089237316195423570985008687907853269984665640564039457584007913129639936.

The leading zero part is just because the hash must be below the target.  The target is related to the difficulty in a way that target is roughly equal to 2256-(difficulty*232).  Right now, the target is 4026319404534786334009451711043898716884778820756489262596096.

See these two pages:

https://en.bitcoin.it/wiki/Difficulty
https://en.bitcoin.it/wiki/Target