WEBVTT - Automatic transcript; recognition may contain errors. Reviewed for technical wording and speaker labels. Times match the published episode.

00:00:19.410 --> 00:00:21.430
<v Aaron van Wirdum>Live from Utrecht, this is Bitcoin.

00:00:22.030 --> 00:00:22.670
<v Sjors Provoost>Explained.

00:00:23.030 --> 00:00:23.370
<v Aaron van Wirdum>Hey, Sjors.

00:00:23.930 --> 00:00:29.210
<v Sjors Provoost>Hey, so last time I read the sponsor and it was a complete disaster. So this time

00:00:29.210 --> 00:00:34.710
<v Sjors Provoost>you're going to do it. As the song goes, Aaron reads ads, Aaron reads ads, Aaron

00:00:34.710 --> 00:00:36.210
<v Sjors Provoost>reads ads.

00:00:36.550 --> 00:00:42.170
<v Aaron van Wirdum>Nice. I forgot all about the jingle. You haven't read any... Toots.

00:00:43.010 --> 00:00:43.750
<v Aaron van Wirdum>What's it called?

00:00:44.070 --> 00:00:44.510
<v Sjors Provoost>Boosts.

00:00:44.550 --> 00:00:47.030
<v Aaron van Wirdum>Boosts. You haven't read any Boosts for a while. What's going on with that?

00:00:47.030 --> 00:00:49.870
<v Sjors Provoost>No, we might do it later again. Because we've got this hyper-commercialized

00:00:49.870 --> 00:00:51.910
<v Sjors Provoost>entity now with sponsors and stuff.

00:00:52.190 --> 00:00:57.890
<v Aaron van Wirdum>True, yeah. Sure. Do you know who our sponsor is? It's Coinkite.

00:00:58.990 --> 00:01:03.250
<v Aaron van Wirdum>And they produce the COLDCARD. You know what I love about the COLDCARD, besides

00:01:03.250 --> 00:01:07.370
<v Aaron van Wirdum>the fact that are— that they are our sponsor, Sjors? I love that they're Bitcoin

00:01:07.370 --> 00:01:11.230
<v Aaron van Wirdum>only. I love that they're a hardware wallet. It's secure. It's for your Bitcoin.

00:01:11.230 --> 00:01:16.430
<v Aaron van Wirdum>It's to store your Bitcoin on. How long is our read, Sjors? Did I get there yet?

00:01:16.430 --> 00:01:17.190
<v Sjors Provoost>I think you're good.

00:01:17.190 --> 00:01:23.070
<v Aaron van Wirdum>The COLDCARD is great. Get it. That's right. Sjors, today we're discussing

00:01:24.190 --> 00:01:29.770
<v Aaron van Wirdum>a very niche bug that I had never heard of. But apparently there's a bug in the

00:01:29.770 --> 00:01:30.410
<v Aaron van Wirdum>Bitcoin protocol.

00:01:31.750 --> 00:01:33.950
<v Sjors Provoost>Well, there was a bug in the Bitcoin protocol.

00:01:35.560 --> 00:01:38.660
<v Aaron van Wirdum>Right, but there's still a problem.

00:01:38.960 --> 00:01:42.580
<v Sjors Provoost>There was a bug, then there was no bug, then there was a bug, then there was no

00:01:42.580 --> 00:01:44.700
<v Sjors Provoost>bug. There's still a problem, but not a bug.

00:01:45.200 --> 00:01:49.300
<v Aaron van Wirdum>Right, okay, I see. So there was a bug, now there's no bug, but there's still a

00:01:49.300 --> 00:01:50.700
<v Aaron van Wirdum>problem, which is not a bug.

00:01:51.280 --> 00:01:55.300
<v Sjors Provoost>Well... It's kind of a bug, but it's not like a dangerous bug like the original thing.

00:01:55.300 --> 00:01:58.240
<v Aaron van Wirdum>Sounds pretty buggy. Anyway, so it's called the

00:01:58.240 --> 00:02:04.220
<v Aaron van Wirdum>1,983,702 problem.

00:02:04.650 --> 00:02:10.530
<v Aaron van Wirdum>Did I say it right even? The block 1,983,702 problem.

00:02:10.990 --> 00:02:14.250
<v Sjors Provoost>Yeah, it sounds good. Or the block 1,983,702 problem.

00:02:14.490 --> 00:02:17.790
<v Aaron van Wirdum>Right. So this will be a problem in…

00:02:18.330 --> 00:02:24.130
<v Sjors Provoost>Yeah, there's another term you could use is the BIP… BIP 34 does not

00:02:24.130 --> 00:02:25.810
<v Sjors Provoost>imply BIP 30 problem.

00:02:27.350 --> 00:02:30.070
<v Aaron van Wirdum>I don't know which one is worse. They're both pretty bad.

00:02:30.370 --> 00:02:30.830
<v Sjors Provoost>Okay, cool.

00:02:31.130 --> 00:02:35.330
<v Aaron van Wirdum>So this will be a problem in block. Well, again,

00:02:35.490 --> 00:02:37.630
<v Aaron van Wirdum>1,900,000 something.

00:02:38.270 --> 00:02:40.410
<v Sjors Provoost>Yeah, which is like a couple decades from now.

00:02:40.770 --> 00:02:44.110
<v Aaron van Wirdum>Yes, like 22 years from now, my sort of napkin math told me.

00:02:44.350 --> 00:02:47.870
<v Sjors Provoost>And to be clear, it's a problem. It's not like bad.

00:02:48.710 --> 00:02:54.650
<v Aaron van Wirdum>Right. Okay, but it is something that needs to be solved eventually in some

00:02:54.650 --> 00:02:55.110
<v Aaron van Wirdum>way or another.

00:02:55.450 --> 00:03:00.930
<v Sjors Provoost>It's better if we solve it. But it's not like the 2106 problem, which in the year

00:03:00.930 --> 00:03:04.550
<v Sjors Provoost>2106, the whole blockchain simply stops. That's definitely a problem.

00:03:05.110 --> 00:03:08.290
<v Aaron van Wirdum>Right. This is not a problem that's going to require a consensus change.

00:03:09.350 --> 00:03:10.570
<v Sjors Provoost>No, ideally it would.

00:03:10.850 --> 00:03:11.630
<v Aaron van Wirdum>Oh, okay.

00:03:11.630 --> 00:03:12.330
<v Sjors Provoost>But not a hard fork.

00:03:12.630 --> 00:03:18.490
<v Aaron van Wirdum>Right, okay. How did you find about... Like I said, I'd never heard of this. Is

00:03:18.490 --> 00:03:21.970
<v Aaron van Wirdum>this just something you... This is your hobby. You look for very niche things

00:03:21.970 --> 00:03:23.210
<v Aaron van Wirdum>that no one else has heard about.

00:03:23.430 --> 00:03:26.950
<v Sjors Provoost>Well, we sometimes need to scrape the bottle of the barrel for episodes titles.

00:03:27.090 --> 00:03:32.730
<v Sjors Provoost>But in this case, I was trying to understand a bug in Stratum V2,

00:03:32.950 --> 00:03:37.420
<v Sjors Provoost>something I'm working on recently, and had something to do with the coinbase

00:03:37.420 --> 00:03:41.800
<v Sjors Provoost>transactions and whether or not it has a witness. It turns out it does have a

00:03:41.800 --> 00:03:45.880
<v Sjors Provoost>witness, or at least it can have a witness, which I didn't know, and that's why I

00:03:45.880 --> 00:03:49.500
<v Sjors Provoost>kept banging my head against it. But as I was trying to understand how the code

00:03:49.500 --> 00:03:53.620
<v Sjors Provoost>works, I was reading the code comments, and I came across this almost full-page

00:03:53.620 --> 00:03:56.420
<v Sjors Provoost>story about this problem.

00:03:56.800 --> 00:04:01.940
<v Aaron van Wirdum>Okay. I'm going to just call it the 1,900,000 problem because I don't want to

00:04:01.940 --> 00:04:02.560
<v Aaron van Wirdum>read it.

00:04:03.660 --> 00:04:04.100
<v Sjors Provoost>Sure.

00:04:04.280 --> 00:04:09.860
<v Aaron van Wirdum>And it's in full every time. So the 1,900,000 problem, we'll start at the

00:04:09.860 --> 00:04:14.840
<v Aaron van Wirdum>beginning. So you mentioned there was a bug. It all started with a bug, right?

00:04:15.200 --> 00:04:18.120
<v Aaron van Wirdum>And this has been a bug in Bitcoin since the beginning?

00:04:18.780 --> 00:04:19.220
<v Sjors Provoost>Yes.

00:04:19.300 --> 00:04:21.160
<v Aaron van Wirdum>Like it's an OG Satoshi bug?

00:04:21.340 --> 00:04:26.910
<v Sjors Provoost>Exactly, an OG Satoshi bug, which is that… it was possible for two

00:04:26.910 --> 00:04:31.310
<v Sjors Provoost>identical transactions to exist, or more than one, basically, identical

00:04:31.310 --> 00:04:33.450
<v Sjors Provoost>transactions to exist in sequence.

00:04:33.650 --> 00:04:35.010
<v Aaron van Wirdum>It was or wasn't?

00:04:35.010 --> 00:04:35.790
<v Sjors Provoost>It was possible.

00:04:35.930 --> 00:04:36.710
<v Aaron van Wirdum>It was possible.

00:04:36.970 --> 00:04:42.890
<v Sjors Provoost>And this was creating a problem because, well, when the transaction exists

00:04:42.890 --> 00:04:47.610
<v Sjors Provoost>twice, then the original one essentially just disappears.

00:04:48.750 --> 00:04:50.530
<v Sjors Provoost>This has to do with how transactions work.

00:04:50.770 --> 00:04:56.670
<v Aaron van Wirdum>Yeah, let's halt here for a second. So how do you get two identical transactions?

00:04:56.790 --> 00:05:02.230
<v Sjors Provoost>Same hash. So the same hash means it's the same content. So it's the same inputs,

00:05:02.410 --> 00:05:05.950
<v Sjors Provoost>the same outputs. And so typically you would expect this in a coinbase

