FOUNDATIONS · CONSENSUS RULES
0%
THE QUESTION FROM OUR CHAT, OPENED UP

Where do Bitcoin's
rules actually live?

You asked two sharp things: are the rules in the software the servers download? and is there software besides Bitcoin Core? The answer to both is yes — and the why is the whole design.

This time we don't just read it. You'll break a rule, mine a block, tamper with a chain, walk the halving schedule to 21 million, and split the network in two — each idea as something you do.

A HANDS-ON TEARDOWN OF THE PROTOCOL
THE CORE IDEA

There is no rulebook. There is only code that runs.

YOUR QUESTION, ANSWERED

Yes — the rules live in the software each node downloads and runs.

There is no central server holding "the official rules of Bitcoin." The protocol is defined by what the running software accepts and rejects. Every full node has its own copy of the validation logic and checks every block and transaction against it independently.

The rules aren't written on a tablet somewhere. They're whatever the software you're running will accept.

WHAT A NODE CHECKS

The consensus rules, concretely.

When your node receives a block, it runs it past a checklist. Fail any item and the block is dropped. The load-bearing ones:

🧮
SUPPLY CAP
No more than 21 million BTC will ever exist. A block minting extra coins is rejected.
💰
BLOCK REWARD SCHEDULE
The reward halves every 210,000 blocks (~4 years). A miner claiming too much is rejected.
PROOF-OF-WORK & DIFFICULTY
The block's hash must fall below the current difficulty target, which retargets every 2,016 blocks for ~10-minute spacing.
SIGNATURES & SCRIPTS
Every input must carry a valid signature unlocking the coins. No valid signature, no spend.
🚫
NO DOUBLE-SPEND
Coins spent once can't be spent again. Each input references an unspent output.

These live in Bitcoin Core's C++ validation code, and in every other implementation that wants to stay on the same network.

If one person edited their own node to allow a 22nd-million coin, what happens?
The whole network inflates — everyone gets extra coins
Nothing useful: every other node rejects their block, so they fork off alone
Bitcoin Core's central server overrides them
Locked in. Every other node rejects that block, so the rule-breaker is left alone on a chain nobody else follows. There is no central server — rejection by peers is the enforcement.
INTERACTIVE: BREAK A RULE

Watch four nodes judge the same block — independently.

Four full nodes, each running different software but the same consensus rules. Feed them a block. Valid → all accept. Tamper with it → they reject it without consulting each other.

Pick a block above and broadcast it to the network.

No node asks the others' permission. Each independently runs the rule and reaches the same verdict. That redundancy is the security model.

BUILDING BLOCK 1

The fingerprint that chains it together

HASHING

A tiny change scrambles the whole fingerprint.

A hash is a fixed-length fingerprint of data. Change one character and the output changes completely and unpredictably — and you can't run it backwards. Type below and watch it scramble on a single keystroke.

A tiny change to the input completely changes the fingerprint.

This is a tiny instant stand-in, not real SHA-256 — but the property (small change → total scramble, one-way) is exactly the same.

INTERACTIVE: TAMPER WITH HISTORY

Each block locks in the one before it.

Every block stores the hash of the previous block. Edit the data in Block 1 and watch its fingerprint change — which breaks Block 2's reference to it, which breaks Block 3. One edit, everything downstream goes red.

Edit Block 1's data to see the chain break.

This is why rewriting history is hopeless: to change one old block you'd have to redo the proof-of-work for it and every block after it, faster than the rest of the network adds new ones.

BUILDING BLOCK 2

Proof-of-work: making blocks expensive

MINING

Find a hash below the target. Only luck and effort get you there.

A valid block's hash must be below a target. Miners change a counter (the nonce) and re-hash, over and over, until they get lucky. The lower the target, the more attempts it takes — that's difficulty.

Set the difficulty (required leading zeros) and mine. Watch the attempt counter climb.

0
ATTEMPTS
0.0s
TIME
WINNING NONCE
Press "Mine" to start searching.

Real Bitcoin needs ~19 leading zeros (in hex), tuned so the whole planet's mining power finds one block every ~10 minutes. Each extra zero multiplies the work — feel how fast it explodes between 4 and 5 here.

If everyone bought faster mining hardware tomorrow, would coins arrive faster?
Yes — more power means more blocks per hour
No — difficulty retargets to keep ~10-minute spacing
Only if Bitcoin Core raises the limit
Locked in. Difficulty retargets every 2,016 blocks so spacing stays ~10 minutes. More miners just make the target harder — the schedule holds.
BUILDING BLOCK 3

