What is cryptocurrency mining? Cryptocurrency mining is a key element that allows cryptocurrency to serve as a peer-to-peer decentralized network without the intervention of a third-party central authority. This is a process used to introduce new currency into the existing circulating supply. How does it work? In this process, transactions between users are verified and added to the blockchain public ledger. In addition, this is also a process of introducing new coins into the existing circulating supply. How does it work? Miners are nodes in the network. They collect transactions and organize them into blocks. Whenever a transaction is made, the secondary node receives and verifies the transaction, then adds them to the memory pool, and starts to assemble them into multiple transaction blocks. The first step in the block mining process is to hash each transaction in the memory pool before starting the process.
The secondary node adds the address they use to obtain mining rewards in the transaction. We call this transaction a coinbase transaction. This is a transaction that creates currency out of thin air. In most cases, this is also the first transaction in a new block. After hashing each transaction, these hash values are organized into miracle trees or hash trees, which means that the hash values are organized into pairs, and then we hash again until we reach the top of the tree. This is also called the root hash or merkel root, the root hash of the previous block and a random number named nonce. Then put it into the block header and hash the block header to generate a block identifier. The block identifier must be less than a certain target value set by the protocol. In other words, the blog header hash must start with a certain number of zeros. This target value is also called the hash difficulty scale, ensuring that the rate of creating new blocks is proportional to the amount of hash power in the network.
The miner continuously hashes the block header by iterating the nonce. Until a miner in the network finally generates a valid hash, when a valid hash is generated, the discoverer node will broadcast the block to the network. All other nodes will check whether the hash is valid, add the block to their copy of the blockchain, and then continue to mine the next block. However, sometimes there will be a situation where two miners broadcast a valid block at the same time, and then there will eventually be two competing blocks in the network. Miners start to mine the next block based on the block they received first. The competition between these blocks will continue to the next block until any one of the competing blocks is mined.
Abandoned blocks are called isolated blocks or stale blocks, and the miners of this block will switch to the chain of winning blocks for mining. The block reward will be given to the miner who finds a valid hash first, and the probability of finding a hash is proportional to the total mining capacity on the network. Miners with a small portion of mining rights rarely have a chance to discover their next block.
The mining pool was created to solve this problem, which means that miners pool resources together. Share their processing power through the network , and distribute each person in the reward pool fairly according to the amount of work they have done to find the possibility of a block . Stay tuned for more content and don’t forget to check out our other videos at Binance Academy..