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

00:00:20.780 --> 00:00:25.220
<v Aaron van Wirdum>Live from Utrecht, this is Bitcoin Explained. It's Sjors.

00:00:25.880 --> 00:00:26.780
<v Sjors Provoost>We're back.

00:00:26.920 --> 00:00:32.700
<v Aaron van Wirdum>We're back in beautiful, sunny Utrecht after I spent some time in Miami and

00:00:32.700 --> 00:00:37.820
<v Aaron van Wirdum>Prague and you spent some time in Prague and more Prague. Is that right?

00:00:38.060 --> 00:00:38.640
<v Sjors Provoost>Mostly Prague.

00:00:38.840 --> 00:00:39.900
<v Aaron van Wirdum>You were in Prague for a while.

00:00:41.140 --> 00:00:46.740
<v Aaron van Wirdum>That's where we recorded the previous episode. Of course, about Stratum V2. And

00:00:46.740 --> 00:00:51.820
<v Aaron van Wirdum>now we're back in Utrecht. And we're going to talk about Bitcoin Core 25,

00:00:52.300 --> 00:00:57.000
<v Aaron van Wirdum>which is the latest Bitcoin Core release. But it came out a couple of weeks ago.

00:00:57.720 --> 00:01:02.450
<v Aaron van Wirdum>Because we were traveling, we didn't have time to record this episode yet. But

00:01:02.450 --> 00:01:07.890
<v Aaron van Wirdum>dear listener, we won't disappoint you. Here we are with our episode on Bitcoin

00:01:07.890 --> 00:01:08.830
<v Aaron van Wirdum>Core 25.

00:01:10.410 --> 00:01:11.670
<v Aaron van Wirdum>Before we get there.

00:01:13.550 --> 00:01:16.710
<v Sjors Provoost>It's time for the critical part of the show.

00:01:16.850 --> 00:01:21.050
<v Aaron van Wirdum>I will be honest with you, Sjors. I am starting to regret doing the jingle

00:01:21.050 --> 00:01:25.400
<v Aaron van Wirdum>myself. I do feel like I painted myself in the corner with this one.

00:01:26.150 --> 00:01:26.830
<v Sjors Provoost>But [unclear]…

00:01:26.830 --> 00:01:32.750
<v Aaron van Wirdum>Here we go. Sjors stacks sats. Sjors stacks sats. Sjors stacks sats.

00:01:33.310 --> 00:01:33.870
<v Sjors Provoost>Yay.

00:01:35.510 --> 00:01:40.970
<v Sjors Provoost>Okay, I guess I'll read one. We have 250 sats from a unit of Ack,

00:01:41.330 --> 00:01:45.350
<v Sjors Provoost>which I would probably read as Proost, as in cheers, because it's two beer

00:01:45.350 --> 00:01:49.830
<v Sjors Provoost>glasses. And then there's another one from Michael

00:01:49.830 --> 00:01:54.910
<v Sjors Provoost>Matulev, Sjors stacks sats, without a music jingle.

00:01:56.080 --> 00:01:59.880
<v Sjors Provoost>Um and MRMR 1750 sats.

00:01:59.880 --> 00:02:02.220
<v Aaron van Wirdum>How do you know that was without the music jingle, Sjors?

00:02:02.220 --> 00:02:06.400
<v Sjors Provoost>Because it doesn't have the music emoji. The last one did.

00:02:06.400 --> 00:02:08.720
<v Aaron van Wirdum>Oh it actually did and you still didn't sing it?

00:02:08.720 --> 00:02:09.860
<v Sjors Provoost>Yeah this one doesn't.

00:02:09.860 --> 00:02:11.680
<v Aaron van Wirdum>Okay well what was the third one?

00:02:12.450 --> 00:02:14.530
<v Sjors Provoost>Whatever let's move on.

00:02:14.530 --> 00:02:19.570
<v Aaron van Wirdum>Sjors, do you still like this part of the episode? Because I don't think I've

00:02:19.570 --> 00:02:22.050
<v Aaron van Wirdum>heard a single interesting message so far.

00:02:22.250 --> 00:02:25.110
<v Sjors Provoost>Well, we could make the criteria a bit stricter that the message should actually

00:02:25.110 --> 00:02:26.550
<v Sjors Provoost>be interesting before we do the segment.

00:02:27.790 --> 00:02:31.030
<v Aaron van Wirdum>All right. Sjors stacks sats.

00:02:32.640 --> 00:02:36.200
<v Aaron van Wirdum>Sjors, Bitcoin Core 25. Or 25.0.

00:02:36.200 --> 00:02:37.680
<v Sjors Provoost>Speaking of not very interesting.

00:02:37.680 --> 00:02:42.320
<v Aaron van Wirdum>Right I was just gonna say this doesn't strike me as a particular

00:02:42.320 --> 00:02:48.320
<v Aaron van Wirdum>particularly spectacular release maybe as always I guess at this

00:02:48.320 --> 00:02:54.230
<v Aaron van Wirdum>point most listeners will know but just For context, what does it

00:02:54.230 --> 00:02:56.170
<v Aaron van Wirdum>mean that there is a new Bitcoin Core release?

00:02:56.350 --> 00:02:59.810
<v Sjors Provoost>It means about six months went by since the last Bitcoin Core release.

00:03:00.190 --> 00:03:00.330
<v Aaron van Wirdum>Right.

00:03:00.790 --> 00:03:06.790
<v Sjors Provoost>So it's basically whatever makes it in by some date is what goes

00:03:06.790 --> 00:03:12.350
<v Sjors Provoost>in. And then there's some time, maybe a month or two spent on fixing bugs, not

00:03:12.350 --> 00:03:15.700
<v Sjors Provoost>changing anything, just fixing bugs. And then it's released.

00:03:15.900 --> 00:03:21.680
<v Aaron van Wirdum>Right. So that's in contrast with some other types of software that will release

00:03:21.680 --> 00:03:27.100
<v Aaron van Wirdum>a new version once they've included some kind of important new upgrade. Instead

00:03:27.100 --> 00:03:31.320
<v Aaron van Wirdum>of that, Bitcoin Core just releases a new version every six months. So sometimes

00:03:31.320 --> 00:03:36.440
<v Aaron van Wirdum>it's very interesting and sometimes not much happens in six months. That's really

00:03:36.440 --> 00:03:40.010
<v Aaron van Wirdum>worth... talking about but we're still going to talk about it is that right?

00:03:40.010 --> 00:03:43.930
<v Sjors Provoost>It also depends on your interest because if you look at the actual you know list

00:03:43.930 --> 00:03:47.990
<v Sjors Provoost>of all the little commits that go in there there's a lot of stuff that's under

00:03:47.990 --> 00:03:53.410
<v Sjors Provoost>the hood so if you find that stuff interesting um then there might actually be

00:03:53.410 --> 00:03:54.290
<v Sjors Provoost>much more for you there.

00:03:54.290 --> 00:03:59.940
<v Aaron van Wirdum>Sure I'm just approaching it from a podcast host perspective

00:03:59.940 --> 00:04:05.670
<v Aaron van Wirdum>and what a average listener might find interesting I think this is

00:04:05.670 --> 00:04:09.650
<v Aaron van Wirdum>not going to be the most spectacular episode but we're still going to do it Sjors.

00:04:09.650 --> 00:04:10.350
<v Sjors Provoost>That's right.

00:04:10.350 --> 00:04:15.550
<v Aaron van Wirdum>Okay so we highlighted a couple of upgrades that are at least kind of worth

00:04:15.550 --> 00:04:21.360
<v Aaron van Wirdum>talking about and we're just going to do them in um in order

00:04:21.360 --> 00:04:27.060
<v Aaron van Wirdum>of us having written them down in our own show notes. They're not in order of

00:04:27.060 --> 00:04:31.480
<v Aaron van Wirdum>importance or in order of anything else right? I think that's right. Okay so

00:04:31.480 --> 00:04:32.400
<v Aaron van Wirdum>number one:

00:04:33.940 --> 00:04:39.800
<v Aaron van Wirdum>there is some kind of performance improvement when it comes to

00:04:40.590 --> 00:04:45.410
<v Aaron van Wirdum>huge transaction loads and it has something to do with BRC-20 is that right?

00:04:45.410 --> 00:04:49.250
<v Sjors Provoost>Yeah that's right. So what in more in general what we've seen in the last few

00:04:49.250 --> 00:04:54.850
<v Sjors Provoost>months is the um the the inscriptions the Ordinals and then the

00:04:54.850 --> 00:05:00.010
<v Sjors Provoost>BRC-20 hypes and also the Stamps hy— hype that we uh we talked about in earlier

00:05:00.010 --> 00:05:01.290
<v Sjors Provoost>episodes it

00:05:01.290 --> 00:05:06.350
<v Aaron van Wirdum>just yeah hang on so yeah we spoke about inscriptions Ordinals in a previous

00:05:06.350 --> 00:05:10.690
<v Aaron van Wirdum>episode as well as Stamps. We have not spoken about BRC-20.

00:05:11.090 --> 00:05:16.330
<v Sjors Provoost>No, BRC-20 is based on inscriptions. They are inscriptions. They're just

