Bitcoin HashRate Explained (2022)

Reading Time: 7 minutes

There’s been a lot of excitement about Bitcoin’s hashrate lately!

If you follow crypto news, you might have seen reports of Bitcoin’s hashrate pushing above the 100 exahash (or 0.1 zetahash) level recently. In simple terms, that means Bitcoin miners are estimated to be collectively performing over 100 quintillion (100,000,000,000,000,000,000+) hash calculations per second.

Consider that one of the most efficient ASIC mining units on the market, the Antminer S17+, achieves an individual hash rate of 73 terahash, or 73 trillion (73,000,000,000,000) calculations per second. For Bitcoin’s total hashrate to be in the 0.1 zetahash range would require about 1.37 million S17+ ASICs to be running simultaneously. As many less-efficient mining devices are still in operation, the real number of ASICs currently running is probably closer to 2 or 3 million units.

Figures like these might sound impressive and explain why Bitcoin uses as much electricity (over 70% of it renewable) as a medium-sized country. But what do all these astronomically large hash rate numbers really mean for Bitcoin’s price or security? How is hash rate measured and controlled? Why is hashrate important? And for that matter, what even is hash rate?

In this article, we’ll address all these questions and more. While the topic may seem technical, it’s really not that difficult to understand. Getting your head around hash rate will give you a much better idea of what makes Bitcoin valuable and secure. Hash rate is probably the most significant Bitcoin “data point” besides price, so it’s definitely worth learning about.

What is HashRate?

Even if you’re new to crypto, you’ve surely heard of Bitcoin mining. This is the process by which everybody’s Bitcoin transactions are verified and entered into the immutable transaction record known as the blockchain.

In order to successfully mine, specialized hardware known as an ASIC miner is required. The performance of such hardware is measured primarily in terms of its hashrate (and the electrical efficiency at which it achieves it).

In order to understand hashrate, it’s first necessary to understand the cryptographic hash function. That might sound complex but it’s pretty simple – a hash function takes any length of data input and produces an output of a set length.

For example:

Using the SHA-256 hash method employed by Bitcoin, the 3 character sequence “123” hashes out to this 64 character string: “a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3.”

Using the same method, a hash of the collected works of Shakespeare (or any other input data) would also produce a random-looking 64 character string, similar to this one: “03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4.”

It’s important to note here that a hash functions are one-way only. That means there’s no way to work backwards from the seemingly-random 64 character output to arrive back at the original input. So, that second string starting with “03a…” could be “1234” or it could be Hamlet… The only way to know for sure is to try different inputs until you arrive at the exact same output.

Try it for yourself on this cool website by putting any text you like into the “String hash” field and hitting “Hash.” Hint: we suggest trying “1234” before pasting any Shakespeare.

Experimenting with various inputs to produce different outputs is a great way to understand the hashing process. Note that even a tiny, one character change in the input produces a vastly different hash result. If you like, you can also dive into the details of hashing but they’re not necessary for our purposes here.

Bitcoin Hashing

Note that in our second example, “03a…” the first character is a zero. Try using the hash generator to produce a second result which also begins with a zero. If you find one, congratulations, you just earned 12.5 bitcoins!

OK, not really… but finding a hash result which starts with a certain number of zeroes is exactly what Bitcoin miners (or more accurately, their ASIC machines) do all day, every day.

The data a miner inputs into the SHA-256 hash function is a combination of several things:

  • data from all the current transactions (compressed into a hash tree, i.e. a hash of multiple hashes) which fit into the block’s size limit,
  • the previous block’s hash result (including that is what “chains” blocks together into a sequential sequence of blocks, or “blockchain”)
  • the nonce, which is a random value the miner changes with each hash attempt to get a new output (remember that even a tiny change in input produces a completely different output).

If you tried to manually arrive at a result starting with a single zero, you probably gave up after a while, realizing that it’s a process which requires many attempts. Well, right now (the 14th of October 2019) Bitcoin miners have to find a result which starts with nineteen zeroes! The first miner to find such a result for their block gets to add their blocks to the blockchain and also claim the block reward and all transaction fees.

You can check this out for yourself by going to any block explorer and clicking the latest block, which will display its winning hash result:

Block 599,334’s winning hash. If a miner found a result with more zeroes, that would also be acceptable.

So obviously, it would take you forever to find a winning block by manually inputting data and hashing it. You could get smart and write some code to automatically run through the process, and that would be a lot faster. At that point, you’d basically be CPU-mining, or using the number-crunching power of your computer’s processor to boost your hash rate.

