Education / Intermediate / Section 8

Section 8 · Intermediate

How Bitcoin Works

Intermediate

⏱ Estimated reading time: 17 minutes

How does Bitcoin actually work? We explain the blockchain, mining, transactions, and nodes in plain English — no technical jargon required.

Topics

Each topic will be filled with community-contributed content

The Blockchain: Bitcoin's Public Ledger That No One Controls

Forget everything you've heard about "the blockchain" being some magical technology. At its core, a blockchain is something surprisingly simple: a list of transactions, grouped into blocks, chained together in order. What makes Bitcoin's blockchain remarkable isn't its complexity — it's what it replaces: the need to trust a central authority to keep honest records.

Before Bitcoin, if you wanted to send money digitally, you needed a bank. The bank kept the ledger. The bank said what balances were valid. The bank could freeze accounts, reverse transactions, or deny service. Bitcoin's blockchain replaces that trusted middleman with math and open code that anyone can verify.

How Blocks Are Structured

Each block contains:

  • A list of transactions — who sent how much to whom
  • A timestamp — when the block was created
  • A reference to the previous block — called the "previous hash"
  • A proof-of-work solution — evidence that computational work was done
Block 840,000 Prev Hash: 0000..a1 Tx Root: 1c8f..4b Nonce: 382914 Hash: 0000..f9 Block 840,001 Prev Hash: 0000..f9 Tx Root: e92a..31 Nonce: 918231 Hash: 0000..3c Block 840,002 Prev Hash: 0000..3c Tx Root: ... Nonce: ... Hash: ...

Each block explicitly references the hash of the block before it, creating an unbroken mathematical chain.

That reference to the previous block is the "chain" in blockchain. Each new block locks in the history of all blocks before it. To change a transaction from 3 years ago, you'd have to redo the work for that block and every block since — an astronomically expensive task that the entire network would reject.

Who Keeps the Blockchain?

Everyone and no one. As of 2024, there are over 60,000 active Bitcoin nodes around the world, each holding a complete copy of the blockchain. There is no master copy. There is no server to take down. The data lives on thousands of independent computers across every continent.

"Bitcoin is the first example of a new form of life on the internet. It lives and breathes on the internet. It lives because it can pay people to keep it alive." — Hal Finney (early Bitcoin contributor)

Immutability: Why the Past Cannot Be Changed

Each block contains the cryptographic hash of the block before it. Change a single character in block 100,000, and its hash changes — which breaks block 100,001's reference, which breaks block 100,002's reference, all the way to the current block. An attacker would need to redo the proof-of-work for every block from the altered one to the present, faster than the entire network is adding new blocks. In practice, this is computationally impossible.

Want to go deeper?


This content is written and approved by Marius, AI-assisted using Claude (Anthropic), with references curated from: Jameson Lopp (lopp.net, PD) · Mastering Bitcoin by A. Antonopoulos & D. Harding (CC BY-SA 4.0) · Bitcoin Wiki (CC-BY) · developer.bitcoin.org (MIT) · Bitcoin Whitepaper (PD).

Bitcoin Transactions: How Value Actually Moves

When you "send" someone Bitcoin, no coin physically moves anywhere. What actually happens is a cryptographic message gets broadcast to the network, signed with your private key, announcing that a certain amount of value — previously locked to your address — is now unlocked and re-locked to someone else's address. This happens in seconds, settles in minutes, and no bank is involved.

Inputs and Outputs

Bitcoin transactions use a UTXO model — Unspent Transaction Outputs. Think of UTXOs like physical banknotes. If you have a "note" worth 0.05 BTC and want to send 0.03 BTC, you spend the whole note and get 0.02 BTC back as "change" to yourself. There are no partial spends — every UTXO must be fully consumed and new ones created.

  • Inputs — references to previous UTXOs being spent
  • Outputs — new UTXOs being created (recipient + change)
  • Fee — the difference between inputs and outputs (paid to miners)

Digital Signatures: Proving Ownership Without Revealing Your Key

To spend a UTXO, you must prove you own the private key for that address — without actually revealing the key. This is done using Elliptic Curve Digital Signature Algorithm (ECDSA) or, since 2021's Taproot upgrade, Schnorr signatures. You produce a signature unique to that transaction; anyone can verify it with your public key, but cannot reverse-engineer your private key from it.

"The signature proves you control the funds without ever showing your secret key. It's mathematical proof of ownership." — Bitcoin developer documentation

Transaction Lifecycle

  1. You create and sign the transaction with your wallet software
  2. The signed transaction is broadcast to the peer-to-peer network
  3. Nodes validate it (is the signature valid? are the UTXOs unspent?)
  4. Miners include it in a block (typically next 10 minutes)
  5. After 6 blocks (~1 hour), it is considered effectively irreversible

Want to go deeper?


This content is written and approved by Marius, AI-assisted using Claude (Anthropic), with references curated from: Jameson Lopp (lopp.net, PD) · Mastering Bitcoin by A. Antonopoulos & D. Harding (CC BY-SA 4.0) · Bitcoin Wiki (CC-BY) · developer.bitcoin.org (MIT) · Bitcoin Whitepaper (PD).