00:05:05.950 --> 00:05:09.450
<v Sjors Provoost>transaction in the early days because a coinbase transaction doesn't have any

00:05:09.450 --> 00:05:12.830
<v Sjors Provoost>inputs or maybe it is the name of your pool, which would be the same if you were

00:05:12.830 --> 00:05:16.420
<v Sjors Provoost>mining multiple blocks. And then the outputs might be the address that you're

00:05:16.420 --> 00:05:20.360
<v Sjors Provoost>paying yourself to, which might also be the same if you were pool. So if you

00:05:20.360 --> 00:05:25.140
<v Sjors Provoost>mined in the early days two blocks to the same address and with the same pool

00:05:25.140 --> 00:05:29.470
<v Sjors Provoost>name and you weren't like, I guess, yeah.

00:05:31.140 --> 00:05:35.840
<v Aaron van Wirdum>Yeah, that makes sense. So you're a pool in the early days. You have your Bitcoin

00:05:35.840 --> 00:05:39.700
<v Aaron van Wirdum>address, one blah, blah, blah, blah, blah, because that was the early addresses.

00:05:40.120 --> 00:05:45.000
<v Aaron van Wirdum>And you're mining new coins, so there's no inputs. And you just did these new 50

00:05:45.000 --> 00:05:48.520
<v Aaron van Wirdum>coins are sent to this one blah, blah, blah, blah address. And if that happens

00:05:48.520 --> 00:05:52.820
<v Aaron van Wirdum>twice, if you say you mine two blocks in a row, it's going to be the exact same

00:05:52.820 --> 00:05:53.420
<v Aaron van Wirdum>transaction.

00:05:53.870 --> 00:05:58.050
<v Sjors Provoost>Yeah, however, it also would have to be the same amount, right? So this would be

00:05:58.050 --> 00:06:01.830
<v Sjors Provoost>either a block with no transactions in it, so no fees. So the coinbase amount

00:06:01.830 --> 00:06:07.690
<v Sjors Provoost>would be exactly 50 Bitcoin back in the day, or it would be coincidentally the

00:06:07.690 --> 00:06:09.130
<v Sjors Provoost>exact same total fees.

00:06:09.570 --> 00:06:10.010
<v Aaron van Wirdum>Right.

00:06:10.270 --> 00:06:12.590
<v Sjors Provoost>I mean, the thing is, it only happened twice.

00:06:14.050 --> 00:06:17.370
<v Aaron van Wirdum>Well, especially in the early days, there was still a lot of transactions that

00:06:17.370 --> 00:06:20.290
<v Aaron van Wirdum>didn't pay any fee, I guess. Or there was a fixed fee for a while.

00:06:20.410 --> 00:06:23.530
<v Sjors Provoost>Probably a fixed fee. So then maybe if you had, I don't know, I didn't look at

00:06:23.530 --> 00:06:24.290
<v Sjors Provoost>those specific blocks.

00:06:24.750 --> 00:06:30.500
<v Aaron van Wirdum>Right. Anyways, that is the most… likely reason why that would happen.

00:06:30.740 --> 00:06:34.620
<v Aaron van Wirdum>Is it plausible that it could happen in any other circumstance to identical

00:06:34.620 --> 00:06:35.140
<v Aaron van Wirdum>transactions?

00:06:36.640 --> 00:06:40.980
<v Sjors Provoost>Well, it could happen as a child of the coinbase. So if the coinbase transactions

00:06:40.980 --> 00:06:46.180
<v Sjors Provoost>are identical, then you could make another transaction. Basically, you could just

00:06:46.180 --> 00:06:50.220
<v Sjors Provoost>replay another transaction from the past that spends that coinbase transaction.

00:06:50.360 --> 00:06:54.640
<v Sjors Provoost>So the whole history of that coinbase could be repeated. So if somebody mines a

00:06:54.640 --> 00:06:58.700
<v Sjors Provoost>block and then they send it to the Pirate Bay and they download a movie, you

00:06:58.700 --> 00:07:00.460
<v Sjors Provoost>could redo all that history.

00:07:00.860 --> 00:07:05.020
<v Aaron van Wirdum>Yeah, it would just have to start from the same coinbase transaction. That's the

00:07:05.020 --> 00:07:07.760
<v Aaron van Wirdum>only way you can get more identical transactions.

00:07:07.880 --> 00:07:08.160
<v Sjors Provoost>Exactly.

00:07:08.300 --> 00:07:09.100
<v Aaron van Wirdum>If you start from there, yeah.

00:07:09.300 --> 00:07:10.780
<v Sjors Provoost>Or if you break SHA-256.

00:07:12.040 --> 00:07:16.060
<v Aaron van Wirdum>Which is also an episode we recorded at some point, I think.

00:07:17.100 --> 00:07:21.280
<v Sjors Provoost>I don't think anybody broke SHA-256, but we did talk about hashes in general.

00:07:21.340 --> 00:07:26.060
<v Aaron van Wirdum>We talked about what it means to break it, I think. Anyways, I'm going on a

00:07:26.060 --> 00:07:31.980
<v Aaron van Wirdum>tangent here. Okay, so that's how you can get identical transaction IDs.

00:07:32.360 --> 00:07:32.540
<v Sjors Provoost>Yeah.

00:07:33.000 --> 00:07:37.460
<v Aaron van Wirdum>And so you said it's possible. So why is it a bug if it's possible? Because I

00:07:37.460 --> 00:07:42.220
<v Aaron van Wirdum>thought you were going to say it's impossible, but you said it's possible. Why is

00:07:42.220 --> 00:07:42.740
<v Aaron van Wirdum>it a bug then?

00:07:42.920 --> 00:07:48.280
<v Sjors Provoost>It was possible, to be exact. But the bug is that it creates problems for you,

00:07:48.400 --> 00:07:51.160
<v Sjors Provoost>especially for you as the recipient of that transaction.

00:07:51.900 --> 00:07:53.500
<v Aaron van Wirdum>Right, so the miner in this case?

00:07:53.740 --> 00:07:58.980
<v Sjors Provoost>Yeah, so the miner mined, say, 50 Bitcoin and doesn't spend it. And then a week

00:07:58.980 --> 00:08:04.640
<v Sjors Provoost>later, he mines 50 Bitcoin and also doesn't spend it. Now he's like, oh, I've got

00:08:04.640 --> 00:08:08.640
<v Sjors Provoost>100 Bitcoins. How am I going to spend this? Oh, I'm going to make a transaction.

00:08:09.020 --> 00:08:14.100
<v Sjors Provoost>And this transaction points to a previous transaction. That's what transactions

00:08:14.100 --> 00:08:19.720
<v Sjors Provoost>do. So you would point to the original coinbase transaction by its hash and then

00:08:19.720 --> 00:08:24.780
<v Sjors Provoost>also by the position of the output in the coinbase transaction. But then the

00:08:24.780 --> 00:08:28.520
<v Sjors Provoost>question is, which one do you mean? And the Bitcoin Core software would simply

00:08:28.520 --> 00:08:34.520
<v Sjors Provoost>look at the most recent one and would spend that. And there's only one

00:08:34.520 --> 00:08:36.040
<v Sjors Provoost>entry, so it would just be overwritten.

00:08:37.290 --> 00:08:39.930
<v Sjors Provoost>So the original coins would be gone.

00:08:42.310 --> 00:08:45.950
<v Aaron van Wirdum>Okay, you have to explain this, I think. Why would the original... So you say

00:08:45.950 --> 00:08:50.650
<v Aaron van Wirdum>Bitcoin Core would just take the most recent one. So why wouldn't the older one

00:08:50.650 --> 00:08:53.150
<v Aaron van Wirdum>just also still exist for next time you want to spend?

00:08:53.350 --> 00:08:58.550
<v Sjors Provoost>Well, so Bitcoin Core keeps track of a list of outputs that exist. Basically, the

00:08:58.550 --> 00:09:03.780
<v Sjors Provoost>transaction hash and the identifier. So if you add another one that is the same,

00:09:04.020 --> 00:09:05.120
<v Sjors Provoost>it would just overwrite it.

00:09:05.540 --> 00:09:08.240
<v Aaron van Wirdum>Oh, sorry. Do you just mean the UTXO set here?

00:09:08.820 --> 00:09:12.400
<v Sjors Provoost>Yeah, although I think at the time the UTXO set worked a little different than it

00:09:12.400 --> 00:09:16.140
<v Sjors Provoost>does now. But I think essentially it was the same thing. It's just a list of

00:09:16.140 --> 00:09:19.360
<v Sjors Provoost>coins that exist. So it's a transaction hash and an identifier and whatever

00:09:19.360 --> 00:09:23.810
<v Sjors Provoost>script you need to spend it. And so if you were to create the transaction again,

00:09:23.990 --> 00:09:28.250
<v Sjors Provoost>that would just be the same entry in the database. So the database would think

00:09:28.250 --> 00:09:28.870
<v Sjors Provoost>there's only one.

00:09:29.090 --> 00:09:33.830
<v Aaron van Wirdum>Okay, so not both transactions would be included in this database. It would just

00:09:33.830 --> 00:09:37.690
<v Aaron van Wirdum>be considered as the same transaction, so there's only one.

00:09:38.010 --> 00:09:39.570
<v Sjors Provoost>So then if you spend it,

00:09:39.710 --> 00:09:41.490
<v Aaron van Wirdum>both are gone because they overlap.

00:09:41.490 --> 00:09:45.910
<v Sjors Provoost>Because you deleted one entry. So this can lead to quite strange situations. For

00:09:45.910 --> 00:09:51.490
<v Sjors Provoost>example, let's say you mine a transaction. You mine a transaction once, and then

00:09:51.490 --> 00:09:56.990
<v Sjors Provoost>a couple blocks later, you mine it again. And then you spend it.

00:09:57.450 --> 00:10:00.010
<v Sjors Provoost>And so then it disappeared, right?

00:10:01.490 --> 00:10:05.670
<v Sjors Provoost>That's one way. But let's say you mine one transaction. Sorry, yeah, let's do it

00:10:05.670 --> 00:10:08.690
<v Sjors Provoost>again. You mine one transaction, you mine a couple other blocks, and then you

