...

How Does Bitcoin Mining Work? A Step-by-Step Guide

Bitcoin mining step-by-step guide with ASIC miners

Bitcoin mining is the process that confirms Bitcoin transactions, adds new blocks to the blockchain, and helps keep the network secure without a central authority. Miners do not physically create Bitcoin. Instead, they use specialized computers to collect transactions, compete to solve a proof-of-work puzzle, and earn rewards if their block is accepted by the network.

In simple terms, Bitcoin mining works like a public competition. Transactions are sent to the network, miners package them into a candidate block, and the first miner to find a valid hash gets to broadcast that block for the network to verify. If the block follows Bitcoin’s rules, it becomes part of the blockchain. This guide explains each step clearly, from the moment a Bitcoin transaction is sent to the point where a miner receives block rewards and transaction fees.

Bitcoin mining process from transaction to reward

Step 1: Bitcoin Transactions Are Sent to the Network

Bitcoin mining starts when someone sends a Bitcoin transaction. Before miners can include that transaction in a block, the transaction must first reach the Bitcoin network and pass basic checks by nodes.

User Sends a Bitcoin Transaction

A Bitcoin transaction happens when a user sends BTC from one wallet to another. The wallet creates a transaction that uses available unspent outputs as inputs and sends BTC to one or more receiving addresses. The user then signs the transaction with a private key to prove that they are allowed to spend those coins.

After the transaction is signed, it is broadcast to the Bitcoin network. At this stage, the transaction is not confirmed yet. It is only a request waiting to be checked, selected, and included in a future block.

Transaction Enters the Mempool

Once the transaction reaches the network, it may enter the mempool. The mempool is like a waiting area for valid but unconfirmed Bitcoin transactions. Each node has its own mempool, so the exact list of waiting transactions can vary slightly across the network.

Transactions with higher fees are often more attractive to miners because miners collect those fees if their block is accepted. This is why fee levels can affect how quickly a Bitcoin transaction gets confirmed, especially when the network is busy.

Nodes Check Basic Validity

Before a transaction stays in the mempool, Bitcoin nodes check whether it follows basic network rules. This helps stop invalid transactions from spreading or being added to a block.

Nodes usually check whether:

  • The digital signature is valid
  • The transaction inputs refer to unspent outputs
  • The same coins have not already been spent
  • The transaction follows Bitcoin’s format and size rules
  • The transaction meets the node’s relay policy

If the transaction fails these checks, nodes can reject it. If it passes, it stays in the mempool until a miner chooses to include it in a candidate block.

Step 2: Miners Collect Transactions Into a New Block

After transactions enter the mempool, miners choose which ones to include in a new block. Miners are not required to include every waiting transaction. They usually select transactions based on validity, fee value, and block space.

Miners Select Valid Transactions

Miners collect valid transactions from the mempool and prepare them for a new block. Since block space is limited, miners often choose transactions that offer better fees relative to their size. This helps them increase the total reward they can earn if they win the next block.

A miner will usually avoid transactions that appear invalid, too large, or unlikely to be accepted by other nodes. If a miner includes invalid transactions, the whole block could be rejected, which means the miner would lose the chance to earn the block reward.

Transaction Fees Affect Priority

Transaction fees play an important role in mining. When many users are sending Bitcoin at the same time, the mempool can become crowded. In that case, miners often give priority to transactions with higher fee rates, meaning the fee is higher relative to the transaction’s size.

For miners, transaction selection is partly an economic decision. They may consider:

  • Fee rate per transaction size
  • Total fees available in the mempool
  • Block size and block weight limits
  • Whether the transaction follows network rules
  • How likely the block is to be accepted by nodes

This is why two transactions sent at the same time may confirm at different speeds. The transaction with the higher fee rate may be included sooner.

A Candidate Block Is Built

After selecting transactions, the miner builds a candidate block. This block includes a list of transactions, a reference to the previous block, a timestamp, and other block header data. It also includes a special transaction called the coinbase transaction, which creates the miner’s block subsidy and collects transaction fees.

At this point, the block is only a candidate. It is not part of the blockchain yet. The miner still needs to solve the proof-of-work puzzle before the network will accept it.

Inside a Bitcoin miner with hash boards and fans

Step 3: Miners Compete to Solve a Proof-of-Work Puzzle

This is the core of Bitcoin mining. Miners compete to find a valid hash for their candidate block. The process requires huge amounts of repeated calculations, but the result is easy for other nodes to verify.

Miners Search for a Valid Hash

