Bitcoin Basic Mining concepts

Estimated read time 5 min read

Behind Bitcoin mining, there is a protocol called Proof of work. Sometimes it’s just referred to as “Mining”. In the Bitcoin whitepaper by Satoshi Nakamoto, Proof of Work (PoW) is a consensus mechanism used in blockchain networks, and it is the underlying mechanism that secures and validates transactions in the Bitcoin network. The concept of Proof of Work was introduced by Bitcoin’s pseudonymous creator, Satoshi Nakamoto, in the Bitcoin whitepaper published in 2008.

If you landed in this article, I would suggest you check out the following as this one is like a continuation of the following:

 

In previous articles, I mentioned that consensus is among the ways to prove what’s in a blockchain. As proof of consensus, is not just based upon the ledger system. There is also proof of computing by using the computing power in consensus. in a random consensus model, someone is just picked up by default. In the article: Blockchain Network and its Security underneath, under “We just want to know the fact”, I have explained the random consensus model. So the key problem with this system is someone can just get as many virtual machines and start running the mining system and eventually, they will become the most likely wood to be selected in this design.

Proof of identity tries eliminating that random consensus power by adding a “tag” in the model saying who has what computing power. This way, since computing power is very expensive, it becomes difficult to fake. Because the one with the largest computing power has more space in this scenario, is likely highly that the miner becomes the selected one. This acts as a deterrence for attacks. Proof of work is most likely a reward to make consensus attacks difficult.

Bitcoin Consensus algorithm

As blocks are being compiled in the system, the Bitcoin protocol required also a hash appended in the Bitcoin header. See this article for more information where I talked about the data in the header : Bitcoin: Bitcoin Header and its ledger system. The hash is composed of transactions and a nonce. The term “nonce” stands for “number used once.” It plays a crucial role in the process of mining, which is the mechanism through which new bitcoins are created and transactions are added to the blockchain. When we represent a hash as a hexadecimal number, a leading zero corresponds to four bits of leading zeros. Therefore, if the network requires, for example, 20 leading zeros, the hash must start with “00000000000000000000” in its hexadecimal representation. There are 5 key concepts to understand about Proof of work in terms of how the leading zeroes work:

  1. Block Header: Just think about a chef in a restaurant who wants to create a signature dish (block) for the restaurant’s menu. The dish has a unique combination of ingredients, and the chef wants to make sure it’s not too easy for the kitchen staff to create a new dish.
  2. Nonce: The chef tells the kitchen staff to find a secret ingredient (nonce) that, when mixed with the other ingredients (block header), creates a dish with a specific flavor (hash). The staff needs to experiment with different secret ingredients until they find the right one.
  3. Target Difficulty: The chef specifies that the dish must have a specific taste (hash with leading zeros) to be accepted. For example, the dish should have a sweetness level that corresponds to the number of leading zeros in the taste.
  4. Hashing Process: The chef adjusts the difficulty level by changing the taste requirements. If the chef wants the dish to be sweeter, they ask for more leading zeros in the taste. If they want it less sweet, they ask for fewer leading zeros.
  5. Leading Zeros: When we represent a hash as a hexadecimal number, a leading zero corresponds to four bits of leading zeros. Therefore, if the network requires, for example, 20 leading zeros, the hash must start with “00000000000000000000” in its hexadecimal representation. The kitchen staff (miners) start experimenting with different secret ingredients (nonces) to create the perfect dish (block). They need to try many combinations until they find one that meets the chef’s taste requirements (leading zeros).
  6. Proof of Valid Work: Once a chef’s assistant (miner) discovers the right combination of ingredients (nonce) that meets the taste requirements (leading zeros), they present the dish to the head chef (network). The head chef quickly checks the dish to ensure it meets the specified taste, verifying that the cooking process is indeed challenging.

The likelihood of finding the lucky lottery number in this mechanism is way more difficult. Therefore, the difficulty with the leading zeroes the more hashes are required, and the hash power of all miners is reviewed.

Deflationary by Design.

This means it’s a big trouble for Miners although it’s not possible and many people around the world are doing it. The only reason is that miners are rewarded with Bitcoin which are Coinbase transactions. I believe that if someone acquired Bitcoin through mining and that value is profitable in terms of its value, it would bring more incentives for miners to cover hardware and energy costs.

It’s good to know that the total supply of Bitcoin is capped at 21 million coins, and this limit is hardcoded into the Bitcoin protocol. This scarcity is one of the features that contribute to Bitcoin’s value proposition. At the time, I am writing this article 93% of Bitcoins have been mined. Coin rewards will get smaller and smaller over time as all Bitcoins left to mine will be over!

Ethereum is one of the cryptos which has infinite supplies. However, I will try to talk about this in different articles about the issue with the Ethereum design.

Nitin J Mutkawoa https://tunnelix.com

Blogger at tunnelix.com | Founding member of cyberstorm.mu | An Aficionado Journey in Opensource & Linux – And now It's a NASDAQ touch!

You May Also Like

More From Author