Book Image

Bitcoin Essentials

By : Albert Szmigielski
Book Image

Bitcoin Essentials

By: Albert 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 (15 chapters)
Bitcoin Essentials
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Types of wallets


Wallets have come a long way since the original came out in 2009. There are now software wallets, hardware wallets, paper wallets, hosted wallets, and, of course, there are innovative companies who constantly think up new ways to create wallets.

Software wallets

There are a variety of software wallets. For an up-to-date list of the most popular wallets, see https://bitcoin.org/en/choose-your-wallet. We will concentrate here on the Bitcoin Core software application. At the time of writing this book, the current version is 0.11.2. You can always check the latest version here: https://bitcoin.org/en/download.

If you do not have Bitcoin Core installed and you would like to mine solo (solo mining will be explained in Chapter 6, Solo Versus Pool Mining), it would be a good idea to download and install it. Make sure that you have sufficient space on your hard drive for the block chain, which currently (Feb 2016) is about 55 GB. Once you install Bitcoin Core, it will proceed to download the block chain, which may take a while. When you open the software, you will be greeted with the following screen:

Fig. 1.1: The Bitcoin Core wallet.

As you can see, the client is downloading the block chain by synchronizing with the Bitcoin network. There are tabs to send and receive bitcoins. There is also a Transactions tab, under which you can find a history of all transactions performed with the wallet.

Fig. 1.2: Send tab in the Bitcoin Core wallet.

The Send tab can be used to transfer the bitcoins you control to another address. It requires a destination Bitcoin address and the amount you wish to transfer. If your wallet is password-protected (more on securing your wallet later), you will be prompted to enter it.

Fig. 1.3: Receive tab in the Bitcoin Core wallet.

The Receive screen, on entering the relevant information and pressing Request payment, will generate a QR code and a URI that can be sent out or posted online.

Fig. 1.4: Request payment screen, generated by Bitcoin Core

The Transactions tab lists all the transactions tied to the private keys that the wallet is storing.

Fig. 1.5: The Transactions tab in Bitcoin Core

The functions described in the preceding section are the basic wallet transaction types, but what is more interesting is the information we can get about the network through the Bitcoin console. The console can be accessed by going to the Help menu and selecting Debug window.

Fig. 1.6: Debug window of Bitcoin Core

Select the Console tab and you will be able to obtain a trove of information about the Bitcoin network and about Bitcoin's block chain. To see a list of possible commands, type help into the console and press Enter. You will be presented with a long list of commands that have been grouped in categories. A complete overview of the commands is beyond the scope of this book. However, we will take a look at some of them.

Fig. 1.7: A listing of all available commands

Perhaps, the most interesting to us will be the getmininginfo command. Typing it into the console yields the following:

Fig. 1.8: The getmininginfo command

As we can see, the command returns the last block number, current mining difficulty, network hashing speed, and some other information as well. There are websites that check this information for each block and offer graphs to visualize the data. They are called block explorers and there are many of them. The most popular perhaps is http://blockchain.info.

You can find out more information about any command by typing help followed by the command name. For example, to find out more about the getmininginfo command, we will type help getmininginfo:

Fig. 1.9: Getting more information about a command: help getmininginfo

Another interesting command from a mining point of view is the getblockchaininfo command. The following screenshot shows us the output and the help data on that command:

Fig. 1.10: Output of the getblockchain info command and help getblockchain info

Hardware wallets

Hardware wallets are a relatively new addition to the array of Bitcoin wallets available. They are not required for mining purposes, but are great for keeping your bitcoins safe. The two most popular solutions on the market are Trezor and Ledger wallets. We encourage you to take a look at their respective websites, if you think you can benefit from a hardware wallet.

Note

Outside resources

Trezor website: https://www.bitcointrezor.com/

Ledger website: https://www.ledgerwallet.com/

The major advantage of hardware wallets over software ones is their security. They are not affected by computer viruses designed to attack software wallets. They are offline for a majority of the time (online only to compose a transaction). They also enjoy an advantage over paper wallets, as a result of being interactive versus importing the whole wallet, as in the case of a paper wallet.

Full wallet versus thin client

Any wallet that stores the entire block chain database is regarded as a full wallet, Bitcoin Core is one example. Sometimes there just aren't enough resources available to download and store the complete block chain. This could be due to bandwidth restrictions, storage limitations, or perhaps just an unwillingness to run the full wallet.

There are wallets available that do not download the entire block chain. This is obviously required for mobile computers with limited storage, such as smart phones and tablets and other Internet-of-things devices. These types of wallets are called thin clients. They use a procedure called Simplified Payment Verification (SPV) to avoid having a full copy of the block chain. SPV is not important for mining purposes, but every miner should at least know that the security of an SPV wallet is not as tight as the security of a full wallet.

Hosted wallets

There are a number of companies that offer hosted wallet services. This means that you do not need to download or install any software and of course downloading the block chain is also not required. There is a trade-off when you use a hosted wallet. You are giving away a part of the security that comes with running your own wallet in exchange for convenience.

However, as these hosted wallet companies are maturing and becoming big, their ways of securing bitcoins may be better than that of a single user. The risk of insolvency is then the biggest risk to a hosted wallet user. If the company goes bankrupt, then the funds stored in their hosted wallets will most likely not be recoverable. Just like with a traditional bank, deposits are liabilities of the bank and in the case of failure, depositors would only be able to recover the portion of their deposits that is insured by the government. We are not aware of any such insurance schemes available to hosted wallet providers.

Wallet security

Securing your wallet is a serious matter. With Bitcoin being deflationary, the value of the cryptocurrency is expected to rise in the long term. Therefore, making sure that your funds are only accessible to you is a worthwhile undertaking. Your online wallet should be encrypted and password-protected. Furthermore, you should back-up your password protected wallet to multiple locations.

To encrypt your wallet, select Encrypt Wallet from the Settings menu in Bitcoin Core and then follow the rest of the instructions. Please remember to choose a very strong password.

Tip

Make sure to use upper- and lower-case characters; also add some special characters and make the password long (min. 10 characters). It is also possible to make a passphrase out of ten (or more) random words. It will be beneficial if those words are not in a dictionary (use misspellings or combination words).

Finally, it is a good idea to only keep a small amount of bitcoins in your online wallet. The bulk of your holdings should be kept offline. A full discussion of securing your wallet is impossible here. We do encourage you to find resources online to educate yourself more about this topic.