00:10:08.690 --> 00:10:10.470
<v Sjors Provoost>mine the transaction again.

00:10:11.680 --> 00:10:17.220
<v Sjors Provoost>Now, if there's a reorg... The blockchain

00:10:17.220 --> 00:10:22.760
<v Sjors Provoost>undoes your most recent block and then creates some other blocks.

00:10:23.240 --> 00:10:29.420
<v Sjors Provoost>That means that your transaction has now disappeared from your point of view.

00:10:29.680 --> 00:10:35.430
<v Aaron van Wirdum>Yeah, yeah, yeah. Okay, I get it. So, oh yeah. So, yeah. Let me try to re-explain

00:10:35.430 --> 00:10:38.630
<v Aaron van Wirdum>that, even though it was kind of clear to me, but maybe if I re-explain, that

00:10:38.630 --> 00:10:43.030
<v Aaron van Wirdum>might help one other person out there. So yeah, you're creating a blockchain,

00:10:43.430 --> 00:10:47.450
<v Aaron van Wirdum>obviously, and then the first coinbase transaction is included in block three,

00:10:47.610 --> 00:10:52.490
<v Aaron van Wirdum>and then the next one is included in block seven. But then there's another block

00:10:52.490 --> 00:10:56.990
<v Aaron van Wirdum>seven, and that's the blockchain that the network goes with. That becomes the

00:10:56.990 --> 00:10:58.990
<v Aaron van Wirdum>longest chain. So now...

00:11:00.550 --> 00:11:05.430
<v Aaron van Wirdum>your second coinbase transaction is deleted from your UTXO set, basically, or

00:11:05.430 --> 00:11:09.730
<v Aaron van Wirdum>this database. And it's not like the one before that is not automatically

00:11:09.730 --> 00:11:11.770
<v Aaron van Wirdum>restored either. So now you lost both.

00:11:12.050 --> 00:11:16.830
<v Sjors Provoost>Yeah, you lost both. However, somebody else who just starts up a new blockchain,

00:11:17.050 --> 00:11:20.690
<v Sjors Provoost>a Bitcoin blockchain, will never see the original second block. So they will only

00:11:20.690 --> 00:11:24.510
<v Sjors Provoost>see the first block in which you do get the coinbase. And as far as they're

00:11:24.510 --> 00:11:27.750
<v Sjors Provoost>concerned, it's still there. So now you have a consensus failure.

00:11:28.010 --> 00:11:28.130
<v Aaron van Wirdum>Right.

00:11:28.390 --> 00:11:30.870
<v Sjors Provoost>Because part of the network believes that a coin exists and the other does not,

00:11:30.910 --> 00:11:33.390
<v Sjors Provoost>and that will explode as soon as somebody tries to spend it.

00:11:33.630 --> 00:11:37.950
<v Aaron van Wirdum>Yeah, or to put it a little bit more accurately, maybe. I mean, I think you're

00:11:37.950 --> 00:11:41.850
<v Aaron van Wirdum>saying it technically accurately, but the more normie way of saying it is there's

00:11:41.850 --> 00:11:43.790
<v Aaron van Wirdum>no consensus on who owns which coins.

00:11:44.310 --> 00:11:47.950
<v Sjors Provoost>Well, yeah, there's no consensus on who owns that, on whether that specific coin

00:11:47.950 --> 00:11:48.510
<v Sjors Provoost>exists.

00:11:48.770 --> 00:11:51.710
<v Aaron van Wirdum>Well, that's a technical way of saying it, right?

00:11:51.890 --> 00:11:55.580
<v Sjors Provoost>Well, it's not about who owns it. It's that it exists or not. So you can't spend

00:11:55.580 --> 00:11:59.850
<v Sjors Provoost>a coin that doesn't exist. It's not about not satisfying the script, but it's

00:11:59.850 --> 00:12:01.470
<v Sjors Provoost>just about the coin not existing.

00:12:01.570 --> 00:12:05.370
<v Aaron van Wirdum>Yeah, you're right, actually. In the reorg case, some nodes would actually think

00:12:05.370 --> 00:12:08.870
<v Aaron van Wirdum>the coins don't exist at all anymore because, yes, I see what you're saying.

00:12:09.210 --> 00:12:14.170
<v Aaron van Wirdum>Yeah, you're right. Anyways, the important part is that the UTXO set...

00:12:14.170 --> 00:12:19.110
<v Aaron van Wirdum>Sorry, why do you not call it the UTXO set? Did you say you back in the day...

00:12:19.110 --> 00:12:24.390
<v Sjors Provoost>This is the part I'm a little vague on, but initially the concept that we call

00:12:24.390 --> 00:12:29.810
<v Sjors Provoost>the UTXO set... So a list of coins that exist is not something that Satoshi

00:12:29.810 --> 00:12:34.530
<v Sjors Provoost>invented as such. I think we'll cover that again maybe in a future episode. But

00:12:34.530 --> 00:12:40.320
<v Sjors Provoost>this idea of having a database of which coin exists and you just add and remove

00:12:40.320 --> 00:12:45.180
<v Sjors Provoost>coins from it, I think at the time it was not like that. It was just a list of

00:12:45.180 --> 00:12:49.660
<v Sjors Provoost>all transactions that were still relevant or something like that. It was less

00:12:49.660 --> 00:12:53.200
<v Sjors Provoost>efficient. So I think in 2018 or 2017 it was...

00:12:54.710 --> 00:13:00.610
<v Sjors Provoost>refactored into what we would now consider the UTXO set. But this less efficient

00:13:00.610 --> 00:13:04.530
<v Sjors Provoost>implementation had the same problem. The modern UTXO set would definitely have

00:13:04.530 --> 00:13:09.010
<v Sjors Provoost>this problem. My understanding is the original one had too, even though it stored

00:13:09.010 --> 00:13:10.210
<v Sjors Provoost>more data than we do now.

00:13:10.470 --> 00:13:15.770
<v Aaron van Wirdum>Anyways, the key point here being that the ownership records that every node

00:13:15.770 --> 00:13:20.890
<v Aaron van Wirdum>holds would start to diverge. And if that starts to happen, that is a consensus

00:13:20.890 --> 00:13:24.790
<v Aaron van Wirdum>failure, that you could get to a place where you try spending coins and it

00:13:24.790 --> 00:13:28.050
<v Aaron van Wirdum>confirms on your end and it doesn't confirm on the other end and networks start

00:13:28.050 --> 00:13:34.030
<v Aaron van Wirdum>to... It's chaos. So that was a potential actual risk

00:13:34.030 --> 00:13:35.730
<v Aaron van Wirdum>with this OG Satoshi bug.

00:13:35.970 --> 00:13:40.530
<v Sjors Provoost>Yeah, and as far as I know, what did happen was there were two instances of these

00:13:40.530 --> 00:13:41.690
<v Sjors Provoost>duplicate coinbases.

00:13:43.690 --> 00:13:49.130
<v Sjors Provoost>Basically, miners losing 50 BTC, but I don't think there were cases of also

00:13:49.130 --> 00:13:53.110
<v Sjors Provoost>reorgs on top of that that would have created this mess. But maybe there was and

00:13:53.110 --> 00:13:57.190
<v Sjors Provoost>nobody noticed it. Because the mess would not have been... Well, I think we would

00:13:57.190 --> 00:13:58.110
<v Sjors Provoost>have noticed it now, yeah.

00:13:58.310 --> 00:14:01.790
<v Aaron van Wirdum>Probably, right? That would have been very unlucky as well. You've got to have an

00:14:01.790 --> 00:14:06.290
<v Aaron van Wirdum>exact reorg exactly on that block where this exact block happened.

00:14:06.490 --> 00:14:09.870
<v Sjors Provoost>Yeah, and because this... Well, as far as we can tell, it only happened twice. It

00:14:09.870 --> 00:14:12.890
<v Sjors Provoost>might have happened more often in chains that never survived.

00:14:14.230 --> 00:14:16.170
<v Aaron van Wirdum>Well, then we would have the problem, right?

00:14:17.310 --> 00:14:21.090
<v Sjors Provoost>Well, maybe we are the surviving chain where that didn't happen, but there may

00:14:21.090 --> 00:14:23.670
<v Sjors Provoost>have been other chains where it did happen and it didn't survive.

00:14:23.830 --> 00:14:27.030
<v Aaron van Wirdum>Well, we would have probably heard it then at some point, don't you think? I

00:14:27.030 --> 00:14:29.870
<v Aaron van Wirdum>would say so. Because then there would have been nodes with these different

00:14:29.870 --> 00:14:32.550
<v Aaron van Wirdum>transaction records, UTXO set, whatever you want to call it.

00:14:32.570 --> 00:14:35.750
<v Sjors Provoost>Yeah, but I mean, if this was long enough ago, maybe they just restarted the

00:14:35.750 --> 00:14:38.850
<v Sjors Provoost>computer and just didn't care, but probably didn't happen.

00:14:38.990 --> 00:14:44.830
<v Aaron van Wirdum>Fair. Alright, so this was the OG Satoshi bug. And

00:14:44.830 --> 00:14:46.550
<v Aaron van Wirdum>this bug was fixed.

00:14:47.030 --> 00:14:50.530
<v Sjors Provoost>Exactly. And this is where BIP 30 comes in. This was introduced in 2012.

00:14:52.690 --> 00:14:58.250
<v Sjors Provoost>What BIP 30 does is very simple. It says there shall never be two transactions

00:14:58.250 --> 00:15:00.290
<v Sjors Provoost>with the same hash at the same time.

00:15:01.260 --> 00:15:02.220
<v Aaron van Wirdum>At the same time?

00:15:02.340 --> 00:15:06.740
<v Sjors Provoost>At the same, as in, if you create a transaction right now, it's not allowed to

00:15:06.740 --> 00:15:08.520
<v Sjors Provoost>already exist in the UTXO set.

00:15:08.760 --> 00:15:13.640
<v Aaron van Wirdum>Okay, so it's just an invalid transaction. So if the same thing would happen, if

00:15:13.640 --> 00:15:17.800
<v Aaron van Wirdum>the miner would create this coinbase transaction where he pays himself to the

