Cryptocurrency Mining For Dummies. Peter KentЧитать онлайн книгу.
Discovering how mining ensures the six characteristics of cryptocurrency
Choosing the winning miner through proof of work and proof of stake
Although not all cryptocurrencies require mining, Bitcoin and other mineable cryptocurrencies rely on miners to maintain their network. By solving computationally difficult puzzles and providing consent on the validity of transactions, miners support the blockchain network, which would otherwise collapse. For their service to the network, miners are rewarded with newly created cryptocurrencies (such as Bitcoin) and transaction fees.
When a miner sends a transaction message across the cryptocurrency network, another miner’s computer picks it up and adds the transaction to the pool of transactions waiting to be placed into a block and the blockchain ledger. (You can find the details about cryptocurrency and blockchain ledgers in Chapter 1.) In this chapter, we explore how cryptocurrencies use mining to create trust and make the cryptocurrency usable, stable, and viable.
Understanding Decentralized Currencies
Cryptocurrencies are decentralized — that is, no central bank, no central database, and no single, central authority manages the currency network. Conversely, the United States has the Federal Reserve in Washington, D.C., the organization that manages the U.S. dollar, the European Central Bank in Frankfurt manages the euro, and all other fiat currencies also have centralized oversight bodies. (A fiat currency is legal tender supported by governments via a central bank.)
However, cryptocurrencies don’t have a central authority; rather, the cryptocurrency community and, in particular, cryptocurrency miners and network nodes manage them. For this reason, cryptocurrencies are often referred to as trustless. Because no single party or entity controls how a cryptocurrency is issued, spent, or balanced, you don’t have to put your trust in a single authority.
Trustless is a bit of a misnomer. Trust is baked into the system. You don’t have to trust a single authority, but your trust in the system and fully auditable codebase is still essential. In fact, no form of currency can work without some form of trust or belief. (If nobody trusts the currency, then nobody will accept it or work to maintain it!)
SO WHY IS THE PROCESS CALLED MINING?
When you compare cryptocurrency mining to gold mining, why the process is referred to as mining becomes clear. In both forms of mining, the miners put in work and are rewarded with an uncirculated asset. In gold mining, naturally occurring gold that was outside the economy is dug up and becomes part of the gold circulating within the economy. In cryptocurrency mining, work is performed, and the process ends with new cryptocurrency being created and added to the blockchain ledger. In both cases, miners, after receiving their reward — the mined gold or the newly created cryptocurrency — usually sell it to the public to recoup their operating costs and get their profit, placing the new currency into circulation.
The cryptocurrency miner’s work is different from that of a gold miner, of course, but the result is much the same: Both bring a new money supply to the market. For cryptocurrency mining, all of the work happens on a mining computer or rig connected to the cryptocurrency network — no burro riding or gap-toothed gold panners required!
In the trustless cryptocurrency world, you can still trust the cryptocurrency community and its mechanisms to ensure that the blockchain contains an accurate and immutable — unchangeable — record of cryptocurrency transactions. Cryptocurrencies are established using a set of software rules that ensure that the system can be trusted, and the mining process is part of this system that allows everyone to trust the blockchain.
Cryptocurrencies have no central bank printing new money. Instead, miners dig up new currency according to a preset coin-issue schedule and release it into circulation in a process called mining.
Exploring the Role of the Crypto Miner
Cryptocurrency miners add transactions to the blockchain, but different cryptocurrencies use different mining methods, if the cryptocurrency uses mining at all. (Some cryptocurrencies don’t use mining — see Chapter 1.) Different mining and consensus methods are used to determine who creates new blocks of data and how exactly the blocks are added to the blockchain.
How you mine a particular cryptocurrency varies slightly depending on the type of cryptocurrency being mined, but the basics are still the same: Mining creates a system to build trust between parties without needing a single authority and ensures that everyone’s cryptocurrency balances are up-to-date and correct in the blockchain ledger.
The work performed by miners consists of a few main actions:
Verifying and validating new transactions
Collecting those transactions and ordering them into a new block
Adding the block to the ledger’s chain of blocks (the blockchain)
Broadcasting the new block to the cryptocurrency node network
The preceding mining process is essential work, necessary for the continued propagation of the blockchain and its associated transactions. Without it, the blockchain won’t function. But why would someone do this work? What are the incentives for the miner?
The Bitcoin miner actually has a couple of incentives (other cryptocurrencies may work in a different manner).
Transaction fees: A small fee is paid by each person spending the cryptocurrency to have the transaction added to the new block; the miner adding the block gets the transaction fees.
Block subsidy: Newly created cryptocurrency, known as the block subsidy, is paid to the miner who successfully adds a block to the ledger.
Combined, the fees and subsidy are known as the block reward. In Bitcoin, the block subsidy began at 50 BTC. (BTC is the ticker symbol for Bitcoin.) The block subsidy at the time of this writing is currently 6.25 BTC. The block subsidy is halved every 210,000 blocks, or roughly every four years; sometime around spring 2024, it will halve again to 3.125 BTC per block.
Figure 2-1, from the BlockChain.com blockchain explorer (https://www.blockchain.com/explorer
), shows a transaction with the block subsidy being paid to an address owned by the miner who added the block to the blockchain. A reward of 12.5 BTC is being paid as the subsidy because this transaction was before the most recent reward halving in 2020; the actual sum received by the miner (the full reward, 13.24251028 BTC) is larger, because it also includes the transaction fees for all the transactions in the block.
FIGURE 2-1: The block subsidy and transaction fees being paid to a miner, from the BlockChain.com blockchain explorer.
Making Cryptocurrency Trustworthy
For a cryptocurrency to function, several conditions must be met by the protocol. We like Jan Lanksy’s six-factor list