Proof of Work in Bitcoin (2026)

No floating point number used

sCrypt

·

Follow

4 min read

·

Feb 28, 2024

--

We elaborate how Proof of Work (PoW) works in Bitcoin.

The core of the PoW (Proof of Work) process involves finding a hash below a target value set by the network. The hash function used by Bitcoin is double SHA-256, which produces a 256-bit hash value. Miners generate hash values by combining the block header information with the nonce and passing it through the hash function. Since the output of the hash function is unpredictable, miners essentially guess different nonce values until they find one that produces a hash below the target value. This process requires a significant amount of computational power and is referred to as mining.

The target is a 256-bit integer that all Bitcoin miners are aiming to find a hash value below. Valid blocks must have a hash below this target. 256-bit means it’s extremely large and can represent a vast range of values. This granularity allows for precise adjustments to the network’s mining difficulty.

Proof of Work in Bitcoin (2)

Difficulty is a measure of how difficult it is to find a hash below a given target. The Bitcoin network has a global block difficulty.

The target inversely relates to the mining difficulty. A lower target means higher difficulty, as there are fewer possible hash values that meet the criteria. Conversely, a higher target increases the range of hash values considered valid, reducing the difficulty.

Difficulty adjustment

The difficulty of the Proof of Work puzzle adjusts approximately every two weeks to maintain a constant block time of about 10 minutes, regardless of the amount of computational power in the network.

Every 2016 blocks, the Bitcoin network calculates the time it took to mine the last 2016 blocks. It then compares this time against the desired timeframe of 20,160 minutes (2016 blocks * 10 minutes per block). If the actual time is less than the desired time, it means blocks are being mined too quickly, and the target lowers (increasing difficulty). Conversely, if the actual time is more, indicating blocks are mined too slowly, the target raises (decreasing difficulty).

In the Bitcoin block header, a compact 32-bit form is stored (known as “Bits”), not the full 256-bit target. It saves spaces and makes it easier to work with and transmit across the network.

Proof of Work in Bitcoin (3)

Converting Bits to target

Bits is just a shorthand/compact version of the target. It works like scientific notation, except that it uses base-256 instead of base-10.

it’s basically split in to two parts:

  1. Exponent: This gives you the size of the target in bytes.
  2. Mantissa: This gives you the initial 3 bytes of the target.

For example, if Bits is equal to 0x1810696F4, you would calculate the target like this:

Proof of Work in Bitcoin (4)

0x18 in hex is 24.

Leading zeros

In the whitepaper, “leading zeros” is used as a way to intuitively understand finding a valid hash below the target threshold.

Proof of Work in Bitcoin (5)

In code, however, the actual criterion for a valid block hash is that it must not exceed a specific target value. Counting leading zeros is thus only an approximation, since hashing to a number of leading zero bits is only a necessary, but not a sufficient, condition for a block hash to be valid.

To see why, consider the target above is shown as full 32 bytes (512 bit) in hexadecimal format below, with preceding zeros.

Target: 0x00000000000000000696f4000000000000000000000000000000000000000000

The following hypothetical block hash is not valid, which only differs from the target in the last byte (0x01 vs 0x00). Even though it has the same number of leading zeros as the target, it is larger and thus invalid.

Block hash: 0x00000000000000000696f4000000000000000000000000000000000000000001

A floating-point number is a way to represent real numbers in computing that can accommodate a very wide range of values. The “floating-point” term comes from the fact that the decimal point can “float”; that is, it can be placed anywhere relative to the significant digits of the number. Examples of floats are 0.1243 and 12.245.

In consensus-critical components of Bitcoin, such as adjusting the difficulty or comparing hash values, floating-point representations are avoided because they can behave inconsistently across various computing architectures. This inconsistency arises from potential rounding differences inherent in floating-point arithmetic, which can lead to non-deterministic outcomes. Since the consensus rules of Bitcoin demand complete determinism to ensure all participants agree on the state of the blockchain, the system relies on data types and operations that yield the same result on any machine, thereby excluding floating-point numbers due to their precision loss and rounding errors. Instead, integers are used.

Proof of Work in Bitcoin (6)

In COPA v. Wright trial, COPA’s witness Adam Back claims the Bitcoin code uses floating point in PoW. This is demonstrably false. All numbers in PoW, target and Bits, are represented as integers. No floating-point arithmetic is used. It is worth noting that difficulty does not show up in code. It is a derived measure from target.

Proof of Work in Bitcoin (2026)

FAQs

What is the proof-of-work for Bitcoin? ›

Proof of work is also called mining, in reference to receiving a reward for work done. Proof of work allows for secure peer-to-peer transaction processing without needing a trusted third party. Proof of work at scale requires vast amounts of energy, which only increases as more miners join the network.

Will Bitcoin move away from proof-of-work? ›

As long as BTC is used, as long as people send/receive BTC between one another, mining will continue. I.e. as long as Bitcoin is still a “thing”. If it stops being used, get replaced by something else, or has to adjust due to some future reason - things may change. But as far as we know now, it won't end.

What problem does proof-of-work solve? ›

