Where does Bitcoin come from? What exactly is done in “mining” or “mining”? Why should a device make money just by turning it on? After reading this article, you will get the answers to these questions and you will understand the bitcoin mining process to a good extent.
Remember that to extract bitcoins you do not need to know how the network works or the meaning of mining, just as you do not need to understand how the Internet works to work with the Internet. So, to learn bitcoin mining, you can refer to the “Bitcoin Mining Tutorial” article. But if you want to understand the mining process, read on.
What exactly does bitcoin mining mean?
If we want to answer this question in simple language and in one or two lines, we must say: Bitcoin mining or bitcoin mining is a voluntary activity in which volunteers called “miners” (Miner), the processing power of their mining devices Are provided to the network to maintain network security and verify bitcoin transactions.
Of course, miners do not do this for the sake of God, but they are rewarded for it, and this reward is the bitcoin. In other words, when you send bitcoins to your friend, the miners behind the scenes help verify your transaction with their activity, and the network rewards them for doing so.
So with mining, there are actually three main things to do:
- Verification of bitcoin transactions
- Protecting the Bitcoin network
- Generate new bitcoin units in a decentralized manner
The explanation we gave was in simple language so that you could understand mining more easily. In the following, we will examine bitcoin mining from a technical point of view.
Maybe when the term «Bitcoin Mining» Hear, imagine in your mind the coins that are pulled out of the heart of the earth. But bitcoin is not that physical. So why call it mining?
Because bitcoin mining is not philosophically dissimilar to gold mining. In this way, bitcoins exist in the design of bitcoin codes and protocols (like gold found in mines) but are not yet available (like gold that has not yet been mined).
According to the protocol or the rules of bitcoin, there will be only 21 million units of it; Like gold, which is scarce and limited.
It can be said that the more scientific name of mining is Proof Of Work. In fact, the extraction process originated from an algorithm called proof of work, which was first used by Adam Back in his anti-spam system, called HashCash.
Spam attacks on computer systems were common in the early 1990s. Spam attacks mean sending useless messages and requests to the system to slow it down. To prevent spammers from sending useless messages, Adam Beck invented the requirement that users had to perform a series of mathematical calculations with their computer that required CPU consumption to send the message. This way, if someone wanted to send spam messages to the system, they would have to provide a lot of processing power.
Proof of work actually means that bitcoin miners or miners do something by which they can create a valid blockchain and gain access to bitcoin. Miners are rewarded by generating blocks of valid transactions and connecting them to the Blockchaink.
Despite this process, in order to effectively attack the Bitcoin network and take control of it, malicious individuals must acquire more than 50% of the network processing power, which is very expensive for a network the size of Bitcoin, and it makes sense to do so. is not.
First of all, we need to talk about nodes. A node in a bitcoin network is a computer that runs bitcoin software and helps maintain the work of the bitcoin network by participating in data transmission.
Anyone can run a node by downloading free Bitcoin software and downloading the entire blockchain transaction history (currently around 200 GB). Nodes validate bitcoin transactions and transmit them over the network.
Also read: Learn how to install and run Full Node bitcoin
But some nodes have special conditions called “mining nodes”.
In the early days of Bitcoin, all nodes were miners, but today mining nodes are different from purely valid nodes.
Miner nodes with processing power collect bitcoin transactions in packages called blocks.
But how do they do it? Adding blocks to Blockchainks requires solving complex mathematical equations that can only be done by guessing numbers.
Solve the equation
Miner powerful computers test numbers one after the other to find the answer to the equation of each block. A solution called the hash function ensures this process.
Miners have no choice but to try and guess until they finally get the right result. Therefore, finding the block equation is completely random, but the more processing power a miner has, the better the chances of finding the answer, because it is a few steps ahead of other miners. The first miner to reach the correct equation and hash answer wins and announces it to the other nodes. Immediately all miners resume competition for the next block.
As a reward for this, a certain amount of bitcoin set by the bitcoin protocol will be awarded to the winning miner. Miner will also receive the full transaction fee for a block. At the time of writing, the Bitcoin Mining Reward is 6.25 Bitcoin (BTC). This bonus was 50 units at the beginning of the launch of Bitcoin. For every 200,000 blocks (every four years), the network extraction bonus is halved.
It is estimated that the extraction of all bitcoin units will take until 2140. When all the bitcoins are mined, the miners will only benefit from the commissions.
Because the bitcoin block time is 10 minutes, new bitcoins are generated approximately every 10 minutes and assigned to a minor. It is now possible for a very powerful computer to find the answer to an equation in, say, 5 minutes. This will disrupt the network and speed up the extraction of all bitcoin units. To this end, something called network hardness is embedded in Bitcoin.
The network automatically increases or decreases the difficulty of finding the answer to the equations relative to the available processing power so that the miners can answer in ten minutes, no more and no less. However, this time sometimes increases and decreases slightly, for example, a block may be created in 9.8 minutes. As the processing power of the miners increases, so does the hardness, and as it decreases, the hardness decreases.
On the Bitcoin network, network hardness is adjusted after every 2,016 blocks (approximately every two weeks).
Today, due to the expansion of the network and powerful mining devices, direct bitcoin mining is less possible by few people, and most miners refer to virtual locations called “mining pools”.
Miners around the world connect their mining machines to reputable mining pools, and the mining pool, on behalf of all and with all its processing power, strives for mining and earning block rewards. Here, miners no longer compete individually and directly for block rewards, but receive bitcoins from the mining pool on a regular basis for their processing power. If a normal miner attempts to extract bitcoin directly, the chance of solving the block will be close to zero.
Everything has a reward. As a miner operating in the Bitcoin network, you verify and secure network transactions and receive rewards for doing so.
To ensure that bitcoin is well secured and can not attack the network, mining is designed so that miners must solve math problems using their processing power to earn rewards. In this case, if one wants to compromise network security, one must have processing power of more than half of the network miners.
The number of bitcoins is limited to 21 million units, which due to the halving of the extraction bonus or Halving, which occurs every four years, the extraction of all bitcoins lasts until 2140.
The extraction pool is a virtual place where the extractors gather their processing power and everyone tries to extract a block. In this method, each miner or extractor benefits based on their processing power. Without joining a mining pool, a miner’s chances of extracting a block will be slim, and only large mining farms will operate independently.
It is important to note that you do not need to know the details of mining to do bitcoin mining, and it is much easier to start mining than you think.
If you want to learn more about how the Bitcoin network and its blockchain work, it is recommended that you read How Bitcoin Works.