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

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

00:00:23.720 --> 00:00:24.120
<v Sjors Provoost>Explained.

00:00:24.380 --> 00:00:24.820
<v Aaron van Wirdum>Hey Sjors.

00:00:25.040 --> 00:00:25.460
<v Sjors Provoost>What's up?

00:00:26.210 --> 00:00:26.870
<v Aaron van Wirdum>I'm good.

00:00:27.750 --> 00:00:28.730
<v Sjors Provoost>How do you like the weather?

00:00:29.030 --> 00:00:34.270
<v Aaron van Wirdum>Yeah, well, it was too hot all summer. And then it was nice for about a week.

00:00:34.790 --> 00:00:36.370
<v Aaron van Wirdum>And now we're back to too cold.

00:00:36.770 --> 00:00:38.610
<v Sjors Provoost>So this is going to be a great winter.

00:00:39.440 --> 00:00:43.680
<v Aaron van Wirdum>That's that's winter for you at least for now it's still a little bit light for

00:00:43.680 --> 00:00:47.460
<v Aaron van Wirdum>example while we're recording it's still light and it's past six that's that's

00:00:47.460 --> 00:00:51.680
<v Aaron van Wirdum>the really dreadful moment for me when the clock changes when you go back to the

00:00:51.680 --> 00:00:54.300
<v Aaron van Wirdum>we revert…

00:00:54.300 --> 00:01:00.200
<v Sjors Provoost>Yeah we go to standard time although some people want to change it and make the

00:01:00.200 --> 00:01:02.560
<v Sjors Provoost>summertime the default which I think is terrible but…

00:01:03.450 --> 00:01:08.650
<v Aaron van Wirdum>I would definitely prefer that just because I don't get up that early anyways. So

00:01:08.650 --> 00:01:11.930
<v Aaron van Wirdum>I like to optimize my sun hours.

00:01:12.970 --> 00:01:16.800
<v Sjors Provoost>I mean, ultimately, you can just get up whenever you want to get up, right?

00:01:17.970 --> 00:01:19.770
<v Sjors Provoost>Unless you have to be in a physical place.

00:01:19.790 --> 00:01:23.870
<v Aaron van Wirdum>But you're kind of reliant on the rest of society around you, right? Like stores

00:01:23.870 --> 00:01:28.550
<v Aaron van Wirdum>close at a certain time and people get out of work at a certain time. Like might

00:01:28.550 --> 00:01:31.910
<v Aaron van Wirdum>be your friends or you want to record a podcast at a certain time because you

00:01:31.910 --> 00:01:35.490
<v Aaron van Wirdum>want to eat at a certain time. So I don't have that full flexibility that you

00:01:35.490 --> 00:01:41.120
<v Aaron van Wirdum>suggest because of all these people around me okay Sjors, so I'm gonna shill the

00:01:41.120 --> 00:01:44.520
<v Aaron van Wirdum>conference one more time conference is coming up okay you can get a 10 discount

00:01:44.520 --> 00:01:50.380
<v Aaron van Wirdum>if you know how to spell Sjorsnado that's your discount code Sjorsnado

00:01:50.380 --> 00:01:56.380
<v Aaron van Wirdum>on I think it's b.tc slash amsterdam I think that's the that's the

00:01:56.380 --> 00:02:02.320
<v Aaron van Wirdum>website for the conference all right Sjors, we're gonna discuss The

00:02:02.320 --> 00:02:06.320
<v Aaron van Wirdum>new Bitcoin Core release that's coming up. It's not here yet. It's Bitcoin Core

00:02:06.320 --> 00:02:07.940
<v Sjors Provoost>24.0.

00:02:09.240 --> 00:02:14.400
<v Aaron van Wirdum>24.0 that's the upcoming one real quick for maybe there are some new listeners

00:02:14.400 --> 00:02:17.760
<v Aaron van Wirdum>what does it mean that there's a new Bitcoin Core release coming out?

00:02:17.760 --> 00:02:23.240
<v Sjors Provoost>Yeah so because Bitcoin Core does not have a roadmap or anything like that there

00:02:23.240 --> 00:02:27.780
<v Sjors Provoost>is just a new release every six months or so and things that are ready go into

00:02:27.780 --> 00:02:31.540
<v Sjors Provoost>that new release and things that are not ready may go into another release so

00:02:31.540 --> 00:02:33.760
<v Sjors Provoost>there's nothing very special about these releases.

00:02:34.880 --> 00:02:38.940
<v Aaron van Wirdum>Right. And so it's time for number 24. It's just an update that happens twice a

00:02:38.940 --> 00:02:40.620
<v Aaron van Wirdum>year. Generally, whatever is done is done.

00:02:41.060 --> 00:02:44.020
<v Sjors Provoost>Yes. And then there are some minor updates throughout the rest of the year that

00:02:44.020 --> 00:02:49.860
<v Sjors Provoost>might be 24.1, 24.2, et cetera. And those typically are just bug fixes, but no

00:02:49.860 --> 00:02:50.520
<v Sjors Provoost>major changes.

00:02:51.040 --> 00:02:55.820
<v Aaron van Wirdum>Right. And right now, there's a release candidate. At the time of recording this

00:02:55.820 --> 00:03:00.060
<v Aaron van Wirdum>podcast, there's, I think, the first release candidate for Bitcoin Core 24. What

00:03:00.060 --> 00:03:01.080
<v Aaron van Wirdum>does a release candidate mean?

00:03:01.280 --> 00:03:06.160
<v Sjors Provoost>Kind of what the word suggests. It's a candidate for the release. So if all goes

00:03:06.160 --> 00:03:12.040
<v Sjors Provoost>well, then the actual release will be made identical to the last candidate. But

00:03:12.040 --> 00:03:15.260
<v Sjors Provoost>the idea is that people who know what they're doing should be downloading that

00:03:15.260 --> 00:03:19.700
<v Sjors Provoost>release candidate and or compiling it themselves and play around with it and make

00:03:19.700 --> 00:03:24.960
<v Sjors Provoost>sure that nothing crashes, that things they use, especially if you run some sort

00:03:24.960 --> 00:03:29.600
<v Sjors Provoost>of automated service, like you might be running an exchange or maybe you're

00:03:29.600 --> 00:03:33.550
<v Sjors Provoost>running BTCPay or something like that. You want to make sure nothing breaks. In

00:03:33.550 --> 00:03:37.210
<v Sjors Provoost>your setup because Bitcoin Core tries to not break things that use it but it

00:03:37.210 --> 00:03:38.210
<v Sjors Provoost>happens occasionally.

00:03:38.790 --> 00:03:43.450
<v Aaron van Wirdum>Right so if there's no report of anything breaking then this release candidate

00:03:43.450 --> 00:03:45.650
<v Aaron van Wirdum>will basically be the release right?

00:03:45.870 --> 00:03:48.910
<v Sjors Provoost>Yeah but I think there's already some some things that have been improved so

00:03:48.910 --> 00:03:50.750
<v Sjors Provoost>there will definitely be a second release candidate.

00:03:51.010 --> 00:03:54.410
<v Aaron van Wirdum>Okay yeah and I think in previous Bitcoin Core releases there were on average

00:03:54.410 --> 00:03:55.910
<v Aaron van Wirdum>like four or so.

00:03:56.370 --> 00:03:57.350
<v Sjors Provoost>Yeah I'd say that's typical.

00:03:57.640 --> 00:03:57.940
<v Aaron van Wirdum>Yeah.

00:03:58.220 --> 00:04:02.360
<v Sjors Provoost>So usually there's two weeks between them. So you release it and then maybe after

00:04:02.360 --> 00:04:05.680
<v Sjors Provoost>a week or so people start fixing things and then after two weeks there's a new one.

00:04:06.160 --> 00:04:11.700
<v Aaron van Wirdum>Right. So realistically, well, technically the new Bitcoin Core 24 release could

00:04:11.700 --> 00:04:16.200
<v Aaron van Wirdum>be released any day now, but practically speaking will probably be at least a

00:04:16.200 --> 00:04:17.120
<v Aaron van Wirdum>couple more weeks, right?

00:04:17.700 --> 00:04:22.740
<v Sjors Provoost>Yeah, I'd say so. I think there is a release, attempted release schedule on the

00:04:22.740 --> 00:04:26.060
<v Sjors Provoost>Bitcoin Core repository, which I think is for mid-October.

00:04:27.630 --> 00:04:33.580
<v Aaron van Wirdum>Right. Okay. So there's a bunch of new features

00:04:33.580 --> 00:04:39.250
<v Aaron van Wirdum>as well as bug fixes and improvements, sorry, performance

00:04:39.250 --> 00:04:43.630
<v Aaron van Wirdum>improvements in this new release. We're going to discuss a couple of these. This

00:04:43.630 --> 00:04:49.560
<v Aaron van Wirdum>is kind of just our selection. If there were, if this podcast was made

00:04:49.560 --> 00:04:55.460
<v Aaron van Wirdum>by two other people. By Ors and Sharon. They might make a

00:04:55.460 --> 00:04:58.900
<v Aaron van Wirdum>different selection, but we, Sjors and Aaron, we made this selection.

00:04:59.200 --> 00:05:04.680
<v Sjors Provoost>Yeah, I mean, you can look at all the commits, so all the atomic changes that go

00:05:04.680 --> 00:05:09.060
<v Sjors Provoost>into a release, and there could be a thousand of them, but most of them are very

00:05:09.060 --> 00:05:13.420
<v Sjors Provoost>boring, or at least they are very boring unless you are really into details of

00:05:13.420 --> 00:05:17.660
<v Sjors Provoost>how compilers work or into cleaning up code for the sake of cleaning it up. So

00:05:17.660 --> 00:05:20.590
<v Sjors Provoost>there's a lot of changes that are just... not very interesting to discuss

00:05:20.590 --> 00:05:24.110
<v Sjors Provoost>although they are important and they should be they are being you know they they

00:05:24.110 --> 00:05:28.050
<v Sjors Provoost>always get reviewed because any of those changes could of course be a really

00:05:28.050 --> 00:05:29.650
<v Sjors Provoost>scary thing yeah.

00:05:29.650 --> 00:05:34.710
<v Aaron van Wirdum>I'm just saying we we made a selection of some of the changes that we think are

