1/11

This transaction is in two blocks at the same time!

How is this possible?

Is this a problem?

🧵Thread👇

Reply to this note

Please Login to reply.

Discussion

2/11

Before anything, this is not the only example of the same transaction being in two different blocks.

This is another example.

There are only 2 such occurrences, and both of them are coinbase transactions.

3/11

I'm sure everyone expects that each Bitcoin transaction is unique, I mean we are trying to solve the double-spend problem here.

And something called the Transaction ID, should serve as a unique identifier.

But clearly, that's not the case(at least in the 2 examples)

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)

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

Not to be that guy, but we don't have note limits here, so you can just copy all of that text into one long note the next time you copy something from Twitter.

Very informative note though. 🤙🏻🫂💜

Also, threads don’t work cause clients don’t display them in a way that’s easy to read

Yeah sure looks like it ;(

I’m very glad you liked it.

I am aware of the not limit, but I think written in multiple smaller chunks, has a higher change of being ready ;)

Though loading them may be more problematic.

TIL! Very cool