Recipe for Mining: Step 1

 Step 1, verify transactions.

Bitcoin users are sending transactions to the Bitcoin network every second, and it’s the miners’ jobs to verify the validity of those transactions.

As transactions come to the miner, they will store those in a “mempool,” where “mem” means “memory” and “pool” means supply (referring to supply of transactions).

It’s where all the pending transactions live before they make their way into a block.

Miners will then choose transactions to verify based on their transaction fees, which we’ll get into shortly.

They verify the validity of each by running the unlocking script as mentioned in Lecture 3.

If that piece of code is able to successfully unlock the previous bitcoins, then the transaction goes through.

Recipe for Mining: Step 2