00:05:34.710 --> 00:05:38.610
<v Aaron van Wirdum>probably most interesting to you our dear listener

00:05:38.610 --> 00:05:39.290
<v Sjors Provoost>That's right.

00:05:39.290 --> 00:05:44.530
<v Aaron van Wirdum>Okay so let's start Sjors, I think that this one is the first one mentioned in

00:05:44.530 --> 00:05:50.470
<v Aaron van Wirdum>the release notes as well it's about the peer-to-peer and network changes is that

00:05:50.470 --> 00:05:54.830
<v Aaron van Wirdum>is that a typo it should just say peer-to-peer changes peer-to-peer network

00:05:54.830 --> 00:05:55.710
<v Aaron van Wirdum>changes whatever

00:05:55.710 --> 00:05:56.790
<v Sjors Provoost>Peer-to-peer networking

00:05:56.790 --> 00:05:58.050
<v Aaron van Wirdum>Yeah let's move on.

00:05:59.450 --> 00:06:05.050
<v Aaron van Wirdum>So it says that there's a change and you're gonna explain to me what this is

00:06:05.050 --> 00:06:10.090
<v Aaron van Wirdum>that's the format of the podcast in case you forgot it says download headers from

00:06:10.090 --> 00:06:15.390
<v Aaron van Wirdum>peers so the downloading from downloading of headers from peers has been

00:06:15.390 --> 00:06:16.110
<v Aaron van Wirdum>reworked

00:06:16.110 --> 00:06:16.670
<v Sjors Provoost>That's right.

00:06:16.670 --> 00:06:17.450
<v Aaron van Wirdum>Somehow okay.

00:06:18.490 --> 00:06:22.310
<v Sjors Provoost>Yeah, this one might be worth a separate episode, but I think we can explain the

00:06:22.310 --> 00:06:26.950
<v Sjors Provoost>gist of it now. So when your node first starts up, it is going to find peers,

00:06:27.230 --> 00:06:30.370
<v Sjors Provoost>which we discussed in earlier episode, and then it's going to download headers

00:06:30.370 --> 00:06:34.890
<v Sjors Provoost>from peers, which we've also discussed in earlier episodes. So it tries to get

00:06:34.890 --> 00:06:36.990
<v Sjors Provoost>all the headers first, and then...

00:06:36.990 --> 00:06:40.970
<v Aaron van Wirdum>Hang on, so every block has a header, which is essentially the hash of the block

00:06:40.970 --> 00:06:41.470
<v Aaron van Wirdum>itself, right?

00:06:41.630 --> 00:06:46.340
<v Sjors Provoost>Plus a little bit of extra info that... for example, contains the timestamp and

00:06:46.340 --> 00:06:49.460
<v Sjors Provoost>the amount of proof of work. Well, the amount of proof of work follows in the

00:06:49.460 --> 00:06:50.860
<v Sjors Provoost>hash, but yeah.

00:06:51.850 --> 00:06:53.870
<v Aaron van Wirdum>It's basically hash plus some extra info.

00:06:54.090 --> 00:06:54.430
<v Sjors Provoost>Yes.

00:06:55.090 --> 00:06:59.170
<v Aaron van Wirdum>So it's not the whole block. Okay. So first you start downloading not the whole

00:06:59.170 --> 00:07:03.770
<v Aaron van Wirdum>block or not all of the blocks, but you start downloading the headers, right?

00:07:04.050 --> 00:07:06.970
<v Sjors Provoost>Yes, and the idea is that you first want to make sure that the chain that you're

00:07:06.970 --> 00:07:10.050
<v Sjors Provoost>following has enough proof of work that it's even worth downloading the blocks

00:07:10.050 --> 00:07:13.510
<v Sjors Provoost>for. Now, that's been improved many years ago. It used to be that I think it

00:07:13.510 --> 00:07:16.150
<v Sjors Provoost>would just download headers and then some blocks and then some headers and then

00:07:16.150 --> 00:07:19.490
<v Sjors Provoost>some blocks. And that has been changed many years ago to first download all the

00:07:19.490 --> 00:07:23.590
<v Sjors Provoost>headers. And only then when you know for sure that you have enough proof of work

00:07:23.590 --> 00:07:27.150
<v Sjors Provoost>because you can check that based on the headers, then you start downloading the

00:07:27.150 --> 00:07:32.370
<v Sjors Provoost>blocks. This prevents you from wasting time chasing and basically chasing dead ends.

00:07:32.570 --> 00:07:36.870
<v Aaron van Wirdum>Okay, that was already the case. So even in Bitcoin Core 23, you would already

00:07:36.870 --> 00:07:40.830
<v Aaron van Wirdum>start with downloading only the headers and only later the blocks. Okay, so what

00:07:40.830 --> 00:07:41.330
<v Aaron van Wirdum>has changed?

00:07:41.490 --> 00:07:45.790
<v Sjors Provoost>So what has changed now is that we're going to download the headers twice. And

00:07:45.790 --> 00:07:50.860
<v Sjors Provoost>that might take some explanation of why you want to do that. So there is... The

00:07:50.860 --> 00:07:55.180
<v Sjors Provoost>potential problem that you're worried about with headers is that you could

00:07:55.180 --> 00:07:58.360
<v Sjors Provoost>receive quite a lot of them. Because, you know, right now there have been about

00:07:58.360 --> 00:08:03.740
<v Sjors Provoost>700,000 blocks since the genesis, but a miner could manipulate the timestamps and

00:08:03.740 --> 00:08:07.360
<v Sjors Provoost>they could create a fake blockchain with blocks that are every second. And that

00:08:07.360 --> 00:08:09.820
<v Sjors Provoost>would be billions and billions of... of blocks.

00:08:09.820 --> 00:08:13.960
<v Aaron van Wirdum>Well I guess anyone can can only my only miner can do well anyone who can mine

00:08:13.960 --> 00:08:18.640
<v Aaron van Wirdum>you you do need basically the ASIC hardware to do that

00:08:18.640 --> 00:08:22.280
<v Sjors Provoost>Well you'd have to do the math on what kind of hardware you would need to do it I

00:08:22.280 --> 00:08:24.520
<v Sjors Provoost>mean in principle you don't need an ASIC to mine blocks right.

00:08:24.520 --> 00:08:27.420
<v Aaron van Wirdum>You need the proof of work is what I'm saying yeah you need the actual proof of work.

00:08:27.420 --> 00:08:30.740
<v Sjors Provoost>Yeah but I mean you know the the proof of work in the beginning was quite low so

00:08:30.740 --> 00:08:33.980
<v Sjors Provoost>you can do that with the CPU but maybe if you want to you know do some damage

00:08:33.980 --> 00:08:38.890
<v Sjors Provoost>maybe you need more power anyway uh so the the worry is that you get billion

00:08:38.890 --> 00:08:44.030
<v Sjors Provoost>headers from a chain and it's not the real chain but it's a lots of low work

00:08:44.030 --> 00:08:48.500
<v Sjors Provoost>nonsense and the problem with that is that not just do you have to download it

00:08:48.500 --> 00:08:53.300
<v Sjors Provoost>because that's kind of hard to avoid but you also tend to store it on your disk

00:08:53.300 --> 00:08:59.140
<v Sjors Provoost>because maybe you receive half a billion headers And those don't go anywhere,

00:08:59.140 --> 00:09:01.940
<v Sjors Provoost>but you don't know. Maybe there's another half a billion headers on top of that

00:09:01.940 --> 00:09:05.800
<v Sjors Provoost>that do take you to the real tip. So you can't really throw those headers away

00:09:05.800 --> 00:09:10.980
<v Sjors Provoost>that easily. And so the attack would be that lots of headers are sent to you. And

00:09:10.980 --> 00:09:14.880
<v Sjors Provoost>that attack has been known for a long time. And the solution to that so far has

00:09:14.880 --> 00:09:15.500
<v Sjors Provoost>been checkpoints.

00:09:16.550 --> 00:09:21.930
<v Aaron van Wirdum>Okay, hang on. Let's summarize this. So first, the problem was solved.

00:09:22.490 --> 00:09:24.250
<v Aaron van Wirdum>The first problem

00:09:24.250 --> 00:09:25.870
<v Sjors Provoost>Was just getting lots of spam blocks.

00:09:26.110 --> 00:09:30.310
<v Aaron van Wirdum>Yes. So that problem was solved by only checking the headers. But now, basically,

00:09:30.350 --> 00:09:35.670
<v Aaron van Wirdum>a new problem is introduced. Namely, someone could just send you a boatload of

00:09:35.670 --> 00:09:37.190
<v Aaron van Wirdum>fake headers, essentially.

00:09:37.530 --> 00:09:37.690
<v Sjors Provoost>Yeah.

00:09:38.010 --> 00:09:42.170
<v Aaron van Wirdum>And then while downloading all these headers, you also have to store it. This is

00:09:42.170 --> 00:09:43.010
<v Aaron van Wirdum>resource intensive.

00:09:43.720 --> 00:09:46.880
<v Sjors Provoost>Yeah, so it's basically the general category of problem is called a resource

00:09:46.880 --> 00:09:50.300
<v Sjors Provoost>exhaustion attack. So I'm trying to exhaust one of your resources.

00:09:50.560 --> 00:09:54.040
<v Aaron van Wirdum>And then you mentioned this was solved with...

00:09:54.140 --> 00:09:57.340
<v Sjors Provoost>Checkpoints. This has been discussed very early on. That's kind of what the

00:09:57.340 --> 00:10:01.430
<v Sjors Provoost>checkpoints are for. Fortunately... Well, checkpoints have not been added since

00:10:01.430 --> 00:10:05.410
<v Sjors Provoost>2013 because they are, you know, not very nice way to do it.

00:10:05.590 --> 00:10:07.210
<v Aaron van Wirdum>Just to be very clear, what is a checkpoint?

00:10:07.490 --> 00:10:11.150
<v Sjors Provoost>So what a checkpoint does is it says this specific block with this hash must

00:10:11.150 --> 00:10:11.990
<v Sjors Provoost>exist in the chain.

00:10:12.290 --> 00:10:12.710
<v Aaron van Wirdum>Right.

00:10:12.890 --> 00:10:13.670
<v Sjors Provoost>So it's not optional.

