Hi, Pablo here

back to home


Bitcoin mining is like adding the final piece to a puzzle

Bitcoin mining is one of those terribly explained topics that everyone and their mother has kind of heard about at some point, but no one really feels comfortable explaining.

Truth is, there are great explanations out there for those who really want to dive into it (there are also terrible ones).

But I understand people are busy and would rather do other stuff than dive into it. For the busy ones, this is the usual metaphor I give away. I'm sharing it here (1) in case it helps other fellow orange pillers in doing the Lord's work, and (2) to make sure I say something completely opposite to that terrible "miners solve highly complex mathematical problems" that sloppy journalists from big media gift to us so we can confirm they don't understand jackshit about what they are reporting.

So, what is mining then?

Imagine I give you a puzzle to finish. One of those beautiful, 3,000 pieces ones. I'm going to give you the puzzle almost complete: it is actually only missing one piece. Should we be playing with only the pieces that came in the puzzle's box, your job would be easy: you would look for the missing gap, get the only unplaced piece, and put it there.

But instead, along with the 2,999 pieces stitched together, I come with a 40ft truck container[1] full of puzzle pieces. They are all different, and only one fits in the last hole of the puzzle.

What could you do to finish the puzzle? Oh well, the only obvious and tedious thing: you need to go check the pieces one by one. Pull piece, check hole. Fits? Bingo. Doesn't? Move on to the next. It would be boring and tedious, but it would surely work. You might get lucky and pull the right piece early, or you might have to work a lot more.

Eventually, you would find the missing piece, and the puzzle will be complete. Anyone could see that the piece is the right one (verifying is easy), even if finding it was a nightmare of work (mining is hard).

Alright, Bitcoin mining, as an activity, is roughly like the work I just described. Only instead of looking for a fitting puzzle piece, we're looking for a random number. This number is searched at random, with no intelligence, by brute force. Hence why I (and anyone who knows a thing or two) gets disappointed when the journalists and snake oil salesmen talk about the "complex mathematical problems" that miners solve.

So, those impressive Bitcoin miners you might see on TV news and documentaries: they are just dumb "ima-try-this-number-out" machines. They are specialized equipment, for a very simple and mundane task.

In case you're curious, and in order to help you further understand, here are some corresponding analogues between real mining and the puzzle metaphor. If you don't understand things, don't worry, just remember the puzzle story:

Puzzle metaphor Real mining
The almost complete puzzle. A candidate block, which is a bunch of Bitcoin transactions, along with some other metadata.
The container full of pieces. All the numbers between 0 and ~One hundred fifteen quintillion (2^256).
Getting a piece, checking if it fits Generating a random number, hashing it with the candidate block and checking if its hash is correct
Checking that the puzzle is complete Checking that the block hash is below the difficulty threshold

[1] The container is a simplification. It would actually be 10^65 containers.


back to home