A hash is a fixed-length output created from block data. Miners repeatedly change a value called the nonce and run the block header through the SHA-256 hashing process. Their goal is to find a hash that is lower than the current network target.

The process is based on trial and error. A miner cannot predict the winning hash in advance. It must keep trying different inputs until one produces a valid result. This is why mining requires specialized machines and a large amount of computing power.

Difficulty Controls the Challenge

Bitcoin uses mining difficulty to control how hard it is to find a valid block. The network adjusts difficulty about every 2,016 blocks so that blocks continue to be found at roughly 10-minute intervals on average.

If more total hashrate joins the network, blocks may be found too quickly. The difficulty then increases. If hashrate drops, blocks may be found more slowly, and the difficulty can decrease at the next adjustment.

This difficulty system helps Bitcoin maintain a stable block production rhythm, even when the number of miners changes.

Hashrate Increases Winning Chances

Hashrate measures how many hash calculations a miner can perform per second. A miner with more hashrate has a higher chance of finding a valid hash, but the chance depends on its share of the total network hashrate. Even a powerful miner is not guaranteed to win a specific block.

For mining profitability, miners usually need to compare:

  • Machine hashrate
  • Power consumption
  • Electricity cost
  • Mining pool fees
  • Network difficulty
  • Bitcoin price
  • Hardware purchase cost

Higher hashrate can increase the chance of earning rewards, but only if the added revenue is greater than the added cost of equipment, power, and cooling.

Step 4: The Winning Miner Adds the Block to the Blockchain

When one miner finds a valid hash, that miner can propose the new block to the network. The block is not accepted just because the miner found it. Other nodes still need to verify that it follows Bitcoin’s rules.

The First Valid Block Wins

The miner that first finds a valid proof of work gets the chance to propose its block to the network. This does not mean the miner can create Bitcoin freely. The miner must follow the reward rules, include valid transactions, and build a block that other nodes will accept.

If two miners find valid blocks at nearly the same time, the network may temporarily see two competing versions of the chain. Usually, one version becomes the main chain once another block is added on top of it.

The Block Is Broadcast

After finding a valid hash, the winning miner broadcasts the block to the Bitcoin network. Other nodes receive the block and begin checking it. This broadcast step is important because the block must spread across the network before it can become widely accepted.

Fast block propagation helps reduce the risk that another miner’s block becomes accepted first. This is one reason mining operations care about network connectivity, not only mining hardware.

The Chain Extends by One Block

If the block is valid, it is added after the previous block, extending the blockchain by one block. Each new block points back to the block before it, creating a chain of transaction history.

This structure makes Bitcoin difficult to rewrite. To change an old transaction, an attacker would need to redo the proof of work for that block and catch up with the rest of the network, which becomes harder as more blocks are added.

Step 5: Other Nodes Verify the Block and Update the Ledger

Bitcoin does not depend on one company or central authority to approve blocks. After a miner broadcasts a block, other nodes independently verify it. This is how the network keeps shared rules without needing a central controller.

Nodes Check the Block Rules

Nodes check whether the new block follows Bitcoin’s consensus rules. They do not simply trust the miner. If the block breaks the rules, nodes can reject it even if the miner spent real energy producing it.

Nodes check things such as:

  • Whether the proof of work is valid
  • Whether all transactions are valid
  • Whether the block follows size and weight limits
  • Whether the block reward is not too high
  • Whether the block correctly references the previous block
  • Whether there are no double-spent coins

This verification step is what makes Bitcoin mining different from simply running powerful computers. Mining requires work, but the result must still follow network rules.

Bitcoin mining pool sharing block rewards

Invalid Blocks Are Rejected

If a miner creates an invalid block, honest nodes will reject it. The miner would not receive the reward, and the block would not become part of the accepted blockchain.

For example, a block may be rejected if it includes invalid transactions, creates more BTC than allowed, or does not meet the proof-of-work target. This system gives miners a strong reason to follow the rules, because breaking them wastes time, electricity, and potential rewards.

The Network Reaches Agreement

When nodes accept the same valid block and miners continue building on top of it, the network reaches agreement on the latest state of the ledger. This agreement is called consensus.

Bitcoin consensus does not require every participant to know or trust each other. Instead, nodes follow the same rules, miners compete through proof of work, and the valid chain with the most accumulated proof of work becomes the accepted transaction history.

Step 6: The Miner Receives Bitcoin Rewards and Transaction Fees

The winning miner earns rewards for adding a valid block. These rewards give miners an incentive to secure the network, process transactions, and spend resources on proof of work.