00:10:14.030 --> 00:10:14.210
<v Aaron van Wirdum>Right.

00:10:14.470 --> 00:10:20.050
<v Sjors Provoost>And that has always been done retroactively, like a long time after. So a way to

00:10:20.050 --> 00:10:24.390
<v Sjors Provoost>abuse checkpoints is to say, well, somebody stole my coins. I'm going to now

00:10:24.390 --> 00:10:28.150
<v Sjors Provoost>introduce a checkpoint that happened before somebody stole my coins for a new

00:10:28.150 --> 00:10:32.150
<v Sjors Provoost>block that I've created that does not steal my coins. And then, you know, we

00:10:32.150 --> 00:10:34.450
<v Sjors Provoost>start history again. That's the worst case.

00:10:34.450 --> 00:10:36.130
<v Aaron van Wirdum>That should be after someone.

00:10:37.520 --> 00:10:38.940
<v Sjors Provoost>So somebody steals my coins.

00:10:39.080 --> 00:10:39.200
<v Aaron van Wirdum>Yeah.

00:10:39.800 --> 00:10:43.960
<v Sjors Provoost>Let's say that happens today. Then I call up a miner and say, could you make a

00:10:43.960 --> 00:10:47.660
<v Sjors Provoost>couple of new blocks that don't steal my coins? Here's the double spend version

00:10:47.660 --> 00:10:51.500
<v Sjors Provoost>that I want to include in that block. They mine it for me. And then I release a

00:10:51.500 --> 00:10:55.840
<v Sjors Provoost>new version of Bitcoin Core that says, here's a checkpoint. You must ignore the

00:10:55.840 --> 00:10:59.460
<v Sjors Provoost>real big chain that has built on top of the hack and actually go for this other chain.

00:10:59.540 --> 00:11:04.000
<v Aaron van Wirdum>Yeah, so with the checkpoint, you can sort of overrule the longest chain rule.

00:11:04.200 --> 00:11:09.760
<v Sjors Provoost>That's right. And that has been done in many altcoins. So the concern is that we

00:11:09.760 --> 00:11:14.040
<v Sjors Provoost>don't want that to happen in Bitcoin. So one way to prevent that, I think, has

00:11:14.040 --> 00:11:17.740
<v Sjors Provoost>been from the beginning to introduce the checkpoints only much after they've

00:11:17.740 --> 00:11:20.340
<v Sjors Provoost>already happened. So you already know they're part of the longest chain.

00:11:20.440 --> 00:11:24.060
<v Sjors Provoost>Everybody can verify that. And the checkpoint is buried quite deeply. But it's

00:11:24.060 --> 00:11:28.060
<v Sjors Provoost>still not a very pretty solution. And so people stopped doing it. So it'd be

00:11:28.060 --> 00:11:29.260
<v Sjors Provoost>nice, but it'd be very nice.

00:11:29.280 --> 00:11:31.240
<v Aaron van Wirdum>Did you mention when the last checkpoint was?

00:11:31.320 --> 00:11:32.080
<v Sjors Provoost>I think it was 2013.

00:11:32.480 --> 00:11:32.680
<v Aaron van Wirdum>Right.

00:11:33.000 --> 00:11:34.180
<v Sjors Provoost>It's quite a long time ago.

00:11:34.520 --> 00:11:35.080
<v Aaron van Wirdum>It's a while, yeah.

00:11:35.280 --> 00:11:39.020
<v Sjors Provoost>Yeah. And so it'd be nice to get rid of those things entirely because, you know,

00:11:39.080 --> 00:11:44.420
<v Sjors Provoost>they are confusing. And, you know, we probably don't want to add new ones. So

00:11:44.420 --> 00:11:49.660
<v Sjors Provoost>in order to get rid of them, you still need to fix this resource exhaustion

00:11:49.660 --> 00:11:54.400
<v Sjors Provoost>attack that we just talked about. So then how do you do that? Well, the trick is

00:11:54.400 --> 00:11:58.840
<v Sjors Provoost>to download headers twice, as I said. So what you do is you download them once.

00:11:59.440 --> 00:12:03.430
<v Sjors Provoost>And when you download them once, you don't save them. You just... Look at them,

00:12:03.550 --> 00:12:06.590
<v Sjors Provoost>check if they're correct, and you throw them away. So this means it does not use

00:12:06.590 --> 00:12:11.550
<v Sjors Provoost>any of your disk space. And then if you see enough work at the end, if you

00:12:11.550 --> 00:12:14.690
<v Sjors Provoost>checked all the headers and you see the proof of work is enough, it's the longest

00:12:14.690 --> 00:12:19.450
<v Sjors Provoost>chain, then you ask the peer, hey, can you send them again, please? And you

00:12:19.450 --> 00:12:20.090
<v Sjors Provoost>download them again.

00:12:21.000 --> 00:12:24.940
<v Aaron van Wirdum>Right. Yeah. I think I mentioned yesterday when we went over this in our

00:12:24.940 --> 00:12:28.540
<v Aaron van Wirdum>preparation, this is kind of how my attention span usually works.

00:12:28.780 --> 00:12:32.460
<v Sjors Provoost>Exactly. You first let me ramble on a bit and then you think, oh, this might

00:12:32.460 --> 00:12:35.140
<v Sjors Provoost>actually be interesting. And then you say, what did you say again? Please repeat.

00:12:35.180 --> 00:12:36.100
<v Aaron van Wirdum>Can you repeat that for me?

00:12:36.260 --> 00:12:36.380
<v Sjors Provoost>Yeah.

00:12:36.920 --> 00:12:39.520
<v Aaron van Wirdum>Yeah, so this is how Bitcoin nodes now actually work.

00:12:39.700 --> 00:12:40.060
<v Sjors Provoost>That's right.

00:12:40.120 --> 00:12:43.480
<v Aaron van Wirdum>They first listen, they don't store anything, but then if it sounds actually

00:12:43.480 --> 00:12:46.720
<v Aaron van Wirdum>interesting, if they see the proof of work, they just ask again and they get all

00:12:46.720 --> 00:12:49.540
<v Aaron van Wirdum>the blocks again. They're like, wow, that's cool. They get all the headers again,

00:12:49.560 --> 00:12:51.340
<v Aaron van Wirdum>I guess, or do they now also get the blocks?

00:12:51.440 --> 00:12:54.540
<v Sjors Provoost>Well, then once those headers have been downloaded the second time, things

00:12:54.540 --> 00:12:58.720
<v Sjors Provoost>continue as always. You just start fetching blocks for the headers. Now there is,

00:12:58.800 --> 00:13:03.240
<v Sjors Provoost>of course, a little gotcha there because, well, who says that the second time

00:13:03.240 --> 00:13:07.410
<v Sjors Provoost>you're getting the same headers is the first time? You don't know that because

00:13:07.410 --> 00:13:13.190
<v Sjors Provoost>you didn't store them. So what you do instead is you store one checksum, which is

00:13:13.190 --> 00:13:18.530
<v Sjors Provoost>a one-bit checksum every 50,000 blocks or so. So every 50,000 headers, you store

00:13:18.530 --> 00:13:22.780
<v Sjors Provoost>a zero or a one, depending on the contents of those headers. And you do that

00:13:22.780 --> 00:13:28.120
<v Sjors Provoost>every 50,000 headers, that is very little information, but it turns out that it's

00:13:28.120 --> 00:13:31.180
<v Sjors Provoost>actually quite difficult for anybody to fake that information. So it's… for…

00:13:31.180 --> 00:13:35.140
<v Sjors Provoost>anybody to create fake headers that do match your checksum, even though it's a

00:13:35.140 --> 00:13:35.900
<v Sjors Provoost>very small checksum.

00:13:36.100 --> 00:13:40.480
<v Aaron van Wirdum>Right, yeah. A checksum is essentially you add up all kinds of numbers and you

00:13:40.480 --> 00:13:44.530
<v Aaron van Wirdum>get a very short number. Which doesn't in itself prove anything, but I guess if

00:13:44.530 --> 00:13:46.630
<v Aaron van Wirdum>you do it a bunch of times, then...

00:13:46.630 --> 00:13:48.670
<v Sjors Provoost>If you added the same numbers, you're going to get the same checksum.

00:13:48.850 --> 00:13:49.290
<v Aaron van Wirdum>Right, exactly.

00:13:49.410 --> 00:13:53.290
<v Sjors Provoost>So if you have 50,000 headers, you add all those up together, then you get either

00:13:53.290 --> 00:13:56.790
<v Sjors Provoost>a 1 or a 0. If you change any of the headers, well, you'll either get a 1 or a 0,

00:13:56.910 --> 00:14:01.010
<v Sjors Provoost>but it might be a different one. Now that, of course, is a 50-50 chance. So

00:14:01.010 --> 00:14:06.800
<v Sjors Provoost>that's pretty easy for a hacker to go after, but there are many blocks. So it

00:14:06.800 --> 00:14:10.180
<v Sjors Provoost>turns out that for long enough... I might be wrong on the exact number. It might

00:14:10.180 --> 00:14:15.940
<v Sjors Provoost>be less than 50,000. But if you have enough of those one-bit checks, basically,

00:14:16.160 --> 00:14:20.200
<v Sjors Provoost>then it becomes quite hard for an attacker to create a fake chain that has enough

00:14:20.200 --> 00:14:22.920
<v Sjors Provoost>proof of work, but that is different from the last one they sent you.

00:14:23.400 --> 00:14:25.360
<v Aaron van Wirdum>Yep. Okay, that makes sense.

00:14:25.720 --> 00:14:25.920
<v Sjors Provoost>Yep.

00:14:26.200 --> 00:14:31.930
<v Aaron van Wirdum>So the... There's still a small part of the problem left, which is you do still

00:14:31.930 --> 00:14:33.650
<v Aaron van Wirdum>need to download it the first time.

00:14:33.870 --> 00:14:34.130
<v Sjors Provoost>Yes.

00:14:34.290 --> 00:14:36.990
<v Aaron van Wirdum>But it solves another part of the problem, essentially.

00:14:37.150 --> 00:14:40.550
<v Sjors Provoost>Yeah, so the downside is you're downloading headers twice, so that might be

00:14:40.550 --> 00:14:46.230
<v Sjors Provoost>another 100 megabytes or so in the ideal case. However, compared to the size of

