Replay attacks and Bitcoin block size expansion

Replay attacks and Bitcoin block size expansion

Chapter 0 Introduction

Ethereum is now in deep crisis of replay attacks. Will Bitcoin be like this one day?

Chapter 1 The process of upgrading the Bitcoin hard fork protocol The possibility of forking into two chains is very low

When Ethereum hard forked to produce two chains, I thought there was a problem. Because mining is difficult, it is difficult for low computing power to mine on a high-difficulty chain, so I thought that the ETH Classic chain would not be able to mine due to low computing power. But the difficulty of Ethereum is adjusted very quickly, block by block, and the block time of Ethereum is super fast, with a block produced within 15 seconds. The ETH Classic chain quickly matched the difficulty and computing power.

The possibility of Bitcoin producing a dual chain during the hard fork process is much lower than that of Ethereum. Bitcoin's computing power is too large, 1400P, and the mining difficulty is also very high. The difficulty adjustment time is 2016 blocks. If during the Bitcoin hard fork upgrade, even if 25% of the computing power insists on mining the old chain, the program lock upgrade time will generally be set to start the upgrade from the block where the difficulty has just been adjusted, that is, when the upgrade is locked, the next difficulty adjustment will not be until 2016 blocks later. How long will it take for the new chain and the old chain to mine until the normal average of 10 minutes to produce a block:

  1. The block time of the new chain before the difficulty adjustment is: 10 minutes/75%=13.33 minutes.

  2. How long does it take to mine a new chain before the difficulty is adjusted? 13.33*2016/60/24=18.662 days.

  3. The block time of the old chain before the difficulty adjustment is: 10 minutes/25%=40 minutes.

  4. How long does it take to mine the old chain before the difficulty is adjusted? 40*2016/60/24=56.0 days.

We assume that the price of the new chain and the old chain is allocated according to computing power, and assume that the price of Bitcoin before the fork was 4,200 yuan.

  1. The price of coins mined from the new chain is: 4200*75%=3150 yuan.

  2. The profit of a new chain miner for mining a block is: 12.5*3150=39375 yuan.

  3. The average profit per minute of the new chain miners is: 39375/13.33=2953.86 yuan, about 3000 yuan.

  4. The average profit per minute of one P computing power of Newchain is: 2953.86/(1400*0.75)=2.8132 yuan, about 2.8 yuan.

  5. The price of coins mined from the old chain is: 4200*25%=1050 yuan.

  6. The profit of the old chain miner for mining one block is: 12.5*1050=13125 yuan.

  7. The average profit per minute for miners on the old chain is: 13125/40=328.125 yuan, about 328 yuan.

  8. The average profit per minute of one P computing power on the old chain is: 328.12/(1400*0.25)=0.9375 yuan, about 1 yuan.

The new chain's revenue is 2.8 times that of the old chain, so miners who insist on mining the old chain are basically sentimental soldiers. They can't even mine the electricity bill, and they have to mine for 56 consecutive days, losing money for 56 consecutive days. And during these 56 days, you have to ensure that your teammates do not withdraw their computing power and defect to mine the more profitable new chain. Not to mention the possibility of being attacked by a large computing power of 51%. If miners are all rational, then the old chain basically has no conditions for survival.

And if a hard fork upgrade is performed based on 90% of the computing power, the older chain will have no chance.

However, there is another situation where the old chain can survive and even threaten the new chain with a replay attack. That is when the old chain itself initiates another hard fork to modify the difficulty.

Chapter 2 If the difficulty of the old chain modification continues to resist the upgrade

If the old chain fights back by changing the difficulty, it basically gives up its own "justice". This goes against the original intention of resisting hard forks. If you dare to change even the difficulty, then you will potentially change the upper limit of 21 million BTC as well. You dare to change everything. Such a forked branch will hardly get the support of users, and thus become an insignificant existence.

But we cannot just stop at the assumptions. We need to think carefully about the threats. There are indeed people who hold completely different ideas about the Bitcoin protocol, and the cost of such a hard fork is very low. The probability of it happening is not small, and it may definitely happen. Let's assume the following situation:

The current Bitcoin block size is 1M, and the community has been arguing about this for a long time. Basically, it is a quarrel. What if someone insists on expanding the block size to a larger size? For example, by changing the difficulty, only a small amount of computing power is needed, such as 10% of the existing computing power, to initiate a hard fork and directly expand the block size to 2M, or even 8M, or even unlimted.

What would happen then?

Chapter 3 Thought Experiment of Replay Attack on Small Block Bitcoin Main Chain

