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.
Mining Pools.
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.
Related posts
Global | Didi Angaye Earns A Distinction Award, Another Feather To The Cap
On a bright sunny day, in the month of July, 2024, the prestigious Staffordshire University located in the West Midlands of England organised its Award giving and Graduation ceremony to honour graduates of various educational programmes and courses which it offers. Didi Timipah Angaye,…
Olu Of Warri Bags Award In UK, Wife Advocates Return To Cultural Values
The Olu of Warri, Ogiame Atuwatse III, has received the Leadership and Community Development award at the 14th African Achievers Awards (AAA), which took place at the Parliament House, United Kingdom. The award was presented by a member of the House of Lords, London, Rt…
Brit Awards | Asake, Burna Boy And Other ‘New Cats’ Get Nominations
Nigerian singers Burna Boy, Asake, and Rema have been nominated for the 2024 Brit Awards. The nomination list for the annual music awards show was released on Wednesday 25, January 2024. Burna Boy and Asake made the ‘Best International Artiste’ category, while ‘Calm…
Brit Awards 2024 | The Full List Of Artist(e)s
This year’s Brits nominees have been revealed ahead of the ceremony in London in March. Dua Lipa is the first star confirmed to perform at the event – but how many awards is she up for? Musicians including Raye, Central Cee, J Hus and Blur are also…
Despite Increased Transfer Volume And Institutional Adoption, Bitcoin Stays Below $60K
Bitcoin’s price hovers around $59K as increased transfer volume indicates a stable demand among investors. CryptoQuant data indicates buyers are absorbing the panic selling pressure around the $57K price level. Bitwise’s latest report suggests that institutional investors are still buying Bitcoin despite the recent price…
Traders Focus On Meme Coins As Bitcoin, Ethereum And XRP Erase Recent Gains
Bitcoin, Ethereum and XRP dip under key support levels at $60,000, $2,600 and $0.60 respectively. Tron ecosystem’s meme launchpad SunPump generates over $1.1 million in revenue within twelve days of its launch. Tron network daily revenue reached a record high of $26.83 million on Tuesday,…
Top 10 Cryptocurrencies To Invest in January 2024
-Michael Adams From Bitcoin and Ethereum to Dogecoin and Tether, there are thousands of different cryptocurrencies, making it overwhelming when you’re first getting started in the world of crypto. To help you get your bearings, these are the top 10 cryptocurrencies based on their market…
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…