00:15:17.800 --> 00:15:22.220
<v Aaron van Wirdum>same address, the Bitcoin network nodes, my node, your node, would just say, this

00:15:22.220 --> 00:15:26.340
<v Aaron van Wirdum>is not valid, you just wasted your energy, we're going to wait for a valid block.

00:15:26.460 --> 00:15:26.840
<v Sjors Provoost>Exactly.

00:15:27.060 --> 00:15:27.260
<v Aaron van Wirdum>Right.

00:15:28.880 --> 00:15:34.820
<v Sjors Provoost>Let's say they do that, they make a coinbase, then they spend it, then they can

00:15:34.820 --> 00:15:37.960
<v Sjors Provoost>make the same coinbase again. That's no problem. So BIP 30 does allow that.

00:15:38.240 --> 00:15:38.780
<v Aaron van Wirdum>Right, okay.

00:15:40.760 --> 00:15:45.860
<v Sjors Provoost>So that was great, and that worked. The only problem is that this

00:15:45.860 --> 00:15:50.540
<v Sjors Provoost>rule is a bit difficult to check, because it means that whenever you get a new

00:15:50.540 --> 00:15:55.480
<v Sjors Provoost>block, for every transaction in that block, you have to make sure that it doesn't

00:15:55.480 --> 00:15:59.950
<v Sjors Provoost>already exist, the transaction itself. So right now, whenever you check a block,

00:16:00.190 --> 00:16:04.670
<v Sjors Provoost>you go through every transaction and you check that all its inputs exist. So it's

00:16:04.670 --> 00:16:08.850
<v Sjors Provoost>spending from something that exists. But you do not check if the transaction

00:16:08.850 --> 00:16:12.930
<v Sjors Provoost>itself exists. Or at least, you know, you don't now because of what we'll

00:16:12.930 --> 00:16:16.790
<v Sjors Provoost>discuss. But with BIP 30, you would have to do that. You'd have to do an extra

00:16:16.790 --> 00:16:20.610
<v Sjors Provoost>check for every transaction. Like, hey, now that I've checked that all the inputs

00:16:20.610 --> 00:16:24.240
<v Sjors Provoost>are valid, whatever, or whichever sequence we're going to do, does this

00:16:24.240 --> 00:16:25.060
<v Sjors Provoost>transaction exist?

00:16:25.320 --> 00:16:30.960
<v Aaron van Wirdum>Right. So that was the case in 2012 for a brief while, at least after BIP 30

00:16:30.960 --> 00:16:36.940
<v Aaron van Wirdum>was deployed. And this sounds like it's an especially annoying or burdensome

00:16:36.520 --> 00:16:41.660
<v Aaron van Wirdum>check because it's so unlikely that it's necessary, especially for all

00:16:41.660 --> 00:16:44.180
<v Aaron van Wirdum>non-coinbase transactions. but just technically…

00:16:43.240 --> 00:16:47.740
<v Sjors Provoost>Yeah, it's completely unnecessary in the sense that no miner would be this

00:16:47.740 --> 00:16:50.520
<v Sjors Provoost>stupid. But of course, if you don't check, then they would be.

00:16:50.580 --> 00:16:52.860
<v Aaron van Wirdum>You have to check. But it's burdensome.

00:16:52.580 --> 00:16:57.660
<v Sjors Provoost>But it weighs some resources. I don't know how much, if it's like 1% or 10%, but

00:16:57.660 --> 00:16:58.740
<v Sjors Provoost>it's annoying.

00:16:59.950 --> 00:17:05.120
<v Aaron van Wirdum>Yeah, and also just in general, you want miners to be able to check validity of

00:17:05.120 --> 00:17:10.020
<v Aaron van Wirdum>new blocks or all nodes. You want them to be able to check validity as soon as possible.

00:17:10.300 --> 00:17:14.400
<v Sjors Provoost>Yeah, so every second you can shave off the checking time is better. So BIP 34

00:17:14.400 --> 00:17:17.660
<v Sjors Provoost>was introduced, which made this process more efficient.

00:17:17.900 --> 00:17:18.580
<v Aaron van Wirdum>When was this?

00:17:18.740 --> 00:17:20.540
<v Sjors Provoost>Same year, but just a half a year later.

00:17:21.240 --> 00:17:23.840
<v Aaron van Wirdum>And was this introduced especially because...

00:17:25.090 --> 00:17:26.630
<v Aaron van Wirdum>For the reason we just mentioned?

00:17:26.910 --> 00:17:27.270
<v Sjors Provoost>Yes.

00:17:27.510 --> 00:17:29.630
<v Aaron van Wirdum>Okay, so it was like a performance improvement.

00:17:29.810 --> 00:17:35.170
<v Sjors Provoost>I think so. So the little background is that BIP 30 was a relatively simple

00:17:35.170 --> 00:17:38.350
<v Sjors Provoost>soft fork that could be deployed very quickly because they realized the problem

00:17:38.350 --> 00:17:42.110
<v Sjors Provoost>and they wanted to fix it as quickly as possible so nobody would deliberately

00:17:42.110 --> 00:17:42.810
<v Sjors Provoost>exploit it.

00:17:44.910 --> 00:17:48.970
<v Sjors Provoost>BIP 34 was something that was deployed a bit more carefully, very much like the

00:17:48.970 --> 00:17:53.830
<v Sjors Provoost>BIP 9 style soft fork. So there was some signaling involved. Block version number

00:17:53.830 --> 00:17:57.110
<v Sjors Provoost>went up and you had like so many percent of the miners had to signal it, et

00:17:57.110 --> 00:18:00.630
<v Sjors Provoost>cetera, et cetera. So BIP 34 was a more thorough solution, but it was also

00:18:00.630 --> 00:18:06.590
<v Sjors Provoost>deployed more carefully. So what does BIP 34 do? Well, it makes sure that,

00:18:06.770 --> 00:18:10.650
<v Sjors Provoost>well, that was the idea, that the coinbase transaction is unique by definition.

00:18:12.990 --> 00:18:17.630
<v Sjors Provoost>by adding the block height to it. So every coinbase transaction must start with

00:18:17.630 --> 00:18:22.250
<v Sjors Provoost>the block height. And because it must start with the block height, it's going to

00:18:22.250 --> 00:18:26.670
<v Sjors Provoost>be different than previous transactions, which had a different block height, or

00:18:26.670 --> 00:18:29.610
<v Sjors Provoost>previous coinbase transactions had a different block height, so you won't have

00:18:29.610 --> 00:18:33.230
<v Sjors Provoost>the duplicates. That is to say, moving forward, you don't have the duplicates.

00:18:33.490 --> 00:18:38.590
<v Aaron van Wirdum>Yeah. Okay. Yeah. This makes sense. This way, every coinbase necessarily is

00:18:38.590 --> 00:18:43.330
<v Aaron van Wirdum>unique. Like every coinbase transaction necessarily is unique because it's in a

00:18:43.330 --> 00:18:47.330
<v Aaron van Wirdum>new block that has new block height. And therefore, every transaction that comes

00:18:47.330 --> 00:18:51.230
<v Aaron van Wirdum>from, that's spent from that coinbase is also unique. So now every transaction

00:18:51.230 --> 00:18:51.990
<v Aaron van Wirdum>has to be unique.

00:18:52.190 --> 00:18:52.550
<v Sjors Provoost>Yes.

00:18:52.670 --> 00:18:54.030
<v Aaron van Wirdum>Right? Okay. Yeah. Makes sense.

00:18:54.510 --> 00:18:54.670
<v Sjors Provoost>Yeah.

00:18:54.770 --> 00:18:56.990
<v Aaron van Wirdum>Good solution. Sjors, I like it. Who came up with this?

00:18:58.220 --> 00:19:00.640
<v Sjors Provoost>I think it was... I'm not sure.

00:19:02.040 --> 00:19:06.900
<v Aaron van Wirdum>Well, whoever came up with it, congratulations. Thank you. However, I guess

00:19:06.900 --> 00:19:10.380
<v Aaron van Wirdum>there's another problem you're going to mention about this solution or not.

00:19:10.480 --> 00:19:13.920
<v Sjors Provoost>I think the original one was Pieter Wuille and the second one was Russell

00:19:13.920 --> 00:19:14.360
<v Sjors Provoost>O’Connor.

00:19:15.220 --> 00:19:18.320
<v Aaron van Wirdum>Right, okay. However, so I guess this is why we're making this episode.

00:19:18.340 --> 00:19:18.980
<v Sjors Provoost>No, Gavin Andresen.

00:19:19.560 --> 00:19:20.460
<v Aaron van Wirdum>Gavin Andresen.

00:19:21.890 --> 00:19:24.470
<v Aaron van Wirdum>I could have guessed. Gavin, you messed up.

00:19:26.020 --> 00:19:29.880
<v Sjors Provoost>Well, I don't know. I mean, it's just he's the author, so it doesn't mean that he came up with it.

00:19:29.880 --> 00:19:35.180
<v Aaron van Wirdum>It was a joke, but maybe it's kind of a sensitive joke at this point in time.

00:19:35.920 --> 00:19:40.500
<v Aaron van Wirdum>Sure, go on. Because there is a problem. It introduced a problem.

00:19:42.010 --> 00:19:47.290
<v Sjors Provoost>Yes. Well, actually, it did not introduce a problem. So just having this rule...

00:19:47.720 --> 00:19:48.420
<v Sjors Provoost>It's fine.

00:19:48.740 --> 00:19:49.140
<v Aaron van Wirdum>Okay.

00:19:49.640 --> 00:19:49.980
<v Sjors Provoost>However...

00:19:49.980 --> 00:19:50.940
<v Aaron van Wirdum>Good job, Gavin.

00:19:52.120 --> 00:19:55.320
<v Sjors Provoost>Exactly. So Gavin, whatever it was, he didn't do anything wrong.

00:19:55.540 --> 00:19:55.800
<v Aaron van Wirdum>Okay.

00:19:56.020 --> 00:20:01.040
<v Sjors Provoost>However, then in 2015, somebody tried to be smart and said, hey, we have this

00:20:01.040 --> 00:20:07.010
<v Sjors Provoost>BIP 34, which means that we don't need to check for BIP 30 anymore.