00:14:46.230 --> 00:14:50.650
<v Sjors Provoost>the blockchain, that's not too bad. And compared to the worst case attack, it's

00:14:50.650 --> 00:14:51.470
<v Sjors Provoost>definitely not bad.

00:14:53.030 --> 00:14:58.130
<v Aaron van Wirdum>And of course, even if an attacker would want to try this for some reason, it's

00:14:58.130 --> 00:15:03.540
<v Aaron van Wirdum>also costing the attacker resources because he has to upload all the data, the

00:15:03.540 --> 00:15:08.460
<v Aaron van Wirdum>same data you have to download. It doesn't really do much, this attack, right? It

00:15:08.460 --> 00:15:10.520
<v Aaron van Wirdum>can't allow you to steal coins or anything like that.

00:15:10.520 --> 00:15:13.740
<v Sjors Provoost>Well, with this defense, no, because all they can do is waste your bandwidth. And

00:15:13.740 --> 00:15:16.820
<v Sjors Provoost>there are many ways to waste your bandwidth, right? An attacker can just send you

00:15:16.820 --> 00:15:22.790
<v Sjors Provoost>a gigabyte block and... or just complete gibberish in general. So that's not a

00:15:22.790 --> 00:15:23.230
<v Sjors Provoost>new problem.

00:15:24.390 --> 00:15:28.170
<v Aaron van Wirdum>Okay, so this was included in Bitcoin Core 24 and will be...

00:15:28.170 --> 00:15:31.490
<v Sjors Provoost>Yeah, and the checkpoints are still there, but the idea would be to remove them

00:15:31.490 --> 00:15:32.450
<v Sjors Provoost>eventually.

00:15:32.690 --> 00:15:35.990
<v Aaron van Wirdum>Okay, so that would be removed in a future release.

00:15:36.130 --> 00:15:38.810
<v Sjors Provoost>Yeah, and of course, you know, there has to be some additional discussion to make

00:15:38.810 --> 00:15:41.750
<v Sjors Provoost>sure that that was really the last thing we needed, that the checkpoints are not

00:15:41.750 --> 00:15:44.090
<v Sjors Provoost>also protecting against something else that we forgot about.

00:15:45.180 --> 00:15:50.970
<v Aaron van Wirdum>Right. Okay. Well, that's the peer-to-peer part of Bitcoin 24. Then

00:15:50.970 --> 00:15:56.910
<v Aaron van Wirdum>the next point is Mempool uses full RBF now or can use full RBF?

00:15:57.030 --> 00:15:58.130
<v Sjors Provoost>Can use full RBF.

00:15:58.230 --> 00:15:58.350
<v Aaron van Wirdum>Right.

00:15:58.550 --> 00:16:02.330
<v Sjors Provoost>So it used to be that if you wanted, I think we've done an episode about replaced

00:16:02.330 --> 00:16:03.270
<v Sjors Provoost>by fee RBF.

00:16:03.410 --> 00:16:03.510
<v Aaron van Wirdum>Yes.

00:16:03.570 --> 00:16:05.510
<v Sjors Provoost>So I think the listeners should listen to that.

00:16:05.730 --> 00:16:07.950
<v Aaron van Wirdum>Well, you can summarize it in two sentences.

00:16:08.190 --> 00:16:12.690
<v Sjors Provoost>Yeah. So basically the Bitcoin protocol itself, when you have one transaction and

00:16:12.690 --> 00:16:15.900
<v Sjors Provoost>then you want to double spend it. There's nothing stopping you from doing that

00:16:15.900 --> 00:16:20.140
<v Sjors Provoost>before it's in a block, right? Now, from an incentive point of view, miners are

00:16:20.140 --> 00:16:23.800
<v Sjors Provoost>most likely to include the block with the highest fee, but they don't necessarily

00:16:23.800 --> 00:16:29.310
<v Sjors Provoost>have to. And so there was a proposal by Peter Todd many, many years ago

00:16:29.310 --> 00:16:35.230
<v Sjors Provoost>to say, well, normally the nodes, well, let's go one step back. So what miners

00:16:35.230 --> 00:16:38.730
<v Sjors Provoost>do is ultimately up to miners. You have no control over that. And Bitcoin Core

00:16:38.730 --> 00:16:41.470
<v Sjors Provoost>can change things in the software, but miners will do whatever they do because

00:16:41.470 --> 00:16:47.350
<v Sjors Provoost>what the mempool does is not consensus. However, the nodes will relay

00:16:47.350 --> 00:16:51.370
<v Sjors Provoost>transactions. And so you can change the nodes to say, well, I'm going to...

00:16:51.240 --> 00:16:54.440
<v Sjors Provoost>broadcast some transactions and not going to rebroadcast other transactions. And

00:16:54.440 --> 00:17:00.300
<v Sjors Provoost>so this new rule, opt-in replaced by fee, opt-in RBF, basically said that

00:17:00.300 --> 00:17:04.100
<v Sjors Provoost>normally we only broadcast the first version of the transaction we see,

00:17:04.320 --> 00:17:07.260
<v Sjors Provoost>regardless of the second one. It doesn't matter if the second one pays more fees.

00:17:08.060 --> 00:17:11.820
<v Sjors Provoost>But if you put a flag in the transaction that says, I want to opt-in to replace

00:17:11.820 --> 00:17:17.140
<v Sjors Provoost>by fee, then nodes will relay transactions that pay a higher fee

00:17:17.140 --> 00:17:22.340
<v Sjors Provoost>only and a bunch of other constraints. And so this gives the recipient some

00:17:22.340 --> 00:17:27.120
<v Sjors Provoost>assurance, not much, but some assurance that if this flag is present, this

00:17:27.120 --> 00:17:29.980
<v Sjors Provoost>transaction could be replaced anytime. You really have to wait for it to confirm.

00:17:30.340 --> 00:17:34.220
<v Sjors Provoost>If it doesn't have this flag, it might still disappear. It's just a little bit

00:17:34.220 --> 00:17:34.740
<v Sjors Provoost>less likely.

00:17:35.600 --> 00:17:39.780
<v Aaron van Wirdum>Yeah, I want to clarify one thing because you mentioned double spending in this

00:17:39.780 --> 00:17:43.540
<v Aaron van Wirdum>context. And you are, of course, right that this can be used to double spend

00:17:43.540 --> 00:17:48.780
<v Aaron van Wirdum>until it's included in a block, as you said. But the main purpose or the main

00:17:48.780 --> 00:17:53.320
<v Aaron van Wirdum>idea for using a flag, for example, is to increase the fee on your own

00:17:53.320 --> 00:17:54.080
<v Aaron van Wirdum>transaction, right?

00:17:54.240 --> 00:17:57.360
<v Sjors Provoost>That's definitely, I don't know how long that idea has been around because the

00:17:57.360 --> 00:18:02.240
<v Sjors Provoost>idea of being stuck in a mempool, that concept didn't even exist until 2015 or

00:18:02.240 --> 00:18:03.720
<v Sjors Provoost>2016. That was never a problem.

00:18:04.390 --> 00:18:08.170
<v Aaron van Wirdum>Yeah, but the flag was introduced around that time and definitely in the context

00:18:08.170 --> 00:18:09.530
<v Aaron van Wirdum>of that. That was the debate.

00:18:09.790 --> 00:18:09.950
<v Sjors Provoost>Okay.

00:18:10.250 --> 00:18:11.170
<v Aaron van Wirdum>Yeah, I'm sure about that.

00:18:12.430 --> 00:18:18.350
<v Aaron van Wirdum>So to summarize that, at least the idea for the flag was

00:18:18.350 --> 00:18:21.790
<v Aaron van Wirdum>you send a transaction, but the mempool was full and therefore your transaction

00:18:21.790 --> 00:18:27.310
<v Aaron van Wirdum>is not confirming. Now with the RBF flag, you can basically resend the same

00:18:27.310 --> 00:18:31.570
<v Aaron van Wirdum>transaction with a higher fee and therefore... Because the flag is included,

00:18:31.730 --> 00:18:36.830
<v Aaron van Wirdum>nodes will actually forward it to miners and it can be included in a block. Now,

00:18:36.830 --> 00:18:42.760
<v Aaron van Wirdum>you don't actually need to include the flag anymore. If this setting

00:18:42.760 --> 00:18:43.480
<v Aaron van Wirdum>is turned on?

00:18:44.000 --> 00:18:48.020
<v Sjors Provoost>Yeah, I think that if you turn the setting on, then the flag does no longer have

00:18:48.020 --> 00:18:52.680
<v Sjors Provoost>to be in there. It'll relay it anyway. I'm guessing there are other rules,

00:18:52.720 --> 00:18:56.090
<v Sjors Provoost>though, because I assume the fee has to go up. But I'm not sure about that.

00:18:56.090 --> 00:19:01.490
<v Aaron van Wirdum>So in my case if so far I was running a Bitcoin Core node let's say what was the

00:19:01.490 --> 00:19:06.510
<v Aaron van Wirdum>previous one 23 of course so far I was running Bitcoin Core 23 and then my node

00:19:06.510 --> 00:19:12.250
<v Aaron van Wirdum>would not forward a transaction even if it had a higher fee and it

00:19:12.250 --> 00:19:16.150
<v Aaron van Wirdum>conflicted with the previous transaction it would not do that but now with

00:19:16.150 --> 00:19:20.650
<v Aaron van Wirdum>Bitcoin 24 I can switch the setting and now it will actually forward that

00:19:20.650 --> 00:19:21.110
<v Aaron van Wirdum>transaction?

00:19:22.240 --> 00:19:27.100
<v Sjors Provoost>Yeah, I think that's it. And it basically means that if you're relying on this

00:19:27.100 --> 00:19:31.480
<v Sjors Provoost>opt-in RBF system to prevent double spends, basically to prevent double spends,

00:19:31.640 --> 00:19:35.840
<v Sjors Provoost>you should now rely on that less so because there's going to be more nodes that

00:19:35.840 --> 00:19:37.020
<v Sjors Provoost>will relay this thing regardless.

00:19:37.400 --> 00:19:41.430
<v Aaron van Wirdum>Yeah, well, I mean, it was almost... Well, I don't know about almost certainly,

