What is bitcoin mining doing

What is bitcoin mining doing

The process of minting new bitcoins is in some ways similar to the process of extracting precious metals from the earth. For this reason, it has come to be known as ‘bitcoin mining.’

The steady addition of a constant amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.

A simplified overview of bitcoin mining is as follows:

  • People compete to earn bitcoin rewards by applying computing power in a process known as ‘Proof of Work’ (PoW). The process is named such because only participants (miners) who have proven they’ve dedicated sufficient resources (work) will have a chance at winning the rewards.
  • Approximately every 10 minutes, rewards are distributed to a single winning ‘miner.’
  • Rewards are twofold: (1) the ‘block reward,’ which is newly minted bitcoin. The block reward is currently set at 6.25 bitcoins (but will be cut in half from early May 2024, then cut in half again four years later and so on). (2) the fees associated with all transactions in the current block. End users wishing to make a transaction must attach a fee to the proposed transaction as incentive for miners to include it in the next block.

Why is bitcoin mining needed?

Bitcoin mining is an essential component of the network’s system for arriving at consensus as to the current state of the ledger. It is central to enabling people to securely make Bitcoin transactions.

The Bitcoin network is a globally distributed public ledger consisting of a giant list of timestamped transactions. For example, one ledger entry might indicate that Person A sent 1 bitcoin to Person B at 10am on Monday. The ledger is updated approximately every 10 minutes by adding ‘blocks’ that contain a list of new transactions. The existence of the ledger, which is voluntarily stored by thousands of participants known as ‘nodes,’ allows anyone to see both the current state and complete history of bitcoin ownership.

By design, there is no centralized authority deciding which transactions should be added to new blocks. Instead, the state of the ledger (ie. the ‘truth’) is arrived at collectively and through coordination by nodes in accordance with the Bitcoin protocol. This decentralization is what gives Bitcoin some of it’s most interesting properties — namely, censorship-resistance and permissionless-ness.

Most nodes simply validate the authenticity of transactions, store the ledger, and pass on updates to other nodes (again, updates take the form of new blocks added to the chain). However, a smaller group of nodes, called miners, compete to create new blocks. When miners create new blocks, they are effectively updating the state of ledger, or the ‘truth’ about who owns what.

What is the purpose of bitcoin mining?

Bitcoin mining serves several functions:

  1. It is a method for distributing new coins.
  2. It is part of a more complete system for ensuring only valid transactions are added to the blockchain.
  3. It is a method for prioritizing transactions given limited throughput (it creates a fair market for limited block space).
  4. It provides financial incentive for participants (miners) to dedicate resources to the network, and the resources dedicated help secure the network from attackers. Note that attackers here primarily refers to miners themselves. In other words, by making it expensive to mine, Bitcoin ensures miners follow the rule.s

How does bitcoin mining secure the network?

Proof-of-Work mining helps to secure the Bitcoin network by requiring potential attackers to commit more resources to an attack than they could hope to gain from the attack itself. In other words, it ensures that attacking Bitcoin is a money-losing (and very costly) prospect, making it exceedingly unlikely to occur.

How does bitcoin mining work?

The process is summarized in the Bitcoin white paper:

  1. New transactions are broadcast to all nodes.
  2. Each node collects new transactions into a block.
  3. Each node works on finding a difficult proof-of-work for its block.
  4. When a node finds a proof-of-work, it broadcasts the block to all nodes.
  5. Nodes accept the block only if all transactions in it are valid and not already spent.
  6. Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.

Let’s break that down into a little more detail.

To begin, miners are the ones who propose updates to the ledger and only miners who have successfully completed the Proof of Work are permitted to add a new block. This is coded into the Bitcoin protocol.

Miners are free to select valid transactions from a pool of potential transactions that are broadcast to the network by nodes. Such transactions are collected into the ‘mempool.’ Rational and honest miners select transactions from the mempool based on the fees attached to them, optimizing for higher fees. This gives rise to the fee market, which helps to ensure the limited block space is used fairly and efficiently.

The first miner to complete the Proof of Work broadcasts her proposed new block to the wider network of nodes who then check to ensure that the block follows the rules of the protocol. The key rules here are (1) all transactions in the block are valid (ie. there are no double spends), and (2) the new block appropriately references the previous block and is numbered as the next in the chain (ie. the new block constitutes the latest block in the longest chain). If it does, nodes send it on to other nodes who complete the same process. In this way, the new block propagates across the network until it is widely accepted as the ‘truth.’

Читайте также:  Что такое накопление инвестиций