The 21 million cap, baked into the schedule

INTERACTIVE: WALK THE HALVINGS

The cap isn't a counter — it's the reward schedule running out.

No code says "stop at 21 million." Instead the block reward halves every 210,000 blocks. Add up every reward forever and the sum converges to just under 21M. Drag through the halving eras and watch supply approach the ceiling.

50
BTC PER BLOCK
0
TOTAL MINED (BTC)
2009
APPROX YEAR

By around 2140 the reward rounds to zero and no new coins are created. The cap is an emergent consequence of the halving rule, enforced by every node rejecting any block that pays itself more than the schedule allows.

YOUR SECOND QUESTION

The other software besides Bitcoin Core

THE LANDSCAPE

Core dominates — but it was never the only client.

Bitcoin Core runs on most nodes, but several implementations exist. The crucial split isn't the programming language — it's whether they enforce the same consensus rules.

⚙️
BITCOIN CORE
C++. The reference implementation and dominant client. "The rules" usually means what Core accepts.
🪝
BITCOIN KNOTS
A derivative of Core (maintained by Luke Dashjr) sharing most of its codebase, with extra config options. Same rules.
🐧
btcd
An independent full node in Go — not derived from Core's C++. A genuinely separate codebase targeting the same rules.
📚
Bcoin / Libbitcoin
Bcoin (JavaScript) and Libbitcoin (a C++ library/toolkit). Different code, same network — when they agree on the rules.
⚠️
XT / CLASSIC / UNLIMITED
Contentious clients from the ~2015–2017 scaling debates that proposed different rules (mainly bigger blocks). Now largely defunct.

Same rules, different code. Core, Knots, and btcd interoperate on one network — they accept and reject identical blocks, just in different languages.

Agreement is the point. A subtle bug making one client validate differently would fork its nodes off — which is why most operators run the most battle-tested implementation.

Killer question: same network

Different software enforcing identical rules is still the same Bitcoin. The diversity is healthy: if one client has a bug, others catch the divergence.

THE OTHER OUTCOME

When the rules diverge: forks

THE LINE THAT MATTERS

Change the rules, and you change the network.

Alternative software is fine only if it enforces the same consensus rules. The moment a client intentionally changes a rule and enough people adopt it, you don't have "alternative Bitcoin software" — you have a separate blockchain and a separate currency.

DIMENSION
SOFT FORK
HARD FORK
Rule change
Tightens rules (old nodes still accept)
Loosens/changes rules (old nodes reject)
Backward compatible?
Yes
No
Result if adopted
One chain continues
Chain can split into two coins
Example
SegWit (2017)
Bitcoin Cash (2017)

The famous splits weren't just "different software" — they were deliberate hard forks: Bitcoin Cash (2017) and later Bitcoin SV (2018), each raising the block-size limit and creating its own chain and coin.

INTERACTIVE: SPLIT THE NETWORK

Change one rule on half the nodes and watch the chain fork.

Six nodes share one chain. Push the "32 MB blocks" rule change to some of them, then broadcast a big block. Nodes that accept the new rule follow one chain; nodes that don't reject the block and stay on the original. That divergence is a fork.

Move the slider, then broadcast the oversized block.

If everyone adopts the change, there's no split — it's just an upgrade. The split happens only when the network disagrees. That's the real meaning of "consensus."

A client allows 32 MB blocks and a group adopts it. Same Bitcoin?
Yes — just a faster version of the same network
No — old nodes reject the big blocks, the chain splits, a new coin is born
Bitcoin Core decides whether to allow it
Locked in. Old nodes reject the oversized blocks, the groups stop agreeing, and the chain splits into a new coin — a hard fork. Different rules mean a different network.
THE TEACHING POINT

"Which software" is a smaller question than "which rules."

Your two questions are really one, seen from two sides. The rules live in the software — and there are many pieces of software. What keeps it all "Bitcoin" is not a central authority blessing one program, but thousands of independent nodes agreeing, block by block, on the same validation logic. Swap the language, keep the rules: same network. Keep the language, change a rule: new network.

Consensus isn't a vote you win. It's the set of blocks everyone's software already agrees to accept.

✦ CHECKPOINT

Lock it in

Answer all four to complete the teardown

The shape of the answer

The rules live in the code every node runs. Many programs run that code. It stays one Bitcoin as long as they enforce the same rules — and becomes a new coin the moment they don't.