Proof of Work in Mining - Part 1

etheros.io
Etheros
Published in
7 min readOct 20, 2022

Mining

Mining is the method used in blockchain to group transactions in a block, add that block to the digital ledger, and announce that new block to the network. Mining ensures the maintenance of the consensus mechanism and the decentralization of the blockchain.

Mining Algorithms

Proof-of-Work blockchains include search algorithms or cryptographic hash functions, which download a block as input and create a small result (output). The hash function was created so that a miner has to store hash files until they achieve the desired result. Read on — I’ll show you how this works. A miner has to execute that task millions or billions of times to complete the task, which requires proper equipment, electric energy, and time.

In the case of Bitcoin, the mining hash function is SHA256, and the platform uses the mechanism of double SHA256 processing to boost security. Ethereum uses Ethash or Dagger-Hashimoto Keccak. Different Proof-of-Work blockchains employ different algorithms, but the most important ones include:

SHA256 — the 256-bit Secure Hashing Algorithm can be dug by general-purpose processors and is used by such cryptocurrencies as Bitcoin, Bytecoin, Peercoin or Namecoin. SHA256 is a very simple logical operation. Simple functions of this sort can be implemented in the ASIC digital logic, thus creating highly efficient mining equipment.

Ethash — Ethash is an algorithm searching for Proof of Work in Ethereum. As it requires more memory, graphics processing units offer a more efficient hash rate. Ethash can be mined using ASIC diggers. Blockchains using this algorithm include Ethereum and Ethereum Classic.

X11 — Dash programmers have created the X11 algorithm, which is one of the safest. ASIC diggers can also mine X11. Some of the cryptocurrencies using this algorithm are Dash, Karmacoin, and MonetaryUnit.

Scrypt — Scrypt is one of the commonly employed mining algorithms as well. It is faster than SHA256, and the leading distributed ledgers using it are Dogecoin, Litecoin, Potcoin, MidasCoin, and Gulden. Talking about Scrypt: I’ve completed my very first Dogecoin course. Check it out!

Cryptonight — yet another Proof-of-Work algorithm with a fancy name. It has been designed to be highly efficient during CPU mining. It is used by Monero, Dashcoin, DigitalNote, or Bytecoin.

Mining bears three names: CPU, GPU, and ASIC.

CPU, GPU, and ASIC mining react to different blockchain algorithms in different ways. Some algorithms are easier to dig (i.e., have a better hash rate) with a CPU — more versatile, GPU — more resource-consuming for more simple computations and better for memory-intense algorithms, or ASIC — designed for specific purposes. Although effective, ASIC diggers carry some drawbacks. Some blockchain programmers have tried to update the protocols to make them resistant to ASICs, i.e., impossible to mine with ASIC equipment. When this happens, ASIC diggers become useless as they have been designed for a specific algorithm and can’t perform any other tasks. Some blockchain programmers claim that ASIC devices may lead to more centralization.

Proof of Work

Miners have to compute a complex math problem in Bitcoin or another blockchain using the Proof-of-Work consensus mechanism. It’s a bit like trying to guess the number of the winning ticket in a lottery. When a node wins “the lottery”, it announces the result to the other nodes, and a new block is attached to the chain. The difficulty of the lottery is adjusted so that the total computing power of a miner generates one Bitcoin block every 10 minutes on average. Let’s say the number of the miners or the computing power in the network increases: the math difficulty will go up to ensure the predictability of coin distribution/supply and block production. In such a case, the proof of the difficulty of work is adjusted when more people join or leave the network.

Mining Bitcoin

In other distributed ledgers, such as Ethereum, blocks can be added at a different rate. For instance, a new block in Ethereum is added every 15 seconds. The Proof of Work can be seen as a sequence of data difficult to generate (it’s time- and resource-consuming). Still, when the solution is finally revealed, the other network users can easily verify it. One of the reasons for which adding a new block to a blockchain requires some work is security improvement. Every miner has to solve a cryptographic puzzle to add a new block, but if it were too easy, any hacker could quickly try to add new blocks or modify the blockchain for their benefit. The Proof-of-Work consensus makes Bitcoin the most secure public network ever created in the history of humankind.