00:05:16.330 --> 00:05:20.090
<v Sjors Provoost>inscriptions with a piece of JSON in it. And they are supposed to be smart

00:05:20.090 --> 00:05:24.930
<v Sjors Provoost>contracts. I'm saying that with a very cynical face and scare quotes. They are

00:05:24.930 --> 00:05:26.810
<v Sjors Provoost>not smarts and they're also not contracts.

00:05:27.670 --> 00:05:32.670
<v Aaron van Wirdum>So this is also what I thought. But you're sure about it? They are just using

00:05:32.670 --> 00:05:33.410
<v Aaron van Wirdum>inscriptions, right?

00:05:33.410 --> 00:05:33.570
<v Sjors Provoost>Yeah.

00:05:33.670 --> 00:05:38.400
<v Aaron van Wirdum>And then they do... It's kind of it's kind of like how Counterparty reinvented is

00:05:38.400 --> 00:05:39.020
<v Aaron van Wirdum>that sort of?

00:05:39.020 --> 00:05:39.460
<v Sjors Provoost>Yes.

00:05:39.460 --> 00:05:43.540
<v Aaron van Wirdum>Because that's how it sounds it's just Counterparty reinvented more or less.

00:05:44.030 --> 00:05:44.470
<v Sjors Provoost>Yes.

00:05:44.810 --> 00:05:49.770
<v Aaron van Wirdum>Okay. Yep. Okay. And there's some kind of performance improvement in Bitcoin Core

00:05:49.770 --> 00:05:51.450
<v Aaron van Wirdum>that has something to do with this.

00:05:51.650 --> 00:05:55.590
<v Sjors Provoost>Yeah. So, I mean, generally speaking, what you see is people start using Bitcoin

00:05:55.590 --> 00:05:58.950
<v Sjors Provoost>in very different ways. So the transactions look a little bit different than what

00:05:58.950 --> 00:06:02.770
<v Sjors Provoost>you're used to. For example, you know, in the last episode or a few episodes ago,

00:06:02.890 --> 00:06:07.010
<v Sjors Provoost>we talked about how invalid blocks were produced because people were putting

00:06:07.010 --> 00:06:10.410
<v Sjors Provoost>multiple signatures in. Now, that wasn't a problem with Bitcoin Core. That was

00:06:10.410 --> 00:06:14.230
<v Sjors Provoost>just a problem with the miner software. But software just gets stressed out and

00:06:14.230 --> 00:06:19.010
<v Sjors Provoost>starts hitting weird corners. And so similarly, these BRC-20 transactions, they

00:06:19.010 --> 00:06:23.450
<v Sjors Provoost>are atypically small. That's sort of one thing you would see about them. They're

00:06:23.450 --> 00:06:27.810
<v Sjors Provoost>not the typical two-input-two-output transaction that you see normally. They're

00:06:27.810 --> 00:06:28.250
<v Sjors Provoost>smaller.

00:06:28.490 --> 00:06:31.640
<v Aaron van Wirdum>Why? What do they look like or what's the deal?

00:06:31.900 --> 00:06:34.980
<v Sjors Provoost>I think, and I haven't looked at them in detail, they're probably just one input,

00:06:35.100 --> 00:06:38.620
<v Sjors Provoost>one output, a lot of them. Because a lot of time what you do is you update the

00:06:38.620 --> 00:06:43.580
<v Sjors Provoost>state of your smart contract. So you're saying, okay, my little fluffy image of a

00:06:43.580 --> 00:06:48.240
<v Sjors Provoost>dolphin is now for sale. And that is just one JSON picture that you're uploading

00:06:48.240 --> 00:06:52.140
<v Sjors Provoost>or one piece of JSON that you're uploading to the blockchain. You're not sending

00:06:52.140 --> 00:06:54.980
<v Sjors Provoost>your coins anywhere. So you just probably just send the same coin to yourself.

00:06:55.580 --> 00:06:57.700
<v Sjors Provoost>With this extra node on it right.

00:06:57.700 --> 00:07:02.000
<v Aaron van Wirdum>So that so we don't have to re-explain how inscriptions work but you just put

00:07:02.000 --> 00:07:07.480
<v Aaron van Wirdum>this data in the witness and most nodes wouldn't even look at it I guess. yeah

00:07:07.640 --> 00:07:11.940
<v Aaron van Wirdum>and they're very small like you said because not much else is happening with the

00:07:11.940 --> 00:07:14.520
<v Aaron van Wirdum>transaction. Yeah but this is the idea. Okay go on.

00:07:14.520 --> 00:07:18.500
<v Sjors Provoost>But it does mean they're a little smaller than expected and then if you really

00:07:18.500 --> 00:07:22.220
<v Sjors Provoost>look at how Bitcoin Core deals with things like the mempool how transactions are

00:07:22.800 --> 00:07:26.980
<v Sjors Provoost>relayed to other nodes before they go in a block. There were some assumptions in

00:07:26.980 --> 00:07:29.820
<v Sjors Provoost>there that were assuming that was happening at about seven transactions per

00:07:29.820 --> 00:07:34.240
<v Sjors Provoost>second and you know with SegWit that increased a bit and for this type of usage

00:07:34.240 --> 00:07:35.680
<v Sjors Provoost>it should be slightly higher too.

00:07:37.000 --> 00:07:40.660
<v Sjors Provoost>Basically the new release contains some improvements to to handle these these

00:07:40.660 --> 00:07:44.240
<v Sjors Provoost>higher numbers but I'm being very vague here so we should do another episode

00:07:44.240 --> 00:07:45.940
<v Sjors Provoost>where we try to explain that in more detail.

00:07:45.940 --> 00:07:50.540
<v Aaron van Wirdum>I mean probably when I understand it. Because it doesn't sound super interesting

00:07:50.540 --> 00:07:56.440
<v Aaron van Wirdum>but basically what it comes down to if I understand you correctly is the

00:07:56.960 --> 00:08:01.680
<v Aaron van Wirdum>Bitcoin Core software the Bitcoin Core code is sort of

00:08:02.600 --> 00:08:08.340
<v Aaron van Wirdum>calibrated with certain assumptions in it of how Bitcoin would usually

00:08:08.340 --> 00:08:10.960
<v Aaron van Wirdum>be used and then that software sort of

00:08:13.620 --> 00:08:17.940
<v Aaron van Wirdum>knows, yeah, it's optimized for that situation. And now that situation kind of

00:08:17.940 --> 00:08:21.980
<v Aaron van Wirdum>changed because of BRC-20 and inscriptions and all of that. And this new Bitcoin

00:08:21.980 --> 00:08:27.780
<v Aaron van Wirdum>Core release kind of takes this new way of using Bitcoin into account with its

00:08:27.780 --> 00:08:29.240
<v Aaron van Wirdum>assumptions in its code.

00:08:29.460 --> 00:08:32.720
<v Sjors Provoost>Yeah, and I guess the bigger picture here is that, you know, in blocks, we have a

00:08:32.720 --> 00:08:36.120
<v Sjors Provoost>very hard limit. You know, there's only so many megabytes that go into a block.

00:08:36.260 --> 00:08:39.740
<v Sjors Provoost>So it's much easier to reason about sort of the worst case. But for the mempool,

00:08:39.900 --> 00:08:41.040
<v Sjors Provoost>there are not really any rules.

00:08:42.240 --> 00:08:46.440
<v Sjors Provoost>Because it's not really consensus, right? So it's a little bit more complicated

00:08:46.440 --> 00:08:49.940
<v Sjors Provoost>to make code that handles all mempool scenarios ideally.

00:08:50.400 --> 00:08:55.780
<v Aaron van Wirdum>Right, okay. Now let's make this as practical as we can make this.

00:08:56.100 --> 00:09:01.860
<v Aaron van Wirdum>So I'm a casual Bitcoin Core user. What's the

00:09:01.860 --> 00:09:06.320
<v Aaron van Wirdum>benefit for me when I download Bitcoin Core 25? How does it help me?

00:09:07.280 --> 00:09:11.720
<v Sjors Provoost>Probably when there's another storm of these super small BRC-20 transactions,

00:09:12.120 --> 00:09:16.020
<v Sjors Provoost>your node will be happier. And by happier, I just mean it's probably going to

00:09:16.020 --> 00:09:20.400
<v Sjors Provoost>make your computer less hot, use less memory, stuff like that.

00:09:20.720 --> 00:09:21.420
<v Aaron van Wirdum>Require less resources.

00:09:21.800 --> 00:09:21.900
<v Sjors Provoost>Yeah.

00:09:22.770 --> 00:09:27.010
<v Aaron van Wirdum>Okay, I like my computer cooler, so that's good. Next point,

00:09:29.550 --> 00:09:29.750
<v Aaron van Wirdum>right?

00:09:30.130 --> 00:09:30.330
<v Sjors Provoost>Yeah.

00:09:30.570 --> 00:09:36.530
<v Aaron van Wirdum>Okay, so there's some update with Miniscripts. We've done a whole

00:09:36.530 --> 00:09:40.380
<v Aaron van Wirdum>episode on Miniscripts. Do you remember what episode that was?