00:19:41.590 --> 00:19:44.870
<v Aaron van Wirdum>but there's definitely a much bigger chance that a conflicting transaction will

00:19:44.870 --> 00:19:48.330
<v Aaron van Wirdum>make it to a miner now, right? Because I think there only needs to be a

00:19:48.330 --> 00:19:52.270
<v Aaron van Wirdum>relatively small amount of nodes on the network that actually do it for a

00:19:52.270 --> 00:19:54.570
<v Aaron van Wirdum>transaction to just find its way over the entire network.

00:19:54.690 --> 00:19:57.790
<v Sjors Provoost>But there was already ways to do it, right? There was a patch by Peter Todd,

00:19:57.870 --> 00:20:01.870
<v Sjors Provoost>which was pretty small, and you could use that to modify your nodes. So there's

00:20:01.870 --> 00:20:04.430
<v Sjors Provoost>already some nodes doing it. Now there's more, presumably.

00:20:04.790 --> 00:20:05.130
<v Aaron van Wirdum>Right.

00:20:08.550 --> 00:20:12.930
<v Aaron van Wirdum>So does this mean that some merchants are going to be unhappy?

00:20:13.310 --> 00:20:15.990
<v Sjors Provoost>Well, they might be for that reason.

00:20:15.990 --> 00:20:18.290
<v Aaron van Wirdum>There are still some merchants that rely on zero-conf.

00:20:18.390 --> 00:20:21.470
<v Sjors Provoost>Yeah, there are definitely merchants that do that. But the flip side is that

00:20:21.470 --> 00:20:26.230
<v Sjors Provoost>there's also merchants that use Lightning. And Lightning is generally bothered a

00:20:26.230 --> 00:20:30.970
<v Sjors Provoost>lot by the existing RBF rules because they make it much more complicated to deal

00:20:30.970 --> 00:20:35.310
<v Sjors Provoost>with penalty transactions. So on the long run, they may get a better Lightning

00:20:35.310 --> 00:20:36.930
<v Sjors Provoost>experience out of this.

00:20:37.170 --> 00:20:42.400
<v Aaron van Wirdum>Right. Yeah I mean my personal opinion is that this should just be the general

00:20:42.400 --> 00:20:42.820
<v Aaron van Wirdum>rule.

00:20:45.410 --> 00:20:50.050
<v Aaron van Wirdum>Transactions should always be broadcast and forwarded, especially if they have a higher fee.

00:20:50.670 --> 00:20:53.970
<v Sjors Provoost>I mean, maybe. We've already had this discussion during that episode, I guess.

00:20:54.070 --> 00:20:57.990
<v Sjors Provoost>But I would also say that if you just turn on the RBF flag by default, it

00:20:57.990 --> 00:21:03.170
<v Sjors Provoost>shouldn't bother you either. But I think the bigger problem is that this RBF flag

00:21:03.170 --> 00:21:06.710
<v Sjors Provoost>has very specific rules. It's not just that you set the flag. You also have to do

00:21:06.710 --> 00:21:11.550
<v Sjors Provoost>a few other things. And those other things cause complications. So that could be

00:21:11.550 --> 00:21:14.770
<v Sjors Provoost>a reason to say, you know what, let's forget about this opt-in RBF completely and

00:21:14.770 --> 00:21:18.630
<v Sjors Provoost>relay everything that is reasonable. But there are trade-offs. One is just

00:21:18.630 --> 00:21:24.270
<v Sjors Provoost>bandwidth. Because if my node relays everything that you send to it,

00:21:24.390 --> 00:21:28.650
<v Sjors Provoost>I could send you one transaction and then increase it by one satoshi per byte or

00:21:28.650 --> 00:21:31.790
<v Sjors Provoost>increase it by, don't even increase the fee, but just change the destinations a

00:21:31.790 --> 00:21:34.270
<v Sjors Provoost>bit. And I could send you millions and millions of variations of the same

00:21:34.270 --> 00:21:38.570
<v Sjors Provoost>transaction, basically wasting everybody's bandwidth. So it's not entirely

00:21:38.570 --> 00:21:39.450
<v Sjors Provoost>without trade-offs.

00:21:40.970 --> 00:21:46.440
<v Aaron van Wirdum>Fair. All right, let's move on to the third point. So we mentioned change on the

00:21:46.440 --> 00:21:49.620
<v Aaron van Wirdum>peer-to-peer network, the block header thing, and we just mentioned RBF. And then

00:21:49.620 --> 00:21:54.160
<v Aaron van Wirdum>the third point is this is related to descriptor wallets and migration to

00:21:54.160 --> 00:21:55.160
<v Aaron van Wirdum>descriptor wallets.

00:21:55.400 --> 00:21:59.560
<v Sjors Provoost>Yeah, I'm not sure how much we covered descriptor wallets so far, but the gist of

00:21:59.560 --> 00:22:04.900
<v Sjors Provoost>it is that the Bitcoin Core wallet is quite old. It used to be just a bag of

00:22:04.900 --> 00:22:09.070
<v Sjors Provoost>keys. And then, you know, given a private key, the wallet would have to pay

00:22:09.070 --> 00:22:12.050
<v Sjors Provoost>attention to certain scripts. I think in one of the first episodes we explained

00:22:12.050 --> 00:22:15.690
<v Sjors Provoost>what scripts are. But the simplest scripts is just that anybody with the public

00:22:15.690 --> 00:22:20.650
<v Sjors Provoost>key can spend this coin. The second simplest script is anybody with the hash of

00:22:20.650 --> 00:22:26.630
<v Sjors Provoost>the public key can spend the coin. Or anybody with the public key

00:22:26.630 --> 00:22:28.390
<v Sjors Provoost>for which the hash is blah, blah, blah.

00:22:28.750 --> 00:22:29.110
<v Aaron van Wirdum>Yeah.

00:22:29.970 --> 00:22:34.330
<v Sjors Provoost>But then later on came SegWit, and that created another two variations of how you

00:22:34.330 --> 00:22:35.110
<v Sjors Provoost>could spend the coins.

00:22:35.270 --> 00:22:35.550
<v Aaron van Wirdum>Right.

00:22:35.550 --> 00:22:39.890
<v Sjors Provoost>Because you had the address of bc1, and you had the address that looked like a

00:22:39.890 --> 00:22:42.440
<v Sjors Provoost>P2SH address. With SegWit wrapped in it.

00:22:42.840 --> 00:22:42.940
<v Aaron van Wirdum>Right.

00:22:43.060 --> 00:22:45.180
<v Sjors Provoost>So the wallet just became a giant mess.

00:22:45.360 --> 00:22:47.860
<v Aaron van Wirdum>Also, you have multisig rates and stuff like that.

00:22:47.960 --> 00:22:52.260
<v Sjors Provoost>Well, yeah, that makes it even more complicated. But basically, the Bitcoin Core

00:22:52.260 --> 00:22:56.260
<v Sjors Provoost>wallet became a bit unwieldy. And so one of the improvements that was introduced

00:22:56.260 --> 00:23:01.200
<v Sjors Provoost>was to create a new way to store data and basically saying, well, here's keys,

00:23:01.400 --> 00:23:06.400
<v Sjors Provoost>but more importantly, here's exactly what scripts you want to watch for. So you

00:23:06.400 --> 00:23:10.460
<v Sjors Provoost>can specifically say, I only want to check for Taproot transactions for this

00:23:10.460 --> 00:23:15.410
<v Sjors Provoost>private key and not also for legacy transactions for this private key. Now your

00:23:15.410 --> 00:23:16.210
<v Sjors Provoost>wallet handles all this.

00:23:16.510 --> 00:23:20.130
<v Aaron van Wirdum>What's the practical benefits of that? Just less resources?

00:23:20.250 --> 00:23:23.630
<v Sjors Provoost>No, for the end user, this doesn't matter. It just means that their wallet

00:23:23.630 --> 00:23:27.310
<v Sjors Provoost>software is better maintained because it's less of a headache for the wallet

00:23:27.310 --> 00:23:31.010
<v Sjors Provoost>developers to deal with this. So it basically involves a giant rewrite, mostly

00:23:31.010 --> 00:23:35.740
<v Sjors Provoost>done by Andrew Chow. And one of the challenges there is we have this old wallet

00:23:35.740 --> 00:23:40.000
<v Sjors Provoost>and we want to move people over to the new wallet. And so the first step for that

00:23:40.000 --> 00:23:45.320
<v Sjors Provoost>is this new RPC call called migratewallet, which does what it says it does.

00:23:46.060 --> 00:23:47.500
<v Aaron van Wirdum>It will migrate your wallet?

00:23:47.740 --> 00:23:52.420
<v Sjors Provoost>Yeah. And for the simplest cases, you know, if you created a wallet in the last

00:23:52.420 --> 00:23:56.480
<v Sjors Provoost>couple of years and you didn't do anything super fancy, very complicated multisig

00:23:56.480 --> 00:24:00.000
<v Sjors Provoost>setups, whatever, this will work. If you did do something complicated, then

00:24:00.000 --> 00:24:03.720
<v Sjors Provoost>please test it. It'll make a backup, but maybe make your own backup too.

00:24:04.060 --> 00:24:04.400
<v Aaron van Wirdum>Right.

00:24:04.640 --> 00:24:07.740
<v Sjors Provoost>And we'd like to see bug reports basically, because maybe you have some super

00:24:07.740 --> 00:24:10.960
<v Sjors Provoost>complicated wallet setup that does not migrate properly.

00:24:11.750 --> 00:24:16.770
<v Aaron van Wirdum>Right. So basically what this does is your wallet software will just go over all

00:24:16.770 --> 00:24:22.700
<v Aaron van Wirdum>of the UTXOs and say, well, this is a pay-to-public key. This is a [unclear]…

00:24:21.920 --> 00:24:23.540
<v Sjors Provoost>No, it will not go over the UTX—

00:24:22.740 --> 00:24:24.500
<v Aaron van Wirdum>And it will throw it in the different buckets.

00:24:24.840 --> 00:24:29.020
<v Sjors Provoost>No, it will go over the keys inside the wallet. The transaction list you have is

00:24:29.020 --> 00:24:32.180
<v Sjors Provoost>kind of the same. It'll look through what keys you have in the wallet and it will

