1

On average, how many "computations" (GPU computations, CPU computations, CPU cycles, etc.) does it take to solve a block ("win" a mining race)?

What are these computations measured in? Operations? Operations per second? Something else? Thanks in advance!

2

When mining, you computer creates hashes. These hashes must satisfy a certain condition. All a miner does is trying many many times to find a valid hash for a block.

For this reason, mining hardware performance is measured in GH/s, giga-hash-per-second, which are one billion hash calculations per second and it is called the hashrate.

It is good to know that there is no fixed amount if hashes required to find a valid hash. The Bitcoin network has a dynamic difficulty for the mining problem. This difficulty is used to make sure new bitcoins are generated at a predictable rate. The difficulty is changed every 2016 blocks, and is adapted so that it will take as close as possible to 2 weeks for the next 2016 blocks. This means that, at average, every 10 minutes a new block is found.

The chance of finding a good hash within such 2 weeks is fixed. This means that you can find one after only a few tries or it can take you weeks or even months to find one. When the total hashrate of the network raises, 2016 blocks will be found in less than 2 weeks. In this case the difficulty will automatically be adapted so that the next 2016 blocks will take 2 weeks, considering the recent hashrate change.

| improve this answer | |
  • Thanks @Steven Roose (+1) - I guess this leaves me with 2 followups: (1) I guess I'm looking for the relationship between GH/s and CPU/GPU clockspeed. If I have, say, a 3GHz CPU, does that mean that in 3 seconds, I'm operating at 3GH/s? And (2) For the current year (2013), what is the average number of hashes miners have to create in order to "solve a block", or how could I find this information? I ask because I'm trying to do some feasibility/proof-of-concept work here. Thanks again for all your awesome answers! – TicketMonster Apr 29 '13 at 23:03
  • 1
    Many CPU's and GPU's are listed here with their measured hashrate: en.bitcoin.it/wiki/Mining_hardware_comparison (the link was in the answer as well). Here is the probability to win a block with one hash try: blockexplorer.com/q/probability The total hashes averagely needed to find a good block is 1 devided by that amount. – Steven Roose Apr 30 '13 at 0:07
0

The number of hashes per block is computed as Difficulty * 2^32.

The current difficulty level is 10,076,293.

So that means there will be ~43,277,734,890,000,000 hashes performed to solve the next block.

1 Terahash = 1,000,000,000,000, so that means ~43,278 Thash are performed per block.

One block is found in 10 minutes, or 600 seconds.

So that means the hashing capacity of the entire Bitcoin network is currently ~72 Thash/s.

| improve this answer | |
0

In response to the question the OP also posed in Steven Rooses answer's, comments.

" I guess this leaves me with 2 followups: (1) I guess I'm looking for the relationship between GH/s and CPU/GPU clockspeed. If I have, say, a 3GHz CPU, does that mean that in 3 seconds, I'm operating at 3GH/s? And (2) For the current year (2013), what is the average number of hashes miners have to create in order to "solve a block", or how could I find this information? I ask because I'm trying to do some feasibility/proof-of-concept work here. Thanks again for all your awesome answers! "

The connection between clock speed and hashing power is somewhat not existent. The real factor is how many pieces of hardware on the chip you have that are dedicated to doing operations the SHA-256 hashing (read mining) algorithm uses.

I do not know exactly the steps of the SHA-256 algorithm, but lets say the algorithm only needs to use hardware x, y, and z to work. And by hardware I mean literally what is printed on the Integrated Circuit. So you only need x, y, and z but you have a CPU that has hardware a-z, at that point only 3/26% of your CPU's computational power is useful to mining. This happens in real life. Most CPU's have a lot of hardware for a bunch of applications. Like floating point number math units, arithmetic logic units, etc. Well if hashing only uses one of these many CPU hardware's the rest of the CPU is worthless to mining.

The reason GPU's are better is they have more hardware on their chips that are useful to mining. Moreover they have a higher percentage of useful hardware on their chips.

ASIC's which are Application Specific Integrated Circuits have ONLY what is needed for the SHA-256 algorithm. Thus 100% of the chip is doing useful work towards mining.

The other thing we must remember too is that there are IC printing sizes. If we can only print with a resolution of 100nm then we can only fit so many hardwares on the IC, if we can print smaller we can print more hardware on the IC.

Lets compare a hypothetical 200nm fabrication process ASIC to a 32nm fabrication process GPU, we can fit 6.25 times more hardwares onto the IC in the GPU than the ASIC (200nm/32nm = 6.25). But the ASIC is 100% for mining and the GPU might only have 50% its hardware useful for mining. So we might suspect the GPU in this case to outperform the ASIC chip for chip. Because even 50% of the GPU has 3 times more useful mining hardwares than the ASIC.

The average number of hashes to solve a block. Impossible to tell you. You would have to average every single hash every single miner has made to date, most of which are never saved. So there is no definite answer.

The bitcoin protocol is made such that hopefully on average a block is solved every ten minutes. How hard it is to solve a block is based on the difficulty. The difficulty is changed, as you might suspect, to make it more or less difficult to solve a block in case it is taking shorter or longer than ten minutes on average to solve a block.

So the best answer is the number of hashes on average to solve a block is based on the past hashing power of the network. The protocol averages out some data points, makes a educated guess based on the average, and then sets the new difficulty so that the average line lies on the 10 minute block mark.

One interesting thing, you have the same chance each time you try a hash to find a block. This is because the outcome of the SHA-256 algorithm is, to humans, random. Changing the input but just a little can dramatically change the output (ie hash value), we also cannot tell how the output will change based on a change to the input. So say you hash at 1 Mhash. or about 1 million hashes a second. So you are doing the SHA-256 algorithm a million times a second, each has the same chance to "solve" the block. So you literally could solve the next million blocks in one second. Which is so unfathomably unlikely, if you could truly understand how unlikely it is you might die.

[As always, correct me where I am wrong]

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.