Block timestamp protection rules of bitcoin
Block timestamp protection rules of bitcoin
Absrtact: we examine two little-known rules of bitcoin, which are used to prevent illegal miners from manipulating block timestamps to obtain unfair and high mining rewards. We discussed why it is possible to choose a constant such as the 2-hour max? Function? Block? Time value, and what specific impact that value has on the special currency cash. We conclude that bitcoin's time protection rules seem to be quite effective and admirable considering the lack of functional networks in implementing the rules._DJMINER
People may think that time is not an important consideration for bitcoin network, because each block references the hash value of the previous block, so these blocks have already been sequenced. The bitcoin block also contains transactions (inputs, outputs, and values), the Merkle tree of the derivation block head, and the block hash value itself, which are used to prove the workload. On the surface, this may be enough for trading and consistency systems. However, there is the problem of adjustment difficulty. If too many miners join the network, the block time may become too fast, or if too many miners leave, the block time may become too slow, making the network unreliable. To solve this problem, the mining difficulty is adjusted every two weeks to achieve the target time of ten minutes between blocks. Unfortunately, in order to calculate the two-week time, the concept of time needs to be introduced into the blockchain and become part of the consistency system. Therefore, the block must contain a time stamp. People can regard bitcoin as the first distributed electronic clock in the world.
When bitcoin blocks are generated, there are essentially two times involved:
1. The time in the block is placed by the miner
2. Actual time of block generation.
Of course, these two times should be almost the same. After all, miners must have reasonable and accurate clocks. Why do they lie about time?
Miners do have incentives to lie about time. For example, illegal miners may add a future timestamp. For example, if it takes 10 minutes to produce a block, a miner can claim to have taken 15 minutes by adding a five minute timestamp to the future. If this 5-minute increase continues throughout the two-week difficulty adjustment cycle, the average block time will look like 15 minutes, which is actually shorter. Then the difficulty of the next cycle may be adjusted downward, and the mining revenue will be increased due to the acceleration of block time. The problem with this approach, of course, is that the bitcoin clock continues to move further and further away from real time.
To solve or alleviate these problems, bitcoin has two mechanisms to prevent miners from tampering with time stamps.
1. Past median time (MPT) rule - timestamps must be higher than the median of the past 11 blocks. The median of 11 blocks means that six blocks can be reorganized and the time will not move backward. Some people may think that this is consistent with the example provided in the 2012 report of Meni Rosenfeld, that is, for an attacker with 10% network computing power, six confirmations are required to reduce the probability of attack success to less than 0.1%.
1. The future block time rule is based on the - max? Function? Block? Time constant. Compared with the median time from the same node, the time stamp cannot appear more than 2 hours in the future. The maximum allowable difference between the time provided by the node and the local system clock is 90 minutes (another security measure). It should be noted that unlike the above MPT rules, this is not a fully agreed rule. Blocks with timestamps that are too far in the future are invalid, but they may become effective as time moves forward.
Rule 1 ensures that the blockchain continues to move forward in time, while rule 2 ensures that the blockchain does not move too far forward. These time protection rules are not perfect. For example, a miner can still move the time stamp forward by generating a future time stamp within two weeks, but the impact of this operation is limited.
As shown in the ratio above, since two hours is only a small part of two weeks, the impact of this operation on network reliability and mining profitability may be limited. This is equivalent to reducing the time between blocks from 10 minutes to 9 minutes and 54 seconds within two weeks after difficulty adjustment. Moreover, it is only a one-time change, because once a two-hour time shift occurs, it cannot move forward again unless it moves backward first. At the same time, miners may consider the margin of safety before moving forward two hours to reduce the risk that the block will be rejected by the network.
According to our judgment, these rules have proved reasonable and effective in preventing miners from tampering with bitcoin time stamps in a malicious way.
As we first mentioned in September 2017, bitcoin cash is an alternative currency split from bitcoin in August 2017. Its main purpose is to increase the block size limit. At that time, one of the concerns of bitcoin cash developers was that many miners would not mine bitcoin cash, so the time difference between blocks might be too large. So the so-called "emergency difficulty adjustment" (EDA) was implemented to alleviate this concern. We won't discuss it in detail here, but it's enough to show that the mechanism is very complex and prove that there are fundamental flaws. This algorithm means that if a specific number of blocks are not found in a specific period of time, the difficulty will be reduced. This policy is particularly radical because it means that the longer the time difference between blocks, the greater the downward adjustment of the difficulty. Miners can deliberately leave behind a large time difference to manipulate the network, resulting in a significant change in the difficulty, followed by a very high frequency of block generation in a low difficulty period. Then the network becomes unreliable._DJMINER
Due to this flaw, the generated bitcoin cash block exceeded expectations and miners' revenue increased during this period. Bitcoin cash has established about 5000 block leads based on bitcoin, one of which still exists today. A few months later, in November 2017, the final fix was made. EDA was removed and replaced with a new difficulty adjustment system (a simpler 24-hour scrolling system). However, this is still different from bitcoin's two-week window system. Bitcoin cash's system is more dynamic and faster to adjust. Although this means that bitcoin cash may be more volatile in the short term, the currency adjusts to change faster, and it may take longer to correct the time difference in bitcoin.
In the new difficulty adjustment algorithm of bitcoin cash, many people may neglect one thing, that is, its relationship with the two-hour time protection rule. As far as we know, bitcoin cash is kept constant for two hours.
Two hours is now 8.3% of the calculation period. This is equivalent to reducing the time between blocks from 10 minutes to 9 minutes and 10 seconds. This does seem to be potentially significant and, if used, could lead to changes in miners' profitability. So bitcoin cash may be vulnerable to miners tampering with time stamps, or at least more so than bitcoin. On the other hand, although bitcoin cash is more vulnerable than bitcoin in the face of miner's timestamp tampering attack, it can solve the problem faster.
conclusion
The obvious vulnerability of time protection rules of bitcoin cash may not be utilized, which shows that the thinking of time protection rules of bitcoin is so perfect. As far as we know, these time protection rules have existed since the introduction of bitcoin in 2009. In designing the system, Nakamoto must innovate at least at three levels of depth:
Verification of working system → difficulty adjustment system → perfect time protection rules
Although this may not seem particularly sophisticated to us today, we have 10 years of experience with these systems. We think it's amazing that Nakamoto has thought about this in an all-round way before he has any such network._DJMINER
Absrtact: we examine two little-known rules of bitcoin, which are used to prevent illegal miners from manipulating block timestamps to obtain unfair and high mining rewards. We discussed why it is possible to choose a constant such as the 2-hour max? Function? Block? Time value, and what specific impact that value has on the special currency cash. We conclude that bitcoin's time protection rules seem to be quite effective and admirable considering the lack of functional networks in implementing the rules._DJMINER
Time problem of bitcoin
People may think that time is not an important consideration for bitcoin network, because each block references the hash value of the previous block, so these blocks have already been sequenced. The bitcoin block also contains transactions (inputs, outputs, and values), the Merkle tree of the derivation block head, and the block hash value itself, which are used to prove the workload. On the surface, this may be enough for trading and consistency systems. However, there is the problem of adjustment difficulty. If too many miners join the network, the block time may become too fast, or if too many miners leave, the block time may become too slow, making the network unreliable. To solve this problem, the mining difficulty is adjusted every two weeks to achieve the target time of ten minutes between blocks. Unfortunately, in order to calculate the two-week time, the concept of time needs to be introduced into the blockchain and become part of the consistency system. Therefore, the block must contain a time stamp. People can regard bitcoin as the first distributed electronic clock in the world.
Block timestamp security rules
When bitcoin blocks are generated, there are essentially two times involved:
1. The time in the block is placed by the miner
2. Actual time of block generation.
Of course, these two times should be almost the same. After all, miners must have reasonable and accurate clocks. Why do they lie about time?
Miners do have incentives to lie about time. For example, illegal miners may add a future timestamp. For example, if it takes 10 minutes to produce a block, a miner can claim to have taken 15 minutes by adding a five minute timestamp to the future. If this 5-minute increase continues throughout the two-week difficulty adjustment cycle, the average block time will look like 15 minutes, which is actually shorter. Then the difficulty of the next cycle may be adjusted downward, and the mining revenue will be increased due to the acceleration of block time. The problem with this approach, of course, is that the bitcoin clock continues to move further and further away from real time.
To solve or alleviate these problems, bitcoin has two mechanisms to prevent miners from tampering with time stamps.
1. Past median time (MPT) rule - timestamps must be higher than the median of the past 11 blocks. The median of 11 blocks means that six blocks can be reorganized and the time will not move backward. Some people may think that this is consistent with the example provided in the 2012 report of Meni Rosenfeld, that is, for an attacker with 10% network computing power, six confirmations are required to reduce the probability of attack success to less than 0.1%.
1. The future block time rule is based on the - max? Function? Block? Time constant. Compared with the median time from the same node, the time stamp cannot appear more than 2 hours in the future. The maximum allowable difference between the time provided by the node and the local system clock is 90 minutes (another security measure). It should be noted that unlike the above MPT rules, this is not a fully agreed rule. Blocks with timestamps that are too far in the future are invalid, but they may become effective as time moves forward.
Rule 1 ensures that the blockchain continues to move forward in time, while rule 2 ensures that the blockchain does not move too far forward. These time protection rules are not perfect. For example, a miner can still move the time stamp forward by generating a future time stamp within two weeks, but the impact of this operation is limited.
As shown in the ratio above, since two hours is only a small part of two weeks, the impact of this operation on network reliability and mining profitability may be limited. This is equivalent to reducing the time between blocks from 10 minutes to 9 minutes and 54 seconds within two weeks after difficulty adjustment. Moreover, it is only a one-time change, because once a two-hour time shift occurs, it cannot move forward again unless it moves backward first. At the same time, miners may consider the margin of safety before moving forward two hours to reduce the risk that the block will be rejected by the network.
According to our judgment, these rules have proved reasonable and effective in preventing miners from tampering with bitcoin time stamps in a malicious way.
Theoretical block time of bitcoin cash
As we first mentioned in September 2017, bitcoin cash is an alternative currency split from bitcoin in August 2017. Its main purpose is to increase the block size limit. At that time, one of the concerns of bitcoin cash developers was that many miners would not mine bitcoin cash, so the time difference between blocks might be too large. So the so-called "emergency difficulty adjustment" (EDA) was implemented to alleviate this concern. We won't discuss it in detail here, but it's enough to show that the mechanism is very complex and prove that there are fundamental flaws. This algorithm means that if a specific number of blocks are not found in a specific period of time, the difficulty will be reduced. This policy is particularly radical because it means that the longer the time difference between blocks, the greater the downward adjustment of the difficulty. Miners can deliberately leave behind a large time difference to manipulate the network, resulting in a significant change in the difficulty, followed by a very high frequency of block generation in a low difficulty period. Then the network becomes unreliable._DJMINER
Due to this flaw, the generated bitcoin cash block exceeded expectations and miners' revenue increased during this period. Bitcoin cash has established about 5000 block leads based on bitcoin, one of which still exists today. A few months later, in November 2017, the final fix was made. EDA was removed and replaced with a new difficulty adjustment system (a simpler 24-hour scrolling system). However, this is still different from bitcoin's two-week window system. Bitcoin cash's system is more dynamic and faster to adjust. Although this means that bitcoin cash may be more volatile in the short term, the currency adjusts to change faster, and it may take longer to correct the time difference in bitcoin.
In the new difficulty adjustment algorithm of bitcoin cash, many people may neglect one thing, that is, its relationship with the two-hour time protection rule. As far as we know, bitcoin cash is kept constant for two hours.
Two hours is now 8.3% of the calculation period. This is equivalent to reducing the time between blocks from 10 minutes to 9 minutes and 10 seconds. This does seem to be potentially significant and, if used, could lead to changes in miners' profitability. So bitcoin cash may be vulnerable to miners tampering with time stamps, or at least more so than bitcoin. On the other hand, although bitcoin cash is more vulnerable than bitcoin in the face of miner's timestamp tampering attack, it can solve the problem faster.
conclusion
The obvious vulnerability of time protection rules of bitcoin cash may not be utilized, which shows that the thinking of time protection rules of bitcoin is so perfect. As far as we know, these time protection rules have existed since the introduction of bitcoin in 2009. In designing the system, Nakamoto must innovate at least at three levels of depth:
Verification of working system → difficulty adjustment system → perfect time protection rules
Although this may not seem particularly sophisticated to us today, we have 10 years of experience with these systems. We think it's amazing that Nakamoto has thought about this in an all-round way before he has any such network._DJMINER


评论
发表评论