00:20:07.010 --> 00:20:11.910
<v Sjors Provoost>We can make it faster. So perhaps I said before in the episode, oh, this was the

00:20:11.910 --> 00:20:15.410
<v Sjors Provoost>reason, the performance thing was the reason to introduce it. Maybe not. Maybe

00:20:15.410 --> 00:20:19.550
<v Sjors Provoost>they did it because it was just a more elegant solution and it would prevent

00:20:19.550 --> 00:20:24.050
<v Sjors Provoost>mistakes. But then a couple of years later, somebody realized, hey, we can

00:20:24.050 --> 00:20:29.780
<v Sjors Provoost>actually make this faster by not checking BIP 30 anymore. Because we know

00:20:29.780 --> 00:20:31.540
<v Sjors Provoost>that the blocks must be unique, right?

00:20:31.760 --> 00:20:35.680
<v Aaron van Wirdum>Yeah, like I explained just now. I immediately got it. Why did it take these

00:20:35.680 --> 00:20:37.080
<v Aaron van Wirdum>Bitcoin Core developers so long, Sjors?

00:20:37.280 --> 00:20:42.320
<v Sjors Provoost>I don't know. So in 2015, that optimization was merged.

00:20:43.730 --> 00:20:49.650
<v Sjors Provoost>And, well, then in 2018, so three years later, somebody

00:20:49.650 --> 00:20:54.260
<v Sjors Provoost>realized, oh, oops, that doesn't actually work.

00:20:53.550 --> 00:20:57.110
<v Aaron van Wirdum>Wait, wait, wait. Sorry, I lost the plot. Where are we now? What's the year?

00:20:57.330 --> 00:21:01.090
<v Sjors Provoost>Well, the year of the fix is 2018, but I guess the year of the realization was

00:21:01.090 --> 00:21:01.930
<v Sjors Provoost>late 2017.

00:21:03.070 --> 00:21:03.250
<v Aaron van Wirdum>Okay.

00:21:03.670 --> 00:21:09.290
<v Sjors Provoost>So somewhere, I think it was October 2017, but this wasn't documented, but

00:21:09.290 --> 00:21:15.210
<v Sjors Provoost>it kind of follows. Somebody realized, oh, wait a minute. There are exceptions

00:21:15.210 --> 00:21:16.750
<v Sjors Provoost>to this convenient rule.

00:21:18.380 --> 00:21:24.200
<v Sjors Provoost>Remember that the rule of BIP 34 is that you put the height of the block at the

00:21:24.200 --> 00:21:28.540
<v Sjors Provoost>beginning of the coinbase. So block number one would have height number one, et

00:21:28.540 --> 00:21:29.040
<v Sjors Provoost>cetera, et cetera.

00:21:30.320 --> 00:21:35.720
<v Sjors Provoost>But that rule only applies starting with block, I don't know, 200,000 something.

00:21:36.160 --> 00:21:38.360
<v Aaron van Wirdum>It started being applied in 2012.

00:21:39.460 --> 00:21:44.240
<v Sjors Provoost>Yeah, and it started being applied from height number 220,000 or something like that.

00:21:45.450 --> 00:21:48.750
<v Sjors Provoost>And so from there on, this rule is correct. But the problem is, and that's what

00:21:48.750 --> 00:21:52.890
<v Sjors Provoost>people realize, is that it doesn't apply earlier. The rule wasn't active earlier.

00:21:53.290 --> 00:21:57.490
<v Sjors Provoost>So what is actually in those earlier coinbase transactions? Might there be

00:21:57.490 --> 00:22:01.390
<v Sjors Provoost>numbers in those earlier coinbase transactions, numbers that could represent a

00:22:01.390 --> 00:22:07.210
<v Sjors Provoost>block height? The answer is yes. There were numbers in there. All the coinbase

00:22:07.210 --> 00:22:10.270
<v Sjors Provoost>transactions that had numbers in there that represented blocks that might occur

00:22:10.270 --> 00:22:10.710
<v Sjors Provoost>in the future.

00:22:12.390 --> 00:22:17.310
<v Aaron van Wirdum>Okay, I know what you're saying, but the word represent is confusing here. There

00:22:17.310 --> 00:22:21.270
<v Aaron van Wirdum>were just numbers in there and they could be interpreted as blocks from the future.

00:22:21.610 --> 00:22:25.250
<v Sjors Provoost>Yeah, either it was a very smart miner that saw that this problem was going to happen.

00:22:25.470 --> 00:22:31.130
<v Aaron van Wirdum>Like let's say there could have been an early miner that for whatever reason put

00:22:31.130 --> 00:22:34.090
<v Aaron van Wirdum>the number a million in the coinbase.

00:22:34.270 --> 00:22:40.010
<v Sjors Provoost>Yeah, so as the episode suggests, some miner put the number 1,983,702 in the

00:22:40.010 --> 00:22:40.470
<v Sjors Provoost>coinbase.

00:22:40.990 --> 00:22:41.390
<v Aaron van Wirdum>Right.

00:22:41.750 --> 00:22:44.470
<v Sjors Provoost>They didn't actually put that number in there. They were probably just writing

00:22:44.470 --> 00:22:48.670
<v Sjors Provoost>their name, and the name, if you map it into how a computer reads it, might have

00:22:48.670 --> 00:22:49.590
<v Sjors Provoost>looked like a big number.

00:22:50.740 --> 00:22:55.560
<v Aaron van Wirdum>Right. Okay, so there was a block in, say, 2009

00:22:55.560 --> 00:22:59.740
<v Aaron van Wirdum>that… start with the number

00:22:59.740 --> 00:23:05.460
<v Aaron van Wirdum>1,900,000 something. So by the time we actually

00:23:05.460 --> 00:23:11.220
<v Aaron van Wirdum>get to block number 1,900,000 and that number has to be put in the coinbase,

00:23:11.380 --> 00:23:15.840
<v Aaron van Wirdum>there's a risk that it, well, it's a pretty, that's not gonna happen, right?

00:23:15.840 --> 00:23:20.620
<v Sjors Provoost>Normally this would not happen, but in theory somebody could… put, would have to

00:23:20.620 --> 00:23:21.540
<v Sjors Provoost>put the same number in it.

00:23:21.740 --> 00:23:22.180
<v Aaron van Wirdum>Yes.

00:23:22.380 --> 00:23:26.860
<v Sjors Provoost>And then could, if they wanted to, wouldn't happen accidentally, make the rest of

00:23:26.860 --> 00:23:29.440
<v Sjors Provoost>the coinbase identical to that original transaction.

00:23:29.760 --> 00:23:34.760
<v Aaron van Wirdum>Right. So, yeah. So it would just have to spend the same amount of, well, no,

00:23:34.900 --> 00:23:37.060
<v Aaron van Wirdum>because there's 50 coins in the original coinbase.

00:23:37.080 --> 00:23:42.240
<v Sjors Provoost>Much more. So Murch looked at this specific transaction and it turns out that

00:23:42.240 --> 00:23:46.520
<v Sjors Provoost>that was a very lucky block. So not only did it get a 50 Bitcoin coinbase

00:23:47.320 --> 00:23:52.960
<v Sjors Provoost>subsidy, which, you know, modern blocks don't get. It also got, I think, 50 or so

00:23:52.960 --> 00:23:55.060
<v Sjors Provoost>BTC in fees.

00:23:55.420 --> 00:23:56.040
<v Aaron van Wirdum>That's good.

00:23:56.280 --> 00:23:59.860
<v Sjors Provoost>Yeah, so that's a very nice little block in the past. So if you wanted to

00:23:59.860 --> 00:24:05.780
<v Sjors Provoost>reproduce this, your coinbase transaction would have to create about 107 Bitcoin.

00:24:06.120 --> 00:24:10.100
<v Sjors Provoost>It would have to spend 107 Bitcoin. That is only allowed if there is 107 Bitcoin

00:24:10.100 --> 00:24:12.000
<v Sjors Provoost>worth of fees in that block.

00:24:12.160 --> 00:24:12.400
<v Aaron van Wirdum>Right.

00:24:12.600 --> 00:24:16.680
<v Sjors Provoost>So that's never going to happen. Accidentally. The other thing that has to happen

00:24:16.680 --> 00:24:17.260
<v Sjors Provoost>is...

00:24:17.260 --> 00:24:21.400
<v Aaron van Wirdum>An attacker would have to actually probably pay these fees himself and then burn

00:24:21.400 --> 00:24:22.640
<v Aaron van Wirdum>it in this block.

00:24:22.860 --> 00:24:26.520
<v Sjors Provoost>Yes, because he cannot send it to some arbitrary destination. He has to reproduce

00:24:26.520 --> 00:24:31.180
<v Sjors Provoost>the original coinbase transaction, which means that his 107 Bitcoin has to go to

00:24:31.180 --> 00:24:34.440
<v Sjors Provoost>the original owner of that coinbase transaction.

00:24:34.660 --> 00:24:34.940
<v Aaron van Wirdum>Right.

00:24:35.160 --> 00:24:40.720
<v Sjors Provoost>And so maybe this miner, you know, was frozen and wakes up and decides that this

00:24:40.720 --> 00:24:44.280
<v Sjors Provoost>is a fun joke because you can just get the 107 Bitcoin back after doing this.

00:24:46.540 --> 00:24:51.160
<v Sjors Provoost>But the other problem is it would have to be a non-SegWit block because there was

00:24:51.160 --> 00:24:55.340
<v Sjors Provoost>no SegWit back then and SegWit adds something to the coinbase. Well, you can't

00:24:55.340 --> 00:24:58.480
<v Sjors Provoost>add that to the coinbase because then it would be a different block. So that

00:24:58.480 --> 00:25:02.420
<v Sjors Provoost>means all the fees would have to be in non-SegWit transactions. There's all sorts

00:25:02.420 --> 00:25:03.520
<v Sjors Provoost>of problems with this attack.

00:25:05.180 --> 00:25:09.100
<v Sjors Provoost>One problem I can think about is that the next miner might be like, hey, there's

00:25:09.100 --> 00:25:13.680
<v Sjors Provoost>a lot of fees in that original block. Let me reorg it and mine it myself. But

