# computational effort needed to mine a block given the number of leading zeros in the resulting hash?

What is the computational effort to mine a block successfully given the number of leading zeros in a resulting hash?

## 2 Answers

The difficulty does not specify a certain amount of computational effort that needs to be expended. In other words, the difficulty is not set to '1000 effort', and miners slowly progress from 0 to 1000, with the first one to expend 1000 effort winning the next block.

Instead, you need to think of it like a lottery. You can expend effort to make a guess, and if your guess is correct, you win the next block! The higher the difficulty, the lower the odds of any one guess generating a valid block.

The network hash rate represents the computational effort to mine a block successfully. Hash rate "is an SI derived unit representing the number of double SHA-256 computations performed in one second." Source

Currently, the network hashrate is about 14.7 million TH/s. TH/s is terahash per second. This means that across the entire bitcoin network, mining hardware runs two series of the block solving algorithm SHA-256 14.7 million trillion times per second. That would be 29.4 million trillion SHA series per second. In plain numbers, that's `29,400,000,000,000,000,000,000`.

According to this SHA comparison table on WikiPedia, the SHA-256 algorithm averages a series of `x` operations, so `x` * 29.4 million trillion is the total current computational effort of the bitcoin network, in operations per second. `x` in this instance is over my head to determine, but I believe it is `Add (mod 232), Or, Shr`, whatever that means.

According to this answer, operations per double hash (one try to solve the block) varies by hardware and gives GPUs as significantly more efficient than CPUs, meaning they actually need less operations to hash SHA-256.