Aaron and Sjors discuss the 'block 1,983,702 problem' in the Bitcoin protocol and its potential for loss of funds and consensus failures. They explain how BIP 30 and BIP 34 solved this problem but introduced a new issue for the future. They explore solutions such as segment commitment and propose SegWit as the most reasonable solution for empty blocks in Bitcoin mining.
The bug in the Bitcoin protocol that allowed for two identical transactions to exist caused a consensus failure and chaos in the network, leading to the introduction of BIP-30 and BIP-34 as solutions.
A proposed solution to address the bug is to make segwit mandatory for every coinbase transaction, which is considered the simplest and most reasonable approach.
Deep dives
The Bug in the Bitcoin Protocol
In this podcast episode, the hosts discuss a bug in the Bitcoin protocol that originated with the first Satoshi bug. The bug allowed for two identical transactions to exist, and the original transaction would essentially disappear when a new one was created. This created a consensus failure in which the ownership records for these identical transactions would diverge, leading to chaos in the network. To address this bug, the BIP-30 rule was introduced in 2012, which ensured that no two transactions with the same hash could exist simultaneously. However, this rule added inefficiencies and was later optimized in 2015. In 2017, it was realized that there could still be exceptions to this rule in earlier coinbase transactions. To prevent any potential exploitation of this bug, the fix was deployed in 2018, and now Bitcoin core nodes start checking BIP-30 from block 1,983,702 onwards. Various other proposals, such as making segwit mandatory or adding the block height to the coinbase transaction, have been discussed as potential solutions. However, the consensus is that BIP-30 still remains the simplest and most reasonable approach. As of now, we have approximately 20 years to find a permanent solution to this bug before Bitcoin core nodes start checking BIP-30 again.
The Near Miss in 2017
In 2017, there was a near miss with the bug in the Bitcoin protocol. It was discovered that there was another block, 490,897, which had a number in the coinbase transaction that could have caused the same bug to occur if not for some lucky circumstances. This block was spared from exploitation as the coinbase transaction had already been spent and reproducing the transactions that spent it would have been impossible. This close call prompted the realization of the need to fix the bug and led to the deployment of the fix in 2018.
Potential Solutions and Future Outlook
Several potential solutions have been proposed to address the bug in the Bitcoin protocol. One suggestion is to make segwit mandatory for every coinbase transaction, ensuring uniqueness. This would add some cost and effort for miners but is considered a simple and effective approach. Another proposal involves examining the coinbase transactions of historical blocks to prove that duplication is not possible. However, the consensus is that the segwit solution remains the most reasonable and low-effort option. With approximately 20 years before the bug could potentially resurface, there is ample time to find a permanent solution.
The Great Consensus Cleanup Proposal
In 2019, there was a proposed great consensus cleanup that aimed to address various small fixes in the Bitcoin protocol. However, it did not include a fix for this specific bug. While the proposal did not gain traction, it is worth considering in the future as it could provide an opportunity to clean up multiple issues, including the bug in question.
In this episode of Bitcoin, Explained, Aaron and Sjors discuss the so-called “block 1,983,702 problem”. They explain how a bug in early Bitcoin implementations could in rare cases cause a loss of funds, or in a worst-case scenario even lead to consensus failures, while they also explain how BIP 30 and BIP 34 solved this problem. As it turns out, however, BIP 34 introduced a new problem, that could become an issue about twenty years from now…
===
This episode’s sponsor: CoinKite, maker of the ColdCard