Source: Liu Jiaolian
BTC fluctuated slightly sideways in the 86-87k range on Thursday. March 2025 is about to pass. March has passed and the first quarter is about to end. As Jiaolian said today, this first quarter may be the worst quarter since 2018.
Time is like water, and time is like songs. BTC is the music of time. But in the early years, specifically before 2013, some discordant notes appeared in the movement. These discordant notes are repeated currency-based transactions (mint transactions).
The so-called currency-based transaction (coin trading), also known as coinbase transaction, is the first transaction in each newly generated block of BTC. The miners who mine the block will usually use this transaction to send the block reward to their address.
As we all know, ordinary transactions of BTC cannot be repeated. Because ordinary transactions must spend the unspent output of an existing transaction, the so-called UTXO, the teaching chain compares it to "coins". These coins are different, so the transactions that spend these coins must also be different. If a coin is spent by two transactions, it becomes the so-called "double-spending", which is strictly prohibited by BTC.
However, an exception appears. That is currency-based trading. Coin-based transactions are coin transactions, so there is no need to spend UTXO coins, but can create new BTC directly from the air as a reward for miners.
If a miner mines multiple blocks one after another and uses exactly the same information when structuring coin-based transaction data, such as the reception address and other additional information, then two identical transactions may be constructed. It is reflected in the blockchain that these two currency-based transactions located in different blocks have the same transaction data and hash value.
This is the repeated currency-based transaction.
This bitcoin bug really exists. The following are two real examples. You can open any blockchain browser for BTC to verify:
Block height 91812 and block height 91842, and have two coin base transactions with exactly the same hash value.
Block height 91722 and block height 91880 have two coin base transactions with exactly the same hash value.
The good news is that no one has ever used such duplicate currency-based transactions to spend them to construct the same similar follow-up ordinary transactions, thus contaminating the entire UTXO space. After implementing BIP-30 through a soft fork on March 15, 2012, such repeated transactions cannot be used.
First, in March 2013, the BIP-34 soft fork was activated, adding block height information as the "version number" to the structure of the currency transaction, making it impossible for the hash value of the currency transaction to be repeated.
Specific,From the technical details, the block height is added at the beginning of scriptSig of the currency base transaction. The first byte is the number of bytes of the block height value - currently 0x03, which means that the subsequent 3 bytes represent the block height of the local currency base exchange. This scriptSig in currency base transactions is also called coinbase script. It is a field that miners can freely customize. It allows writing any data in the early days. For example, Satoshi Nakamoto wrote the title of the Times in this field.
Compare it more intuitive. Let’s first look at the scriptSig of the coin base transaction in block #91812 with repeated coin base transaction problems: 0456720e1b00 (OP_PUSHBYTES_4 56720e1b OP_0).
The coin base transaction scriptSig of the block #889678 that Jiaolian just produced when he wrote this article is: 034e930d044260e5672f466f756e6472792055534120506f6f6c202364726f70676f6c642f23648154608b15000000000000000000000000 (OP_PUSHBYTES_3 4e930d OP_PUSHBYTES_4 4260e567 OP_PUSHBYTES_47).
The beginning is 0x03, and the next three bytes are 43930d, indicating that the height of the block is 0x0d934e in hexadecimal, that is, 889678 in decimal.
The bad news is that before the 2013 fix, some of their scriptSig starts at 0x03! This makes it possible for these miners in the future to use this to deliberately construct repeated currency-based transactions.
Give a specific example. The coinbase script of block #164384 starts with 0x03: 03d6441e014b0136 (OP_PUSHBYTES_3 d6441e OP_PUSHBYTES_1 4b OP_PUSHBYTES_1 36).
We don't know what the script written by the miner was meant to be. But what we can know is that he has the opportunity to exploit this vulnerability and try to construct the exact same currency transaction as it in the future.
What time is it? We need to make a simple calculation.
According to the definition of BIP-34, the 3 bytes after 0x03 represent the block height. For the above example, d6441e, that is, 0x1e44d6 in hexadecimal, that is, 1983702 in decimal.
When will block #1983702 be produced at what time? It's easy to produce one block every 10 minutes based on BTCIt is estimated that from the current block #889678 to the future #1983702, it will take (1983072 - 889678)/6/24/365 = 20.8 years, that is, around 2046.
The bad news is that there are still many such blocks. Here is the full table:
block_height,coinbase_height,equal
164384,1983702,TRUE
169895,3708179,TRUE
170307,3709183,TRUE
171896,3712990,TRUE
172069,3713413,TRUE
172357,3714082,TRUE
172428,371 4265,TRUE
174151,5208854,TRUE
176684,490897,TRUE
183669,3761471,TRUE
196988,4275806,TRUE
201577,5327833,TRUE
206039,7299941,TRUE
206354,7299941,TRUE
209920,209921,TRUE
nodeleaf="">
From the bar chart above, it can be seen that around 2078 is the time with the most risks.
The good news is that with the current large and greater network computing power in the future, even if the miners of that year had this idea, it would be difficult for them to just grab the packaging rights (generation rights, mining rights) of that block at that height.
And, miners have to eat too much to get the mining rights with great difficulty, and build a transaction that can never be spent and imitate early data, thus causing themselves to suffer in vain?
Therefore, the conclusion is that the bug of repeated currency-based transactions cannot be said to have been solved 100% perfectly, but it is unlikely to cause any major waves.