What is “Mining” with regards to Cryptocurrencies and Blockchain?
Before Blockchain and Cryptocurrencies were introduced to the world, we understood mining as the process of obtaining coal or other minerals from a mine/ earth. The major point to remember here is:
· Mining is not easy; it takes a lot of effort to mine these minerals from earth.
· Costs a lot and is not easy (manpower, huge machinery, bomb experts, trucks/ loaders, etc.)
· Finally extract these minerals as rewards for the mining company
Now cut to 2009 when Bitcoin was launched by Satoshi Nakamoto. This was the first ever Cryptocurrency and also the first ever Blockchain platform.
Blockchain is a series of Blocks that are chained to each other by some way. New blocks are generated in the network after a certain time interval (in Bitcoin new Blocks are generated every 10 minutes on an average).
You can see in the above diagram Blocks are connected to each other. Each Block has a Block Header which contains information about the data it stores, and also it takes information from the previous Block’s Header. Which means that:
1. Block 1 has information from Block 0.
2. Block 2 has information from Block 1 (and hence information of Block 0 as well).
3. Block 3 has information from Block 2 (and hence information of Block 0 and 1 as well).
4. Similarly, Block “n” will have information of all “n — 1” blocks and so on.
5. Thus, you can understand that each new Block in any Blockchain contains information of all the blocks that were created before it.
These Blocks as you can see in the diagram contains transactions. The transactions become final only when they become part of a valid Block. An example of a transaction in Bitcoin network is: Alice transferring 5 Bitcoins to Bob.
But how are these Blocks created?
Blockchain is a distributed network with many nodes together forming a single system. There is no single owner of this network, rather the entire network together come to a consensus on every decision that is to be made (majority wins).
So how do they achieve consensus? Through different consensus mechanisms like Proof of Work (PoW), Proof of Stake (PoS), etc. (Bitcoin uses PoW as its consensus mechanism). These consensus algorithms are sort of puzzles (program based) that needs to be solved by nodes in the network in order to form Blocks.
These puzzles or problems can be easy or difficult to solve, it depends on what kind of platform you are on. Since Public Blockchain networks have a lot of nodes and participants, the consensus algorithms implemented are very complex and difficult to solve. But, on Private Blockchain platforms since parties are less and already known to each other, they have comparatively easier puzzles to solve.
Since these puzzles are difficult to solve on Public Blockchain platforms (like Bitcoin, Ethereum, Litecoin, Zcash, etc.) this process is generally associated with a reward. Which means that, whoever solves the puzzle in these networks first, they are rewarded with native Crypto Tokens.
For Example: In Bitcoin network whichever node solves the PoW puzzle first will be rewarded with certain number of Bitcoins. Currently this reward is of 12.5 Bitcoins per block (it is halved every 4 years in Bitcoin network).
On platforms like Bitcoin, Ethereum, etc. “solving these consensus puzzles” is the only way to generate new tokens (like Bitcoins, Ethers, etc.). This means that when a new Block is produced in Bitcoin network, it also produces new Bitcoins in the network (currently 12.5 Bitcoin per block), and this is the only way new Bitcoins can be minted in the network (no other way).
Proof of Work is one of the most complex (but also very robust) consensus mechanisms available today. In order to solve this puzzle, nodes have to do Billions and Billions of calculations very quickly. These nodes compete against each other, because whoever solves the puzzle first, the chances of their block getting accepted by the network is the highest. And, whoever wins gets the reward (12.5 Bitcoins currently).
These Billions of calculations that these nodes have to do, costs a lot of computing and electrical power. There are special GPUs and AISEC Chips that are manufactured today just for solving this PoW puzzle (which are very costly). These processors consume a lot of electrical power. Just to give you an idea, Bitcoin mining alone uses ~0.29% of the World electrical power (Huge!!!).
So, in order to produce a new Blocks in such networks:
· A node has to do a lot of work.
· Costs a lot and is not easy.
· Only way to generates new Tokens on many Public Blockchain platforms like Bitcoin, Ethereum, etc.
So, What is Mining?
You can see that these characteristic of producing Blocks resembles a lot with actual mining of minerals as we discussed at the beginning of this article. Thus, this term mining was associated with Cryptocurrencies as well. And, whoever does this mining can be called as a miner.
All the nodes in a Public Blockchain network are considered homogenous and thus each node is free to compete in the process of producing new block i.e. anyone can be a miner (he will be able to successfully mine or not, depends on the computing power he/ she has).
While on Private Blockchain platforms, this term mining is not of much value, because these platforms do not have any Cryptocurrency associated with them. The main agenda of Private Blockchains is to produce new blocks, and not mine new coins. Also, mining is permissioned i.e. only allowed to selected nodes in the network. Thus, the consensus algorithms implemented on these Private Blockchains are a lot simpler than those in Public Blockchains. Some examples of consensus algorithms implemented in Private Blockchains are: Voting, Round Robin, PBFT, Ordering Service, etc.
On Public Blockchains — mining is the same as saying:
· Producing Blocks
· Solving Consensus Puzzle
· Generating new Coins
— — — — — — — — — — — — — — — — — — — — — — — — — — — —
BlockDigest is one company that is focused on training and educating people on Blockchain. Apart from classroom trainings, they have a variety of Blockchain courses on their website: https://blockdigest.thinkific.com/
There are several courses to choose from like:
Certified Blockchain Professional
Certified Ethereum Smart Contract Developer
For any other queries or issues you can email at: blockdigest@gmail.com