bitcoin mining is like finishing a puzzle

This commit is contained in:
counterweight 2025-02-01 15:14:03 +01:00
parent bc1135fe7d
commit 8d98860e19
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 115 additions and 1 deletions

View file

@ -102,6 +102,10 @@
<h2 id="writings-header">Writings</h2> <h2 id="writings-header">Writings</h2>
<p>Sometimes I like to jot down ideas and drop them here.</p> <p>Sometimes I like to jot down ideas and drop them here.</p>
<ul> <ul>
<li>
<a href="writings/bitcoin-mining-is-like-adding-the-final-piece-to-a-puzzle.html" target="_blank"
rel="noopener noreferrer">Bitcoin mining is like adding the final piece to a puzzle</a>
</li>
<li> <li>
<a href="writings/credit-cards-affairs-and-chatgpt.html" target="_blank" <a href="writings/credit-cards-affairs-and-chatgpt.html" target="_blank"
rel="noopener noreferrer">Credit cards, affairs and ChatGPT</a> rel="noopener noreferrer">Credit cards, affairs and ChatGPT</a>
@ -119,7 +123,6 @@
simple solution to spam</a> simple solution to spam</a>
</li> </li>
</ul> </ul>
</section> </section>
</main> </main>

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View file

@ -0,0 +1,111 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Pablo here</title>
<meta charset="utf-8">
<meta viewport="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../styles.css">
</head>
<body>
<main>
<h1>
Hi, Pablo here
</h1>
<p><a href="../index.html">back to home</a></p>
<hr>
<section>
<h2>Bitcoin mining is like adding the final piece to a puzzle</h2>
<p>
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.
</p>
<figure>
<img width="75%" src="../static/feynman-quote.jpg" alt="">
</figure>
<p>
Truth is, <a href="https://www.youtube.com/watch?v=bBC-nXj3Ng4">there are great explanations out
there</a> for those who really want to dive into it (<a
href="https://www.youtube.com/watch?v=7A0YjbLGLXo">there are also terrible ones</a>).
</p>
<p>
But I understand people are busy and would rather do other stuff than dive into it. For those, 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 a thing about what they are reporting.
</p>
<p>
So, what is mining then?
</p>
<p>
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.
</p>
<p>
But instead, along with the 2,999 pieces stitched together, I come with a 40ft truck container<a
href="#footnote-1">[1]</a> full of puzzle pieces. They are all different, and only one fits in
the last hole of the puzzle.
</p>
<p>
What could you do to finish the puzzle? Oh well, the only obvius 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. </p>
<p>
Eventually, you will find the missing piece, and the puzzle will be complete. Anyone can see that the
piece is the right one (verifying is easy), even if finding it was a nightmare of work (mining is hard).
</p>
<p>
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.
</p>
<p>
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:
</p>
<table>
<col width="50%">
<col width="50%">
<tr>
<th>Puzzle metaphor</th>
<th>Real mining</th>
</tr>
<tr>
<td>The almost complete puzzle.</td>
<td>A candidate block, which is a bunch of Bitcoin transactions, along with some other metadata.
</td>
</tr>
<tr>
<td>The container full of pieces.</td>
<td>All the numbers between 0 and ~One hundred fifteen quintillion (2^256).</td>
</tr>
<tr>
<td>Getting a piece, checking if it fits</td>
<td>Generating a random number, hashing it with the candidate block and checking if its hash is
correct</td>
</tr>
<tr>
<td>Checking that the puzzle is complete</td>
<td>Checking that the block hash is below the difficulty threshold</td>
</tr>
</table>
<p id="footnote-1" class="footnote"><em>[1] The container is a simplification. It would actually be 10^65
containers.</em></p>
<hr>
<p><a href="../index.html">back to home</a></p>
</section>
</main>
</body>
</html>