Author

Topic: Where can I learn in more detail exactly what the computers are doing to mine? (Read 1118 times)

kjj
legendary
Activity: 1302
Merit: 1026
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
hero member
Activity: 492
Merit: 503
Kind of, but don't confuse the hash that a miner needs to find, with a bitcoin address.

A bitcoin address is the thing that looks like a string of uppercase/lowercase letters and numbers (frinstance, the one in my sig). It always starts with a 1, has (I think) 33 or 34 characters, and each character is one of 58 (not 62). 26 uppercase letters + 26 lowercase + 10 digits = 62, but four are disallowed (I think 0, O, 1 and l) and you can probably see why.

The hash is a 256-bit number, which must start with a certain number of zeroes. The more zeroes it must start with, the harder it'll be to find. Back when the difficulty level was 1, the first 32 bits had to be zero. That meant that on average you'd have to make 4 billion hashes (actually 2^32) to find a valid block header. Now the difficulty is six-million-and-change, which means the upper limit for what's a valid hash, is six million times lower than it was back in the day. So your miner has to do six million times as much work as back then.

For more info on what's actually being hashed, check out https://en.bitcoin.it/wiki/Block_hashing_algorithm
newbie
Activity: 14
Merit: 0
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?
hero member
Activity: 533
Merit: 500
sr. member
Activity: 471
Merit: 256
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.
legendary
Activity: 1512
Merit: 1049
Death to enemies!
It searches for such combination of block header hash and random number that when hashed two times by SHA256 will give hash that starts with equal or greater number of zeroes than required by difficulty level. Hope I got it all right and did not miss anything.
member
Activity: 215
Merit: 11
I've been doing some reading on this myself, if you understand the fundamentals of programming: https://en.bitcoin.it/wiki/Getblocktemplate is a treasure trove of information.
legendary
Activity: 1064
Merit: 1001
You would probably get the most bang for your buck by first studying Hash Functions to understand what they are.
newbie
Activity: 14
Merit: 0
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.
Jump to: