Coding Enthusiast (OP)
Legendary
Offline
Activity: 1040
Merit: 2785
Bitcoin and C♯ Enthusiast
|
|
June 23, 2019, 06:24:59 AM |
|
I am having trouble with some numbers, they don't make sense! Let's say it is 2009, difficulty is 1, you are mining with your Core 2 duo E7300 CPU (the CPU of that time [1]) which gives you a hashrate of 3 (rounded up from 2.52) MHash/s [2] to find block #3 [3] Nonce max value is 4,294,967,295 and to go through a whole set of hashes takes: 4,294,967,295 hash / 3,000,000 Hash/sec = 1,431 sec = 23 minutes. Block #3 was found in ~7 minutes which is the result of calculating 4,294,967,295 hashes more than once (since the nonce in coinbase was changed). [1] https://www.computerhope.com/history/processor.htm[2] https://en.bitcoin.it/wiki/Non-specialized_hardware_comparison[3] https://www.blockchain.com/btc/block-height/3
|
|
|
|
HeRetiK
Legendary
Offline
Activity: 3066
Merit: 2166
Playgram - The Telegram Casino
|
|
June 23, 2019, 11:06:49 AM |
|
I think this is the math you are looking for: https://math.stackexchange.com/questions/903870/probability-of-guessing-correctly-after-x-tries-with-multiple-right-answersApplied to the mining example at hand, if it takes 23 minutes to go through all possible combinations, the chance of finding a correct block within 7 minutes of mining with 3 MHash/s is higher than 50%.
|
|
|
|
▄▄███████▄▄███████ ▄███████████████▄▄▄▄▄ ▄████████████████████▀░ ▄█████████████████████▄░ ▄█████████▀▀████████████▄ ██████████████▀▀█████████ █████████████████████████ ██████████████▄▄█████████ ▀█████████▄▄████████████▀ ▀█████████████████████▀░ ▀████████████████████▄░ ▀███████████████▀▀▀▀▀ ▀▀███████▀▀███████ | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ Playgram.io ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | ▄▄▄░░ ▀▄ █ █ █ █ █ █ █ ▄▀ ▀▀▀░░
| │ | ▄▄▄███████▄▄▄ ▄▄███████████████▄▄ ▄███████████████████▄ ▄██████████████▀▀█████▄ ▄██████████▀▀███▄██▐████▄ ██████▀▀████▄▄▀▀█████████ ████▄▄███▄██▀█████▐██████ ██████████▀██████████████ ▀███████▌▐██▄████▐██████▀ ▀███████▄▄███▄████████▀ ▀███████████████████▀ ▀▀███████████████▀▀ ▀▀▀███████▀▀▀ | | │ | ██████▄▄███████▄▄████████ ███▄███████████████▄░░▀█▀ ███████████░█████████░░█ ░█████▀██▄▄░▄▄██▀█████░█ █████▄░▄███▄███▄░▄██████ ████████████████████████ ████████████████████████ ██░▄▄▄░██░▄▄▄░██░▄▄▄░███ ██░░░█░██░░░█░██░░░█░████ ██░░█░░██░░█░░██░░█░░████ ██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████ ███████████████████████ ███████████████████████ | | │ | ► | |
|
|
|
Coding Enthusiast (OP)
Legendary
Offline
Activity: 1040
Merit: 2785
Bitcoin and C♯ Enthusiast
|
|
June 23, 2019, 03:15:24 PM |
|
if it takes 23 minutes to go through all possible combinations,
That is not "all" possible combinations. That is only all possible nonces. We go through all the ~4.3 billion of them and perform the hash, when we fail to find the result we want, then we change something else and start nonce from 0. For example in block #3 if you deduct 1 second from the time (the block time field) we won't find the hash we were looking for (smaller than the target). So practically you may do this multiple times to find the correct result and my problem is that the numbers (according to hashrate) don't make sense.
|
|
|
|
DaCryptoRaccoon
|
|
June 23, 2019, 04:03:54 PM |
|
Could it be possible that more that one machine was being used?
|
┏━━━━━━━━━━━━━━━━━┓ ┃ 𝔱𝔥𝔬𝔲 𝔰𝔥𝔞𝔩𝔱 𝔴𝔬𝔯ⱪ 𝔣𝔬𝔯 𝔶𝔬𝔲𝔯 𝔟𝔞𝔤𝔰 ┃ ┃ ➤21/M ┃ ┃ ███▓▓ ███▓▓ ███▓▓ ███▓▓┃
|
|
|
HeRetiK
Legendary
Offline
Activity: 3066
Merit: 2166
Playgram - The Telegram Casino
|
|
June 23, 2019, 04:38:03 PM |
|
[...] For example in block #3 if you deduct 1 second from the time (the block time field) we won't find the hash we were looking for (smaller than the target). So practically you may do this multiple times to find the correct result and my problem is that the numbers (according to hashrate) don't make sense.
Ah, you're right. I forgot that you'll have to retry nonces due to the changing block time field. But yes, like MagicByt3 pointed out they might have simply had multiple machines running? Even if satoshi was the only one running the client until Hal Finney came along a few days later this doesn't mean that they only had the client running on a single machine. It only needs a second or third machine for the numbers to make sense.
|
|
|
|
▄▄███████▄▄███████ ▄███████████████▄▄▄▄▄ ▄████████████████████▀░ ▄█████████████████████▄░ ▄█████████▀▀████████████▄ ██████████████▀▀█████████ █████████████████████████ ██████████████▄▄█████████ ▀█████████▄▄████████████▀ ▀█████████████████████▀░ ▀████████████████████▄░ ▀███████████████▀▀▀▀▀ ▀▀███████▀▀███████ | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ Playgram.io ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | ▄▄▄░░ ▀▄ █ █ █ █ █ █ █ ▄▀ ▀▀▀░░
| │ | ▄▄▄███████▄▄▄ ▄▄███████████████▄▄ ▄███████████████████▄ ▄██████████████▀▀█████▄ ▄██████████▀▀███▄██▐████▄ ██████▀▀████▄▄▀▀█████████ ████▄▄███▄██▀█████▐██████ ██████████▀██████████████ ▀███████▌▐██▄████▐██████▀ ▀███████▄▄███▄████████▀ ▀███████████████████▀ ▀▀███████████████▀▀ ▀▀▀███████▀▀▀ | | │ | ██████▄▄███████▄▄████████ ███▄███████████████▄░░▀█▀ ███████████░█████████░░█ ░█████▀██▄▄░▄▄██▀█████░█ █████▄░▄███▄███▄░▄██████ ████████████████████████ ████████████████████████ ██░▄▄▄░██░▄▄▄░██░▄▄▄░███ ██░░░█░██░░░█░██░░░█░████ ██░░█░░██░░█░░██░░█░░████ ██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████ ███████████████████████ ███████████████████████ | | │ | ► | |
|
|
|
DaCryptoRaccoon
|
|
June 23, 2019, 04:58:54 PM Last edit: June 23, 2019, 09:44:47 PM by MagicByt3 |
|
[...] For example in block #3 if you deduct 1 second from the time (the block time field) we won't find the hash we were looking for (smaller than the target). So practically you may do this multiple times to find the correct result and my problem is that the numbers (according to hashrate) don't make sense.
Ah, you're right. I forgot that you'll have to retry nonces due to the changing block time field. But yes, like MagicByt3 pointed out they might have simply had multiple machines running? Even if satoshi was the only one running the client until Hal Finney came along a few days later this doesn't mean that they only had the client running on a single machine. It only needs a second or third machine for the numbers to make sense. This seems like the most likley reason the numbers don't add up. I recall reading a post by Satoshi that said something about using more than one machine but I cannot seem to find it.. This mail might give a better idea. page 13 https://www.courtlistener.com/recap/gov.uscourts.flsd.521536/gov.uscourts.flsd.521536.24.8.pdf
|
┏━━━━━━━━━━━━━━━━━┓ ┃ 𝔱𝔥𝔬𝔲 𝔰𝔥𝔞𝔩𝔱 𝔴𝔬𝔯ⱪ 𝔣𝔬𝔯 𝔶𝔬𝔲𝔯 𝔟𝔞𝔤𝔰 ┃ ┃ ➤21/M ┃ ┃ ███▓▓ ███▓▓ ███▓▓ ███▓▓┃
|
|
|
itod
Legendary
Offline
Activity: 1974
Merit: 1077
^ Will code for Bitcoins
|
|
June 24, 2019, 10:02:52 AM |
|
[...] For example in block #3 if you deduct 1 second from the time (the block time field) we won't find the hash we were looking for (smaller than the target). So practically you may do this multiple times to find the correct result and my problem is that the numbers (according to hashrate) don't make sense.
Ah, you're right. I forgot that you'll have to retry nonces due to the changing block time field. But yes, like MagicByt3 pointed out they might have simply had multiple machines running? Even if satoshi was the only one running the client until Hal Finney came along a few days later this doesn't mean that they only had the client running on a single machine. It only needs a second or third machine for the numbers to make sense. This seems like the most likley reason the numbers don't add up. I recall reading a post by Satoshi that said something about using more than one machine but I cannot seem to find it.. ... Can't find where Satoshi said he was using multiple computers from the beginning, but I'm almost certain I've read it somewhere, and if I remember correctly number of machines were in double digits. That's why many people think he was working in Academia, otherwise it would be rather hard to get hold of so many computers to play with your own personal project. It makes complete sense, how would you otherwise test networking part of the code?
|
|
|
|
DaCryptoRaccoon
|
|
June 24, 2019, 12:27:24 PM |
|
[...] For example in block #3 if you deduct 1 second from the time (the block time field) we won't find the hash we were looking for (smaller than the target). So practically you may do this multiple times to find the correct result and my problem is that the numbers (according to hashrate) don't make sense.
Ah, you're right. I forgot that you'll have to retry nonces due to the changing block time field. But yes, like MagicByt3 pointed out they might have simply had multiple machines running? Even if satoshi was the only one running the client until Hal Finney came along a few days later this doesn't mean that they only had the client running on a single machine. It only needs a second or third machine for the numbers to make sense. This seems like the most likley reason the numbers don't add up. I recall reading a post by Satoshi that said something about using more than one machine but I cannot seem to find it.. ... Can't find where Satoshi said he was using multiple computers from the beginning, but I'm almost certain I've read it somewhere, and if I remember correctly number of machines were in double digits. That's why many people think he was working in Academia, otherwise it would be rather hard to get hold of so many computers to play with your own personal project. It makes complete sense, how would you otherwise test networking part of the code? I recall reading it too in a early post here there was also the spec of the machine and some figures if I recall correctly.
|
┏━━━━━━━━━━━━━━━━━┓ ┃ 𝔱𝔥𝔬𝔲 𝔰𝔥𝔞𝔩𝔱 𝔴𝔬𝔯ⱪ 𝔣𝔬𝔯 𝔶𝔬𝔲𝔯 𝔟𝔞𝔤𝔰 ┃ ┃ ➤21/M ┃ ┃ ███▓▓ ███▓▓ ███▓▓ ███▓▓┃
|
|
|
klaaas
|
|
June 24, 2019, 01:24:52 PM |
|
If i understand your question correct it boils down to this If your hash is below the target, then you win. If not, you increment the nonce (completely changing the hash) and try again. quote from the wikiFor the inner details for the difficulty check this page https://en.bitcoin.it/wiki/Mining and for the target here https://en.bitcoin.it/wiki/Target
|
|
|
|
Coding Enthusiast (OP)
Legendary
Offline
Activity: 1040
Merit: 2785
Bitcoin and C♯ Enthusiast
|
|
June 24, 2019, 03:12:57 PM |
|
I recall reading it too in a early post here there was also the spec of the machine and some figures if I recall correctly.
You might be referring to the guesswork about number of coins Satoshi owns which also included an estimation of his hashrate. That put it around 7.16 MHS and concluded Satoshi must have had more than one machine mining bitcoin. https://organofcorti.blogspot.com/2014/08/167-satoshis-hashrate.htmlBTW 7.16 still doesn't make sense to me because of what I explained before and since it takes 10 min to go through 4.2 billion hashes.
|
|
|
|
HeRetiK
Legendary
Offline
Activity: 3066
Merit: 2166
Playgram - The Telegram Casino
|
|
June 24, 2019, 04:00:19 PM |
|
BTW 7.16 still doesn't make sense to me because of what I explained before and since it takes 10 min to go through 4.2 billion hashes.
Why do you assume that one has to go through "all" 4.2 billion hashes to successfully mine a block? After all PoW mining is a probabilistic affair.
|
|
|
|
▄▄███████▄▄███████ ▄███████████████▄▄▄▄▄ ▄████████████████████▀░ ▄█████████████████████▄░ ▄█████████▀▀████████████▄ ██████████████▀▀█████████ █████████████████████████ ██████████████▄▄█████████ ▀█████████▄▄████████████▀ ▀█████████████████████▀░ ▀████████████████████▄░ ▀███████████████▀▀▀▀▀ ▀▀███████▀▀███████ | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ Playgram.io ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | ▄▄▄░░ ▀▄ █ █ █ █ █ █ █ ▄▀ ▀▀▀░░
| │ | ▄▄▄███████▄▄▄ ▄▄███████████████▄▄ ▄███████████████████▄ ▄██████████████▀▀█████▄ ▄██████████▀▀███▄██▐████▄ ██████▀▀████▄▄▀▀█████████ ████▄▄███▄██▀█████▐██████ ██████████▀██████████████ ▀███████▌▐██▄████▐██████▀ ▀███████▄▄███▄████████▀ ▀███████████████████▀ ▀▀███████████████▀▀ ▀▀▀███████▀▀▀ | | │ | ██████▄▄███████▄▄████████ ███▄███████████████▄░░▀█▀ ███████████░█████████░░█ ░█████▀██▄▄░▄▄██▀█████░█ █████▄░▄███▄███▄░▄██████ ████████████████████████ ████████████████████████ ██░▄▄▄░██░▄▄▄░██░▄▄▄░███ ██░░░█░██░░░█░██░░░█░████ ██░░█░░██░░█░░██░░█░░████ ██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████ ███████████████████████ ███████████████████████ | | │ | ► | |
|
|
|
Coding Enthusiast (OP)
Legendary
Offline
Activity: 1040
Merit: 2785
Bitcoin and C♯ Enthusiast
|
|
June 24, 2019, 04:18:03 PM |
|
BTW 7.16 still doesn't make sense to me because of what I explained before and since it takes 10 min to go through 4.2 billion hashes.
Why do you assume that one has to go through "all" 4.2 billion hashes to successfully mine a block? After all PoW mining is a probabilistic affair. Actually I'm assuming you have to go through all of them multiple times not just once and the reason is because I keep changing the header and hash it with all nonces and don't get any results. For example as I said above if the block time was 123147017 2 instead of 123147017 3 no acceptable hash could have been found. Obviously I haven't tested that many cases due to having only 1.7 MH/s with 1 core, to talk probability and this is just an assumption based on small number of tests.
|
|
|
|
|