How does Bitcoin mining works ?

Share on facebook
Share on google
Share on twitter
Share on linkedin

What is Bitcoin Mining ?

You have probably heard of “Bitcoin mining” and always wondered how it works. Computers mining for virtual coins? Is Bitcoin mining just free money?

As you know, Bitcoin is a  digital currency. Currencies need checks and balances, validation and verification. Normally central governments and banks are the ones who perform these tasks, making their currencies difficult to forge while also keeping track of them.

  • The big difference with Bitcoin is that it is decentralized. If there is no central government regulating it, then how do we know that the transactions are accurate?
  • How do we know that person A has sent 1 bitcoin to person B?
  • How do we stop person A from also sending that bitcoin to person C?

Mining is one of the most complex parts of Bitcoin, but it is also the most critical to its success. Bitcoin mining is performed by high-powered computers that solve complex computational math problems. The role of miners is to secure the network and to process every Bitcoin transaction. Miners achieve this by solving a computational problem which allows them to chain together blocks of transactions (hence Bitcoin’s famous “blockchain”).

Bitcoin Is Like Gold

One of the most common analogies that people use for Bitcoin is that it’s like mining gold. Just like the precious metal, there is only a limited amount (there will only ever be 21 million bitcoin) and the more that you take out, the more difficult and resource intensive it is to find. Apart from that, Bitcoin actually works quite differently and it’s actually quite genius once you can get your head around it. One of the major differences is that mining doesn’t necessarily create the bitcoin. Bitcoin is given to miners as a reward for validating the previous transactions. So how do they do it?

How Does Bitcoin Mining Work?

What is the point of mining Bitcoin?

There are many aspects and functions of Bitcoin mining and we’ll go over them here. They are:

 

  • Issuance of new bitcoins
  • Confirming transactions
  • Security

Mining Is Used to Issue new Bitcoins
Traditional currencies–like the dollar or euro–are issued by central banks. The central bank can issue new units of money ay anytime based on what they think will improve the economy. Bitcoin is different. Bitcoin mining requires a computer and a special program. Miners will use this program and a lot of computer resources to compete with other miners in solving complicated mathematical problems. About every ten minutes, they will try to solve a block that has the latest transaction data in it, using cryptographic hash functions. The issuance rate is set in the code, so miners cannot cheat the system or create bitcoins out of thin air.

What are Hash Functions?

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 a rate of megahashes per second (MH/s), gigahashes per second (GH/s), or even 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 at the time of writing is about 6,061,518,831,027. That is, the chance of a computer producing a hash below the target is 1 in 6,061,518,831,027 — less than 1 in 6 trillion. That 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 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.

A cryptographic hash function is essentially a one-way encryption without a key. It takes an input and returns a seemingly random, but fixed length hash value.

Play Video

Miners Confirm Transactions and Secure the Network

Each block is created in sequence, including the hash of the previous block. Because each block contains the hash of a prior block, it proves that it came afterward. Sometimes, two competing blocks are formed by different miners. They may contain different transactions of bitcoin spent in different places. The block with the largest total proof of work embedded within it is chosen for the blockchain.

This works to validate transactions because it makes it incredibly difficult for someone to create an alternative block or chain of blocks. They would have to convince everyone on the network that theirs is the correct one, the one that contains sufficient proof of work. Because everyone else is also working on the ‘true’ chain, it would take a tremendous amount of CPU power to beat them. One of the biggest fears of Bitcoin is that one group may gain 51% control of the blockchain and then be able to influence it to their advantage, although thankfully this has been prevented so far.

Payments with 0 confirmations can still be reversed! Wait for at least one. If you are sending big amounts it is safer to wait for several confirmations (10 or more).

Bitcoin Mining Distribution

Discover more crypto articles

Article written by

Sponsored add

Start Learning

Follow us

Hello!

This section is not available yet.

Please leave us your email, so we can inform you as soon as it is available.

Connectez-vous à votre compte