Block Subsidy Is Created

Each valid block includes a block subsidy, which is newly issued BTC created according to Bitcoin’s supply schedule. This subsidy decreases over time through Bitcoin halvings. As a result, fewer new bitcoins are created per block after each halving event.

The block subsidy is one of the main reasons miners compete to find new blocks. However, it is not unlimited. Bitcoin has a fixed supply limit, and the subsidy will continue decreasing over time.

Transaction Fees Are Collected

In addition to the block subsidy, miners collect transaction fees from the transactions included in their block. When the network is busy, transaction fees can become a more important part of miner revenue.

For miners, total block revenue usually comes from:

  • The block subsidy
  • Transaction fees from included transactions

As the block subsidy decreases over future halvings, transaction fees are expected to become more important for long-term mining incentives.

Rewards Become Spendable Later

Even after a miner wins a block, the reward cannot be spent immediately. Bitcoin requires coinbase rewards to mature for 100 blocks before they can be used. This waiting period helps protect the network in case a block is later replaced by another valid chain.

Once the reward becomes mature, the miner can move or spend it like other Bitcoin. This final step completes the mining cycle: transactions are confirmed, a new block is added, nodes update the ledger, and the miner receives compensation for securing the network.

Conclusion

Bitcoin mining is the process that confirms transactions, creates new blocks, and helps secure the Bitcoin network without a central authority. Miners use specialized machines to compete for a valid proof-of-work hash. The winning miner broadcasts a candidate block, nodes verify it, and the block becomes part of the blockchain if it follows Bitcoin’s rules.

Mining matters because it connects transaction processing, network security, and miner rewards in one system. While mining can be profitable for some operators, it also requires ASIC hardware, stable electricity, cooling, and careful cost management.

FAQ

Can Anyone Mine Bitcoin?

Yes, anyone can try to mine Bitcoin, but profitable mining usually requires specialized ASIC mining machines, low electricity costs, and reliable cooling. Most individual miners join mining pools because competing alone is very difficult.

Can You Mine Bitcoin on a Normal Computer?

Technically, a normal computer can run mining software, but it is not practical for Bitcoin mining today. Bitcoin mining is dominated by ASIC miners, which are much faster and more efficient than regular CPUs or GPUs.

How Long Does It Take to Mine One Bitcoin?

Miners usually do not mine exactly one Bitcoin at a time. Bitcoin rewards are earned when a block is found, and most miners receive smaller payout shares through a mining pool. How long it takes to earn 1 BTC depends on the miner’s hashrate, network difficulty, pool performance, electricity cost, and the current block reward.

Why Does Bitcoin Mining Use So Much Electricity?

Bitcoin mining uses a lot of electricity because miners perform huge numbers of hash calculations to find a valid block. This proof-of-work process makes it costly to attack the network and helps protect Bitcoin’s transaction history.

Do You Need a Mining Pool to Mine Bitcoin?

A mining pool is not required, but most miners use one. Solo mining has a very low chance of finding a block unless the miner has massive hashrate. A pool combines miners’ computing power and gives more regular payouts based on contribution.

What Happens When All Bitcoin Is Mined?

When all Bitcoin is mined, miners will no longer receive new BTC from the block subsidy. However, they can still earn transaction fees from the transactions included in each block. At that point, transaction fees would become the main incentive for miners to keep securing the network.

Is Bitcoin Mining Legal?

Bitcoin mining is legal in many places, but rules vary by country and region. Miners should check local laws, electricity use rules, tax requirements, and business registration needs before setting up a mining operation.

Is Bitcoin Mining the Same as Buying Bitcoin?

No, Bitcoin mining and buying Bitcoin are different. Mining uses hardware and electricity to help secure the network and earn rewards. Buying Bitcoin means purchasing BTC directly from an exchange or another holder.

Reading next

The ElphaPex DG2 provides the higher total hashrate at 18 GH/s, but the Antminer L9 17G consumes less power, offers better efficiency and has a substantially lower reference purchase price. The DG2 can produce slightly more daily net income with exceptionally cheap electricity, while the L9 generally offers the stronger ROI, faster estimated payback and better overall value under the article’s assumptions.

Safely updating the ElphaPex DG Home 1 requires model-specific firmware from an official source, a complete configuration backup, wired Ethernet and uninterrupted power. Upload the original supported package through the local dashboard, leave the miner untouched while it flashes and reboots, then verify the firmware version, pool configuration, hashboards, cooling system, temperatures and accepted shares before returning to Overclock mode.