Bitcoin Mining: The Work That Secures the Network

Bitcoin mining sounds like digging for digital gold, and the metaphor isn't entirely wrong — miners expend real energy to earn newly issued bitcoin. But the actual purpose of mining isn't about the reward. Mining is how Bitcoin achieves consensus across thousands of strangers who don't trust each other, without needing a central authority to settle disputes.

What Miners Actually Do

Miners collect pending transactions from the mempool (the waiting area for unconfirmed transactions), assemble them into a candidate block, and then try to find a special number — called a "nonce" — that, when combined with the block's data and hashed through SHA-256, produces a result below a certain target value. This is the "puzzle" of proof-of-work.

  • Miners are guessing billions of nonces per second
  • Each guess is a SHA-256 hash computation — cheap to verify, expensive to find
  • The first miner to find a valid nonce broadcasts the block to the network
  • Other nodes verify the solution instantly (one hash check) and accept the block

The Block Reward: New Bitcoin Into Existence

The winning miner receives the block subsidy (currently 3.125 BTC after the 2024 halving) plus all transaction fees in the block. This is the only mechanism by which new bitcoin is created. No central bank. No government printing press. Only computational work.

"Bitcoin mining is the backbone of the network's security. The energy spent isn't waste — it's the cost of trustlessness." — Lyn Alden

Difficulty Adjustment: Self-Regulation at Scale

Every 2,016 blocks (~2 weeks), the network automatically adjusts the mining difficulty based on how fast blocks were found in the previous period. If miners joined and blocks came every 5 minutes, difficulty increases. If miners left and blocks slowed, difficulty decreases. The target is always one block approximately every 10 minutes — maintained by math, not management.

Want to go deeper?


This content is written and approved by Marius, AI-assisted using Claude (Anthropic), with references curated from: Jameson Lopp (lopp.net, PD) · Mastering Bitcoin by A. Antonopoulos & D. Harding (CC BY-SA 4.0) · Bitcoin Wiki (CC-BY) · developer.bitcoin.org (MIT) · Bitcoin Whitepaper (PD).

Bitcoin Consensus: How 60,000 Strangers Agree on One Truth

How do thousands of computers, run by people who don't know or trust each other, spread across 100+ countries, all agree on the exact same ledger? This is the core problem Bitcoin solved — and the answer is elegant enough to have launched an entire field of study: distributed consensus.

Nakamoto Consensus: The Longest Chain Rule

Bitcoin's consensus rule is simple: the valid chain with the most cumulative proof-of-work is the correct chain. If two miners produce valid blocks at the same time (a "fork"), nodes temporarily hold both chains. When the next block is found, it will build on one of them — making that chain longer. All nodes then abandon the shorter fork and adopt the longer one. No vote. No central arbiter. Just math.

  • Longest chain = most accumulated work = the one honest majority of miners built on
  • Orphaned blocks (the losing fork) are discarded harmlessly
  • The deeper a transaction is buried, the more work an attacker would need to undo it

The 51% Attack Scenario

What if an attacker controlled 51% of the network's hashing power? Theoretically, they could temporarily outpace honest miners and reorganise recent blocks — potentially double-spending funds. In practice, this is prohibitively expensive. As of 2024, Bitcoin's hash rate is so large that a 51% attack would require billions of dollars in specialised hardware and electricity, with diminishing returns as the attack itself would destroy the value of the coins being stolen.

"The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes." — Satoshi Nakamoto, Bitcoin Whitepaper

Consensus Rules vs. Miner Rules

Miners create blocks, but they cannot create invalid blocks — every node independently validates each block against Bitcoin's consensus rules. Miners who produce invalid blocks (wrong reward, bad signature, etc.) have their blocks rejected by the network automatically. This is why mining power doesn't equal control: nodes enforce the rules, miners play by them.

Want to go deeper?


This content is written and approved by Marius, AI-assisted using Claude (Anthropic), with references curated from: Jameson Lopp (lopp.net, PD) · Mastering Bitcoin by A. Antonopoulos & D. Harding (CC BY-SA 4.0) · Bitcoin Wiki (CC-BY) · developer.bitcoin.org (MIT) · Bitcoin Whitepaper (PD).

Bitcoin Nodes: The Network's Sovereign Validators

When people talk about Bitcoin being "decentralised," the node network is what they mean. A Bitcoin node is a computer that downloads the full blockchain, independently verifies every transaction and every block, and enforces the consensus rules — without trusting anyone else's version of events. Nodes are how individual participants remain sovereign in the Bitcoin network.

What a Full Node Does

A full node performs these tasks continuously:

  • Downloads every block from the network since the genesis block (Jan 2009)
  • Validates every transaction in every block against Bitcoin's rules
  • Maintains a complete, independently verified copy of the UTXO set
  • Relays valid transactions and blocks to peers
  • Rejects any block or transaction that breaks consensus rules

