Cryptocurrency mining is the process in which transactions between users are verified and added into the blockchain public ledger. The process of mining is also responsible for introducing new coins into the existing circulating supply and is one of the key elements that allow cryptocurrencies to work as a peer-to-peer decentralized network, without the need for a third party central authority.
Bitcoin is the most popular and well-established example of a mineable cryptocurrency, but it is worth noting that not all cryptocurrencies are mineable. Bitcoin mining is based on a consensus algorithm called Proof of Work.
How does it work?
A miner is a node in the network that collects transactions and organizes them into blocks. Whenever transactions are made, all network nodes receive them and verify their validity. Then, miner nodes gather these transactions from the memory pool and begin assembling them into a block (candidate block).
The first step of mining a block is to individually hash each transaction taken from the memory pool, but before starting the process, the miner node adds a transaction where they send themselves the mining reward (block reward). This transaction is referred to as the coinbase transaction, which is a transaction where coins get created ‘out of thin air’ and, in most cases, is the first transaction to be recorded in a new block.
After every transaction is hashed, the hashes are then organized into something called a Merkle Tree (or a hash tree) – which is formed by organizing the various transaction hashes into pairs and then hashing them.The outputs are then organized into pairs and hashed once again, and the process is repeated until “the top of the tree” is reached. The top of the tree is also called a root hash (or Merkle root) and is basically a single hash that represents all the previous hashes that were used to generate it.
The root hash – along with the hash of the previous block and a random number called nonce – is then placed into the block’s header. The block header is then hashed producing an output based on those elements (root hash, previous block’s hash, and nonce) plus a few other parameters. The resulting output is the block hash and will serve as the identifier of the newly generated block (candidate block).
In order to be considered valid, the output (block hash) must be less than a certain target value that is determined by the protocol. In other words, the block hash must start with a certain number of zeros.
The target value – also known as the hashing difficulty – is regularly adjusted by the protocol, ensuring that the rate at which new blocks are created remains constant and proportional to the amount of hashing power devoted to the network.
Therefore, every time new miners join the network and competition increases, the hashing difficulty will raise, preventing the average block time from decreasing. In contrast, if miners decide to leave the network, the hashing difficulty will go down, keeping the block time constant even though there is less computational power dedicated to the network.
The process of mining requires miners to keep hashing the block header over and over again, by iterating through the nonce until one in the network miner eventually produces a valid block hash. When a valid hash is found, the founder node will broadcast the block to the network. All other nodes will check if the hash is valid and, if so, add the block into their copy of the blockchain and move on to mining the next block.
However, it sometimes happens that two miners broadcast a valid block at the same time and the network ends up with two competing blocks. Miners start to mine the next block based on the block they received first. The competition between these blocks will continue until the next block is mined based on either one of the competing blocks. The block that gets abandoned is called an orphan block or a stale block. The miners of this block will switch back to mining the chain of the winner block.
While the block reward is granted to the miner who discovers the valid hash first, the probability of finding the hash is equal to the portion of the total mining power on the network. Miners with a small percentage of the mining power stand a very small chance of discovering the next block on their own. Mining pools are created to solve this problem. It means pooling of resources by miners, who share their processing power over a network, to split the reward equally among everyone in the pool, according to the amount of work they contribute to the probability of finding a block.
The Miss Universe-Greatest Celebration of Women
-SOFIE ZERUTO The Miss Universe Organization is a global, inclusive of organizations that celebrates all cultures, backgrounds and religions. It creates and provide a safe space for women to share their stories and drive impact personally, professionally, and philanthropically. The women who participate in this…
All Africa Music Awards; Categories and Regions
-MUSIC IN AFRICA All Africa Music Awards (also referred to as AFRIMA) is an annual awards event. The awards event was established by the International Committee AFRIMA, in collaboration with the African Union (AU) to reward and celebrate musical works, talents and creativity around the African continent while promoting…
African Acts And The Grammy Award
-FUMILAYO KANMODI African music is now getting much-deserved recognition, and talented stars have been rewarded for their hard work. One award many covet has always been the Grammy Award, and we have had African acts that have received the award. In our little way of…
Nigeria’s Former Jonathan Tells African Leaders To Put Humanity First
Joke Falaju, Abuja Bags African Heritage awardFormer President Goodluck Jonathan has urged African leaders privilege to hold public offices to become servants of the people, and not turn themselves into the “bosses of the people”.Jonathan stated this while receiving the African Democracy and Peace Icon…
The Risk And Reward Of ChatGPT In Cybersecurity
Juan is an experienced CTO with a demonstrated history of working in the computer and network security industry. He is an information technology professional skilled in SAP and Oracle applications, computer forensics, vulnerabilities research, IPS/IDS and information security. Unless you’ve been on a retreat in…
Explained – History Of Money From Fiat To Crypto
What is money? Money as a concept has been a cornerstone of human civilization and economic development. To start with the latter, money is a method of storing value and worth, and it also functions as a medium of exchange that allows individuals to exchange…
Studies Show That Nigerian Crypto Foreign Investment Is At A Record Low
Foreign direct investment in Nigeria fell by 33% last year due to a severe shortage of dollars, which discouraged crypto companies from expanding into the country. The largest economy in Africa has a foreign investment problem despite exponential growth in crypto adoption. The National Bureau…
Growing The Bitcoin Development Ecosystem In Africa
– Abubakar Nur Khalil | Bitcoin Magazine Bitcoin development in Africa, with a proper regulatory environment, could equally accelerate the continent and the technology. In this piece, we’ll be analyzing the current state of the Bitcoin developer ecosystem in Africa, ways to improve it and…