The math problem is nothing more than guessing the nonce, or a long sequence of numbers, by way of making millions or billions of trial-and-error iterations. It’s about brute-forcing the result. A miner has to guess a nonce, append it to the hash of the current header, rehash the value and compare this to the target hash. You must’ve heard about the mining difficulty as well. It’s mostly a measure of how hard it is to find a new block or, in other words, how rare the nonce is […]. I’ve always thought that it’s pretty funny when people say that miners “solve a very complex math problem” while all they’re trying to do is to guess a number “in a lottery.” Miners are not Einsteins! They’re not trying to find the mathematical wonders of the universe.

In most public blockchains, miners receive a block reward for their work. This reward will most likely cover their equipment costs and electricity bills and is an incentive for further participation in this network maintenance process. In 2021, the reward for a Bitcoin block is BTC 6.25 and will stay at this level until 2024, that is until the next halving (a reduction of the mining reward by fifty percent, which occurs more or less every 4th year or, to be more exact, every 210,000 blocks). So in 2024, the reward for a Bitcoin block will be BTC 3.125. In 2028 it will go down to BTC 1.5625 and so on. The total Bitcoin supply is limited to 21 million and the last coin will be dug in 2140.

Mining Block

The Proof of Work is mostly used by permissionless blockchains, where every individual can add a node to the platform and the identity of the nodes is unknown in the network. Therefore, the consensus mechanism is required as it allows the nodes to cooperate in a trustless manner.

The Proof of Work accounts for 90% of the total market cap of the cryptocurrencies present today. It requires work from nodes, which participate in the block validation process, to carry out the complicated work. In addition, miners need some incentive to do their job. We’ll also see that mining one block in the Bitcoin network requires many quadrillion calculations. Therefore, miners receive a bonus for the block reward, transaction fees, or both in all Proof-of-Work blockchains.

The economic stimulus behind the Proof of Work is the perfect example of keeping consensus in a fully decentralized network. A node/miner in a blockchain requires equipment, electric energy, and time, but they receive a reward if nodes play by the rules, i.e., the consensus mechanism. If nodes try to attack the network, manipulate data, or commit double-spending, they will not get the reward and waste their resources.

In 2020, miners obtained around 7 billion dollars in Bitcoins as block rewards and approximately 800 million dollars in transaction fees paid by users. Nice, right? Being a miner is hard work, though.

Advantages of the Proof of Work:

  • • Network scalability (in terms of the number of the nodes)
  • • Security increases as the number of the nodes goes up, i.e., the larger the mining community, the more secure the network
  • • Miners receive incentives in exchange for contributing their computing power to the network
  • • very secure for the most part

Disadvantages of the Proof of Work:

  • • Vulnerable to the 51% attack (in the case of small PoW blockchains)
  • • Mining difficulty usually becomes higher and higher, and the mining equipment goes out of date pretty quickly (the profitability may drop down to zero over three years)
  • • Mining is costly and usually requires specialized devices for it to be profitable
  • • Requires enormous amounts of electric energy
  • • Proof-of-Work blockchains generally have a low throughput (studies show that they can get up to 60 transactions per second without compromising security)
  • • Blockchain transaction verification needs time depending on the employed blockchain protocol. Therefore, waiting for 10 to 20 minutes (1 or 2 blocks) is advised until the given transaction is verified/validated in the Bitcoin network, or 5 minutes (around 20 blocks) in the Ethereum platform. On the other hand, Dogecoin blocks are mined every minute.

Do you want to know what’s coming next and whether POW can make a difference in the context of the whole world of the Etheros metaverse? Welcome to the second part of POW in which we will focus on the remaining critical proof-of-work issues.

Etheros Links

Twitter — https://twitter.com/EtherosIo

Telegram Community — https://t.me/Etherosio

Medium — https://medium.com/etheros

Reddit — https://www.reddit.com/r/Etheros

Telegram Official — https://t.me/EtherosioOfficial

Linkedin — https://www.linkedin.com/company/etherosio

Instagram — https://www.instagram.com/etheros.io/

Facebook — https://www.facebook.com/etherosio

--

--

etheros.io
Etheros

Etheros is Your new decentralized world! It’s a new decentralized platform that’s going to revolutionize your value! It’s a visual world for Ethereum.