00:24:32.180 --> 00:24:33.960
<v Sjors Provoost>restructure those as descriptors.

00:24:34.080 --> 00:24:35.680
<v Aaron van Wirdum>It will throw these in the different buckets.

00:24:35.860 --> 00:24:36.200
<v Sjors Provoost>Yeah.

00:24:36.660 --> 00:24:38.200
<v Aaron van Wirdum>Okay, instead of one big bucket.

00:24:38.700 --> 00:24:39.280
<v Sjors Provoost>That's right.

00:24:39.720 --> 00:24:41.460
<v Aaron van Wirdum>Okay, I think that's clear enough then.

00:24:42.730 --> 00:24:47.570
<v Aaron van Wirdum>And as mentioned, this is mostly to benefit just the developers, not so much

00:24:47.570 --> 00:24:48.130
<v Aaron van Wirdum>users.

00:24:48.620 --> 00:24:54.140
<v Sjors Provoost>I mean, yeah, the users benefit indirectly, but yeah. I mean, descriptors have

00:24:54.140 --> 00:24:58.120
<v Sjors Provoost>already been used to allow Taproot. So if you wanted to use Taproot, you either

00:24:58.120 --> 00:25:02.000
<v Sjors Provoost>need to create a whole new wallet or you need to migrate to a descriptor wallet

00:25:02.000 --> 00:25:04.970
<v Sjors Provoost>and then add Taproot to it. So there is that too.

00:25:05.430 --> 00:25:11.430
<v Aaron van Wirdum>Right. Okay, there's been, moving on to the fourth point, Miniscript support. Has

00:25:11.430 --> 00:25:13.310
<v Aaron van Wirdum>Miniscript support been added to Bitcoin Core?

00:25:13.630 --> 00:25:15.090
<v Sjors Provoost>Yes, in very limited fashion.

00:25:15.390 --> 00:25:15.610
<v Aaron van Wirdum>Okay.

00:25:15.830 --> 00:25:19.690
<v Sjors Provoost>I think we have done a whole episode about Miniscript, but it basically lets you

00:25:19.690 --> 00:25:22.530
<v Sjors Provoost>do very advanced scripting systems.

00:25:24.520 --> 00:25:30.140
<v Sjors Provoost>Something like I want to spend with two keys, or I want two signatures, or after

00:25:30.140 --> 00:25:35.160
<v Sjors Provoost>five years, I want one signature. Or if somebody has the pre-image of this

00:25:35.160 --> 00:25:40.980
<v Sjors Provoost>SHA-256 hash, then they only need one signature plus whatever. Miniscript

00:25:40.980 --> 00:25:46.400
<v Sjors Provoost>allows you to do fairly arbitrarily complicated things. And Bitcoin Core can now,

00:25:46.640 --> 00:25:51.090
<v Sjors Provoost>if you have a piece of Miniscript, it can now watch that. You cannot spend from it yet.

00:25:51.370 --> 00:25:55.990
<v Aaron van Wirdum>Right. I mean, the other way to put it, the simple way to put it maybe is a

00:25:55.990 --> 00:26:00.940
<v Aaron van Wirdum>Miniscript allows for smart contracting type of stuff, right?

00:26:02.180 --> 00:26:07.890
<v Sjors Provoost>Yeah, I guess. I mean, that might be overselling it a bit, but yeah. To the

00:26:07.890 --> 00:26:11.790
<v Sjors Provoost>degree that Bitcoin can support smart contracts, the Bitcoin script language is

00:26:11.790 --> 00:26:15.090
<v Sjors Provoost>very complicated. You don't want to write Bitcoin script by hand. You will make

00:26:15.090 --> 00:26:20.030
<v Sjors Provoost>mistakes, like even Andrew Poelstra and people like that will make mistakes. So

00:26:20.030 --> 00:26:23.970
<v Sjors Provoost>Miniscript is designed to get the most out of the existing Bitcoin script system

00:26:23.970 --> 00:26:27.990
<v Sjors Provoost>in a safe way. I think that's the most fair way to put it.

00:26:28.720 --> 00:26:33.360
<v Aaron van Wirdum>Right. Sorry. And what does it mean that it's been added now? In what way has it been added?

00:26:33.700 --> 00:26:38.720
<v Sjors Provoost>It means you can create a wallet. So if you create a new wallet, you can put a

00:26:38.720 --> 00:26:42.340
<v Sjors Provoost>piece of Miniscript inside of that wallet. And it will basically let you create

00:26:42.340 --> 00:26:46.660
<v Sjors Provoost>addresses for that Miniscript. And you can send coins to those addresses. But you

00:26:46.660 --> 00:26:47.220
<v Sjors Provoost>can't spend them.

00:26:47.500 --> 00:26:49.720
<v Aaron van Wirdum>I see. So you can't spend them.

00:26:49.800 --> 00:26:52.060
<v Sjors Provoost>Not yet. So you shouldn't do that.

00:26:52.220 --> 00:26:57.940
<v Aaron van Wirdum>Okay, yeah, don't do it yet then. And this sounds like you might need to run a

00:26:57.940 --> 00:27:01.760
<v Aaron van Wirdum>separate wallet or a separate piece of software that you connect to your Bitcoin

00:27:01.760 --> 00:27:02.300
<v Aaron van Wirdum>Core node.

00:27:02.560 --> 00:27:06.740
<v Sjors Provoost>No, well, in order to create the Miniscript itself, you will need separate

00:27:06.740 --> 00:27:11.180
<v Sjors Provoost>software. There is a Miniscript compiler, but you can write Miniscript by hand

00:27:11.180 --> 00:27:14.460
<v Sjors Provoost>too if you want to. So in principle, you don't need a second piece of software.

00:27:14.900 --> 00:27:18.440
<v Sjors Provoost>Now, the idea is that a future version of Bitcoin Core will also be able to sign for it.

00:27:19.480 --> 00:27:20.180
<v Aaron van Wirdum>Sure, yeah.

00:27:20.340 --> 00:27:23.640
<v Sjors Provoost>But you shouldn't count on that. You shouldn't use it until it does.

00:27:24.380 --> 00:27:28.140
<v Aaron van Wirdum>Okay, well, this sounds like a pretty big step then, doesn't it? This sounds to

00:27:28.140 --> 00:27:29.180
<v Aaron van Wirdum>me like it's a pretty big step.

00:27:29.380 --> 00:27:33.260
<v Sjors Provoost>I think it is pretty big, yeah. And the other constraint is that it only works

00:27:33.260 --> 00:27:38.420
<v Sjors Provoost>for the first version of SegWit. So those are addresses with bc1q. So it does not

00:27:38.420 --> 00:27:42.570
<v Sjors Provoost>work for Taproot yet. And because there's a lot of work that needs to be done, or

00:27:42.570 --> 00:27:46.090
<v Sjors Provoost>at least there is work that needs to be done in order to have Miniscript work

00:27:46.090 --> 00:27:50.090
<v Sjors Provoost>with Taproot at all. And then once it does that in general, so the specification

00:27:50.090 --> 00:27:54.310
<v Sjors Provoost>of Miniscript can handle it, then the next challenge is to actually get that into

00:27:54.310 --> 00:27:58.980
<v Sjors Provoost>Bitcoin Core. And to really use Taproot and Miniscript well, you probably want

00:27:58.980 --> 00:28:00.180
<v Sjors Provoost>MuSig too.

00:28:01.590 --> 00:28:03.370
<v Sjors Provoost>The signature aggregation stuff.

00:28:03.550 --> 00:28:03.910
<v Aaron van Wirdum>Yeah.

00:28:04.170 --> 00:28:07.190
<v Sjors Provoost>That also needs to be added to Bitcoin Core. So there is a ton of work still left

00:28:07.190 --> 00:28:08.550
<v Sjors Provoost>to do. But this is one step.

00:28:08.850 --> 00:28:12.910
<v Aaron van Wirdum>Is there currently, so we're right now talking about Bitcoin Core, obviously. Is

00:28:12.910 --> 00:28:18.700
<v Aaron van Wirdum>there currently other Bitcoin software that already allows you to create and use

00:28:18.700 --> 00:28:19.300
<v Aaron van Wirdum>Miniscript?

00:28:19.880 --> 00:28:25.060
<v Sjors Provoost>No, as far as I know, there is basically a library called Rust Miniscript and a

00:28:25.060 --> 00:28:28.440
<v Sjors Provoost>library written by sipa that does Miniscript and C++.

00:28:30.010 --> 00:28:34.590
<v Sjors Provoost>Those libraries you can use, but they're not fully functional wallets. So I don't

00:28:34.590 --> 00:28:37.590
<v Sjors Provoost>know if anybody's using Miniscript in a while. Maybe Blockstream is for their,

00:28:37.590 --> 00:28:38.590
<v Sjors Provoost>what is it?

00:28:38.690 --> 00:28:39.570
<v Aaron van Wirdum>Liquid sidechain.

00:28:39.570 --> 00:28:41.230
<v Sjors Provoost>Liquid sidechain stuff. I would know.

00:28:42.470 --> 00:28:46.030
<v Aaron van Wirdum>Okay. Well, interesting. Like I said, that sounds like a pretty big step actually.

00:28:46.210 --> 00:28:49.250
<v Sjors Provoost>Yeah. And it would also, I think this is the longer term trend of hopefully

00:28:49.250 --> 00:28:53.630
<v Sjors Provoost>turning Bitcoin Core from a, not a very good wallet. It was quite slow, quite

00:28:53.630 --> 00:28:59.000
<v Sjors Provoost>weird to hopefully a very good wallet. And at least a very good wallet for power

00:28:59.000 --> 00:29:04.220
<v Sjors Provoost>users, right? So maybe exchanges want to use it more. And my hope is that if this

00:29:04.220 --> 00:29:09.220
<v Sjors Provoost>wallet becomes very powerful, then more people will help review the code and more

00:29:09.220 --> 00:29:15.060
<v Sjors Provoost>people will help improve it. So you kind of get this self-amplifying effect.

00:29:16.620 --> 00:29:19.680
<v Sjors Provoost>Once it's useful enough, more people will look at it, but it takes a very long

00:29:19.680 --> 00:29:23.140
<v Sjors Provoost>time to become useful enough because it's not useful enough, so not enough people

