Can you help in answering the following questions:-
1. What is the actual algorithm?
2. I'm told a coin is mined every ten minutes, how is this controlled since the number of people mining varies during each day?
3.Why / how does the algorithm become more difficult with time?
4. If new coins are being mined or discovered, I take it not all 21 million currently exist?
5.If 21 million don't exist at present how can we be sure they actually exist and who knows what they are?
6. Why can't it go beyond 21 million, surely there is another solution to the 21 millionth blockchain?
Thanks
Tim
1.- I think it's SHA256 applied twice to the block header. The block header is constructed concatenating a lot of stuff like the previous block hash, the current time, the nonce of course, the hash of the merkle root of transactions. I said I think because I have studied more scrypt currencies that sha256 currencies. The hash must be lower than a target; let's say the hash has to start with an specified number of zeroes.
2.- The difficulty changes every x blocks or something (that is the hash has to have more zeroes at the left to be correct). If blocks have been mined in less than 10 minutes in average the difficulty will rise.
3.- The "target" changes: the hash have to have more zeroes to the left. Example. Let's say difficulty is 0.00048. The target is 000007fff8000000000000000000000000000000000000000000000000000000. A mined block looked like this:
[2014-01-02 15:15:03] DEBUG: hash <= target
Hash: 000001132dbd8678607c314bb4340351b9641551822ebfc77dfccb62cf7ce575
Target: 000007fff8000000000000000000000000000000000000000000000000000000
The current target is 0000000000000003071f00000000000000000000000000000000000000000000 so good luck finding a hash that starts with 15 zeroes in less than 10 minutes!!!!
4.- They don't.
5.- The code of the bitcoin daemon of the whole world avoids that.
6.- Why bother? The last coins will be discover in the year 2140.