00:09:40.600 --> 00:09:41.300
<v Sjors Provoost>I do not.

00:09:42.120 --> 00:09:47.850
<v Aaron van Wirdum>Look it up. And then I think in a previous Bitcoin Core release episode, we also

00:09:47.850 --> 00:09:53.800
<v Aaron van Wirdum>mentioned that something... Miniscript related was implemented but it wasn't

00:09:53.800 --> 00:09:57.260
<v Aaron van Wirdum>quite there and it sounds like a new step has been made right?

00:09:57.260 --> 00:10:00.820
<v Sjors Provoost>Yeah so when we described Miniscript several years ago I think it was one of the

00:10:00.820 --> 00:10:05.340
<v Sjors Provoost>first episodes where Miniscript is just a way it's not a consensus change it's

00:10:05.340 --> 00:10:09.220
<v Sjors Provoost>not a soft fork, it's just a way to write scripts in a in a sane way because

00:10:09.220 --> 00:10:13.840
<v Sjors Provoost>writing scripts Bitcoin script by hand is a the best way to lose your money and

00:10:13.840 --> 00:10:17.860
<v Sjors Provoost>using Miniscript basically allows you to write scripts in a safe way now Bitcoin

00:10:17.860 --> 00:10:23.070
<v Sjors Provoost>Core added support for making a watch-only wallet. So that's a wallet that you

00:10:23.070 --> 00:10:27.350
<v Sjors Provoost>can see your balance. You can create addresses. So you can use Miniscript and you

00:10:27.350 --> 00:10:31.690
<v Sjors Provoost>can receive coins, but you couldn't spend it. So that's not ideal for most

00:10:31.690 --> 00:10:36.290
<v Sjors Provoost>people. And so this new release does let you spend it. I'd still say it's pretty

00:10:36.290 --> 00:10:40.950
<v Sjors Provoost>experimental. And there are some edge cases where you can actually not spend it.

00:10:41.960 --> 00:10:47.650
<v Aaron van Wirdum>Okay, so maybe as a very... brief recap of Miniscript

00:10:47.650 --> 00:10:53.220
<v Aaron van Wirdum>actually. So the thing here is that the Bitcoin protocol allows certain kind of

00:10:53.220 --> 00:10:57.520
<v Aaron van Wirdum>basic smart contract functionalities. So it allows multisig, it allows time

00:10:57.520 --> 00:11:03.350
<v Aaron van Wirdum>locks, it allows I don't know hash pre-images, it allows a bunch of things. And

00:11:03.350 --> 00:11:08.710
<v Aaron van Wirdum>with Miniscript, it's actually very easy to implement these things in the smart

00:11:08.710 --> 00:11:13.590
<v Aaron van Wirdum>contract way. So you can receive coins in a certain way. So for example, you can

00:11:13.590 --> 00:11:18.180
<v Aaron van Wirdum>have a board of directors and a company and they can say... Three out of five

00:11:18.180 --> 00:11:22.080
<v Aaron van Wirdum>have to agree or two out of five after a year, whatever. You can do that kind of

00:11:22.080 --> 00:11:26.060
<v Aaron van Wirdum>stuff. And with Miniscript, you can implement that easily. Now with Bitcoin Core,

00:11:26.640 --> 00:11:30.740
<v Aaron van Wirdum>okay, now is where I'm getting kind of lost. Because this is what the Bitcoin

00:11:30.740 --> 00:11:31.840
<v Aaron van Wirdum>protocol allows.

00:11:32.320 --> 00:11:34.700
<v Sjors Provoost>Yeah, nothing changed in the Bitcoin protocol for Miniscript.

00:11:34.880 --> 00:11:36.720
<v Aaron van Wirdum>Right, so what is Bitcoin Core actually?

00:11:37.140 --> 00:11:41.160
<v Sjors Provoost>Well, Bitcoin Core is really multiple things. So Bitcoin Core is the node, the

00:11:41.160 --> 00:11:44.520
<v Sjors Provoost>thing that checks the blocks for validity. Nothing changed there. But Bitcoin

00:11:44.520 --> 00:11:49.340
<v Sjors Provoost>Core is also a software package that has a wallet built into it. Now, anybody's

00:11:49.340 --> 00:11:53.400
<v Sjors Provoost>free to build a wallet, there's nothing special about the Bitcoin Core wallet. In

00:11:53.400 --> 00:11:56.480
<v Sjors Provoost>fact, it's probably not one of the most user-friendly wallets, but it is quite

00:11:56.480 --> 00:12:00.320
<v Sjors Provoost>powerful. At least it's becoming quite powerful. I think that's a better way to

00:12:00.320 --> 00:12:05.500
<v Sjors Provoost>say it, thanks to Miniscript. So this wallet is able to use Miniscript.

00:12:06.510 --> 00:12:09.870
<v Aaron van Wirdum>But when you say, okay, you say use Miniscript.

00:12:10.070 --> 00:12:13.230
<v Sjors Provoost>It means you can give it a piece of Miniscript and it understands how to create

00:12:13.230 --> 00:12:16.930
<v Sjors Provoost>addresses, how to sign transactions using it, etc.

00:12:17.170 --> 00:12:22.510
<v Aaron van Wirdum>Okay, but Miniscript is literally script. It's not—it's still something you code

00:12:22.510 --> 00:12:23.570
<v Aaron van Wirdum>as a programmer, right?

00:12:23.770 --> 00:12:23.870
<v Sjors Provoost>Yeah.

00:12:24.860 --> 00:12:30.340
<v Aaron van Wirdum>So you give that code to the Bitcoin Core wallet. Okay, we're not talking about

00:12:30.340 --> 00:12:34.640
<v Aaron van Wirdum>the GUI then. You have to go into the command line and you paste a piece of code

00:12:34.640 --> 00:12:37.120
<v Aaron van Wirdum>there. And this is what Bitcoin Core will understand.

00:12:37.420 --> 00:12:40.780
<v Sjors Provoost>Yeah, but basically, I mean, some people may have been used to pasting xpubs

00:12:40.780 --> 00:12:46.360
<v Sjors Provoost>around. So it's basically Miniscript. The way it works in practice is just an

00:12:46.360 --> 00:12:50.400
<v Sjors Provoost>xpub with a bunch of extra script around it saying what to do with the xpub.

00:12:50.540 --> 00:12:51.840
<v Aaron van Wirdum>Okay, this is what you paste.

00:12:52.740 --> 00:12:55.480
<v Sjors Provoost>Yeah, you paste it in the command line, but there's no reason this could not—

00:12:55.580 --> 00:12:59.100
<v Sjors Provoost>this could be added to the user interface too. It's just that you'll have to paste

00:12:59.100 --> 00:13:02.560
<v Sjors Provoost>something magical that you probably don't understand. So it's a bit dangerous.

00:13:02.840 --> 00:13:07.060
<v Aaron van Wirdum>Okay. And so far, Bitcoin Core could understand it and you could receive the

00:13:07.060 --> 00:13:10.420
<v Aaron van Wirdum>coins, but then they were just sitting there in your wallet and you couldn't

00:13:10.420 --> 00:13:11.220
<v Aaron van Wirdum>actually spend them.

00:13:11.500 --> 00:13:11.620
<v Sjors Provoost>Yeah.

00:13:12.200 --> 00:13:15.580
<v Aaron van Wirdum>Yeah, it sounds like being able to spend them is a pretty good upgrade.

00:13:15.800 --> 00:13:18.700
<v Sjors Provoost>It's one of the nicer features of Bitcoin, although it's good for inflation if

00:13:18.700 --> 00:13:19.620
<v Sjors Provoost>people don't, you know.

00:13:21.190 --> 00:13:26.850
<v Aaron van Wirdum>Okay, so I guess... Wait, but this is still

00:13:26.850 --> 00:13:29.410
<v Aaron van Wirdum>sort of limited. It doesn't...

00:13:29.410 --> 00:13:32.790
<v Sjors Provoost>Yeah, I think for the most cases that you've described it will work. You can

00:13:32.790 --> 00:13:36.290
<v Sjors Provoost>create a PSBT because there's now two, I believe, two hardware models or maybe

00:13:36.290 --> 00:13:42.010
<v Sjors Provoost>three. So the Ledger was first and then I believe it was COLDCARD

00:13:42.010 --> 00:13:46.540
<v Sjors Provoost>or BitBox, one of those two, added support for Miniscript, which means you can

00:13:46.540 --> 00:13:51.300
<v Sjors Provoost>make like a multisig wallet with three physically different devices with each

00:13:51.300 --> 00:13:56.700
<v Sjors Provoost>having their own trade-offs. And in order to do that, you need PSBTs generally to

00:13:56.700 --> 00:14:00.600
<v Sjors Provoost>move between these devices. But there are some limits to what you can do there.

00:14:00.740 --> 00:14:04.420
<v Sjors Provoost>So there may be some obscure scripts that you can write them, you can receive

00:14:04.420 --> 00:14:07.800
<v Sjors Provoost>coins on it, but you will not be able to send them to the hardware wallets using

00:14:07.800 --> 00:14:11.820
<v Sjors Provoost>a PSBT. Some like edge case that if you know Miniscript, you'll probably