Let’s do this thought experiment. What would happen if the small computing power hard forked to a larger block in Chapter 2?

  1. We call the new chain from the hard fork Bitcoin bigger, and the original chain is still called Bitcoin core. The token of the former is called BTCg, and the latter is called BTC.

  2. Based on the experience of ETH and ETHc, there will definitely be exchanges that will list BTCg. Because for small exchanges, this is a rare opportunity to become famous and grab traffic by taking an unconventional approach.

  3. There will definitely be trading volume, and BTCg has great speculative opportunities. Look at the various altcoins on the market, even the worst ones are bought by people.

  4. Because the transaction format of Bitcoin bigger and Bitcoin core is exactly the same, the address and private key are also the same, then a replay attack will occur. Transactions on the Bitcoin bigger chain can be replayed on the Bitcoin core chain.

  5. Because the Bitcoin core block is already full of 1M. Now, the transactions on Bitcoin bigger are rebroadcasted to the Bitcoin core chain, which will definitely cause a blockage. Given that the 1M block has been running for a very long time, coupled with the replay attack, the congestion will be serious. However, Bitcoin bigger will not be congested because the block is larger and can accommodate more transactions.

  6. Due to congestion, users on the Bitcoin core chain have to increase their transaction fees in order to obtain faster confirmations, and the transaction fees are rising. However, the transaction fees on Bitcoin bigger are not high because there is no congestion.

  7. Users can initiate more transactions on Bitcoin bigger, or even malicious dust attacks, and the Bticoin core block will face long-term and serious congestion.

  8. The memory pool of the mining pool for Bitcoin core will face the pressure of bursting, and at this time, an upper limit has to be set. When the upper limit is reached, the transactions with low transaction fees will be deleted. However, Bitcoin bigger does not have this problem.

  9. As time goes by, the high transaction fees and unstable confirmation time make the user experience of Bitcoin core worse and worse. However, Bitcoin bigger, a hard forked chain with small computing power and difficulty modification, has a better user experience. Then the speculative value of BTCg will become higher and higher.

  10. The price of BTCg will rise, and the price of BTC will fall, and then it will become a vicious cycle.

Eventually Bitcoin bigger will take over, unless Bitcoin core can be upgraded to larger blocks to resolve transaction congestion.

Any modification of the transaction format of Bitcoin core in an attempt to avoid the replay attack of Bitcoin bigger is difficult to be effective, because Bitcoin bigger can also be modified accordingly. The only way is to switch the computing power of Bitcoin core to Bitcoin bigger to launch a 51% attack and completely eliminate it. But this is not in the economic interests of miners, and even faces moral pressure. It is difficult to find miners with such a spirit of sacrifice, and they must be large computing power mines. Even if such miners prevented the first Bitcoin bigger, what about the next one? After all, the cost of launching a Bitcoin bigger project is very low.

If the reasoning of this thought experiment is valid, it means that Bitcoin core will be forced to increase the block size limit. This will not be the result of consensus promotion, but a defense method after being attacked. If there is such a day, we should upgrade now.

The replay attack on Ethereum did not cause the above thoughts, and the ETH chain was not attacked by ETHc. This is because the Ethereum block does not have such a large transaction volume pressure problem as the Bitcoin block, and the amount that Ethereum can process per second is far greater than that of Bitcoin.

Chapter 4 Conclusion

Is there any way to prevent this thought experiment from happening? If not, it means that small-block Bitcoin can be brought down by a large blockchain branch through a replay attack. If that day comes, what we should do now is to upgrade to a larger block.


<<:  HkDJ

>>:  UNICEF seeks blockchain developers and consultants to improve child welfare worldwide

Recommend

What kind of face should you not marry a woman with?

For men, they would not dare to marry a woman who...

Why is Bitcoin halving a big bull market? The answers are all here

Bitcoin has been a standout recently, doubling in...

Opinion: Despite record miner sell-off, BTC could revisit $40,000 in February

Bitcoin has experienced a lot of volatility over ...

How many children are there from the palm lines?

Although family planning is advocated nowadays, i...

What does it mean if you don't have a destiny line?

In palmistry, the fate line, life line and love l...

What does the fate palace represent?

In ancient times, the Palace of Life was given gr...

How did Dogecoin become a popular coin?

At the beginning of this year, "Dogecoin soa...

The five facial features reveal one's character and destiny

The five facial features reveal one's charact...

The eyebrows that will bring bad luck are analyzed for you

Eyebrows are one of the five facial features and ...

People with this face have a bumpy emotional life

Some people always ask, why is my love life so bu...