However, it can (and regularly does) happen that more than one miner completes the Proof of Work at almost the same time and simultaneously broadcasts his new block out to the network. Moreover, due to network delays and geographic separation, nodes may receive new proposed blocks at slightly different times.

Note that one miner’s newly proposed block could be slightly different from another’s. This is because, as mentioned, miners are the ones who choose which transactions to include in a block — and even though they tend to optimize for profitability, location and other factors introduce variation. When two miners send out different new blocks, competing versions of the ‘truth’ begin to propagate across the network. The network ultimately converges on the ‘correct’ version of the truth by selecting the chain that grows longer at faster rate.

Let’s break down that last part. Imagine there are two competing chains. Let’s say 75% of miners select version A (because it was the first version they saw) and begin their Proof of Work for the next block, building on top of version A. The other 25% of miners select version B (again, because that’s the version they happened to come across first) and initiate the same process building on top of that version. Statistically, one of the miners working on version A is likely to complete the Proof of Work first, broadcasting the new version out to the network. Since nodes always select for the longest chain, version A will quickly come to dominate the network. In fact, the probability that version B will grow faster vanishes exponentially with each additional block such that by the time six blocks have been added, it’s a statistical impossibility. For this reason, a transaction that has been confirmed in six blocks is, for most participants, considered to be set in stone. Note that a block which doesn’t end up becoming part of the longest chain (version B in our example above) is known as an orphan block. It is estimated that such blocks are created between 1 and 3 times per day. Transactions that are included in an orphan block are not lost. That’s because if they weren’t already included in the version that ends up being the longest chain, they’ll end up being added to the next block of the longest chain.

What is Bitcoin’s hashing algorithm?

Bitcoin uses a military-grade encryption algorithm called Secure Hash Algorithm 2 (SHA2). Bitcoin miners are awarded BTC when they find a random number that can only be generated by running the hashing algorithm over and over again. This process is analogous to a lottery (where buying more tickets increases your chances of winning). By dedicating more computing power to the hashing algorithm, miners are effectively buying more lottery tickets.

What is the difficulty adjustment in bitcoin mining?

The difficulty level for the Proof of Work algorithm is automatically adjusted every 2,016 blocks, or roughly every 2 weeks. Adjustments are made with the goal of keeping the mining of new blocks constant at 10 minutes per block.

The difficulty adjustment factors in the total volume of computing power, or ‘hashpower,’ being applied to the hashing algorithm. As computing power is added, the difficulty is increased, making mining more difficult for everyone. If computing power is removed, difficulty is reduced, making mining easier.

Note that the difficult adjustment system makes bitcoin mining quite different from the mining of precious metals. If, for example, the price of gold rises, more miners are enticed to join the market. The addition of more gold miners will inevitably result in more gold produced. By forces of supply and demand, this will eventually lower the market price of gold. In Bitcoin’s case, however, the volume of bitcoin produced (minted) is predetermined by the Bitcoin protocol (ie. not affected by the number and power of miners) so, no matter how much mining power is directed towards the algorithm, the volume of Bitcoin produced will not be affected.

Bitcoin mining is legal in most regions, including the US and Europe. In China the legal status of bitcoin mining is currently in a gray zone.

Is bitcoin mining profitable?

Bitcoin mining is a highly competitive industry with narrow profit margins. The primary input is electricity, although significant upfront investments in hardware and facilities for housing the hardware are also required. The key hardware involved is known as the Application Specific Integrated Circuit (ASIC), which is a computing device specialized for running the Bitcoin hashing algorithm exclusively. Profitably relies mainly on consistent access to low-cost electricity applied to the most efficient ASIC hardware.

Bitcoin mining is a naturally equilibrating system. As the price of bitcoin rises, miner margins expand. This entices more miners to join the market. However, new entrants cause the difficulty of minting new blocks to increase. This requires all participants to expend more resources, thereby reducing profitability across the board. Sustained downturns in the price of bitcoin have historically resulted in a portion of miners quitting due to costs exceeding revenue.

How does bitcoin mining affect the price of bitcoin?

In most cases, miners sell their earned bitcoins to cover the costs associated with mining. These costs, then, contribute to the net sell pressure. Miner’s attempts to maximize profitability by holding or selling Bitcoin based on market momentum may have an impact on Bitcoin’s price volatility. Here, the argument is that when the price of Bitcoin is rising, miners may attempt to hold longer in the hopes that they can extract more profit. This would result in less net sell pressure, leading to a faster rise in the price. When the price of Bitcoin is falling, however, miners are likely to sell not only their reserves, but also newly acquired bitcoin. This, in turn, would contribute to volatility on the downside.