00:14:11.820 --> 00:14:13.280
<v Sjors Provoost>understand the edge case. I don't.

00:14:13.650 --> 00:14:16.430
<v Aaron van Wirdum>And also, it doesn't work with Taproot yet.

00:14:16.730 --> 00:14:20.290
<v Sjors Provoost>Yeah, that's a bigger drawback, I would say. Miniscript was designed quite a

00:14:20.290 --> 00:14:26.290
<v Sjors Provoost>while ago before Taproot. And it is initially designed for the use

00:14:26.290 --> 00:14:32.100
<v Sjors Provoost>with SegWit, basically SegWit script. Actually, I think there's also

00:14:32.100 --> 00:14:36.600
<v Sjors Provoost>a Miniscript standard for pre-SegWit script, I think. But at least it was

00:14:36.600 --> 00:14:41.360
<v Sjors Provoost>designed for SegWit script. And so there has now been a recent modification to

00:14:41.360 --> 00:14:45.100
<v Sjors Provoost>that proposal that also makes it work for Taproot script. Because most of the

00:14:45.100 --> 00:14:48.240
<v Sjors Provoost>script is the same between SegWit and Taproot. Most are the same opcodes, so you

00:14:48.240 --> 00:14:53.730
<v Sjors Provoost>can make signatures, etc. But there's a few subtle changes in Taproot. So that

00:14:53.730 --> 00:14:55.210
<v Sjors Provoost>changes a few things about Miniscript.

00:14:55.390 --> 00:15:00.240
<v Aaron van Wirdum>So is that... So that would be an upgrade in the future, potentially, I would assume.

00:15:00.520 --> 00:15:03.100
<v Sjors Provoost>Yeah. And that's, again, that's one step at a time. So the first step would be

00:15:03.100 --> 00:15:08.960
<v Sjors Provoost>that you can write Miniscript and then it'll generate, you know, a leaf, a

00:15:08.960 --> 00:15:12.560
<v Sjors Provoost>script leaf in Taproot because you can put your individual scripts and individual

00:15:12.560 --> 00:15:18.140
<v Sjors Provoost>leaves in the tree. But there's no way yet to decide how to most efficiently,

00:15:18.140 --> 00:15:22.420
<v Sjors Provoost>you know, distribute your... your scripts between all the leaves so if you have

00:15:22.420 --> 00:15:25.860
<v Sjors Provoost>like five different conditions do you want to make five leaves in Taproot or do

00:15:25.860 --> 00:15:29.260
<v Sjors Provoost>you want to make one leaf that does two of them that sort of stuff there's

00:15:29.260 --> 00:15:30.820
<v Sjors Provoost>nothing no tooling for that yet.

00:15:30.820 --> 00:15:33.160
<v Aaron van Wirdum>Right okay. so

00:15:33.160 --> 00:15:34.040
<v Sjors Provoost>Soon tm.

00:15:34.490 --> 00:15:40.350
<v Aaron van Wirdum>Two weeks. So we've mentioned two improvements so far which had one

00:15:40.350 --> 00:15:44.870
<v Aaron van Wirdum>was the transaction loads BRC-20 and then we now mentioned Miniscript and now

00:15:44.870 --> 00:15:48.490
<v Aaron van Wirdum>we're getting to the third one and that's actually the last one already.

00:15:50.680 --> 00:15:52.300
<v Sjors Provoost>Fast wallet rescan.

00:15:52.540 --> 00:15:54.960
<v Aaron van Wirdum>Fast wallet rescan. Sjors, explain.

00:15:55.960 --> 00:16:01.300
<v Sjors Provoost>So Bitcoin Core again has a wallet built into it. And let's say you first used

00:16:01.300 --> 00:16:06.870
<v Sjors Provoost>that in 2012 and you received some Bitcoin. And then you were like, okay. Let me

00:16:06.870 --> 00:16:11.650
<v Sjors Provoost>put this wallet on a USB stick put it in a vault somewhere physically so the

00:16:11.650 --> 00:16:16.350
<v Sjors Provoost>whole wallet not just a backup codes just the actual file and remove it from my

00:16:16.350 --> 00:16:20.090
<v Sjors Provoost>computer because I'm traveling around with it now your node just keeps updating

00:16:20.090 --> 00:16:24.210
<v Sjors Provoost>keep syncing, keep syncing, keep syncing, and then now you come back and you you

00:16:24.210 --> 00:16:27.890
<v Sjors Provoost>put the USB stick back into your computer maybe that's a bad idea if there's a

00:16:27.890 --> 00:16:33.820
<v Sjors Provoost>lot of money on it but let's say you do and use Well, then your

00:16:33.820 --> 00:16:38.800
<v Sjors Provoost>wallet is behind, in a sense, because the new transactions that happened since

00:16:38.800 --> 00:16:42.780
<v Sjors Provoost>2012 would not be in that wallet file because it was in your vault. And your node

00:16:42.780 --> 00:16:46.440
<v Sjors Provoost>doesn't know, it doesn't really track them either, not specifically. It just has

00:16:46.440 --> 00:16:51.460
<v Sjors Provoost>all the blocks. So there's something called a rescan, which basically the wallet file...

00:16:51.460 --> 00:16:56.640
<v Aaron van Wirdum>Wait, wait, wait, wait. So, because this is confusing. I think what you mean to

00:16:56.640 --> 00:17:02.480
<v Aaron van Wirdum>say is you received coins on one wallet. And now after that, you

00:17:02.480 --> 00:17:07.740
<v Aaron van Wirdum>started using a new wallet, right? When you say syncing, syncing, syncing, your

00:17:07.740 --> 00:17:09.920
<v Aaron van Wirdum>node is not syncing based on that wallet anymore.

00:17:10.100 --> 00:17:12.640
<v Sjors Provoost>Yeah, your node is still syncing. It's just storing all the blocks and checking

00:17:12.640 --> 00:17:17.400
<v Sjors Provoost>the validity. But it's not keeping track of how that matters for your wallet.

00:17:17.540 --> 00:17:21.260
<v Aaron van Wirdum>Right. So you basically reinstalled Bitcoin Core or something like that. You got

00:17:21.260 --> 00:17:22.700
<v Aaron van Wirdum>a new computer, something like that, right?

00:17:22.740 --> 00:17:27.760
<v Sjors Provoost>No, you can basically unload a wallet and then load it again.

00:17:28.210 --> 00:17:29.150
<v Aaron van Wirdum>But in most—

00:17:29.150 --> 00:17:32.770
<v Sjors Provoost>But I guess another scenario would be yes so so you are restoring you're

00:17:32.770 --> 00:17:37.230
<v Sjors Provoost>reinstalling Bitcoin Core and you you're recovering your wallet and you're trying

00:17:37.230 --> 00:17:40.650
<v Sjors Provoost>to see if there's any coins in that wallet and find the transactions and the only

00:17:40.650 --> 00:17:43.690
<v Sjors Provoost>way to do that is to go through all the blocks and check for every block if

00:17:43.690 --> 00:17:47.130
<v Sjors Provoost>there's something useful in that block and that just takes a long time could be

00:17:47.130 --> 00:17:48.390
<v Sjors Provoost>several hours.

00:17:51.750 --> 00:17:53.310
<v Aaron van Wirdum>That's not so bad.

00:17:53.310 --> 00:17:55.450
<v Sjors Provoost>Computer. Okay it depends on your patience.

00:17:55.450 --> 00:17:58.010
<v Aaron van Wirdum>I guess I guess we can do better than that.

00:17:58.680 --> 00:17:59.500
<v Sjors Provoost>Yes, we can.

00:17:59.640 --> 00:18:00.480
<v Aaron van Wirdum>So how do we do better?

00:18:00.780 --> 00:18:04.140
<v Sjors Provoost>Yeah, so basically this is using the Neutrino filters that we did an earlier

00:18:04.140 --> 00:18:06.600
<v Sjors Provoost>episode about, the compact block filters.

00:18:08.080 --> 00:18:13.020
<v Sjors Provoost>Forgot the episode. Look for Bitcoin Explained Neutrino and you'll find it. But

00:18:13.020 --> 00:18:16.620
<v Sjors Provoost>the idea there is that light wallets can use these filters to figure out which

00:18:16.620 --> 00:18:21.480
<v Sjors Provoost>blocks they need to download. So instead of downloading all the blocks, a mobile

00:18:21.480 --> 00:18:26.300
<v Sjors Provoost>wallet can say, okay, it can figure out by itself without revealing any private

00:18:26.300 --> 00:18:30.620
<v Sjors Provoost>information to the outside world. Which blocks it it should download and in order

00:18:30.620 --> 00:18:34.100
<v Sjors Provoost>to do that it needs to download something called these filters these filters are

00:18:34.100 --> 00:18:39.480
<v Sjors Provoost>much smaller than normal blocks and so Bitcoin Core can create these filters and

00:18:39.480 --> 00:18:43.820
<v Sjors Provoost>Now the wallet will take advantage of that because rather than scanning every

00:18:43.820 --> 00:18:48.220
<v Sjors Provoost>block From the history from the last time you checked your wallet it now knows

