BeInNews Academy Ltd © Street: Suite 1701 – 02A, 17/F, 625 King’s Road, North Point. Hong Kong.
Mining is the process that allows transactions to be verified, new information to be added to the database and new coins to be released into circulation. Mining is important because it enables cryptocurrencies to function as a decentralized peer-to-peer network.
Although not all cryptocurrencies use mining, Bitcoin is the most widely used example of a mineable cryptocurrency.
Bitcoin uses a blockchain that is regulated by a network of nodes; in this context, there are two types of node:
Miners race against each other to solve complex mathematical problems. Once a miner has found the solution, they will share it with the rest of the network so that they can verify the solution and confirm the addition of the block.
Miners must find the number, that when combined with the hash function will produce a number within a specific range.
In simple terms, a hash function is a series of algorithms that you can apply to data and produce a single ‘hash’ – (a hash is just a number). There are basic hash functions and cryptographic hash functions, the latter of which are used in blockchain.
In every bitcoin, there is a special part of the block that can be filled with a random number, also known as a nonce (“number only used once”). Each miner takes information from blocks they already know about (from the memory pool) and builds a block out of them. Once they have hashed every transaction, they are organized into pairs and hashed again to form what we call a ‘Merkle Tree’ or ‘hash tree’. This process is repeated until they have one single hash that represents all of the previous hashes; this is also referred to as the ‘root hash’. Basically, to solve the hash, the miner must, through trial and error, work out which sequence of numbers to use as the nonce.
If the output from the algorithm is smaller than the target number, then it will be considered valid and can be accepted by the rest of the network. If the hash of the block is bigger than the target number, the miner must alter the data going into the hash function until they find the correct answer.
In theory, people could also get to the correct output value by changing the transaction details existing in the blockchain, that’s why Proof of work and proof of stake are both ways of achieving trustless and distributed consensus on the blockchain. Many... More is necessary, and the miner must share the answer with the other nodes for them to check. Once a miner finds an answer that meets the ‘hash is smaller than target number’ rule, the miner will share the answer with the other nodes for them to verify.
The difficulty level of the puzzle is determined by the number of users and the computational power of the network. As more miners join, the difficulty level of the puzzle increases to compensate so that the rate of block creation doesn’t increase. This ensures a steady currency production; currently, the average time of a block formation is 10 minutes.
For each block successfully mined, the miner is rewarded with cryptocurrency. To ensure a steady supply, the reward amount is halving every 210,000 blocks (which roughly takes four years). As of October 2019, 18 million bitcoins out of the total 21 million have been mined.
Although this current mining system helps to secure the network against attacks, mining requires expensive computer hardware that consumes a considerable amount of energy. Many alternative consensus methods are being developed to try and overcome this, and some cryptocurrencies may get rid of mining altogether.
If you want to learn more about the practicalities of mining please take a look at our articles on the easiest ways to mine and the most profitable crypto to mine. Here you can find all the information you need to get you started!