Читайте также:  Основные критерии оценки экономической эффективности инвестиций

Buy as little as $30 worth to get started

Choose from Bitcoin, Bitcoin Cash, Ethereum, and more

Источник

Bitcoin Mining

What Is Bitcoin Mining?

Chances are you hear the phrase “bitcoin mining” and your mind begins to wander to the Western fantasy of pickaxes, dirt and striking it rich. As it turns out, that analogy isn’t too far off.

Bitcoin mining is performed by high-powered computers that solve complex computational math problems; these problems are so complex that they cannot be solved by hand and are complicated enough to tax even incredibly powerful computers.

Key Takeaways

  • Bitcoin mining is the process of creating new bitcoin by solving a computational puzzle.
  • Bitcoin mining is necessary to maintain the ledger of transactions upon which bitcoin is based.
  • Miners have become very sophisticated over the last several years using complex machinery to speed up mining operations.

The result of bitcoin mining is twofold. First, when computers solve these complex math problems on the bitcoin network, they produce new bitcoin (not unlike when a mining operation extracts gold from the ground). And second, by solving computational math problems, bitcoin miners make the bitcoin payment network trustworthy and secure by verifying its transaction information.

When someone sends bitcoin anywhere, it’s called a transaction. Transactions made in-store or online are documented by banks, point-of-sale systems, and physical receipts. Bitcoin miners achieve the same thing by clumping transactions together in “blocks” and adding them to a public record called the “blockchain.” Nodes then maintain records of those blocks so that they can be verified into the future.

When bitcoin miners add a new block of transactions to the blockchain, part of their job is to make sure that those transactions are accurate. In particular, bitcoin miners make sure that bitcoin is not being duplicated, a unique quirk of digital currencies called “double-spending.” With printed currencies, counterfeiting is always an issue. But generally, once you spend $20 at the store, that bill is in the clerk’s hands. With digital currency, however, it’s a different story.

Digital information can be reproduced relatively easily, so with Bitcoin and other digital currencies, there is a risk that a spender can make a copy of their bitcoin and send it to another party while still holding onto the original. 

Special Considerations

Rewarding Bitcoin Miners

With as many as 300,000 purchases and sales occurring in a single day, verifying each of those transactions can be a lot of work for miners.   As compensation for their efforts, miners are awarded bitcoin whenever they add a new block of transactions to the blockchain.

The amount of new bitcoin released with each mined block is called the «block reward.» The block reward is halved every 210,000 blocks (or roughly every 4 years). In 2009, it was 50. In 2013, it was 25, in 2018 it was 12.5, and in May of 2020, it was halved to 6.25.

Bitcoin successfully halved its mining reward—from 12.5 to 6.25—for the third time on May 11th, 2020.

This system will continue until around 2140.   At that point, miners will be rewarded with fees for processing transactions that network users will pay. These fees ensure that miners still have the incentive to mine and keep the network going. The idea is that competition for these fees will cause them to remain low after halvings are finished.

These halvings reduce the rate at which new coins are created and, thus, lower the available supply. This can cause some implications for investors, as other assets with low supply—like gold—can have high demand and push prices higher. At this rate of halving, the total number of bitcoin in circulation will reach a limit of 21 million, making the currency entirely finite and potentially more valuable over time. 

El Salvador made Bitcoin legal tender on June 9, 2021. It is the first country to do so. The cryptocurrency can be used for any transaction where the business can accept it. The U.S. dollar continues to be El Salvador’s primary currency.

Verifying Bitcoin Transactions

In order for bitcoin miners to actually earn bitcoin from verifying transactions, two things have to occur. First, they must verify one megabyte (MB) worth of transactions, which can theoretically be as small as one transaction but are more often several thousand, depending on how much data each transaction stores.

Second, in order to add a block of transactions to the blockchain, miners must solve a complex computational math problem, also called a «proof of work.» What they’re actually doing is trying to come up with a 64-digit hexadecimal number, called a «hash,» that is less than or equal to the target hash. Basically, a miner’s computer spits out hashes at different rates—megahashes per second (MH/s), gigahashes per second (GH/s), or terahashes per second (TH/s)—depending on the unit, guessing all possible 64-digit numbers until they arrive at a solution. In other words, it’s a gamble.

The difficulty level of the most recent block as of August 2020 is more than 16 trillion. That is, the chance of a computer producing a hash below the target is 1 in 16 trillion. To put that in perspective, you are about 44,500 times more likely to win the Powerball jackpot with a single lottery ticket than you are to pick the correct hash on a single try. Fortunately, mining computer systems spit out many hash possibilities. Nonetheless, mining for bitcoin requires massive amounts of energy and sophisticated computing operations.