Nakamoto's consensus mechanism solved the double-spend problem. By incentivizing miners to verify the integrity of new crypto transactions before adding them to the distributed ledger that is blockchain, proof of work helps prevent double spending.

What is Bitcoin answers? ›

--------- What is Bitcoin? It is a digital currency, created in 2009, by an unknown person(s) using the alias Satoshi Nakamoto. It operates on a decentralized network of computers using blockchain technology to manage transactions and record keeping.

What causes proof-of-work to fail? ›

Problems with proof-of-work

Because proof-of-work mining requires so much computing power, it tends to consolidate miners down to the few people who can afford the equipment. It also tends to pull computing resources into locations where electricity is cheap.

What are the disadvantages of proof-of-work? ›

The advantages of the proof-of-work consensus algorithm include security and decentralization, while the disadvantages include high energy consumption and low scalability. Advantages: High security, decentralized, resistant to attacks. Disadvantages: High energy consumption, slow block generation, limited scalability.

Is it safe to leave money in Bitcoin? ›

If you are new to crypto investing, it's important to have someone experienced guide you through the process of putting crypto in your own wallet. Bottom line, says Fraser, is that crypto investing as a whole remains safe. But exchanges and brokerages continue to lack transparency.

What is the difference between proof of work and proof of stake? ›

Proof of work and proof of stake are systems that choose who gets to update a blockchain. Proof of work chooses the updater through competition. Proof of stake chooses them via a lottery-like system.

Can Bitcoin be wiped out? ›

To manipulate a cryptocurrency network is extremely difficult. Erasing or overwriting a block of already spent Bitcoin, known as “double spending”, is rendered impossible by the decentralised, chronological and computing, power-intensive characteristics of the Bitcoin blockchain.

How long does proof-of-work take? ›

Differences Between Proof Of Work And Proof Of Stake

Transactions on the Proof of Work network take longer to process. This is known as block time, and it varies with each project. The typical block duration for Bitcoin is roughly 10 minutes, although projects like Litecoin broadcast a new block every 2.5 minutes.

Is proof-of-work still used? ›

Proof of work was the consensus mechanism of choice for early cryptocurrencies that needed a secure, decentralized way to process transactions. Although proof of stake has since emerged as a less energy-intensive alternative, proof of work is still used by many major coins.

Why is proof-of-work valuable? ›

A great advantage of proof-of-work is that it results in a chain that is produced by relatively stable, dedicated hardware, creating a secure network. Essentially, the Bitcoin network that produces blocks can be thought of as a giant decentralized hashing factory.

How much is $1 Bitcoin in US dollars? ›

Current BTC to USD exchange rate

1 BTC equals 63,687.00 USD. The current value of 1 Bitcoin is -1.69% against the exchange rate to USD in the last 24 hours. ​ The current Bitcoin market cap is $1.26T. ​Create a free Kraken account to instantly convert BTC to USD or trade BTC/USD markets today.

How many people own 1 Bitcoin? ›

Summary: As of 2024, there are about 420 million cryptocurrency users globally. Of these, approximately 1.5 million individuals possess more than 1 Bitcoin, which is just 0.36% of all cryptocurrency users.

Who owns the most Bitcoin? ›

So, who are the top holders of BTC? According to the Bitcoin research and analysis firm River Intelligence, Satoshi Nakamoto, the anonymous creator behind Bitcoin, is listed as the top BTC holder as of 2024. The company notes that Satoshi Nakamoto holds about 1.1m BTC tokens in about 22,000 different addresses.

What is proof-of-work target in Bitcoin? ›

The target is a 256-bit integer that all Bitcoin miners are aiming to find a hash value below. Valid blocks must have a hash below this target. 256-bit means it's extremely large and can represent a vast range of values. This granularity allows for precise adjustments to the network's mining difficulty.

Is Bitcoin cash proof-of-work? ›

Bitcoin and Bitcoin Cash both use a proof-of-work algorithm to timestamp every new block. The proof of work algorithm used is the same in both cases.

Why is Bitcoin proof-of-work 10 minutes? ›

Bitcoin's block time is 10 minutes, partly due to its reliance on probabilistic finality and the rule of the longest chain being the canonical blockchain. On the other hand, proof-of-stake blockchains can achieve near-instant transaction finality and are much better positioned to be an internet currency.

What is the difference between Bitcoin proof-of-work and stake? ›

Proof-of-Stake (POS) uses randomly selected validators to confirm transactions and create new blocks. Proof-of-Work (POW) uses a competitive validation method to confirm transactions and add new blocks to the blockchain.

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Velia Krajcik

Last Updated:

Views: 5995

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Velia Krajcik

Birthday: 1996-07-27

Address: 520 Balistreri Mount, South Armand, OR 60528

Phone: +466880739437

Job: Future Retail Associate

Hobby: Polo, Scouting, Worldbuilding, Cosplaying, Photography, Rowing, Nordic skating

Introduction: My name is Velia Krajcik, I am a handsome, clean, lucky, gleaming, magnificent, proud, glorious person who loves writing and wants to share my knowledge and understanding with you.