Bitcoin mining is the process by which blocks of transactions are added to the public blockchain and verified. it is also the process by which new bitcoin coins are created, a mechanism that ensures the integrity of the blockchain and encourages participation in the network.
miners compete to add new blocks to the blockchain. bitcoin mining demands a substantial commitment from the miners; it is an expensive, time-consuming task that is necessary for cryptocurrency to work and for people to have faith in its legitimacy.
Reading: Mineria de bitcoin
After more than a decade since bitcoin was created by satoshi nakamoto, most people have heard of mining. But what does it really mean—and how do you go about mining bitcoin?
mining bitcoin is not like digging for gold or coal deep in the earth. refers to the verification of transactions made with bitcoin. miners are those people or companies that maintain and audit the blockchain network that supports the cryptocurrency.
They do this by completing “blocks” of already verified transactions, which are added to the blockchain; when a miner completes a block, they are rewarded with bitcoin.
Bitcoin mining is no longer as cheap as it used to be, but this does not stop investors from doing so. The bitcoin block reward is the incentive that drives cryptocurrency transactions through legitimation and control of the network. Because this responsibility is borne by many users around the world, bitcoin is a decentralized cryptocurrency, which means that it is not dependent on any central authority such as a government or bank for its solvency.
mining is, in effect, a process of auditing and verifying bitcoin transactions to avoid the problem of “double spending”. double spending is when someone with crypto tries to spend the same coin twice. With a physical currency, it is not possible to buy a drink in a bar with a £20 note and then go to the store to buy some groceries with the same £20 note.
With cryptocurrency, there is a risk that someone with bitcoin could create a copy of that bitcoin and trade it instead of the real deal. In the real world, the cashier looks at a £20 note to make sure it’s not fake — and this is what bitcoin miners are trying to do with the cryptocurrency; they’re checking to make sure a transaction hasn’t been done twice.
bitcoin uses a consensus mechanism called proof of work.
See also: Can Bitcoin Be Seized? | River Financial
the bitcoin mining process works as follows:
- 🖥️ a miner’s computer, called a node, collects and packages the individual bitcoin transactions of the last ten minutes into a block.
- 🖧this node competes with other nodes in the network in solving a complicated cryptographic problem and thus be the first to validate the new block for the blockchain.
- 📡the first miner to solve the problem transmits its success to the entire network.
- 🧮 other nodes then check if their solution is correct. if it is correct, the new block is added to the blockchain and the whole process starts again.
- 💰as the miner is the first to solve the problem, he is rewarded with an amount of bitcoin coins + the network fees (the money people pay to have their transactions processed).
bitcoin mining hardware executes a cryptographic hash function on the block header.
This means that each miner creates a “candidate block” with unconfirmed transactions in the node’s memory pool, or mempool. this block includes a block header containing the summary of the data within the block, along with a reference to an existing block on the blockchain and a nonce (“number that is only used once”). in bitcoin, the nonce is an integer between 0 and 4,294,967,296.
This block header is then hashed to the sha256 function; if the resulting number is greater than the desired hash, the miner adjusts the nonce and tries again. miners do this several miles of times per second. the target difficulty is a 256-bit number, which is adjusted every 2016 blocks (approximately every two weeks), to ensure that a block is mined on average once every 10 minutes.
When a lucky miner’s hash function returns a result lower than the intended hash, the block is broadcast to the network. each node checks that the block header hash is fit for purpose, and if confirmed, the newly mined block is added to the blockchain. the miner receives compensation in bitcoin; this transaction, which creates new bitcoin from scratch, is known as a “coinbase transaction” and is included in the candidate block.
These rewards serve to incentivize participation and keep everything running smoothly.
The rate at which coins are issued is defined by the mining code, ensuring that the time it takes for a miner to earn a block is always approximately 10 minutes. this is to protect the system and prevent miners from creating their own bitcoin.
Every time bitcoin is mined, the cryptographic problem becomes more complex to solve, meaning miners use a higher hash rate to be successful in earning block rewards. this means that more computing power is needed to earn the same amount of cryptocurrency.
Early bitcoin miners used their computer’s cpus to complete cryptographic problems. Soon, miners needed graphics processing cards (GPUs) to be more efficient than CPUs, sparking an arms race in mining hardware. bitcoin miners now use dedicated hardware known as asic (application-specific integrated circuit) miners — although miners of ethereum and other cryptocurrencies still typically use gpu, which has led to a shortage of graphics cards.
Resolving cryptographic issues is necessary to protect the bitcoin network from attack. reversing transactions on the blockchain required 51% of the computing power of the entire network. this ensures that any attack is difficult and pointless, as an attacker will have to have more mining hardware than anyone else.
As bitcoin mining has evolved, the barrier to access for individual miners has increased. Now, most mining is done by “pools” of miners who combine their resources and try to use their combined computing power to earn bitcoin rewards.
Until mid-2021, most mining pools are based in China. this changed in may 2021, when china’s state council included bitcoin mining in the list of financial risks that required monitoring. This marked the start of a sweeping crackdown on cryptocurrency mining across China, fueled by the country’s commitments to carbon neutrality and the imminent launch of its digital yuan, a central bank digital currency and rival to bitcoin.
This was followed by a succession of mining bans imposed by local governments such as those in Inner Mongolia, Xinjiang, Qinghai, Yunnan and Sichuan, leading to a collapse in the bitcoin hash rate. Since then, Chinese miners have moved to countries such as Kazakhstan, while miners from other countries have taken over, with the result that, by October 2021, the United States had overtaken China as the largest market. largest in the world to mine bitcoin.
miners are constrained by electricity tariffs, as proof-of-work mining uses large amounts of electricity; many miners relocate their operations to take full advantage of cheap electricity.
Bitcoin mining has been criticized for its high energy consumption, which in 2021 was about 11.8 GW or 103.31 terawatt hours — more than the output of twelve nuclear power plants.
Some cryptocurrency experts argue that it works as an “energy currency” that incentivizes the use of surplus energy; in fact, several power plants in the u.s. and iran are now using surplus natural gas to operate large-scale bitcoin mining. other miners are looking for nuclear power. The government of El Salvador, which confirmed bitcoin as legal tender in 2021, has even started mining bitcoin using geothermal energy from volcanoes.
Figures for how much of bitcoin’s total energy consumption comes from renewables vary, with estimates ranging from 39% to 75% (although higher estimates often come from companies involved in the crypto industry ). bitcoin miners currently generate a carbon footprint equivalent to that of bangladesh.
Faced with these criticisms, some cryptocurrencies are moving from a proof-of-work consensus mechanism to a system known as proof-of-stake (pos).
Instead of miners, proof-of-stake cryptocurrencies have validators. these validators will stake their cryptocurrency to determine which blocks will be added to the chain. if successful, validators receive a block reward in proportion to how much they have staked. ethereum, the second largest cryptocurrency by market cap after bitcoin, is switching to a proof of stake model with its ethereum 2.0 update.
bitcoin, however, sticks to the tried and tested proof of work consensus model that satoshi nakamoto failed in the original bitcoin white paper, over a decade ago.