First off: it's really nice to see you're digging into this stuff. A lot of people don't really bother, but I think it's important to understand.
Also: I'm not a full expert on this either, but I think I can clear things up a little.
No, that's not correct. There's no "issuing" of a block. You're probably thinking in terms of a "round", as pools often call the timespan until they find a block. If the difficulty changes during a "round", the block has to be found with the new difficulty.
This might not be the right thread but after i read your answer i thought id better get dirty and get rid of my missconceptions.
So i went to the lions den (https://en.bitcoin.it/wiki/Block
) and honestly, that page could use some clarifying.
As i understand it now the generation of blocks is actually done when the block is solved (and several blocks can be solved competing for the same space in the block chain).
But other pages (https://en.bitcoin.it/wiki/Block_hashing_algorithm
) talk about it as if the block exists from the beginning, which i guess it does: "When generating, you constantly hash the block header. The block is also occasionally updated as you are working on it."
I think it helps here to talk about different kinds of blocks, or different stages a block can be in. Initially it's merely a "block candidate
". The bitcoin client constructs a "block candidate
" with all the transactions, a nonce (initially "0"), previous blocks hash, etc. Then all that is needed to make it a "valid block
", is the hash of the block being smaller than the target. This can be accomplished by manipulating the nonce (usually increasing it by 1) until the hash matches the target. Once this is done (usually by the miner software), that "winning nonce" is put into the block and the block becomes a "valid block
". It's now sent to the network and the block is added to the chain by all nodes and becomes an "accepted block
". Once enough new blocks are accepted to the chain after this block, it becomes a "confirmed block
" and is now truly part of the bitcoin block chain and will very very likely remain part of it forever.
When reading about the generation algorithm (https://en.bitcoin.it/wiki/Generation_Calculator
) it says that:
"Divide by 115792089237316195423570985008687907853269984665640564039457584007913129639935, which is the maximum value of a 256-bit number. You now have the probability of a single hash solving a block."
If this holds true there is a finite number of hashings that would guarantee that a block is solved.
Thus the following statement on the https://en.bitcoin.it/wiki/Block
page is incorrect.
"What if I'm 1% towards calculating a block and...?
- There's no such thing as being 1% towards solving a block. You don't make progress towards solving it. After working on it for 24 hours, your chances of solving it are equal to what your chances were at the start or at any moment. Believing otherwise is what's known as the Gambler's fallacy .
- It's like trying to flip 53 coins at once and have them all come up heads. Each time you try, your chances of success are the same. "
The citation above is only true if we are talking about an infinitely long serie.
As an example.
- The maximum value is: 115792089237316195423570985008687907853269984665640564039457584007913129639935.
- If the calculation above (Generation_Calculator) is true the chances of finding the hash when 115792089237316195423570985008687907853269984665640564039457584007913129639935 - 1 hashes has been done equals 1.
- Thus proving the block page to be wrong.
I have no idea what the correct answer is
The answers do not contradict each other. Let's make an example: Let's say we're not solving a bitcoin block, but where throwing a dice with 6 sides. Let's say rolling a 6 is analogous to solving a block:
Answer 1 is analogous to: "If you divide 1 by 6, you have probability 1/6 of rolling a 6"
Answer 2 is analogous to: "Question: 'if I'm 1% towards rolling a 6 and...?', Answer: 'There's no such thing as being 1% towards rolling a 6. After rolling the dice for 24h the chances of rolling a 6 are equal to what your chances were at the start or at any moment. Believing otherwise is what's known as the Gambler's fallacy''"
Rolling a dice 6 times doesn't guarantee you throw a 6, does it
, probabilities don't add. The probability of rolling a 6 in 6 rolls is not 1/6 * 6, but: 1 - (1 - 1/6) ^ 6 = 0.6651, in words: it's the probability of "not rolling a 1,2,3,4, or 5 six times in a row"
So, both answers are correct.
I hope I was of help.