Thread
Bitcoin Miners are NOT solving complex math problems.

A 🧵 to make your smol brain bigger.

So WTF are they doing?

(RIP to the S9 boards that have fallen.)
Say it with me friends, "Bitcoin miners HASH."

There you go, you already sound smarter.

But what is hashing?

Hashing is the process by which you take a certain INPUT and process it through a particular ALGORITHM.

In Bitcoin we use SHA-256.
IMO, the most beautiful, technical breakdown of how SHA-256 works is this website:

sha256algorithm.com/

You can put any sort of input into SHA256 and get a hashed output of a fixed length.

Small input changes make HUGE output changes.

Beautiful.
OK, enough about algorithms, math is scary.

Bitcoin blocks consist of a HEADER and a BODY of TRANSACTIONS.

To have a VALID block you must hash this information via SHA-256, and output a new hash with a certain number of 0s at the start.

What?

This is miner 'difficulty'.
What keeps block issuance at ~10 minutes is periodic network difficulty adjustment.

This difficulty is determined by how many 0s you need leading your output hash.

The more 0s leading the output hash, the HIGHER the difficulty. Fewer 0s means easier.

Let's make that simpler.
The part of the block the miner changes while hashing is the NONCE.

Changing that input even a little bit radically changes the hashed output of the whole thing.

The job of a miner is to input a guess nonce, hash, then check their work.
Say difficulty is at 5 0s, 00000X
(Currently ~20 0s)

Guess a nonce, hash it w/ SHA-256.

Does your output hash have 5 0s followed by a number?
No?
Guess again.
Does your output have 5 0s followed by a number?
No?
Does your output have 5 0s followed by a number?
No?
Does your...
Miners are rapidly and randomly GUESSING what to make that nonce.

They hash it via SHA-256, until they get an output with enough 0s to satisfy the always changing network difficulty.

We are professional GUESSERS, not professional mathematicians.
You can easily verify this yourself.

Go to mempool.space/

Click on a recent block number.

Count the number of 0s preceding the hash.

That's how you KNOW this is a valid block.
It satisfies the current difficulty of the network.
The more you think through this, the cooler it gets.

Proof of Work is what connect the digital world to the physical world.

It's what keeps this network incredibly secure.
It's WHY miner efficiency and elec. costs matter.

How EXPENSIVE is it for you to guess a nonce?
I hope your brain is slightly larger now and you never ever, ever, ever, tell anyone ever again that bitcoin miners are doing 'complex math problems'.

It's our job to learn these things and make them simple to explain, NOT to hide behind assumed complexity.

END 🧵
Mentions
See All