00:29:23.140 --> 00:29:23.820
<v Sjors Provoost>are working on it.

00:29:25.090 --> 00:29:25.650
<v Aaron van Wirdum>Got it.

00:29:25.770 --> 00:29:27.370
<v Sjors Provoost>It's really, I think, maybe four people.

00:29:29.660 --> 00:29:31.260
<v Aaron van Wirdum>All right, moving on to the next point.

00:29:31.580 --> 00:29:31.980
<v Sjors Provoost>Yep.

00:29:32.260 --> 00:29:36.860
<v Aaron van Wirdum>Okay, the next point on our list, this is another point about RBF.

00:29:38.780 --> 00:29:44.700
<v Sjors Provoost>Yeah, but this is just about opt-in RBF, that the wallet RPC, so the

00:29:44.700 --> 00:29:47.000
<v Sjors Provoost>command line wallet, will now use it by default.

00:29:47.690 --> 00:29:51.990
<v Aaron van Wirdum>Oh, that's right. Okay, wait. So we're not talking about the GUI, right?

00:29:52.250 --> 00:29:54.530
<v Sjors Provoost>No, the GUI already switched to use RBF by default.

00:29:54.710 --> 00:29:57.410
<v Aaron van Wirdum>Right. And now the command line does as well?

00:29:57.610 --> 00:29:57.810
<v Sjors Provoost>Yeah.

00:29:57.990 --> 00:30:00.650
<v Aaron van Wirdum>So why didn't... Okay, go on. Maybe I should just let you finish.

00:30:00.730 --> 00:30:01.330
<v Sjors Provoost>So why didn't it?

00:30:01.670 --> 00:30:02.870
<v Aaron van Wirdum>Yeah, why didn't it yet?

00:30:03.070 --> 00:30:07.670
<v Sjors Provoost>So one of the reasons is that people are using the Bitcoin Core wallet in some

00:30:07.670 --> 00:30:12.270
<v Sjors Provoost>automated systems. So if you're running a Bitcoin ATM, you may have some really

00:30:12.270 --> 00:30:17.520
<v Sjors Provoost>old software that... does not know that RBF exists, maybe, because it's really

00:30:17.520 --> 00:30:22.750
<v Sjors Provoost>old. And it might get confused if it's turned on by default. So for those kind of

00:30:22.750 --> 00:30:25.790
<v Sjors Provoost>systems, you don't want to change things too quickly. But I think it's been five

00:30:25.790 --> 00:30:28.270
<v Sjors Provoost>years now, so it might be a good time to switch to default.

00:30:27.920 --> 00:30:28.550
<v Aaron van Wirdum>[unclear] enough time.

00:30:29.280 --> 00:30:29.980
<v Sjors Provoost>Well, hopefully.

00:30:30.480 --> 00:30:36.190
<v Aaron van Wirdum>Okay, so would we expect more RBF transactions on the network now?

00:30:37.240 --> 00:30:41.060
<v Sjors Provoost>We'll have to see. It depends on when people start using it. My hope is no,

00:30:41.300 --> 00:30:46.990
<v Sjors Provoost>because my hope is that anybody... who you know builds this kind of software

00:30:46.990 --> 00:30:51.070
<v Sjors Provoost>already decided whether they want RBF on or off because it's just a default value

00:30:51.070 --> 00:30:55.290
<v Sjors Provoost>you probably should already set that default to what you want it to be so that

00:30:55.290 --> 00:30:58.390
<v Sjors Provoost>you're not surprised by this update so I hope to see no difference right because

00:30:58.390 --> 00:31:02.350
<v Sjors Provoost>the worst case scenario would be that some major company that has RBF turned off

00:31:02.350 --> 00:31:06.710
<v Sjors Provoost>for some reason now suddenly turns it on and starts producing lots of RBF

00:31:06.710 --> 00:31:09.230
<v Sjors Provoost>transactions confusing everybody in their ecosystem.

00:31:11.380 --> 00:31:14.820
<v Aaron van Wirdum>Yeah, it wouldn't really harm them in any way, would it?

00:31:15.000 --> 00:31:19.880
<v Sjors Provoost>I don't know. Maybe people are using that service to send coins to some other

00:31:19.880 --> 00:31:23.360
<v Sjors Provoost>service that does not like it when transactions are RBF.

00:31:23.460 --> 00:31:25.260
<v Aaron van Wirdum>Yeah, that does not accept RBF transactions.

00:31:25.580 --> 00:31:27.200
<v Sjors Provoost>Or gets confused by them. Yeah.

00:31:27.420 --> 00:31:30.920
<v Aaron van Wirdum>Yeah, these are out there. Okay, makes sense.

00:31:31.020 --> 00:31:33.840
<v Sjors Provoost>So that's why you want to be a little bit slow with these command line tools to

00:31:33.840 --> 00:31:34.420
<v Sjors Provoost>change them.

00:31:35.630 --> 00:31:40.910
<v Aaron van Wirdum>Right okay I think we've covered five points now and we got we got seven in total

00:31:40.910 --> 00:31:46.590
<v Aaron van Wirdum>so we got two more to go all right number six the

00:31:48.730 --> 00:31:54.830
<v Aaron van Wirdum>change output amounts are randomized it says that's what it says.

00:31:54.830 --> 00:31:55.610
<v Sjors Provoost>It's very cool.

00:31:58.110 --> 00:32:03.610
<v Sjors Provoost>Yeah, so basically this has to do, I mean, I don't know the precise change, but

00:32:03.610 --> 00:32:07.790
<v Sjors Provoost>the general problem is that when you're looking at the blockchain, you can kind

00:32:07.790 --> 00:32:12.710
<v Sjors Provoost>of guess which address is change and which address is not change if you have an

00:32:12.710 --> 00:32:17.610
<v Sjors Provoost>assumption about how the wallet picks coins. So if the wallet is very efficient,

00:32:17.890 --> 00:32:22.410
<v Sjors Provoost>it will look for the smallest coin possible to spend, and then it will create as

00:32:22.410 --> 00:32:27.360
<v Sjors Provoost>little change as possible. But that means that generally when you see two outputs

00:32:27.360 --> 00:32:30.880
<v Sjors Provoost>to a transaction, the biggest one is probably the amount that's being sent and

00:32:30.880 --> 00:32:32.280
<v Sjors Provoost>the smallest one is probably the change.

00:32:33.240 --> 00:32:37.160
<v Aaron van Wirdum>Right. Well, is that necessarily true?

00:32:37.500 --> 00:32:38.240
<v Sjors Provoost>It's not necessarily true.

00:32:38.240 --> 00:32:41.600
<v Aaron van Wirdum>That's maybe true if there are several inputs, right? That logic only holds up if

00:32:41.600 --> 00:32:42.680
<v Aaron van Wirdum>there are several inputs, I think.

00:32:43.900 --> 00:32:44.960
<v Sjors Provoost>Or if there's one input.

00:32:46.150 --> 00:32:47.370
<v Aaron van Wirdum>Well, if there's only...

00:32:47.370 --> 00:32:50.610
<v Sjors Provoost>Let's say you... Well, it depends on how much there's available, right? But

00:32:50.610 --> 00:32:54.220
<v Sjors Provoost>you're looking at the change, so you don't know what was available. But if your

00:32:54.220 --> 00:32:58.000
<v Sjors Provoost>wallet is looking at a bag of coins it might you know start with the smallest

00:32:58.000 --> 00:33:02.180
<v Sjors Provoost>coin saying no it's not big enough and then keep looking and then find one coin

00:33:02.180 --> 00:33:04.830
<v Sjors Provoost>that's big enough and then use that to spend it.

00:33:04.830 --> 00:33:05.690
<v Aaron van Wirdum>Right yeah.

00:33:05.690 --> 00:33:10.150
<v Sjors Provoost>And if you it doesn't really matter but if you know what software the person was

00:33:10.150 --> 00:33:15.740
<v Sjors Provoost>using based on some other fingerprinting aspects You can start then. You know how

00:33:15.740 --> 00:33:18.400
<v Sjors Provoost>that software works. You know how that software does its coin selection. You can

00:33:18.400 --> 00:33:19.380
<v Sjors Provoost>use that against the user.

00:33:19.800 --> 00:33:23.960
<v Aaron van Wirdum>Okay, so do you know what algorithm Bitcoin Core was using up till now?

00:33:25.030 --> 00:33:26.470
<v Sjors Provoost>It's using a bunch of algorithms.

00:33:26.870 --> 00:33:29.190
<v Aaron van Wirdum>Oh, several. And do you know which ones or no?

00:33:29.270 --> 00:33:30.230
<v Sjors Provoost>No, you should ask Murch.

00:33:30.410 --> 00:33:30.770
<v Aaron van Wirdum>Okay.

00:33:31.050 --> 00:33:34.050
<v Sjors Provoost>He wrote a whole thesis on it and implemented a bunch of things.

00:33:34.310 --> 00:33:35.730
<v Aaron van Wirdum>But something changed.

00:33:35.930 --> 00:33:40.370
<v Sjors Provoost>I think originally the system was called the knapsack. And I think the knapsack

00:33:40.370 --> 00:33:44.450
<v Sjors Provoost>basically meant you just grabbed coins randomly and then see if it was enough.

00:33:44.650 --> 00:33:49.490
<v Sjors Provoost>And then if it wasn't, you try it again. And then there was a new thing called

00:33:49.490 --> 00:33:54.550
<v Sjors Provoost>branch and bound, which was a bit more smarter way to find coins. And there's

00:33:54.550 --> 00:33:58.950
<v Sjors Provoost>also the try to find a single coin that is exactly the right value strategy.

00:33:59.570 --> 00:34:03.090
<v Sjors Provoost>There's a bunch of things that are happening. It's a bit complicated. But what

00:34:03.090 --> 00:34:05.770
<v Sjors Provoost>this basically does is make it more difficult to tell which one is the input.

00:34:06.150 --> 00:34:09.730
<v Sjors Provoost>Sorry, which one is the change and which one is the destination. And the way you

00:34:09.730 --> 00:34:12.990
<v Sjors Provoost>do that is basically saying, well, rather than looking for the coin of the exact

00:34:12.990 --> 00:34:18.560
<v Sjors Provoost>right size to spend, I'm going to look for a coin that is the amount that I need