Crucially, a node doesn't need permission to participate. You download Bitcoin Core (the open-source software), let it sync, and you're now part of the network — with no authority able to stop you.

Why Running Your Own Node Matters

If you use a wallet that connects to someone else's node, you're trusting that node operator's version of your balance. Your own full node means you verify everything yourself. Nobody can lie to you about how many bitcoin you have, whether a transaction confirmed, or what the rules of the network are.

"When you run a full node, you don't trust — you verify. That's the essence of Bitcoin's security model for end users." — Jameson Lopp

Hardware Requirements (2024)

Running a Bitcoin full node is accessible to most people:

  • ~600 GB of disk space (SSD preferred)
  • Any modern CPU (low computational load)
  • 2–4 GB of RAM
  • Reliable internet connection (can be set to limit bandwidth)
  • Raspberry Pi 4 or any basic home computer is sufficient

Want to go deeper?


This content is written and approved by Marius, AI-assisted using Claude (Anthropic), with references curated from: Jameson Lopp (lopp.net, PD) · Mastering Bitcoin by A. Antonopoulos & D. Harding (CC BY-SA 4.0) · Bitcoin Wiki (CC-BY) · developer.bitcoin.org (MIT) · Bitcoin Whitepaper (PD).

Proof of Work: The Engine of Bitcoin's Trustless Security

Proof of Work (PoW) is the mechanism that makes Bitcoin work without trust. Before Bitcoin, every attempt to create digital money failed at the same problem: how do you prevent someone from copying a digital coin and spending it twice? PoW solved this by requiring real-world resource expenditure to propose new blocks — making fraud expensive and honest participation rewarding.

The Core Idea: Verifiable Work

Proof of Work requires that anyone wanting to add a block must prove they performed significant computational work to find it. This work involves repeatedly hashing block data until a result below a specific target emerges. The work is:

  • Hard to do — requires trillions of guesses to find a valid hash
  • Easy to verify — anyone can check the result with a single hash computation
  • Asymmetric — production is expensive, verification is free

This asymmetry is what makes the system work. Cheating requires re-doing all that expensive work, while honest participation earns the block reward.

SHA-256: Bitcoin's Hash Function

Bitcoin uses SHA-256 (Secure Hash Algorithm 256-bit), applied twice per block. A hash function takes any input and produces a fixed-length output that looks completely random — change one character of the input and the output changes entirely and unpredictably. This is what makes finding a valid nonce a pure trial-and-error search.

"Proof of work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it." — Satoshi Nakamoto

Why Not Use Something Cheaper?

Many alternative cryptocurrencies use Proof of Stake, which replaces computational work with economic bonding. The debate between PoW and PoS is ongoing and complex. Bitcoin's proponents argue that PoW's physical energy expenditure creates a direct, real-world anchor to Bitcoin's security that cannot be faked, borrowed, or replicated without real cost. Proof of Stake, by contrast, relies on cryptoeconomic incentives whose long-term game-theoretic properties are less proven.

Want to go deeper?


This content is written and approved by Marius, AI-assisted using Claude (Anthropic), with references curated from: Jameson Lopp (lopp.net, PD) · Mastering Bitcoin by A. Antonopoulos & D. Harding (CC BY-SA 4.0) · Bitcoin Wiki (CC-BY) · developer.bitcoin.org (MIT) · Bitcoin Whitepaper (PD).

Key Takeaways

  • The blockchain is a public, immutable ledger shared across thousands of independent nodes — no single entity controls it.
  • Bitcoin transactions use a UTXO model: every coin can be traced back to its creation through a chain of cryptographic signatures.
  • Mining is the process of expending computational energy to find a valid block hash — securing the network and creating new bitcoin.
  • Nakamoto Consensus (longest chain rule) allows thousands of strangers to agree on one truth without trusting each other.
  • Full nodes independently verify every transaction and block — running your own node means you trust no one.
  • Proof of Work makes cheating expensive and honest participation rewarding — it is the engine of Bitcoin's trustless security.

Frequently Asked Questions

What is the blockchain?

The blockchain is Bitcoin's public ledger — a chain of blocks, each containing a batch of verified transactions. Every node in the network stores a complete copy, making it transparent, tamper-proof, and decentralized. No single entity controls it, and anyone can verify every transaction ever made.

What is Bitcoin mining?

Mining is the process of validating Bitcoin transactions and adding them to the blockchain. Miners use specialized computers (ASICs) to solve mathematical puzzles called proof of work. The first miner to solve each puzzle earns newly created Bitcoin and transaction fees as a reward. See our Mining & Consensus section for a deep dive.

How many Bitcoin exist?

There will only ever be 21 million Bitcoin — this limit is hard-coded into the protocol and cannot be changed. As of 2026, about 19.8 million have been mined. The last Bitcoin will be mined around the year 2140 due to the halving schedule that cuts mining rewards in half every ~4 years.

Further Reading

Help Write This Section

This section needs contributors. If you can explain how Bitcoin works clearly and accurately, we'd love your help. All content is CC BY-SA 4.0 licensed with full author credit.

Contribute Content →

Learn more about contributing