00:25:13.680 --> 00:25:17.720
<v Sjors Provoost>anyway, this could be done. And then you would have an identical transaction.

00:25:18.380 --> 00:25:21.260
<v Aaron van Wirdum>Hang on, hang on. Maybe first finish your sentence.

00:25:21.700 --> 00:25:26.860
<v Sjors Provoost>So if the attacker did that, they would have an identical transaction. And this

00:25:26.860 --> 00:25:31.560
<v Sjors Provoost>is what people realized back in 2017, 2018. That's bad because that is a BIP 30

00:25:31.560 --> 00:25:37.730
<v Sjors Provoost>violation. But we are not checking BIP 30 anymore. So we should check BIP 30 again.

00:25:39.080 --> 00:25:42.460
<v Sjors Provoost>That's the solution, basically. But it was a realization, like, oh, if we don't

00:25:42.460 --> 00:25:45.700
<v Sjors Provoost>fix this, let me, you know, they would have to look at all the other numbers that

00:25:45.700 --> 00:25:47.800
<v Sjors Provoost>were in all the transactions and see if this could happen earlier.

00:25:49.940 --> 00:25:53.420
<v Aaron van Wirdum>Okay, also, there could still be nodes that are checking BIP 30, right, in theory?

00:25:53.960 --> 00:25:55.400
<v Sjors Provoost>Yeah, that could be very old nodes.

00:25:55.480 --> 00:25:57.540
<v Aaron van Wirdum>Which could be sort of its own problem.

00:25:57.540 --> 00:26:01.400
<v Sjors Provoost>Exactly, all the nodes from before 2015 would check BIP 30, and they would not

00:26:01.400 --> 00:26:03.820
<v Sjors Provoost>approve this block if this attacker did that.

00:26:06.110 --> 00:26:11.830
<v Aaron van Wirdum>Let me sort of cut down, shortcut to... Okay, so let's

00:26:11.830 --> 00:26:16.610
<v Aaron van Wirdum>say an actual... Let's say just the classical example, like a state-level

00:26:16.610 --> 00:26:20.370
<v Aaron van Wirdum>attacker that does want to burn 100 Bitcoin just to fuck with Bitcoin.

00:26:20.610 --> 00:26:24.730
<v Sjors Provoost>It doesn't have to be a state-level attacker, like 100 Bitcoin. It's a lot of

00:26:24.730 --> 00:26:26.190
<v Sjors Provoost>money, but it's not state-level money.

00:26:26.250 --> 00:26:30.170
<v Aaron van Wirdum>Well, hang on. We're talking in 20 years from now, Sjors. That's enough to buy

00:26:30.170 --> 00:26:30.870
<v Aaron van Wirdum>North America.

00:26:31.230 --> 00:26:32.070
<v Sjors Provoost>Sure. Okay.

00:26:32.890 --> 00:26:38.850
<v Aaron van Wirdum>So a state level, my attacker wants to do this. What's the actual specific

00:26:38.850 --> 00:26:44.310
<v Aaron van Wirdum>consequence [unclear], like, he wouldn't also have to do the reorg thing and then

00:26:44.310 --> 00:26:46.170
<v Aaron van Wirdum>the UTXO sets get…

00:26:45.990 --> 00:26:47.790
<v Sjors Provoost>Well, okay, so the question is, first of all, you want to...

00:26:47.790 --> 00:26:48.510
<v Aaron van Wirdum>What's the actual risk?

00:26:48.710 --> 00:26:52.970
<v Sjors Provoost>Well, the first risk, and again, this has been fixed, but if it had not been

00:26:52.970 --> 00:26:57.430
<v Sjors Provoost>fixed... The first risk is that they could violate BIP 30. And that means that if

00:26:57.430 --> 00:27:02.330
<v Sjors Provoost>you had a node from before 2015, it would not accept the block. New nodes would

00:27:02.330 --> 00:27:05.630
<v Sjors Provoost>accept the block. So you get a chain split. And of course, you know, the majority

00:27:05.630 --> 00:27:08.130
<v Sjors Provoost>of people would probably be on the modern nodes because you wouldn't be running

00:27:08.130 --> 00:27:10.590
<v Sjors Provoost>25-year-old software, but it's still not healthy.

00:27:11.130 --> 00:27:13.630
<v Aaron van Wirdum>I mean, I'm pretty lazy with upgrading, to be honest.

00:27:13.890 --> 00:27:19.250
<v Sjors Provoost>Yeah. Well, your computer will force you to, probably. But the other thing

00:27:19.250 --> 00:27:23.950
<v Sjors Provoost>is... Yeah, then you could have shenanigans, right? So, yeah, you could be

00:27:23.950 --> 00:27:27.670
<v Sjors Provoost>talking about this reorg scenario. I don't know if that's useful for the attacker

00:27:27.670 --> 00:27:31.710
<v Sjors Provoost>or just shoots himself in the foot. But there may be other weird things that you

00:27:31.710 --> 00:27:37.650
<v Sjors Provoost>can do. It shouldn't happen, basically. So you can try and reason about it, but

00:27:37.650 --> 00:27:39.250
<v Sjors Provoost>you just want to prevent that from happening.

00:27:39.410 --> 00:27:44.050
<v Aaron van Wirdum>Okay, so we've got 22 years, more or less, to do something about this problem.

00:27:44.470 --> 00:27:46.090
<v Sjors Provoost>Yeah, we didn't wait that long.

00:27:46.330 --> 00:27:48.610
<v Aaron van Wirdum>What are we going to do? Oh, it's solved already?

00:27:48.810 --> 00:27:53.160
<v Sjors Provoost>Yes, in 2018, once they realized this problem, it was solved. And the solution is

00:27:53.160 --> 00:27:58.840
<v Sjors Provoost>very simple. As of block 1,983,702,

00:27:59.290 --> 00:28:00.710
<v Sjors Provoost>we just check BIP 30 again.

00:28:01.760 --> 00:28:05.400
<v Aaron van Wirdum>Oh, we're back to checking BIP 30 with all these inefficiencies?

00:28:05.640 --> 00:28:09.440
<v Sjors Provoost>Yes. Now we will check it from that block onward.

00:28:09.800 --> 00:28:11.260
<v Aaron van Wirdum>Oh, okay, yeah, that makes sense.

00:28:11.320 --> 00:28:14.620
<v Sjors Provoost>Which means we have 30 years to actually solve the problem, but if we don't solve

00:28:14.620 --> 00:28:16.240
<v Sjors Provoost>the problem, we'll just check BIP 30.

00:28:16.640 --> 00:28:19.040
<v Aaron van Wirdum>Right, okay, so in 20 years...

00:28:20.540 --> 00:28:24.720
<v Aaron van Wirdum>My Bitcoin Core node, well, I haven't upgraded my... Your Bitcoin Core node

00:28:24.720 --> 00:28:30.240
<v Aaron van Wirdum>today, if you don't upgrade it, will still start checking for BIP 30 in

00:28:30.240 --> 00:28:31.420
<v Aaron van Wirdum>20 years from now.

00:28:31.560 --> 00:28:32.020
<v Sjors Provoost>That's right.

00:28:32.260 --> 00:28:33.140
<v Aaron van Wirdum>Oh, okay. Interesting.

00:28:33.500 --> 00:28:37.060
<v Sjors Provoost>So will your node probably, unless you didn't upgrade before 2018.

00:28:38.070 --> 00:28:42.290
<v Aaron van Wirdum>I'm not sure. No, probably I did. No, I did upgrade since 2018.

00:28:42.290 --> 00:28:46.130
<v Sjors Provoost>There are so many security vulnerabilities in old Bitcoin nodes that this is the

00:28:46.130 --> 00:28:46.890
<v Sjors Provoost>last of your problems.

00:28:47.090 --> 00:28:50.270
<v Aaron van Wirdum>I might be like three versions behind, but not that many.

00:28:50.290 --> 00:28:51.350
<v Sjors Provoost>That's probably not too bad.

00:28:52.630 --> 00:28:58.490
<v Sjors Provoost>But it gets more exciting than that because 1,983,702

00:28:58.490 --> 00:29:03.540
<v Sjors Provoost>is not the only block where this happens. It was an earlier block where it didn't

00:29:03.540 --> 00:29:06.600
<v Sjors Provoost>happen, but it could have. Or it could not have.

00:29:06.720 --> 00:29:07.900
<v Aaron van Wirdum>Wait, sorry, there was?

00:29:08.060 --> 00:29:10.780
<v Sjors Provoost>There is block 490,897.

00:29:11.460 --> 00:29:13.520
<v Aaron van Wirdum>Are we talking about the future or the past?

00:29:13.680 --> 00:29:13.940
<v Sjors Provoost>The past.

00:29:14.100 --> 00:29:15.340
<v Aaron van Wirdum>Okay, what about it?

00:29:15.460 --> 00:29:19.580
<v Sjors Provoost>So this block was another one of those numbers that if you look at the older

00:29:19.580 --> 00:29:24.620
<v Sjors Provoost>coinbase transactions and you just find what number is in there, there was a

00:29:24.620 --> 00:29:30.040
<v Sjors Provoost>couple of numbers in there. I think one number was so low, like 200,000, it was

00:29:30.040 --> 00:29:36.030
<v Sjors Provoost>before BIP 34 was activated. So it wasn't a problem because it

00:29:36.030 --> 00:29:41.970
<v Sjors Provoost>was referring to something in the same era. But the next number was 490,897,

00:29:41.970 --> 00:29:47.570
<v Sjors Provoost>which was in October 2017. And that block, if it wasn't for some lucky

00:29:47.570 --> 00:29:52.750
<v Sjors Provoost>circumstances, could have already exposed this bug that we just talked about. So

00:29:52.750 --> 00:29:56.910
<v Sjors Provoost>we wouldn't have had 30 years. No, we had two weeks, basically. At least the

00:29:56.910 --> 00:30:00.330
<v Sjors Provoost>people who discovered this issue discovered it about two weeks before that block.

00:30:01.050 --> 00:30:01.410
<v Aaron van Wirdum>Interesting.

00:30:01.650 --> 00:30:05.310
<v Sjors Provoost>So this is like the asteroid coming towards the Earth, and NASA says, oh, we