00:18:48.220 --> 00:18:52.840
<v Sjors Provoost>which blocks it needs to scan And so it'll scan fewer blocks, which is faster.

00:18:53.160 --> 00:18:59.100
<v Aaron van Wirdum>Yes. Wait. So if I have a wallet.dat file on a USB stick,

00:18:59.120 --> 00:19:04.140
<v Aaron van Wirdum>as we discussed, that's the example we're using. And I

00:19:04.140 --> 00:19:09.760
<v Aaron van Wirdum>buy a new computer tomorrow and I sync Bitcoin Core and now I get the wallet.dat

00:19:09.760 --> 00:19:15.410
<v Aaron van Wirdum>file. Somehow Bitcoin Core would know which blocks to download based on the wallet.

00:19:15.410 --> 00:19:20.550
<v Sjors Provoost>So the wallet.dat contains the addresses that belong to your wallet. And so

00:19:20.550 --> 00:19:25.250
<v Sjors Provoost>depending on how old it is, that's going to be somewhere between 2,000 and 8,000

00:19:25.250 --> 00:19:30.170
<v Sjors Provoost>because it basically creates a cache of addresses. It knows these addresses. And

00:19:30.170 --> 00:19:34.510
<v Sjors Provoost>yet using these filters, which Bitcoin Core will also have created, it's able to

00:19:34.510 --> 00:19:39.210
<v Sjors Provoost>know which blocks are relevant and which blocks are not because these filters are

00:19:39.210 --> 00:19:40.810
<v Sjors Provoost>like a compressed summary of the blocks.

00:19:42.620 --> 00:19:47.320
<v Sjors Provoost>So then it looks at the filters and it says, okay, do my addresses, if I run my

00:19:47.320 --> 00:19:51.000
<v Sjors Provoost>addresses to this filter, does it say yes or no? And if it says yes, I'm going to

00:19:51.000 --> 00:19:54.360
<v Sjors Provoost>download the block and I'm going to check everything. Filters are not accurate.

00:19:54.880 --> 00:19:58.340
<v Sjors Provoost>So it's possible that you might download 10 times more blocks than you really

00:19:58.340 --> 00:20:02.100
<v Sjors Provoost>need, but you're not downloading them all. And in the case of Bitcoin Core, it's

00:20:02.100 --> 00:20:04.220
<v Sjors Provoost>not even about downloading them. It's just about checking them.

00:20:05.620 --> 00:20:10.660
<v Aaron van Wirdum>Well... Yes, so it doesn't work with a pruned node, right? You do need to have

00:20:10.660 --> 00:20:11.620
<v Aaron van Wirdum>all the blocks available.

00:20:11.940 --> 00:20:15.100
<v Sjors Provoost>Correct. At the moment, it does not work with a pruned node, but if you had these

00:20:15.100 --> 00:20:18.680
<v Sjors Provoost>filters on your computer, but pruned blocks, you would be able to know which

00:20:18.680 --> 00:20:24.220
<v Sjors Provoost>blocks to download again, which currently you can only do with some manual magic.

00:20:24.420 --> 00:20:28.060
<v Sjors Provoost>So it is possible, actually, with a pruned node, but then you need a script. And

00:20:28.060 --> 00:20:33.840
<v Sjors Provoost>basically, I've tried this myself, just to experiment with it. You can scan.

00:20:34.710 --> 00:20:38.190
<v Sjors Provoost>I don't know if I tried this myself. I may not. No, I think I'm lying here. But

00:20:38.190 --> 00:20:42.650
<v Sjors Provoost>in theory, it's possible to download all the blocks that you're missing and then

00:20:42.650 --> 00:20:45.290
<v Sjors Provoost>scan it. But the wallet will [unclear] be very confused.

00:20:46.470 --> 00:20:50.250
<v Aaron van Wirdum>Okay. Well, I don't understand how this works, but that's probably because I

00:20:50.250 --> 00:20:53.970
<v Aaron van Wirdum>forgot how Neutrino works. So if I want to understand that, I would have to go

00:20:53.970 --> 00:20:55.670
<v Aaron van Wirdum>back to our own episode and listen to that.

00:20:55.830 --> 00:20:56.210
<v Sjors Provoost>Sounds good.

00:20:57.250 --> 00:21:00.570
<v Aaron van Wirdum>Unless, Sjors, you want to try explaining this right now?

00:21:01.220 --> 00:21:02.540
<v Sjors Provoost>You forgot how an Arduino works.

00:21:02.740 --> 00:21:03.580
<v Aaron van Wirdum>I mean, I don't remember.

00:21:03.680 --> 00:21:04.480
<v Sjors Provoost>I just told you.

00:21:05.560 --> 00:21:11.300
<v Aaron van Wirdum>I mean, I understand the idea. I just don't understand why it works. I don't understand.

00:21:11.480 --> 00:21:12.160
<v Sjors Provoost>It's magical math.

00:21:12.360 --> 00:21:17.880
<v Aaron van Wirdum>Yes, exactly. Well, I feel that at some point I kind of understood it more than

00:21:17.880 --> 00:21:20.400
<v Aaron van Wirdum>just magical math, but not right now.

00:21:20.760 --> 00:21:25.260
<v Sjors Provoost>No, the magical math basically says that you've done some calculations before to

00:21:25.260 --> 00:21:30.380
<v Sjors Provoost>make a filter from a block. And then you can check against the filter. You say,

00:21:30.520 --> 00:21:32.540
<v Sjors Provoost>do these addresses belong to this block or not?

00:21:33.820 --> 00:21:35.680
<v Aaron van Wirdum>Do you want to just leave it there?

00:21:36.240 --> 00:21:38.320
<v Sjors Provoost>Yeah, because that's about as well as I can explain it.

00:21:38.400 --> 00:21:42.080
<v Aaron van Wirdum>Okay, we'll leave it there. If you want to know more, I think we go a little bit

00:21:42.080 --> 00:21:44.080
<v Aaron van Wirdum>more in depth in our actual Neutrino episode.

00:21:44.300 --> 00:21:45.240
<v Sjors Provoost>We missed the topic.

00:21:46.330 --> 00:21:52.050
<v Aaron van Wirdum>Well, I wasn't done, Sjors. I think you're going to bring up the RBF, the full

00:21:52.050 --> 00:21:52.510
<v Aaron van Wirdum>RBF.

00:21:52.510 --> 00:21:55.680
<v Sjors Provoost>No, no, no, no. Wait, there's 65-byte transactions.

00:21:55.970 --> 00:22:01.070
<v Aaron van Wirdum>Oh, you're right. Oh, we missed a topic. That's a big one. You're so sharp today.

00:22:02.030 --> 00:22:07.410
<v Aaron van Wirdum>Luckily, because I'm apparently not. Okay, so yes, there's something going on

00:22:07.410 --> 00:22:09.790
<v Aaron van Wirdum>with the minimum size of transactions.

00:22:09.850 --> 00:22:11.790
<v Sjors Provoost>Yeah, we added more freedom to the mempool.

00:22:13.660 --> 00:22:14.560
<v Aaron van Wirdum>Is that so?

00:22:14.780 --> 00:22:15.060
<v Sjors Provoost>Yes.

00:22:15.460 --> 00:22:16.100
<v Aaron van Wirdum>Okay, explain.

00:22:16.640 --> 00:22:21.420
<v Sjors Provoost>So remember there is consensus, which is what the rules for the blocks, and

00:22:21.420 --> 00:22:25.800
<v Sjors Provoost>there's standardness, which is rules for the mempool. And generally the

00:22:25.800 --> 00:22:30.360
<v Sjors Provoost>standardness rules are stricter than the consensus rules. In fact, that's always

00:22:30.360 --> 00:22:35.270
<v Sjors Provoost>the case. In other words, there are some transactions that are perfectly fine in

00:22:35.270 --> 00:22:41.250
<v Sjors Provoost>a block, but they are not fine in the mempool. And this usually has to do with

00:22:41.250 --> 00:22:46.220
<v Sjors Provoost>preventing DoS, denial of service attacks, on your node. In this case, though,

00:22:46.220 --> 00:22:47.060
<v Sjors Provoost>it's not really that.

00:22:48.480 --> 00:22:53.760
<v Sjors Provoost>There is a minimum size. I believe it was 84 bytes. So any transaction that's

00:22:53.760 --> 00:22:58.120
<v Sjors Provoost>less than 84 bytes would not be relayed by nodes. If it's in a block, it's fine.

00:22:58.400 --> 00:23:01.580
<v Aaron van Wirdum>Is there a minimum size to be in blocks at all?

00:23:01.780 --> 00:23:05.900
<v Sjors Provoost>I don't think so. There's probably a minimum practical size because you have to

00:23:05.900 --> 00:23:07.320
<v Sjors Provoost>point to a previous transaction, etc.

00:23:08.700 --> 00:23:13.020
<v Aaron van Wirdum>Yeah, there's an actual minimum size that a transaction can be, but there's no

00:23:13.020 --> 00:23:14.400
<v Aaron van Wirdum>consensus rule for it.

00:23:14.640 --> 00:23:18.820
<v Sjors Provoost>Yeah, I guess you'd say there's an inherent minimum size. It follows from what

