Secret of Bitcoin V: Hashrate Voting and Competitions - DotWallet

Secret of Bitcoin V: Hashrate Voting and Competitions
2020.11.11

Author: Linzheming

Review

 

In the previous article Secret of Bitcoin IV: What do miners do?, I have introduced the sources of revenues that node operators can obtain when they are packing. Today I am going to introduce fierce competitions and games for the rights to pack block between node operators.

 

Outline

 

Mining Revenues

Mining revenue is obtained by the block constructor who makes the first transaction called coinbase transaction.Let’s review the composition of transaction, input of coinbase transaction can be any character, and the output amount includes block rewards / block handling fees.Coinbase transaction output can be transferred only after 100-block maturation, then node operator can claim real mining revenue.Therefore, we may regard a bitcoin competition as a race to get over 100 block votes.

 

Voting

Block chain is a hash chain with a hash used in the previous block header in each block. When a hash operator finishes constructing a block template based on the received verified transaction, he will send the block template to a hashrate operator. And he will cooperate with the hashrate operator on the block template by using hashrate to vote. Hashrate vote here indicates that node operator has accepted the previous block and is willing to pay sunk costs to extend the blockchain that consists of the previous block.

 

Why does not each node operator reject the blockchain submitted by others and only extend his own blockchain? A node operator judges through his own methods, the block accepted by the vast majority of hash power of the system is more likely to become the blockchain (the longest chain) where the next block is located. Therefore, if the node operator doesn’t accept this block, instead, he mines in the block packed by himself (assuming it is the previous block of this block), the probability of being part of the longest chain is low in mathematical expectation. As a result, when a legal block that is expected to be accepted by the majority of hashrate is discovered, it’s rational to accept this block and continue to vote on the extension of this legal block instead of rejecting it and voting for the previous block.

 

The main expectation here is the choice of the highest rate.

 

The first to find or the first to verify

What is the choice of the highest rate in the untrustworthy network? Following the newly discovered blocks blindly is one of the most initiative method. However, will the newly discovered block be accepted by the other hashrate faster? In the process of mining, we also found that some blocks were discovered first while they didn’t become parts of the longest blockchain. According to the mining principle, vote on the new block with hashrate comes after a block is discovered and verified. Therefore, we need to consider the verification time of this block at the same time. The block discovered first is not necessarily to be the most likely candidate for the blockchain ledger, and the block that is first verified by other hashrate operators is more likely to be part of the longest chain of the blockchain ledger.

 

When block competitions of different versions appear on the network, we need to figure out the amount of hashrate behind these versions which is estimated by the number of blocks mined from different node operators. The amount can not be tampered with or hid that shows the choice of the highest rate objectively. Node operators can adopt Miner ID technology to add some immutable information of identities. Here they can list information about the node operator's access way, and later, use the asymmetric encryption technology of public and private keys to deliver information that is exclusive for the node operator.

 

In this way, we can: 1. Obtain the approximate hashrate ratio of the node operators through the block information; 2. Obtain the voting block information by querying the information of different node operators. We will calculate the possibilities of blocks of different versions to become the longest chain at the same level. At the point, it is available for the specific node operators to vote for any legal blocks. Any new block found at the moment will impact the balance of victory. However, as broadcasting and verification takes time, node operators should consider other node operators who vote on competitions of different versions, and extra processing costs on the branch of a block. Even if the branch is extended successfully, it takes greater costs to win supports the vast majority of hashrate. And it may be defeated by the branch of the hashrate with the highest vote rate. Finally, a branch version with a majority of the votes will have a slightly higher chance of winning.

 

Orphan Block

From the analysis above, we can see with the gradual increase of blocks and transactions to be processed, more blocks will be discovered. However, node operator lost hashrate competition and here comes the orphan block rate due to the delay in transmission verification. If the block is smaller and and the transactions are fewer, the delay caused by the cost of transmission verification will be less frequent or even negligible, and there will be smaller orphan blocks.

 

However, are orphan blocks harmful? From an individual point of view, node operators "lost" some revenues due to orphan blocks. But if node operators have the same loss on average, it is fair to every node operator. And they will have the motivation to reduce orphan block rate by improving connectivity, increasing verification speed, balancing handling fee income, block size and so forth. With a below-average orphan block rate and above-average fee incomes, node operators will gain more.

 

For blockchain users, I stress that the transaction chain is the core, and the blockchain is just a different ledger. Orphan blocks will not affect users’ transactions. At the same time, it is also necessary for users to detect possible block forks and to query the status of transactions being packed by different blocks on the network. This part of the query can be completed by directly querying the access point of the node operator who packed the packed block. This is what the Merchant API needs to provide. Our users or payment service providers will be able to query the ownership of different block headers through MinerID, and query the status of each transaction concerned through the corresponding Merchant API.

 

Honest Node

The word ‘Honest’ is mentioned many times in white paper. If there are different block versions, sequence of transaction will be different, even the transaction versions will be different, which means double-spending transactions with the same UTXO will appear. What does that mean?

 

There are different versions of a transaction. Different node operators receive different versions.

There is only one version of the transaction at first, the node operator hides the double-spending version and double-spends when it is packed.

There is only one version of the transaction at first, and the node operator packs different versions of the transaction with its plasticity.

If the user or payment service provider uses the Bitcoin ledger correctly, they can contact the node operator as much as possible to check the status of the transaction. If there is only one version in a transaction, the version is most likely to be packed in the next block. If there are multiple versions of the transaction, it is obvious that the sender has attempted to double spend.

 

For the case 2 and 3, when the transaction is sent to all node operators, double-spending cannot be detected. However, judging from the result of the packed block by the node operator, a double-spending version appeared. As these node operators follow a first-come, first-served strategy for transactions, there wasn’t any double-spending in transactions at the beginning, which contradicts the subsequent packaging result. This contradiction is a manifestation of node dishonesty.

 

Dishonest nodes damage the security and stability of the whole bitcoin network. Since they have guaranteed the digit signatures to public, they will be detected and boycotted by honest nodes.

 

Therefore, as 100 blocks maturity is required, nodes who packed a double-spending transaction will give up block incentive of that part, and honest nodes can organize a block chain of honest ledgers.

 

That is an important basis for bitcoin to become the only immutable source of truth in the world.

 

 

■ ■■■■

 

Collaboration

 

(WeChat ID:Mempool-q)

(Telegram:@Elvira1106

 

 

Customer service

 

(UTC+8) 9:00-19:00

(WeChat ID:dot_wallet)

Official English Telegram Group: t.me/dotwallet