00:30:05.310 --> 00:30:07.670
<v Sjors Provoost>found an asteroid coming towards the Earth, but don't worry, it's going to miss

00:30:07.670 --> 00:30:11.730
<v Sjors Provoost>us by at least the distance between here and the Moon. It's fine. The only thing

00:30:11.730 --> 00:30:15.450
<v Sjors Provoost>is we found out like two hours ago, so if it had not missed us, we would be dead

00:30:15.450 --> 00:30:16.870
<v Sjors Provoost>and we would not have noticed it.

00:30:17.210 --> 00:30:17.910
<v Aaron van Wirdum>Right, right, right.

00:30:18.150 --> 00:30:21.930
<v Sjors Provoost>So this is one of those cases where, yes, the bug isn't actually harmful, but if

00:30:21.930 --> 00:30:24.230
<v Sjors Provoost>it had been harmful, it would have been only two weeks to deal with it.

00:30:26.090 --> 00:30:30.970
<v Aaron van Wirdum>I mean, the bug could have been harmful if someone wanted to exploit it.

00:30:31.110 --> 00:30:37.030
<v Sjors Provoost>No. So basically, by looking at the original transaction, they could see that

00:30:37.030 --> 00:30:41.170
<v Sjors Provoost>it was not possible to exploit this. And the reason is because that coinbase,

00:30:41.310 --> 00:30:46.920
<v Sjors Provoost>yes, you could duplicate it, but it was already spent. And so you then need to

00:30:46.920 --> 00:30:50.620
<v Sjors Provoost>reproduce the transactions that spent the coinbase. And that is impossible

00:30:50.620 --> 00:30:54.860
<v Sjors Provoost>because one of those transactions was spending another coinbase. And that other

00:30:54.860 --> 00:31:00.360
<v Sjors Provoost>coinbase had a number in it. It's like 5 billion or some insane number. And we

00:31:00.360 --> 00:31:04.520
<v Sjors Provoost>can never get to block 5 billion, at least not in the current code, right?

00:31:04.520 --> 00:31:06.020
<v Sjors Provoost>Because it stops in 2106.

00:31:06.260 --> 00:31:06.720
<v Aaron van Wirdum>I see.

00:31:06.960 --> 00:31:09.460
<v Sjors Provoost>And then you have a hard fork. So with a hard fork, you can fix everything

00:31:09.460 --> 00:31:10.160
<v Sjors Provoost>basically though.

00:31:11.650 --> 00:31:14.810
<v Sjors Provoost>Anything after blocks 6 million or so, you don't have to worry about it.

00:31:16.290 --> 00:31:18.010
<v Sjors Provoost>So that was good, but it was a close call.

00:31:18.150 --> 00:31:21.090
<v Aaron van Wirdum>With a hard fork, you can fix anything. You can quote Sjors on that.

00:31:23.080 --> 00:31:25.260
<v Sjors Provoost>I'm not saying you're not introducing any new problems.

00:31:24.000 --> 00:31:25.780
<v Aaron van Wirdum>Are you pushing for a hard fork?

00:31:26.840 --> 00:31:30.000
<v Sjors Provoost>No, you can just wait until 2006, 2106.

00:31:30.820 --> 00:31:35.860
<v Aaron van Wirdum>Anyways, okay, we had a near miss in 2017. That

00:31:35.860 --> 00:31:40.960
<v Aaron van Wirdum>turned out to not be a real problem. Now we got 20 years to either fix this

00:31:40.960 --> 00:31:43.460
<v Aaron van Wirdum>problem or just ignore it because it's kind of already fixed.

00:31:45.620 --> 00:31:46.420
<v Aaron van Wirdum>Anything else?

00:31:46.600 --> 00:31:51.520
<v Sjors Provoost>Yeah, so the fix was shipped in 2018. It just basically says, okay, from this

00:31:51.520 --> 00:31:55.340
<v Sjors Provoost>block, I'm going to check BIP 30. So anybody running a modern node doesn't have

00:31:55.340 --> 00:32:00.680
<v Sjors Provoost>to worry too much. Except on testnet, I think. On testnet, I think on testnet,

00:32:00.880 --> 00:32:05.280
<v Sjors Provoost>it's already checking BIP 30 now. But who cares about testnet?

00:32:07.980 --> 00:32:10.420
<v Sjors Provoost>Because testnet has the same kind of problem.

00:32:12.080 --> 00:32:12.500
<v Aaron van Wirdum>Yeah.

00:32:12.500 --> 00:32:14.140
<v Sjors Provoost>And it was fixed in the same way.

00:32:14.260 --> 00:32:14.440
<v Aaron van Wirdum>Okay.

00:32:14.740 --> 00:32:19.860
<v Sjors Provoost>And I think in testnet, there was another block like that in block 2,200,000 or

00:32:19.860 --> 00:32:20.500
<v Sjors Provoost>something like that.

00:32:20.940 --> 00:32:22.940
<v Aaron van Wirdum>I don't care about testnet.

00:32:23.160 --> 00:32:26.100
<v Sjors Provoost>But testnet has already had block 2,500,000. So I think it's already checking

00:32:26.100 --> 00:32:26.560
<v Sjors Provoost>BIP 30.

00:32:26.720 --> 00:32:26.940
<v Aaron van Wirdum>Okay.

00:32:27.520 --> 00:32:30.780
<v Sjors Provoost>And there's a little code comment saying like, oh, I'm sure somebody will fix it

00:32:30.780 --> 00:32:31.280
<v Sjors Provoost>before then.

00:32:32.050 --> 00:32:36.990
<v Aaron van Wirdum>Oh, I was going to ask, so we got 20 years, are there other solutions? Is this

00:32:36.990 --> 00:32:41.210
<v Aaron van Wirdum>just it, or do we have other ways out of this conundrum that we find ourselves in?

00:32:41.410 --> 00:32:47.370
<v Sjors Provoost>So ideally, you want to have something in every block that

00:32:47.370 --> 00:32:52.530
<v Sjors Provoost>we know was not in those blocks before BIP 34 activated.

00:32:54.100 --> 00:32:58.340
<v Sjors Provoost>And there's a bunch of candidates that were mentioned back in the day. But one

00:32:58.340 --> 00:33:03.520
<v Sjors Provoost>candidate that I saw on Twitter, I think it was Calvin Kim that said it, but I

00:33:03.520 --> 00:33:07.090
<v Sjors Provoost>don't know if he came up with it or heard it from somebody else. And that is to

00:33:07.090 --> 00:33:11.530
<v Sjors Provoost>basically make SegWit mandatory. And why? Right now...

00:33:11.530 --> 00:33:12.050
<v Aaron van Wirdum>Wait, wait.

00:33:13.790 --> 00:33:14.530
<v Sjors Provoost>SegWit commitments.

00:33:14.550 --> 00:33:16.250
<v Aaron van Wirdum>SegWit for every transaction mandatory?

00:33:16.250 --> 00:33:17.690
<v Sjors Provoost>No, just Seg… for every block.

00:33:18.190 --> 00:33:19.630
<v Aaron van Wirdum>For every coinbase transaction?

00:33:19.790 --> 00:33:20.010
<v Sjors Provoost>Yes.

00:33:20.170 --> 00:33:21.410
<v Aaron van Wirdum>Yeah, okay, that makes sense.

00:33:21.610 --> 00:33:26.890
<v Sjors Provoost>So every block has to commit to SegWit, has to include the SegWit commitment. The

00:33:26.890 --> 00:33:30.350
<v Sjors Provoost>SegWit commitment is an OP_RETURN that refers to the tree of SegWit transactions.

00:33:30.610 --> 00:33:32.950
<v Aaron van Wirdum>Oh, wait, so are you just, oh.

00:33:33.390 --> 00:33:35.950
<v Sjors Provoost>So the transactions in the block don't have to be SegWit.

00:33:36.150 --> 00:33:39.910
<v Aaron van Wirdum>Oh, so what you're saying is that could still be a block mined that has zero

00:33:39.910 --> 00:33:44.350
<v Aaron van Wirdum>SegWit transactions. But as soon as there's one SegWit transaction in a block,

00:33:44.530 --> 00:33:48.370
<v Aaron van Wirdum>you need the SegWit thing in the coinbase and therefore the transaction ID is different.

00:33:48.710 --> 00:33:52.530
<v Sjors Provoost>Yeah, and so right now, every time there is a SegWit block, yes, that's happened

00:33:52.530 --> 00:33:57.330
<v Sjors Provoost>automatically. But empty blocks or blocks with no SegWit transactions do not

00:33:57.330 --> 00:34:01.190
<v Sjors Provoost>commit to SegWit. But definitely empty blocks don't. However, they can, they just

00:34:01.190 --> 00:34:05.280
<v Sjors Provoost>don't. Because they don't have to. So the change would be to say, okay, you have to.

00:34:05.420 --> 00:34:10.240
<v Aaron van Wirdum>Let me ask this question real quick. So because I was going to ask, has there

00:34:10.240 --> 00:34:13.820
<v Aaron van Wirdum>been any block mined that doesn't include any SegWit transactions

00:34:13.640 --> 00:34:14.700
<v Aaron van Wirdum>since SegWit [unclear]?

00:34:14.120 --> 00:34:14.240
<v Sjors Provoost>Yes.

00:34:14.720 --> 00:34:15.960
<v Aaron van Wirdum>And that would be empty blocks.

00:34:16.100 --> 00:34:16.300
<v Sjors Provoost>Yes.

00:34:16.480 --> 00:34:18.200
<v Aaron van Wirdum>Right. Yeah. Makes sense. Okay. Go on.

00:34:18.640 --> 00:34:23.960
<v Sjors Provoost>So basically, you know, the difficulty then would just be, okay, when you propose

00:34:23.960 --> 00:34:27.660
<v Sjors Provoost>an empty block, which you have to do as a miner sometimes, very briefly. Just

00:34:27.660 --> 00:34:31.540
<v Sjors Provoost>make sure that it's a SegWit block. So that would be a fairly simple soft fork.

00:34:32.220 --> 00:34:34.520
<v Sjors Provoost>But there are other ideas out there.