Читайте также:  Майнинг бот что это

The difficulty level is adjusted every 2016 blocks, or roughly every 2 weeks, with the goal of keeping rates of mining constant.   That is, the more miners there are competing for a solution, the more difficult the problem will become. The opposite is also true. If computational power is taken off of the network, the difficulty adjusts downward to make mining easier.

Bitcoin Mining Analogy

Say I tell three friends that I’m thinking of a number between 1 and 100, and I write that number on a piece of paper and seal it in an envelope. My friends don’t have to guess the exact number, they just have to be the first person to guess any number that is less than or equal to the number I am thinking of. And there is no limit to how many guesses they get.

Let’s say I’m thinking of the number 19. If Friend A guesses 21, they lose because 21>19. If Friend B guesses 16 and Friend C guesses 12, then they’ve both theoretically arrived at viable answers, because 16

Bitcoin vs. Traditional Currencies

Consumers tend to trust printed currencies. That’s because the U.S. dollar is backed by a central bank of the U.S., called the Federal Reserve. In addition to a host of other responsibilities, the Federal Reserve regulates the production of new money, and the federal government prosecutes the use of counterfeit currency.   

Even digital payments using the U.S. dollar are backed by a central authority. When you make an online purchase using your debit or credit card, for example, that transaction is processed by a payment processing company (such as Mastercard or Visa). In addition to recording your transaction history, those companies verify that transactions are not fraudulent, which is one reason your debit or credit card may be suspended while traveling.

Bitcoin, on the other hand, is not regulated by a central authority. Instead, bitcoin is backed by millions of computers across the world called “nodes.” This network of computers performs the same function as the Federal Reserve, Visa, and Mastercard, but with a few key differences. Nodes store information about prior transactions and help to verify their authenticity. Unlike those central authorities, however, bitcoin nodes are spread out across the world and record transaction data in a public list that can be accessed by anyone.

History of Bitcoin Mining

Between 1 in 16 trillion odds, scaling difficulty levels, and the massive network of users verifying transactions, one block of transactions is verified roughly every 10 minutes.   But it’s important to remember that 10 minutes is a goal, not a rule.

The bitcoin network is currently processing just under four transactions per second as of August 2020, with transactions being logged in the blockchain every 10 minutes.   For comparison, Visa can process somewhere around 65,000 transactions per second.   As the network of bitcoin users continues to grow, however, the number of transactions made in 10 minutes will eventually exceed the number of transactions that can be processed in 10 minutes. At that point, waiting times for transactions will begin and continue to get longer, unless a change is made to the bitcoin protocol.

This issue at the heart of the bitcoin protocol is known as “scaling.” While bitcoin miners generally agree that something must be done to address scaling, there is less consensus about how to do it. There have been two major solutions proposed to address the scaling problem. Developers have suggested either (1) creating a secondary «off-chain» layer to Bitcoin that would allow for faster transactions that can be verified by the blockchain later, or (2) increasing the number of transactions that each block can store. With less data to verify per block, the Solution 1 would make transactions faster and cheaper for miners. Solution 2 would deal with scaling by allowing for more information to be processed every 10 minutes by increasing block size.

In July 2017, bitcoin miners and mining companies representing roughly 80% to 90% of the network’s computing power voted to incorporate a program that would decrease the amount of data needed to verify each block.

The program that miners voted to add to the bitcoin protocol is called a segregated witness, or SegWit. This term is an amalgamation of Segregated, meaning “to separate,” and Witness, which refers to “signatures on a bitcoin transaction.” Segregated Witness, then, means to separate transaction signatures from a block — and attach them as an extended block. While adding a single program to the bitcoin protocol may not seem like much in the way of a solution, signature data has been estimated to account for up to 65% of the data processed in each block of transactions.

Less than a month later in August 2017, a group of miners and developers initiated a hard fork, leaving the bitcoin network to create a new currency using the same codebase as bitcoin. Although this group agreed with the need for a solution to scaling, they worried that adopting segregated witness technology would not fully address the scaling problem.

Instead, they went with Solution 2. The resulting currency, called “bitcoin cash,” increased the blocksize to 8 MB in order to accelerate the verification process to allow a performance of around 2 million transactions per day. On August 16, 2020, Bitcoin Cash was valued at about $302 to Bitcoin’s roughly $11,800.   

Источник

Оцените статью