Technology behind cryptocurrency mining

in hive-108451 •  4 years ago 

The term crypto mining means gaining cryptocurrencies by solving cryptographic equations through the use of computers. This process involves validating data blocks and adding transaction records to a public record (ledger) known as a blockchain.
In a more technical sense, cryptocurrency mining is a transactional process that involves the use of computers and cryptographic processes to solve complex functions and record data to a blockchain. In fact, there are entire networks of devices that are involved in cryptomining and that keep shared records via those blockchains.
And we should also understand that the cryptocurrency market itself is an alternative to the traditional banking system that we use globally. And we have two types of banks and they are centralized and decentralized systems.

Traditional Banks Are Centralized Systems,
In traditional banking, there’s a central authority that controls, maintains, and updates a centralized record (ledger). That means that every single transaction has to go through the central banking system, where it’s recorded and verified. Plus, it’s a restricted system — only a small number of organizations (banks) are allowed to connect to the centralized banking system directly.

Decentralized, which cryptocurrency is using to distribute Systems,
With cryptocurrencies, there’s no central authority, nor is there a centralized ledger. That’s because cryptocurrencies operate in a decentralized system with a distributed ledger (more on this shortly) known as blockchain. Unlike the traditional banking system, anybody can be directly connected to and participate in the cryptocurrency “system.” You can send and receive payments without going through a central bank. That’s why it’s called decentralized digital currency.
But in addition to being decentralized, cryptocurrency is also a distributed system. This means the record (ledger) of all transactions is publicly available and stored on lots of different computers. This differs from the traditional banks we mentioned which are centralized systems.

First Question
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.

Second Question <
What does mining difficulty mean?

-----The mining difficulty of a cryptocurrency such as Bitcoin indicates how difficult and time-consuming it is to find the right hash for each block.
Mining difficulty is a measurement unit used in the process of Bitcoin mining
Difficulty indicates how difficult it is to solve a complex cryptographic puzzle
The difficulty of mining new units increases or decreases over time, depending on the number of miners in the network
Increases in difficulty are necessary in order to keep the target block time
In this lesson, you will learn the basics of mining difficulty.

As a cryptocurrency like Bitcoin becomes more popular, the number of computers participating in its peer-to-peer network increases. Miners compete against each other for limited block rewards. With more participants and more computing power, the so-called “hashpower” of the entire network increases accordingly.

To maintain the time it takes to process one block at around 10 minutes, difficulty has to be adjusted periodically.
Mining difficulty in the Bitcoin network is adjusted automatically after 2,016 blocks have been mined in the network. An adjustment of difficulty upwards or downwards depends on the number of participants in the mining network and their combined hashpower
Because the difficulty is rising continually, miners join forces in Bitcoin mining pools and solve the mathematical puzzles together. The first individual miner or the mining pool that finds the right hash gets the block .

After all 21 million bitcoins have been mined, miners will still need to contribute to the Bitcoin network in order to keep it running. New blocks will still be generated, but the rewards will change. Instead of getting new coins as a block reward, miners will receive a share of the transaction fees spent by people who send transactions within the network.

The level of Bitcoin mining difficulty is increases or decreases according to the ease of mining within the protocol. Bitcoin needs to have a consistent block time of 10 minutes. In other words, new BTC can be injected into the circulating supply every 10 minutes. To make sure that this timing doesn’t change the Bitcoin protocol which Increases the network difficulty when it becomes easier for miners to mine.
Decrease network difficulty when it becomes harder for miners to mine.
The Bitcoin network has a universal block difficulty. All valid blocks must have a hash below the target. Mining pools also have a pool-specific share difficulty setting a lower limit for shares.

One of the critical metrics in judging the health of a proof-of-work network is hash rate. Simply put, hashrate shows you how powerful the miners are within the network. The Higher the bitcoin network hashrate, the higher it’s overall security and speed. However, these networks need to keep their hashrate under control for consistent block production. This is why, when hashrate becomes high, the bitcoin difficulty eventually gets higher as well, making it tougher for miners to mine easily within the network.

And If Bitcoin’s hashrate decreases, the network difficulty will reduce as well. Hashrate may decrease because of the following reasons:

  1. Bitcoin currently has a high difficulty, which is why the miners are having a tough time mining in the system.
  2. The price of BTC went down, which is why a lot of miners quit mining.

Around March 26, the network difficulty fell by 16% from 16.55 trillion to 13.9 trillion. This was the largest crash in network difficulty since early 2013. because of Bitcoin’s price crash, which forced a lot of miners to quit operations.

calculations of difficultty
Bitcoin’s network difficulty changes every 2016 blocks. [Amber Rosic]

[ ]

Untitled-design-2020-10-26T132322.399-450x300.png

Third Question
What are the challenge for crypto currency miners <

  1. Crypto miners can opt for less power-intensive protocols. One of them is the Proof of Stake (PoS) consensus that secures networks through the staking of crypto.

  2. Lack of Electricity: Running your mining activities on mining facilities and mining data centers that are powered by energy

  3. Vulnerability to Cryptojacking : so what to do is by creating a space, using decentralization is to assure security,

  4. Centralization: but we can use ASICs method

ASICs have proven adept at solely mining a specific cryptocurrency. They are so powerful that once a coin-specific ASIC is released,
People can buy bitcoins by exchanging their respective currencies.
[Ejeofor Francis ]

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!