00:34:34.840 --> 00:34:39.860
<v Aaron van Wirdum>It's probably still like, you know, in the sort of Puritan Bitcoin conservative,

00:34:40.300 --> 00:34:44.940
<v Aaron van Wirdum>you know, which is a good philosophy. It's still...

00:34:46.800 --> 00:34:50.580
<v Aaron van Wirdum>it's still kind of a cost to miners, which you're opposing on miners. Like now

00:34:50.580 --> 00:34:53.720
<v Aaron van Wirdum>they have to do something extra. Like it might still be controversial. I don't

00:34:53.720 --> 00:34:54.340
<v Aaron van Wirdum>know. What do you think?

00:34:54.380 --> 00:34:58.220
<v Sjors Provoost>I don't know if it's a cost to miners because if they use Bitcoin Core to create

00:34:58.220 --> 00:35:00.580
<v Sjors Provoost>the block templates, Bitcoin Core would just do it for them.

00:35:01.260 --> 00:35:05.020
<v Aaron van Wirdum>Well, the cost I'm referring to is you have to upgrade your Bitcoin Core node

00:35:05.020 --> 00:35:05.800
<v Aaron van Wirdum>once in a while.

00:35:07.200 --> 00:35:10.890
<v Aaron van Wirdum>It's not backwards compatible is what I'm basically saying, for miners.

00:35:11.110 --> 00:35:14.430
<v Sjors Provoost>Not for the miners, no, but that's always true for soft forks. Well, no, it's not

00:35:14.430 --> 00:35:19.010
<v Sjors Provoost>always true for soft forks. Generally, soft forks are done in such a way that if

00:35:19.010 --> 00:35:23.690
<v Sjors Provoost>you only mine standard transactions, then you're going to be fine. But for this

00:35:23.690 --> 00:35:26.510
<v Sjors Provoost>case, yes, miners would have to do something, just like they had in the first

00:35:26.510 --> 00:35:30.950
<v Sjors Provoost>time it was introduced. So, yeah, it's not entirely innocent.

00:35:31.110 --> 00:35:34.830
<v Aaron van Wirdum>It seems to me like a very plausible or reasonable solution. I'm just pointing

00:35:34.830 --> 00:35:37.030
<v Aaron van Wirdum>out that even that might have some pushback.

00:35:37.150 --> 00:35:40.850
<v Sjors Provoost>Yeah, and the other solutions, I think, have the same property, is that every

00:35:40.850 --> 00:35:43.710
<v Sjors Provoost>miner would have to do it, or they might lose a block if they mine an empty block.

00:35:44.030 --> 00:35:44.470
<v Aaron van Wirdum>Right.

00:35:45.370 --> 00:35:49.830
<v Sjors Provoost>So I think another one was, okay, we just add the block height again, but we add

00:35:49.830 --> 00:35:53.590
<v Sjors Provoost>it to a different field, like the lock time of the coinbase transaction.

00:35:54.430 --> 00:35:57.070
<v Aaron van Wirdum>Because lock time wasn't activated back in?

00:35:57.170 --> 00:36:00.970
<v Sjors Provoost>Lock time wasn't used. As far as I know, again, you'd have to run a script and check.

00:36:01.490 --> 00:36:03.770
<v Aaron van Wirdum>Well, lock time was introduced in 2015, right?

00:36:05.400 --> 00:36:10.800
<v Sjors Provoost>It's possible, but the numbers were there. They didn't have any meaning. So you

00:36:10.800 --> 00:36:15.200
<v Sjors Provoost>still have to check that they weren't used. But that's easy. I think this SegWit

00:36:15.200 --> 00:36:20.060
<v Sjors Provoost>thing is the simplest one. The other option is we can buy ourselves another 20

00:36:20.060 --> 00:36:22.560
<v Sjors Provoost>years or so, to block

00:36:22.560 --> 00:36:26.780
<v Sjors Provoost>3,808,179.

00:36:26.900 --> 00:36:27.160
<v Aaron van Wirdum>How?

00:36:27.680 --> 00:36:33.500
<v Sjors Provoost>Well, we would have to very carefully study block 1,983,702. Well, not this

00:36:33.500 --> 00:36:37.320
<v Sjors Provoost>block, but the original block that created it. And that coinbase has been spent,

00:36:37.340 --> 00:36:41.910
<v Sjors Provoost>so it can already be recreated, but you have to look at all the descendants. So

00:36:41.910 --> 00:36:44.710
<v Sjors Provoost>this thing was spent to like, I don't know, 10 different addresses and those

00:36:44.710 --> 00:36:48.950
<v Sjors Provoost>could spend and those could spend. And if you can show that for every transaction

00:36:48.950 --> 00:36:53.890
<v Sjors Provoost>descending from it, it was also using a coinbase transaction that cannot be

00:36:53.890 --> 00:36:58.790
<v Sjors Provoost>duplicated. Maybe you can prove that it, you know, you could write a proof that

00:36:58.790 --> 00:37:03.100
<v Sjors Provoost>it can never happen. Gives you another 20 years. I think that's a stupid exercise

00:37:03.100 --> 00:37:04.340
<v Sjors Provoost>compared to the simple soft fork.

00:37:04.460 --> 00:37:07.640
<v Aaron van Wirdum>Well, you didn't figure it out for this podcast if that's the case or not?

00:37:07.720 --> 00:37:11.080
<v Sjors Provoost>I did ask it on Stack Overflow in a comment somewhere, but no, I did not.

00:37:11.760 --> 00:37:14.460
<v Aaron van Wirdum>What do you do for this podcast?

00:37:16.140 --> 00:37:16.540
<v Sjors Provoost>Nothing.

00:37:19.080 --> 00:37:19.760
<v Aaron van Wirdum>Moving on.

00:37:19.940 --> 00:37:23.100
<v Sjors Provoost>I did actually run a script to check that there are no OP_RETURN transactions

00:37:23.100 --> 00:37:25.360
<v Sjors Provoost>before BIP 324 activated.

00:37:26.320 --> 00:37:28.120
<v Aaron van Wirdum>Wait, sorry. Can you repeat that just for me?

00:37:28.320 --> 00:37:33.080
<v Sjors Provoost>There were no OP_RETURN transactions in the coinbase, okay, before BIP 324

00:37:33.080 --> 00:37:33.620
<v Sjors Provoost>activated.

00:37:33.740 --> 00:37:34.860
<v Aaron van Wirdum>You did actually check that?

00:37:35.040 --> 00:37:35.280
<v Sjors Provoost>Yes.

00:37:35.340 --> 00:37:35.560
<v Aaron van Wirdum>Okay.

00:37:35.740 --> 00:37:38.460
<v Sjors Provoost>Which means that you don't even have to commit to SegWit. You just have to put

00:37:38.460 --> 00:37:42.560
<v Sjors Provoost>OP_RETURN in a coinbase transaction. That will be the rule. But of course, it's

00:37:42.560 --> 00:37:43.960
<v Sjors Provoost>easier to just say SegWit.

00:37:46.920 --> 00:37:52.520
<v Aaron van Wirdum>Okay, so far I think we agree SegWit is the most reasonable, low effort kind of

00:37:52.520 --> 00:37:56.600
<v Aaron van Wirdum>way of doing this. I guess you could do Taproot as well maybe or no. Does it make sense?

00:37:56.980 --> 00:37:58.080
<v Sjors Provoost>Taproot is just a subset.

00:37:58.360 --> 00:38:00.020
<v Aaron van Wirdum>I'm just thinking out loud.

00:38:00.040 --> 00:38:04.380
<v Sjors Provoost>You want to keep it simple? So the funny thing is there was in 2019 a proposal.

00:38:04.600 --> 00:38:09.040
<v Aaron van Wirdum>I'm just thinking of soft forks that were introduced after 2015 to make me sound

00:38:09.040 --> 00:38:12.080
<v Aaron van Wirdum>smart. But yeah, SegWit is the obvious thing here. Go on.

00:38:12.560 --> 00:38:17.320
<v Sjors Provoost>Yeah, so there was a great consensus cleanup proposal back in 2019 by Matt

00:38:17.320 --> 00:38:22.500
<v Sjors Provoost>Corallo, Blue Matt, which contained a bunch of these very small fixes, kind of

00:38:22.500 --> 00:38:24.540
<v Sjors Provoost>similar to this one, but not actually this one.

00:38:27.490 --> 00:38:29.510
<v Aaron van Wirdum>Sorry, a fix for this specific problem?

00:38:29.610 --> 00:38:30.310
<v Sjors Provoost>Yeah, it was not in there.

00:38:31.540 --> 00:38:32.900
<v Aaron van Wirdum>So why do you even bring it up?

00:38:33.300 --> 00:38:36.680
<v Sjors Provoost>Because I was curious whether the great consensus cleanup would clean this up.

00:38:36.740 --> 00:38:37.860
<v Aaron van Wirdum>And it doesn't.

00:38:38.020 --> 00:38:41.260
<v Sjors Provoost>But it would if you were to revive that proposal, you should clean this up too.

00:38:42.130 --> 00:38:42.530
<v Aaron van Wirdum>Okay.

00:38:43.010 --> 00:38:46.670
<v Sjors Provoost>Because it also fixes the time warp attack and other things that we've discussed

00:38:46.670 --> 00:38:47.370
<v Sjors Provoost>in other episodes.

00:38:47.530 --> 00:38:49.810
<v Aaron van Wirdum>Sure. Yeah. Okay.

00:38:51.330 --> 00:38:52.210
<v Sjors Provoost>That's all I have.

00:38:52.630 --> 00:38:56.050
<v Aaron van Wirdum>Yeah. Well, I mean, it sounds to me like SegWit is the easy way to go. And

00:38:56.050 --> 00:38:56.950
<v Aaron van Wirdum>also...

00:38:57.020 --> 00:38:59.020
<v Sjors Provoost>We have a few decades to figure this out.

00:38:59.020 --> 00:39:02.520
<v Aaron van Wirdum>We can think about it in a while. All right. Thanks, Sjors.

00:39:02.960 --> 00:39:04.780
<v Sjors Provoost>All right, and thank you for listening to Bitcoin.

00:39:05.680 --> 00:39:06.080
<v Aaron van Wirdum>Explained.

