Secret of Bitcoin IV: What do miners mine? - DotWallet

Secret of Bitcoin IV: What do miners mine?
2020.10.16

Author: Linzheming

 

Review

In the previous article Secret of Bitcoin III: High Volumes of Transactions, we knew that UTXO structure was adopted to deal with massive transactions, and introduced another important role -- miner, also known as node operator. Now I am going to introduce in the perspective of a miner to tell you what miners are doing.

 

 

Outline

 

Block Rewards (Block Incentives)

According to the definition of bitcoin code, bitcoins have been minted since the release of code. Initially, when a miner solved a hash puzzle of PoW using hashrate, he would be rewarded. It is known to all that a block reward was 50 bitcoins at first. Every 210,000 blocks mined, or about every four years, rewards given to bitcoin miners diminish by half of the previous rewards (Bitcoin Halving). This is why bitcoin is more difficult to mine.

 

Meanwhile, the difference part between input quantity and the output quantity is defined as handling fees that miners can obtain whilst they obtain block incentive. As time goes on, transaction volume increases in line with handling fees while block incentives reduce. We may regard block incentives as rewards to stimulate node operators in maintaining network when transaction volume and handling fees are insufficient.

 

Transaction Handling Fees

As block rewards decrease geometrically, transaction handling fees are becoming more crucial. We regard block rewards and all transaction handling fees as the total revenue for a miner to pack, and divide by the total number of transactions or bytes served to get an average fee rate (that is the transaction costs used in bitcoin network).

 

When transaction volume increases, the average fee rate decreases. With the increase of transaction volume, the packing cost for each transaction will approach the marginal cost being proceeded. Transaction cost will gradually decrease along with the competitions between miners and technology progress.

 

Bounty Script

One easily overlooked part is that node operator can find the possible existing mining bounty reward by monitoring every transaction. This bounty can be set for special miners or all miners -- if a legitimate unlock script is constructed, the transaction receiving the bounty will be packed into a legitimate block.

 

The bounty script can be constructed by SIGHASH. The SIGHASH of SIGHASH_NONE|SIGHASH_ANYONECANPAY indicates that when OP_CHECHSIG / OP_CHECKSIGVERIFY in the script is executed for signature verification, no output will be signed, only the current input can be signed.    

 

In this way, the first person who gets the transaction can obtain bounty reward by script execution. And he spreads the transaction to network, honest miners will broadcast it as it is. The broadcasting is so quick that dishonest miners can’t claim bounty by changing output.

 

Block Maturity

After a transaction processor packed a block successfully, he can not obtain (spend) the incentive. It takes 100 blocks (maturity) before the coinbase transaction can be used. The method is adopted to prevent losses caused by receiving a new isolated coin during the short-term block fork process.

 

However, someone would have a doubt. Is payment secure before the block maturity with 100 block confirmations? Let’s think about this for a second. As I have mentioned before bitcoin transaction is a chain of digit signatures. Transactions are secured by digit signatures instead of ledgers. Therefore, if double-spending appears during transaction, it could only be the problem from the owner of private key. Normally, transaction can’t be double-spent by node operators without the assistance of the owner of private key. Double-spending can be detected in the form of regression and reorganization in short term. Node operators can not finish this process privately because of their great needs in resources. As a result, it’s necessary to protect block maturity.

 

Reorganization of Block- Hashrate Competition

We have mentioned short-term block forks before, as bitcoin transaction order differs in the perspectives of the whole network, reaching a consensus in short time is costly. Therefore, 10-minute block generation time is not exactly 10 minutes. It’s possible to generate the next block in a few seconds. At this point, there will be a short-lived fork, and a consensus will be reached when a winner appears. However, the block may also experience a long-term reorganization or even become an irreversible fork.

 

Let’s stop here, we will talk about fierce competitions between node operators in the next chapter.

 

 

 


 

■ ■■■■

 

Collaboration

(WeChat ID:Mempool-q)

(Telegram:@Elvira1106

 

 

Customer service

(WeChat ID:Dot_Wallet)

(Telegram:@DotWallet2020

 

■ ■■■■

 

For more information please visit

 

▼▼▼

 

website:www.dotwallet.com

Weibo: @打点钱包DotWallet

telegram:@DotWallet

Twitter: @wallet_dot