00:23:18.820 --> 00:23:21.460
<v Sjors Provoost>has to be in a transaction, but other than that, I don't think there's a number.

00:23:21.660 --> 00:23:26.880
<v Aaron van Wirdum>Okay, but there is a minimum size for the mempool policy.

00:23:27.060 --> 00:23:30.900
<v Sjors Provoost>Yeah, and I think it was something like 82 or 84, some number, and this number

00:23:30.900 --> 00:23:34.000
<v Sjors Provoost>has been decreased. Now it's 65.

00:23:34.760 --> 00:23:35.620
<v Aaron van Wirdum>Okay, why?

00:23:36.620 --> 00:23:41.820
<v Sjors Provoost>Well, so why... I mean, there's some use for it. So I think the idea is it makes

00:23:41.820 --> 00:23:44.160
<v Sjors Provoost>it a little bit easier to burn coins if you need to.

00:23:45.560 --> 00:23:46.420
<v Aaron van Wirdum>To burn coins?

00:23:46.820 --> 00:23:50.620
<v Sjors Provoost>Yeah, if you have some dust that you want to get rid of, you want to remove it

00:23:50.620 --> 00:23:51.460
<v Sjors Provoost>from the UTXO set.

00:23:51.980 --> 00:23:52.340
<v Aaron van Wirdum>Okay.

00:23:53.100 --> 00:23:55.460
<v Sjors Provoost>I think it's easier to do that with smaller transactions.

00:23:56.970 --> 00:23:58.110
<v Sjors Provoost>But the...

00:23:58.110 --> 00:24:00.750
<v Aaron van Wirdum>Wait, what? Why would you want to do that?

00:24:01.070 --> 00:24:03.450
<v Sjors Provoost>Because you want to clean up the UTXO set.

00:24:03.570 --> 00:24:06.730
<v Aaron van Wirdum>But you literally just want to... throw away coins?

00:24:06.730 --> 00:24:10.270
<v Sjors Provoost>Well you throw away coins that are not economical right?

00:24:10.980 --> 00:24:12.760
<v Aaron van Wirdum>So why not just leave it alone?

00:24:12.760 --> 00:24:18.000
<v Sjors Provoost>Because then it's sitting in people's memory and using up resources. Be

00:24:18.860 --> 00:24:20.560
<v Sjors Provoost>a good citizen clean up your UTXOs

00:24:20.560 --> 00:24:22.820
<v Aaron van Wirdum>I guess I guess okay yeah go on.

00:24:22.820 --> 00:24:27.320
<v Sjors Provoost>There may also be uh things I mean I think this was proposed by instagibbs,

00:24:27.320 --> 00:24:32.850
<v Sjors Provoost>[unclear] Sanders and he's working on ephemeral anchors which are ways to combine

00:24:32.850 --> 00:24:36.690
<v Sjors Provoost>two transactions that are paying a zero fee and then one is bumping the other so

00:24:36.690 --> 00:24:40.270
<v Sjors Provoost>maybe those transactions are actually smaller than and maybe that's why he needs

00:24:40.270 --> 00:24:44.570
<v Sjors Provoost>it I haven't looked at the reasoning in any case it's possible so it's done um

00:24:44.570 --> 00:24:50.390
<v Sjors Provoost>the original reason is kind of funny um the original limit was

00:24:50.390 --> 00:24:55.970
<v Sjors Provoost>made this weird number like 82 or 84 because if they had made it 65 then the bad

00:24:55.970 --> 00:25:00.140
<v Sjors Provoost>people would have understood why it was done and they might have been able to

00:25:00.140 --> 00:25:03.860
<v Sjors Provoost>exploit something before the fix was released. So this is a case of you have a

00:25:03.860 --> 00:25:07.660
<v Sjors Provoost>vulnerability. You know that if people make 64-byte transactions, they can cause

00:25:07.660 --> 00:25:12.220
<v Sjors Provoost>problems. You don't want to give that away too, obviously. So you say, we're not

00:25:12.220 --> 00:25:15.780
<v Sjors Provoost>going to make the limit 65. We're going to make it like 84 and then make up some

00:25:15.780 --> 00:25:19.180
<v Sjors Provoost>excuse why 84 is a good number. Because nobody needed it.

00:25:19.480 --> 00:25:22.700
<v Aaron van Wirdum>This is super confusing. Luckily, I know what you're talking about.

00:25:22.940 --> 00:25:24.620
<v Sjors Provoost>All right. Well, maybe you can explain it.

00:25:24.720 --> 00:25:29.260
<v Aaron van Wirdum>Yes. So you mentioned the original number, and you said that was 82. So that's

00:25:29.260 --> 00:25:34.440
<v Aaron van Wirdum>the confusing part. No. The original number was 64. That was a minimum of 64.

00:25:34.740 --> 00:25:34.880
<v Sjors Provoost>Yeah.

00:25:35.220 --> 00:25:36.480
<v Aaron van Wirdum>And then it was increased?

00:25:36.660 --> 00:25:41.020
<v Sjors Provoost>No, no. There was no minimum. But it had to be increased above 64.

00:25:41.490 --> 00:25:43.030
<v Aaron van Wirdum>Oh, so it was not 64?

00:25:43.370 --> 00:25:44.210
<v Sjors Provoost>No, I think it was…

00:25:44.450 --> 00:25:45.570
<v Aaron van Wirdum>So there was no minimum.

00:25:45.750 --> 00:25:45.890
<v Sjors Provoost>Yeah.

00:25:46.190 --> 00:25:51.610
<v Aaron van Wirdum>Okay. Okay. So there was no minimum. And then a minimum was imposed. When was this?

00:25:52.830 --> 00:25:55.630
<v Sjors Provoost>I think it was 2017.

00:25:56.170 --> 00:25:56.910
<v Aaron van Wirdum>Oh, a while ago.

00:25:57.250 --> 00:25:59.170
<v Sjors Provoost>Yeah. Might have been done even earlier.

00:25:59.530 --> 00:26:02.570
<v Aaron van Wirdum>Okay. Then a minimum was imposed and that minimum was 84?

00:26:03.370 --> 00:26:04.230
<v Sjors Provoost>Something like that.

00:26:04.430 --> 00:26:07.430
<v Aaron van Wirdum>Okay. And now that has been decreased to 65.

00:26:07.770 --> 00:26:08.230
<v Sjors Provoost>Exactly.

00:26:08.610 --> 00:26:13.950
<v Aaron van Wirdum>What you're saying is... the reason that 84 was picked originally

00:26:13.950 --> 00:26:19.830
<v Aaron van Wirdum>is because they didn't like originally 65 would have been ideal

00:26:19.830 --> 00:26:24.610
<v Aaron van Wirdum>but I didn't want to do that because it would reveal something so then they

00:26:24.610 --> 00:26:30.410
<v Aaron van Wirdum>picked 84 which was a little bit more off to the side And then

00:26:30.410 --> 00:26:32.350
<v Aaron van Wirdum>hopefully attackers wouldn't notice it.

00:26:32.530 --> 00:26:33.030
<v Sjors Provoost>That's right.

00:26:33.230 --> 00:26:38.530
<v Aaron van Wirdum>Right? Okay. So what was wrong with... So why is 64 a magical number?

00:26:38.770 --> 00:26:43.770
<v Sjors Provoost>Yeah. And in fact, the strict rule that you really need is not 64. So it could be

00:26:43.770 --> 00:26:46.750
<v Sjors Provoost>smaller than 64. It can be bigger than 64. But you don't want 64.

00:26:46.970 --> 00:26:47.170
<v Aaron van Wirdum>Okay.

00:26:47.330 --> 00:26:50.670
<v Sjors Provoost>And the reason has to do with Merkle trees. And we've talked about Merkle trees

00:26:50.670 --> 00:26:54.130
<v Sjors Provoost>in earlier episodes. We've even tried to explain Merkle trees in earlier

00:26:54.130 --> 00:26:56.250
<v Sjors Provoost>episodes. I think we should not try that again.

00:26:56.330 --> 00:26:57.430
<v Aaron van Wirdum>Probably multiple times.

00:26:57.610 --> 00:26:59.500
<v Sjors Provoost>Yeah. But the idea of a Merkle tree is like...

00:26:59.500 --> 00:27:00.100
<v Aaron van Wirdum>To no avail.

00:27:00.460 --> 00:27:03.600
<v Sjors Provoost>What it looks like... Right. What it looks like is you take two transactions side

00:27:03.600 --> 00:27:09.460
<v Sjors Provoost>by side and then you hash... No. So you take two transactions, you hash each of

00:27:09.460 --> 00:27:12.680
<v Sjors Provoost>them, and then you put the hash of the first transaction on the left, the hash of

00:27:12.680 --> 00:27:16.820
<v Sjors Provoost>the second transaction on the right. And the hash of a transaction is how many bytes?

00:27:17.880 --> 00:27:18.280
<v Aaron van Wirdum>64.

00:27:18.780 --> 00:27:19.180
<v Sjors Provoost>No.

00:27:19.360 --> 00:27:19.520
<v Aaron van Wirdum>Oh.

00:27:19.720 --> 00:27:21.540
<v Sjors Provoost>The hash of a transaction is...