00:34:18.560 --> 00:34:24.420
<v Sjors Provoost>to spend plus two times the yeah I'm going to look for a coin that is at least

00:34:24.420 --> 00:34:27.880
<v Sjors Provoost>three times I guess the amount that I'm trying to spend right.

00:34:27.880 --> 00:34:31.900
<v Aaron van Wirdum>So you want to spend one Bitcoin so you're going to look for a UTXO of three Bitcoin.

00:34:31.900 --> 00:34:34.640
<v Sjors Provoost>Yeah except you're not going to do that you're going to say I'm going to pick a

00:34:34.640 --> 00:34:38.900
<v Sjors Provoost>number between the amount I want to spend and three times the amount I want to spend

00:34:38.900 --> 00:34:40.100
<v Aaron van Wirdum>Between one and three.

00:34:40.100 --> 00:34:44.260
<v Sjors Provoost>Yeah and I'm going to pick that number randomly So that means sometimes the

00:34:44.260 --> 00:34:47.360
<v Sjors Provoost>biggest, sometimes you're going to pick a very high number. And so the change

00:34:47.360 --> 00:34:51.250
<v Sjors Provoost>address will actually be the smaller, will be the bigger output. And sometimes I

00:34:51.250 --> 00:34:55.530
<v Sjors Provoost>pick the lower random number and the change output will be the... biggest amount.

00:34:55.530 --> 00:35:01.010
<v Aaron van Wirdum>Okay so we're basically gonna keep using the algorithm that we were using or at

00:35:01.010 --> 00:35:01.950
<v Aaron van Wirdum>least I don't know but that's…

00:35:01.950 --> 00:35:03.170
<v Sjors Provoost>Yeah I think that doesn't change.

00:35:03.170 --> 00:35:09.130
<v Aaron van Wirdum>Yeah however we're now gonna look for coins as if we're looking for one to three

00:35:09.130 --> 00:35:11.470
<v Aaron van Wirdum>times more than what we are actually spending.

00:35:11.470 --> 00:35:13.070
<v Sjors Provoost>Exactly and that number is random.

00:35:13.070 --> 00:35:19.010
<v Aaron van Wirdum>Right okay that sounds interesting doesn't that mean that you

00:35:19.010 --> 00:35:24.680
<v Aaron van Wirdum>sometimes end up using more UTXOs than you would actually require? In other

00:35:24.680 --> 00:35:28.100
<v Aaron van Wirdum>words, wouldn't you make transactions bigger than they really need to be?

00:35:28.280 --> 00:35:32.100
<v Sjors Provoost>Yeah, I think that might mean that sometimes you are spending more coins than

00:35:32.100 --> 00:35:33.620
<v Sjors Provoost>necessary, yeah.

00:35:34.140 --> 00:35:38.580
<v Aaron van Wirdum>Okay, so it's not optimizing for fees then? It's not optimizing for...

00:35:38.580 --> 00:35:41.220
<v Sjors Provoost>I don't think so, but there may be some caveats in that code. You'd have to read

00:35:41.220 --> 00:35:45.700
<v Sjors Provoost>through it to see what exactly it's doing. Maybe there's some protection against

00:35:45.700 --> 00:35:46.740
<v Sjors Provoost>spending too much on fees.

00:35:47.020 --> 00:35:51.700
<v Aaron van Wirdum>Right, maybe it only works if this is not... the case.

00:35:51.700 --> 00:35:55.040
<v Sjors Provoost>I mean if you're using the GUI you can also do your coin selection completely

00:35:55.040 --> 00:35:58.540
<v Sjors Provoost>manually right there is a little menu where you can sure see what your inputs are

00:35:58.540 --> 00:36:00.080
<v Sjors Provoost>and just select which ones you want to spend.

00:36:00.080 --> 00:36:05.180
<v Aaron van Wirdum>Yeah okay so there might be trade-offs that we're not completely clear on but the

00:36:05.180 --> 00:36:08.920
<v Aaron van Wirdum>general idea is you're going to look for more coins than you actually need for

00:36:08.920 --> 00:36:12.060
<v Aaron van Wirdum>privacy purposes that's ultimately the benefit right? Privacy.

00:36:12.060 --> 00:36:15.200
<v Sjors Provoost>I suppose one day we should do an episode about coin selection this is also

00:36:15.200 --> 00:36:16.540
<v Sjors Provoost>something I haven't specialized in.

00:36:17.100 --> 00:36:21.400
<v Aaron van Wirdum>Yeah, we should maybe. That does sound like an interesting topic. We can go over

00:36:21.400 --> 00:36:21.920
<v Aaron van Wirdum>all of this.

00:36:22.100 --> 00:36:22.520
<v Sjors Provoost>Cool.

00:36:22.900 --> 00:36:24.990
<v Aaron van Wirdum>Exciting. Last point, Sjors.

00:36:25.570 --> 00:36:30.910
<v Sjors Provoost>Yeah, this one isn't super interesting. It's a new RPC called sendall. And so

00:36:30.910 --> 00:36:34.820
<v Sjors Provoost>this is a command line tool. And the name suggests that you're sending all your

00:36:34.820 --> 00:36:38.920
<v Sjors Provoost>money. That's not actually true. You can use it to send all your money away to a

00:36:38.920 --> 00:36:42.460
<v Sjors Provoost>different wallet, let's say if you're trying to migrate. But you can also say,

00:36:42.640 --> 00:36:48.040
<v Sjors Provoost>take these coins, so these specific input coins, and send them all to a specific

00:36:48.040 --> 00:36:53.740
<v Sjors Provoost>destination. And this is stuff that you could already do because there was one

00:36:53.740 --> 00:36:57.220
<v Sjors Provoost>command line tool called and sendmany and sendtoaddress. So there basically were

00:36:57.220 --> 00:36:58.180
<v Sjors Provoost>already calls to do this.

00:36:58.340 --> 00:37:01.000
<v Aaron van Wirdum>Yeah, also in the GUI, this is already possible, right?

00:37:01.080 --> 00:37:05.100
<v Sjors Provoost>Yeah, so the underlying motivation here is actually that there are different

00:37:05.100 --> 00:37:10.100
<v Sjors Provoost>intentions that the user might have. They might want to send an entire coin to an

00:37:10.100 --> 00:37:15.020
<v Sjors Provoost>exchange for privacy reasons, or they might want to send an exact amount to an

00:37:15.020 --> 00:37:18.540
<v Sjors Provoost>exchange. And in retrospect, you don't really know what the user intended, so

00:37:18.540 --> 00:37:21.620
<v Sjors Provoost>that creates problems when you try to bump the fee. But also the code that

00:37:21.620 --> 00:37:24.420
<v Sjors Provoost>actually implements this is a bit of a mess because it has all these different

00:37:24.420 --> 00:37:27.760
<v Sjors Provoost>features. So you can do all these different things for different use cases. That

00:37:27.760 --> 00:37:32.520
<v Sjors Provoost>means your code is full of if, then, else, if, if, else, else, if. And so

00:37:32.520 --> 00:37:35.720
<v Sjors Provoost>basically this is the first step to splitting that up, to saying, okay, if you

00:37:35.720 --> 00:37:40.260
<v Sjors Provoost>want to do this specific thing, use the sendall method. If you want to do this

00:37:40.260 --> 00:37:45.510
<v Sjors Provoost>other thing, use the send method. And that's the first step. At the command line,

00:37:45.550 --> 00:37:48.610
<v Sjors Provoost>it's easier to tell users to start using two different commands for two different

00:37:48.610 --> 00:37:51.890
<v Sjors Provoost>things. And then eventually, I guess, under the hood, there will be some changes

00:37:51.890 --> 00:37:53.690
<v Sjors Provoost>to the GUI to also use the separation.

00:37:54.520 --> 00:37:58.160
<v Aaron van Wirdum>Okay. I mean, this sounds like something that basically all wallets already do.

00:37:58.930 --> 00:37:59.570
<v Sjors Provoost>I don't know.

00:38:00.410 --> 00:38:01.890
<v Aaron van Wirdum>Like I said,

00:38:01.950 --> 00:38:03.070
<v Sjors Provoost>It's not a new piece of functionality.

00:38:03.290 --> 00:38:07.430
<v Aaron van Wirdum>The insulting thing, though, is that other wallets, the universally accepted term

00:38:07.430 --> 00:38:08.850
<v Aaron van Wirdum>for this is send max.

00:38:10.080 --> 00:38:10.440
<v Aaron van Wirdum>Send max.

00:38:10.620 --> 00:38:12.860
<v Sjors Provoost>Yeah, but it's send max given the set of coins.

00:38:14.810 --> 00:38:16.870
<v Aaron van Wirdum>That's also what send max is, I think, or not?

00:38:17.070 --> 00:38:18.110
<v Sjors Provoost>I don't know. Yeah, could be.

00:38:18.570 --> 00:38:22.030
<v Aaron van Wirdum>That's how I use it. That's how I think about it. No, but I get your point. Okay,

00:38:22.370 --> 00:38:25.870
<v Aaron van Wirdum>yeah, this was not the most exciting feature of the seven, but I'm happy we

00:38:25.870 --> 00:38:26.870
<v Aaron van Wirdum>covered it, Sjors. Are you?

00:38:27.050 --> 00:38:30.850
<v Sjors Provoost>Last but not least. Yeah, and like I said, there's probably at least probably 500

00:38:30.850 --> 00:38:35.150
<v Sjors Provoost>or maybe 1,000 individual changes that could each be worth their own episode if

00:38:35.150 --> 00:38:38.810
<v Sjors Provoost>you were truly interested in how compilers work and whatever. So,

00:38:39.450 --> 00:38:42.710
<v Aaron van Wirdum>There's that. Okay, well, we covered the highlights. At least we covered our

00:38:42.710 --> 00:38:43.210
<v Aaron van Wirdum>highlights.

00:38:43.590 --> 00:38:44.250
<v Sjors Provoost>I think so too.

00:38:44.390 --> 00:38:47.270
<v Aaron van Wirdum>And I think that makes for another successful episode.

00:38:47.490 --> 00:38:49.790
<v Sjors Provoost>We'll see. Thank you for listening to Bitcoin

00:38:49.790 --> 00:38:51.230
<v Aaron van Wirdum>Explained.

