Learn Bitcoin← Home

What is Mining?

Introduction: Why Bitcoin Mining Is Required

Bitcoin mining is the process that secures the Bitcoin network and keeps the blockchain trustworthy.

Unlike traditional financial systems, Bitcoin does not have a central authority like a bank to verify transactions. Instead, thousands of independent miners around the world perform this job.

Mining serves three important purposes:

  • Transaction Verification — Miners verify that Bitcoin transactions are valid and that coins are not being double-spent.
  • Block Creation — Miners group verified transactions into blocks and add them to the Bitcoin blockchain (public ledger).
  • Network Security and Immutability — To add a block, miners must solve a Proof-of-Work puzzle, which requires large amounts of computing power.

Because this work is computationally expensive, it makes the blockchain extremely difficult to tamper with.

If someone tried to change a past transaction, they would need to:

  • Redo the Proof-of-Work for that block
  • Redo the work for all blocks after it
  • Catch up with and surpass the entire global mining network

This would require enormous computing power and energy, making it practically impossible. This is why Bitcoin blocks are considered immutable (cannot be changed once confirmed).

Activities Performed During Bitcoin Mining

1. Receive Transactions From the Network

Miners run Bitcoin software and stay connected to the Bitcoin peer-to-peer network. They continuously receive new unconfirmed transactions broadcast by wallets and nodes. These transactions are stored in a temporary pool called the mempool.

2. Validate Transactions

Before including transactions in a block, miners verify that each transaction is valid. They check that:

  • The digital signature is correct
  • The sender owns the bitcoin being spent
  • The transaction does not double-spend coins

Invalid transactions are rejected.

3. Select Transactions for a New Block

Miners choose transactions from the mempool to include in a new block. They usually prioritize transactions that offer higher fees. The miner also adds a special transaction called the coinbase transaction, which pays the miner the mining reward.

4. Create a Candidate Block

The miner builds a candidate block containing:

  • Selected transactions
  • The hash of the previous block
  • Timestamp
  • Merkle root (hash representing all transactions)
  • Nonce (number used during mining)

At this stage the block is not yet valid.

5. Perform Proof-of-Work (Hashing)

Miners repeatedly:

  • Change the nonce
  • Calculate the block hash using SHA-256
  • Check if the hash meets the difficulty target

This process requires massive computational power. Millions or billions of hashes may be tried every second.

6. Solve the Mining Puzzle

Eventually, one miner finds a hash that satisfies the network difficulty requirement. This means the miner has solved the Proof-of-Work puzzle and wins the right to add the block to the blockchain.

7. Broadcast the New Block

The winning miner broadcasts the newly created block to the Bitcoin network. Other nodes verify:

  • The Proof-of-Work
  • All transactions
  • Block rules

If everything is valid, the block is accepted.

8. Block Added to the Blockchain

Once verified, the block becomes part of the Bitcoin blockchain. All nodes update their copy of the ledger. The included transactions are now confirmed.

9. Miner Receives Reward

The winning miner receives:

  • Block reward (newly created Bitcoin)
  • Transaction fees from the transactions in that block

This reward incentivizes miners to secure the Bitcoin network.

Simple Summary

Mining involves:

  • Collect transactions
  • Validate transactions
  • Build a candidate block
  • Perform Proof-of-Work hashing
  • Solve the puzzle
  • Broadcast the block
  • Network verifies the block
  • Block added to blockchain
  • Miner receives reward