Book Image

Bitcoin Essentials

By : Szmigielski
Book Image

Bitcoin Essentials

By: Szmigielski

Overview of this book

Blockchain is being billed as the technology of the future. Bitcoin is the first application of that technology. Mining is what makes it all possible. Exploring mining from a practical perspective will help you make informed decisions about your mining setup. Understanding what the future may hold for blockchains, and therefore for mining, will help you position yourself to take advantage of the impending changes. This practical guide starts with an introduction to Bitcoin wallets, as well as mining hardware and software. You will move on to learn about different mining techniques using the CPU, GPU, FPGA, and ultimately the ASIC as an example. After this, you will gain an insight into solo mining and pool mining, and see the differences between the two. The book will then walk you through large-scale mining and the challenges faced during such operations. Finally, you will take a look into the future to see a world where blockchain-based applications are commonplace and mining is ubiquitous.
Table of Contents (10 chapters)
9
Index

Mining with Bitcoin Core

The Bitcoin Core wallet has built-in capabilities for mining; therefore, it is really easy to use the wallet to mine on your machine. The wallet will use your CPU to mine. As you might recall, mining is basically hashing of a candidate block over and over again until the result is smaller than the current difficulty threshold.

To mine with your CPU and Bitcoin Core, open up the wallet software:

  1. Now click on the Help menu and select Debug Window.
  2. Then click on the Console tab—the console will appear. Remember, to see a list of all available commands, type help and press Enter.

The command to mine with your wallet is setgenerate. The syntax of the command is as follows:

setgenerate <true|false> <number of cores to be used>

To start mining with only 1 core, type setgenerate true 1:

Mining with Bitcoin Core

Fig. 2.1: Starting mining in Bitcoin Core

To make sure that your wallet is mining, you can go to your Task Manager in Windows, Activity Monitor in Mac OS, or System Monitor...