4/11

The TX ID(Transaction ID) is just a double-hash of the transaction data.

And we know that if we hash 2 different things we get 2 very different outputs.

And ofc, hashing the same thing gives the exact same results.

(some theoretical caveats, but nvm)

Reply to this note

Please Login to reply.

Discussion

5/11

A "normal" #Bitcoin transaction has mainly 2 things:

- Inputs: where you spend from

- Outputs: Where you spend to

(+ some other data)

It's very uncommon for all the data to be the same for different transactions, so that's why the TX ID is unique(most of the time)

6/11

However, the 2 transactions above, are Coinbase transactions.

A coinbase transaction is a special transaction, that a miner uses to pay himself.

And because this is done from the block reward, there is no input to this transaction

(there technically is, but ignore this)

7/11

So when the same outputs are used, the coinbase transactions have the same transaction ID.

They obviously are 2 different transactions in 2 different blocks, and are paying 2 different things, but they both pay to the same output.

(Here the output is a pay-to-pub key)

8/11

This problem 1st was addressed in BIP30.

Blocks are not allowed to contain a TX with the same ID as a previously not-spent TX.

While this solved some of the problems, it's still not enough.

Also, the BIP has specific exceptions for the above-mentioned TXs.

9/11

Later in BIP34 a new rule was added.

Each coinbase TX is to include the height of the block.

As each block height is different, this guarantees each coinbase TX ID will be unique.

Blocks with such coinbase TXs are version2

Last version1 block was 227,835 was mined in 2013

10/11

This was a problem because it was not the desired behavior for Bitcoin TXs.

In some cases could have led to network splits.

Plus, could allow for some attacks, where you can reduce the confirmation of a TX to 1, making it more susceptible to double-spending.

(could****)

11/11

Thanks for reading and like & retweet, if you liked it. :D

Follow for more #Bitcoin facts like this every day!

And the #BitcoinFactOfTheDay was brought to you by BitBoxSwiss !🇨🇭🔑

https://twitter.com/raw_avocado/status/1743414238654201869