How Bitcoin Works: Blockchain, Mining & Transactions
Go deeper into Bitcoin's technology. Understand how the blockchain works, what miners do, and how transactions are processed.
🎯 Key Takeaways
- ✓ The blockchain is a chain of blocks, each containing a batch of verified transactions.
- ✓ Miners compete to add the next block by solving a computational puzzle (Proof of Work).
- ✓ A Bitcoin transaction includes sender, recipient, amount, and a cryptographic signature.
- ✓ Transactions need 6 confirmations (≈60 minutes) to be considered final.
- ✓ Bitcoin halving cuts the mining reward in half every 4 years, reducing new supply.
How the Bitcoin Blockchain Works
The blockchain is the revolutionary technology that makes Bitcoin possible. At its core, it's a ledger — a record of who owns what. But unlike a bank's private ledger, the Bitcoin blockchain is:
The Structure of a Block
The blockchain is literally a chain of blocks. Each block contains:
By including the previous block's hash in each new block, every block is mathematically linked to every block before it. Changing one block would require re-mining every block that follows — an impossible task given the network's total computing power.
Understanding Bitcoin Mining
Mining serves two critical functions:
Here's how mining works:
Step 1: Miners collect pending transactions from the mempool (a waiting room for unconfirmed transactions).
Step 2: They assemble these transactions into a block candidate.
Step 3: They repeatedly try different nonce values (random numbers) and hash the block header. They're looking for a hash that starts with a certain number of zeros — like rolling dice until you get a specific combination.
Step 4: The first miner to find a valid hash broadcasts the block to the network. Other nodes verify it and add it to their copy of the blockchain.
Step 5: The winning miner receives the block reward (currently 3.125 BTC after the 2024 halving) plus all transaction fees in the block.
The difficulty of finding a valid hash adjusts automatically every 2,016 blocks (≈2 weeks) to maintain an average block time of 10 minutes, regardless of how much computing power joins or leaves the network.
The Bitcoin Halving
Every 210,000 blocks (approximately 4 years), Bitcoin's block reward is cut in half. This is called the halving:
Halvings reduce the rate at which new Bitcoin enters circulation. Historically, each halving has been followed by a significant bull market, as supply growth drops while demand remains constant or grows.
How a Bitcoin Transaction Works
Let's trace what happens when you send 0.1 BTC to a friend:
1. You create the transaction Your wallet software creates a transaction that specifies: the input (where your Bitcoin comes from), the output (your friend's address), and the amount.
2. You sign it with your private key Your wallet signs the transaction with your private key — a cryptographic signature that proves you own the Bitcoin without revealing your private key.
3. The transaction broadcasts to the network Your wallet sends the signed transaction to nearby Bitcoin nodes, which relay it across the globe within seconds.
4. Nodes verify the transaction Each node checks: Does the sender have enough Bitcoin? Is the signature valid? Is this a double-spend attempt? Valid transactions enter the mempool.
5. A miner includes it in a block Miners prioritize transactions with higher fees. Your transaction gets bundled into a block.
6. Confirmations accumulate Once in a block, your transaction has 1 confirmation. Each new block added after it adds another confirmation. Most services consider 3-6 confirmations as final.
Understanding UTXOs
Bitcoin uses a unique accounting model called Unspent Transaction Outputs (UTXOs). Rather than tracking account balances, Bitcoin tracks individual chunks of Bitcoin that haven't been spent yet.
Think of it like physical cash. If you have a $20 bill and spend $7, you don't get back $7 — you get $13 in change. Bitcoin works similarly: when you spend a UTXO, the entire amount is consumed, and you get 'change' back to your own wallet.
Bitcoin Nodes vs. Miners
These are often confused but serve different roles:
Nodes enforce Bitcoin's rules. They verify every transaction and block, reject invalid ones, and maintain a full copy of the blockchain. Anyone can run a node — it costs very little.
Miners create new blocks. They require specialized hardware (ASICs) and massive electricity. They earn Bitcoin for their work.
Running a node doesn't earn money, but it contributes to the network's decentralization and security.
In the next lesson, we'll cover Bitcoin wallets — the tools you need to safely store and send Bitcoin.
Frequently Asked Questions
How long does a Bitcoin transaction take? ▾
What happens when all 21 million Bitcoins are mined? ▾
Can Bitcoin's code be changed? ▾
加密学院教育团队
Free crypto education, simplified for everyone.