00:27:21.500 --> 00:27:22.260
<v Aaron van Wirdum>I don't know.

00:27:22.300 --> 00:27:23.080
<v Sjors Provoost>Well, it's called SHA—

00:27:22.740 --> 00:27:23.640
<v Aaron van Wirdum>Should I know?

00:27:23.780 --> 00:27:27.680
<v Sjors Provoost>Yes, it's called SHA-256. The 256 stands for the number of bits.

00:27:29.480 --> 00:27:32.120
<v Sjors Provoost>256 divided by 8 is 32.

00:27:32.620 --> 00:27:32.940
<v Aaron van Wirdum>Okay.

00:27:34.200 --> 00:27:39.960
<v Sjors Provoost>So the hash is 32 bytes. You put two of the next to each other. That is 64.

00:27:40.640 --> 00:27:41.040
<v Aaron van Wirdum>Right.

00:27:41.180 --> 00:27:45.040
<v Sjors Provoost>And then this tree goes up and up and up. You keep combining two. What?

00:27:45.340 --> 00:27:47.300
<v Aaron van Wirdum>This is not how a Merkle tree works. What?

00:27:47.380 --> 00:27:49.820
<v Sjors Provoost>This is exactly how a Merkle tree works, at least how it works in Bitcoin.

00:27:53.460 --> 00:27:57.180
<v Sjors Provoost>Yeah, you start with transactions at the bottom, you pair them, and then you

00:27:57.180 --> 00:28:02.220
<v Sjors Provoost>basically hash each of them, and you put the hashes next to each other, so 32

00:28:02.220 --> 00:28:04.800
<v Sjors Provoost>bytes next to 32 bytes, and that's 64 bytes in total.

00:28:04.980 --> 00:28:06.900
<v Aaron van Wirdum>Right, and you hash these together, right?

00:28:07.080 --> 00:28:07.700
<v Sjors Provoost>Yeah, exactly.

00:28:07.900 --> 00:28:08.400
<v Aaron van Wirdum>Okay, yeah, yeah.

00:28:08.600 --> 00:28:14.420
<v Sjors Provoost>So you hash each of these. And so the problem there is that if you implemented

00:28:14.420 --> 00:28:15.820
<v Sjors Provoost>this well, a Merkle tree,

00:28:17.040 --> 00:28:20.420
<v Sjors Provoost>then it would be very clear how many leaves there would be. So you would

00:28:20.420 --> 00:28:24.520
<v Sjors Provoost>basically say this is a Merkle tree and has so many leaves. And then somebody who

00:28:24.520 --> 00:28:28.760
<v Sjors Provoost>looks at the Merkle tree can extract it and see these are all transaction hashes.

00:28:29.040 --> 00:28:34.040
<v Sjors Provoost>Problem is in Bitcoin, it's done unsafely and this has caused problems in the

00:28:34.040 --> 00:28:40.000
<v Sjors Provoost>past. But basically anything that's 64 bytes can be either a transaction of

00:28:40.000 --> 00:28:43.960
<v Sjors Provoost>64 bytes or it can be one of these points inside the Merkle tree.

00:28:45.670 --> 00:28:48.170
<v Aaron van Wirdum>Yeah okay they look the same I just want to clarify

00:28:48.170 --> 00:28:52.390
<v Sjors Provoost>They look the same and that is that is where multiple attacks have come from

00:28:52.390 --> 00:28:56.950
<v Sjors Provoost>including much older ones that where you could create blocks that were like you

00:28:56.950 --> 00:29:00.510
<v Sjors Provoost>would pretend that you that the block is invalid and then you'd send the same

00:29:00.510 --> 00:29:02.490
<v Sjors Provoost>thing again you all sorts of nasty things

00:29:02.490 --> 00:29:08.190
<v Aaron van Wirdum>I just want to clarify we're getting really into the weeds with weird niche

00:29:08.190 --> 00:29:14.120
<v Aaron van Wirdum>but kind of interesting attacks here so yeah okay the transaction hash is

00:29:14.120 --> 00:29:19.590
<v Aaron van Wirdum>32 bytes. I already, I'm not going to try to re-explain this one even. But I was

00:29:19.590 --> 00:29:20.450
<v Aaron van Wirdum>kind of following you.

00:29:20.440 --> 00:29:23.610
<v Sjors Provoost>32 bytes. You put two of them next to each other and now you have 64 bytes.

00:29:23.790 --> 00:29:24.050
<v Aaron van Wirdum>Yes.

00:29:24.230 --> 00:29:27.310
<v Sjors Provoost>So what does that mean? Well, I think it's Sergio who...

00:29:27.310 --> 00:29:29.150
<v Aaron van Wirdum>Sergio, yeah, Demian Lerner, yeah.

00:29:29.490 --> 00:29:35.050
<v Sjors Provoost>Yeah, who wrote a blog post in 2017 explaining exactly what you can do to attack

00:29:35.050 --> 00:29:38.210
<v Sjors Provoost>a user of an SPV wallet.

00:29:38.630 --> 00:29:41.650
<v Aaron van Wirdum>I'll add the link to the article in the show notes.

00:29:41.830 --> 00:29:44.690
<v Sjors Provoost>Yeah, you definitely want to read it. I'll try to explain it at some high level,

00:29:44.710 --> 00:29:45.910
<v Sjors Provoost>but it... I find it confusing.

00:29:46.250 --> 00:29:46.550
<v Aaron van Wirdum>Yeah, go for it.

00:29:46.610 --> 00:29:49.990
<v Sjors Provoost>What is important to know is that this attack, so it's an attack on SPV wallets.

00:29:50.050 --> 00:29:55.250
<v Sjors Provoost>So these are wallets that do not download full blocks but only get a summary. And

00:29:55.250 --> 00:29:58.370
<v Sjors Provoost>they get something called an SPV proof, which is saying, hey, this transaction

00:29:58.370 --> 00:30:02.810
<v Sjors Provoost>exists. It's inside a block. It's here. It's inside this block. And then you give

00:30:02.810 --> 00:30:06.030
<v Sjors Provoost>it all the block headers. So the SPV wallet knows, okay, there's some proof of

00:30:06.030 --> 00:30:10.010
<v Sjors Provoost>work on top of this transaction. I can't check all the consensus rules, but at

00:30:10.010 --> 00:30:14.830
<v Sjors Provoost>least I know some miner paid a lot of money to make this thing. So that's a kind

00:30:14.830 --> 00:30:18.630
<v Sjors Provoost>of wallet user that's not very common anymore because there's all sorts of

00:30:18.630 --> 00:30:23.090
<v Sjors Provoost>problems with it, including the one we're about to describe. And then if you have

00:30:23.090 --> 00:30:27.710
<v Sjors Provoost>a few million dollars in budget, you can perform this attack. And this was in

00:30:27.710 --> 00:30:31.410
<v Sjors Provoost>2017. I think you also need to have a pretty substantial amount of Bitcoin to do

00:30:31.410 --> 00:30:33.190
<v Sjors Provoost>that, which was cheaper back then.

00:30:35.170 --> 00:30:40.710
<v Sjors Provoost>What you do is you start creating transactions. You basically create a 64-byte

00:30:40.710 --> 00:30:46.100
<v Sjors Provoost>transaction. and you pretend that it is part of this Merkle tree

00:30:46.100 --> 00:30:51.320
<v Sjors Provoost>or the other way around. See, this is where I even get confused. But the idea

00:30:51.320 --> 00:30:57.260
<v Sjors Provoost>here is because the transaction is hashed into 32 bytes and there's two of them

00:30:57.260 --> 00:31:03.240
<v Sjors Provoost>next to each other, that means that you can basically start making

00:31:03.240 --> 00:31:05.600
<v Sjors Provoost>a... How do you say this?

00:31:07.730 --> 00:31:11.030
<v Sjors Provoost>There's certain parts of the transactions that can be whatever you want. And so

00:31:11.030 --> 00:31:15.780
<v Sjors Provoost>you don't have to actually find a SHA-256 pre-image. You have to find far fewer.

00:31:15.820 --> 00:31:19.440
<v Sjors Provoost>You have to try far fewer random transactions to be able to craft a transaction

00:31:19.440 --> 00:31:23.810
<v Sjors Provoost>that looks like this. And one of the tricks he does is like he's saying, okay, I

00:31:23.810 --> 00:31:27.310
<v Sjors Provoost>don't care about the amount in advance. So how many amounts can there be? There's

00:31:27.310 --> 00:31:31.370
<v Sjors Provoost>just several bytes worth of what the amounts can be. So you basically keep

00:31:31.370 --> 00:31:34.150
<v Sjors Provoost>looking for transactions with random different amounts. And then once you find

00:31:34.150 --> 00:31:37.580
<v Sjors Provoost>the right hash, you use it. And then you send money to yourself. Anyway, you

00:31:37.580 --> 00:31:40.320
<v Sjors Provoost>should read the blog post. But the attack is quite expensive.

00:31:40.540 --> 00:31:46.060
<v Aaron van Wirdum>Yeah, can I summarize this? Here's the summary. SPV wallets are not

