Recipe for Mining: Overview

Let’s first take a look at the generic steps for mining as a full node.

Step 0, the preliminary step for mining, is downloading the entire Bitcoin blockchain.

This allows us to know the history so that we can verify future transactions.

Note: this step is optional if you mine in a mining pool; we’ll talk more about this later.

Step 1, the next step, is to verify transactions, which we fill up our block with valid transactions.

Step 2, create the block using the given transactions, and all necessary metadata, such as time, version, and target.

Step 3, find the proof-of-work, aka a valid nonce that solves the partial preimage hash puzzle.

Step 4, broadcast your block if you have not seen any competitor blocks yet.

Step 5, if your block gets included in the longest chain: profit! Let’s go into detail on how each of these steps plays out.

Recipe for Mining: Step 0