That’s how Bitcoin was mined in the early days; via CPU. It was later realized that hashing via a GPU (graphics card) was a lot faster than a CPU, so mining switched over to GPUs (and FPGAs). Eventually, GPUs gave way to ASIC devices, designed for nothing besides mining. With each new generation of mining hardware, hash rate gets noticeably faster:

Hash rate climbed from 0 terahash per second at launch to 1 TH/s in 2011, 10 in 2012, 100 then 1,000 in 2013, 10,000 then 100,000 in 2014, 1 then 10 million in 2016, and 100 million in late 2019. That makes Bitcoin’s network the world’s biggest supercomputer by far, in terms of calculations performed per second.

How HashRate is Measured and Controlled

While mining / hashing is an entirely logical process which makes sense after a little study, Bitcoin’s decentralized nature is harder to grasp. With the possible exception of decentralized file sharing platforms like BitTorrent, most of us are unused to decentralized systems.

One result of decentralization is that there’s no central party which “receives” the miners’ quintillions of hash calculations and so can measure total hash rate. The way we measure is to observe the effects of mining activity over time:

A miner with sufficient hashpower (or enough luck!) to find a block simply announces their new block to the network. Under normal circumstances, all other miners then update the block they’re trying to hash, refreshing it with new, un-mined transactions and the recently-announced block’s hash info. Then the race to find the next hash solution begins all over.

Only by measuring the interval between discovered blocks can we estimate the total hash rate of Bitcoin’s miners.

So, if you’ve ever sent or received a Bitcoin transaction, you probably waited around 10 minutes for a “confirmation” from a miner, declaring your transaction to be part of the official record by including it in a block. You might therefore be wondering why this confirmation process took so long, given that hashrate has increased tremendously over Bitcoin’s history…

The answer is Difficulty. Coded within Bitcoin is this clever little feature, which monitors the time between blocks. In effect, Difficultly estimates hash rate and adjusts the, well, difficulty of finding a block accordingly.

If, over two weeks, the average time between blocks is less than the target time of 10 minutes, the Difficulty algorithm makes it harder to mine blocks. If it’s more than 10 minutes, the algo makes it easier. And how exactly does the Difficulty algorithm makes this adjustment? Simply by altering the number of leading zeroes required for a hash result to be valid.

Technical Note: the number of leading zeroes is a simplified explanation. In reality, the Difficulty adjustment process has much higher precision, which allows for minor adjustments “between the zeroes.”

This brilliant auto-adjusting Difficulty function ensures (more or less) stable block times. A block should take about 10 minutes to mine, even in the event that major investment or some technological breakthrough greatly increases hash rate, or some disaster or government decree greatly diminishes it.

Be aware however that block times can still vary significantly, even without any change in hash rate. This phenomenon is known as “variability.” It derives from the fact that random chance plays a role in finding a block solution, in addition to brute hashpower. Over time however, Difficulty and the law of averages ensure fairly predictable block times.

HashRate Determines Network Security

Random chance aside, it should be apparent that there’s no way to force a block solution. The only way to find the solution is to perform the work (or more accurately, to pay for the ASIC miner and its electricity, so that it can perform the work of seeking a winning hash result). This is why Bitcoin is said to follow a Proof of Work (PoW) model.

The only obvious way to cheat within a PoW system is to consistently perform the majority of work. This is known as a 51% attack. If a miner has a majority of hash rate, they can produce an invalid block and reliably build further blocks upon it. Even if other miners rejected the invalid block and start working on a separate chain which excludes it and any subsequent blocks which include it, Bitcoin is designed to consider the chain with the most accumulated proof of work to be the real one.

If that sounds exploitable, don’t worry. There’s an in-built incentive against miner fraud. In order to gain a majority of hash power, a miner needs to invest in enough mining equipment to overpower the current hashrate of honest miners. Let’s say they need 1.5 million S17s – that would cost around $4,249,500,000 – a stunning $4.2 billion, although Bitmain would probably give them a bulk discount. After investing that much money, the last thing a miner would want to do is destroy their investment by attacking Bitcoin.

As such an attack would be immediately apparent and highly concerning, the market would react negatively, crashing Bitcoin’s price, and so reducing the evil miner’s profits from block rewards and fees. Thus, it makes a lot more economic sense for any miner to play along with the rules rather than try to cheat.

That, in a nutshell, is why a cryptocurrency is more secure the more hashrate it has. Hashrate is thus a good, objective measure of just how secure any coin truly is.

Related Articles

This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.