00:31:46.060 --> 00:31:50.140
<v Aaron van Wirdum>secure if you want to accept millions of dollars worth of Bitcoin.

00:31:50.720 --> 00:31:54.280
<v Sjors Provoost>Yeah, assuming his calculation is correct, it would cost at the time several

00:31:54.280 --> 00:31:57.720
<v Sjors Provoost>million to do this attack. And so if you are receiving more than a few million,

00:31:57.940 --> 00:32:00.440
<v Sjors Provoost>you should absolutely run a full node.

00:32:00.660 --> 00:32:04.320
<v Aaron van Wirdum>Yeah, there are just some weird quirks in the Bitcoin protocol and miner

00:32:04.320 --> 00:32:06.560
<v Aaron van Wirdum>incentives. And SPV is not secure for that.

00:32:06.710 --> 00:32:10.430
<v Sjors Provoost>No, and this attack also requires collaboration from a miner. So if you have

00:32:10.430 --> 00:32:13.210
<v Sjors Provoost>collaboration from a miner anyway, you might as well just do a normal double spend.

00:32:13.510 --> 00:32:13.670
<v Aaron van Wirdum>Right.

00:32:13.870 --> 00:32:18.650
<v Sjors Provoost>But I think the target audience for this attack was automated systems that use

00:32:18.650 --> 00:32:24.550
<v Sjors Provoost>SPV proofs. And I think at the time, Liquid had some components and RSK had some

00:32:24.550 --> 00:32:28.430
<v Sjors Provoost>components that were fully automated and would use these SPV proofs and would

00:32:28.430 --> 00:32:29.370
<v Sjors Provoost>have lots of money in them.

00:32:29.610 --> 00:32:35.220
<v Aaron van Wirdum>Okay. And now I want to ask you, so Bitcoin Core made this change? Or

00:32:35.220 --> 00:32:39.000
<v Aaron van Wirdum>apparently they made the change a couple of years ago, actually. And now it's

00:32:39.000 --> 00:32:44.040
<v Aaron van Wirdum>only now, I guess the developer figured most people have now upgraded. So now we

00:32:44.040 --> 00:32:46.960
<v Aaron van Wirdum>can stop pretending that 84 was...

00:32:46.960 --> 00:32:51.940
<v Sjors Provoost>No, the pretending stopped earlier. So I think it was changed in 2017 without any

00:32:51.940 --> 00:32:56.910
<v Sjors Provoost>explanation. Although this blog post from him was around the same time. And then

00:32:56.910 --> 00:33:00.770
<v Sjors Provoost>in 2019, there were comments added to the source code saying, actually, this is

00:33:00.770 --> 00:33:06.370
<v Sjors Provoost>nonsense, but this is the reason. And then only now somebody bothered to actually

00:33:06.370 --> 00:33:08.830
<v Sjors Provoost>change the limit, which is because nobody needed it.

00:33:09.050 --> 00:33:12.390
<v Aaron van Wirdum>Yeah. So why is it needed now?

00:33:13.360 --> 00:33:16.720
<v Sjors Provoost>Well, I don't know. I mean, that's what we speculated on earlier. Maybe it's

00:33:16.720 --> 00:33:19.180
<v Sjors Provoost>easier to burn money or maybe it has something to do with these ephemeral

00:33:19.180 --> 00:33:21.300
<v Sjors Provoost>anchors. I didn't study it in enough detail.

00:33:21.600 --> 00:33:27.520
<v Aaron van Wirdum>Okay. Uh anyway so now the limit is 65 however even now that's only a

00:33:27.520 --> 00:33:28.240
<v Aaron van Wirdum>policy change

00:33:28.240 --> 00:33:31.900
<v Sjors Provoost>Yeah so the irony is this never prevented the attack because the attack as

00:33:31.900 --> 00:33:36.720
<v Sjors Provoost>described actually requires being a miner or at least working with a miner so

00:33:36.720 --> 00:33:40.720
<v Sjors Provoost>it's kind of ironic because a miner doesn't care about standardness rules so it

00:33:40.720 --> 00:33:44.100
<v Sjors Provoost>was a step it was like okay but you know there's something called defense in

00:33:44.100 --> 00:33:47.990
<v Sjors Provoost>depth where you say okay We think only a miner can do this, but maybe somebody

00:33:47.990 --> 00:33:51.710
<v Sjors Provoost>else figures out a way to do it without the help of a miner. So it still helps to

00:33:51.710 --> 00:33:55.960
<v Sjors Provoost>make it more difficult to relay these things. And there is a software proposal,

00:33:55.960 --> 00:34:00.780
<v Sjors Provoost>which is called the Great Consensus Cleanup, which Matt Corallo proposed in 2017.

00:34:01.060 --> 00:34:02.220
<v Aaron van Wirdum>We may have done an episode on that or no?

00:34:02.520 --> 00:34:06.260
<v Sjors Provoost>Yep. And one of the parts of that proposal was to make the minimum transaction

00:34:06.260 --> 00:34:08.840
<v Sjors Provoost>size 65 bytes. And that would be consensus change.

00:34:09.000 --> 00:34:09.200
<v Aaron van Wirdum>Right.

00:34:09.600 --> 00:34:11.200
<v Sjors Provoost>Which is precisely for this reason.

00:34:11.380 --> 00:34:14.660
<v Aaron van Wirdum>Right. Okay. But that's not what this is. So that's one.

00:34:16.590 --> 00:34:21.150
<v Aaron van Wirdum>I feel we're getting really into the weeds with this Bitcoin Core 25 episode

00:34:21.150 --> 00:34:26.090
<v Aaron van Wirdum>Sjors. I think this is like a very niche upgrade, but it's an upgrade. So we've

00:34:26.090 --> 00:34:29.030
<v Aaron van Wirdum>now covered four topics. We're done with this one, right?

00:34:29.110 --> 00:34:31.150
<v Sjors Provoost>I think we've covered. Yeah, we covered four of them.

00:34:31.350 --> 00:34:33.050
<v Aaron van Wirdum>Good. Are we done with the episode?

00:34:33.710 --> 00:34:34.530
<v Sjors Provoost>I think so.

00:34:34.730 --> 00:34:37.930
<v Aaron van Wirdum>I mean, that was this other thing you wanted to mention, maybe something about

00:34:37.930 --> 00:34:39.030
<v Aaron van Wirdum>the full RBF release.

00:34:39.270 --> 00:34:44.010
<v Sjors Provoost>Yeah, so there's an alternative implementation, which you can download at your

00:34:44.010 --> 00:34:46.810
<v Sjors Provoost>own risk. Make sure to check all the signatures, et cetera.

00:34:47.110 --> 00:34:48.350
<v Aaron van Wirdum>This is Peter Todd's implementation?

00:34:48.630 --> 00:34:51.290
<v Sjors Provoost>Yeah, it's Peter Todd, I think, together with Antoine Riard.

00:34:53.030 --> 00:34:56.490
<v Sjors Provoost>They're lobbying the full RBF thing, which we've done plenty of episodes about.

00:34:56.990 --> 00:35:02.130
<v Sjors Provoost>It's essentially Bitcoin Core 25 plus the full RBF stuff. And the one thing

00:35:02.130 --> 00:35:07.560
<v Sjors Provoost>that's... I think interesting about it is that when you just turn on full RBF,

00:35:07.820 --> 00:35:13.260
<v Sjors Provoost>you're able to replace transactions without setting the RBF signal. But the

00:35:13.260 --> 00:35:17.020
<v Sjors Provoost>problem is if you're sending it to your peers, none of those peers might relay

00:35:17.020 --> 00:35:21.120
<v Sjors Provoost>it. And so what you want to do is you want to find other nodes out there in the

00:35:21.120 --> 00:35:24.640
<v Sjors Provoost>network that also support this feature. And there's something called service

00:35:24.640 --> 00:35:29.600
<v Sjors Provoost>flags in which nodes can communicate that they have this feature and deliberately

00:35:29.600 --> 00:35:35.250
<v Sjors Provoost>connect to them. So this patch does that. But I should warn you that changing

00:35:35.250 --> 00:35:40.940
<v Sjors Provoost>peer-to-peer code is always very scary. So if just one or two people are doing

00:35:40.940 --> 00:35:42.360
<v Sjors Provoost>that, I don't know, it's up to you.

00:35:43.200 --> 00:35:46.560
<v Aaron van Wirdum>And anyways, this is not Bitcoin Core really. And we were talking about Bitcoin

00:35:46.560 --> 00:35:48.960
<v Aaron van Wirdum>Core. So that's the episode then, Sjors?

00:35:49.150 --> 00:35:49.770
<v Sjors Provoost>That's right.

00:35:49.790 --> 00:35:52.020
<v Aaron van Wirdum>Bitcoin Core 25 is released. Where can people find it?

00:35:52.440 --> 00:35:53.440
<v Sjors Provoost>BitcoinCore.org.

00:35:54.370 --> 00:35:55.110
<v Aaron van Wirdum>There you go.

00:35:55.160 --> 00:35:56.700
<v Sjors Provoost>So thank you for listening to Bitcoin

00:35:57.340 --> 00:35:57.810
<v Aaron van Wirdum>Explained.

