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

00:00:15.820 --> 00:00:20.200
<v Aaron van Wirdum>Live from Utrecht, this is Bitcoin Explained. Hey Sjors.

00:00:20.580 --> 00:00:20.960
<v Sjors Provoost>Hello.

00:00:21.400 --> 00:00:26.980
<v Aaron van Wirdum>First of all, I'd like to thank our sponsor Coinkite, the creator of

00:00:26.980 --> 00:00:29.080
<v Aaron van Wirdum>the OPENDIME as well.

00:00:29.840 --> 00:00:30.520
<v Sjors Provoost>That's right.

00:00:30.660 --> 00:00:33.380
<v Aaron van Wirdum>Are we going to get sued if we only mention the OPENDIME, Sjors?

00:00:34.680 --> 00:00:35.080
<v Sjors Provoost>No.

00:00:35.280 --> 00:00:39.720
<v Aaron van Wirdum>Are we contractually obligated to mention the COLDCARD, or can we just riff off

00:00:39.720 --> 00:00:41.300
<v Aaron van Wirdum>the OPENDIME this episode?

00:00:41.520 --> 00:00:45.640
<v Sjors Provoost>If you want to riff on the OPENDIME for the great memories it brought us.

00:00:46.250 --> 00:00:49.010
<v Aaron van Wirdum>The OPENDIME is pretty cool. I still have a few.

00:00:49.250 --> 00:00:49.990
<v Sjors Provoost>What is an OPENDIME?

00:00:50.290 --> 00:00:55.050
<v Aaron van Wirdum>It's like a USB stick, kind of small stick. You put it, you stick it in your

00:00:55.050 --> 00:00:59.330
<v Aaron van Wirdum>computer, you put some Bitcoin on it, you hand it to someone, very cypherpunk

00:00:59.330 --> 00:01:03.950
<v Aaron van Wirdum>technology, off chain, no one needs to know anything. And then that person can

00:01:03.950 --> 00:01:08.670
<v Aaron van Wirdum>check that the Bitcoin are really on there and they can take the Bitcoin off only

00:01:08.670 --> 00:01:12.170
<v Aaron van Wirdum>once. You have to sort of destroy the thing to get the coin off.

00:01:12.390 --> 00:01:15.270
<v Sjors Provoost>Yeah, so you can see whether it was spent or not. You actually have to break it.

00:01:15.560 --> 00:01:21.190
<v Aaron van Wirdum>Right. Very cool. So we're making another episode about another Bitcoin Core

00:01:21.190 --> 00:01:27.070
<v Aaron van Wirdum>release. I feel like one every four episodes we make now is about a Bitcoin

00:01:27.070 --> 00:01:27.730
<v Aaron van Wirdum>Core release.

00:01:28.420 --> 00:01:31.260
<v Sjors Provoost>Yeah, those are a bit of our lazy episodes.

00:01:31.840 --> 00:01:36.020
<v Aaron van Wirdum>Well, also, we don't make as much episodes. Or is Bitcoin Core making more

00:01:36.020 --> 00:01:37.120
<v Aaron van Wirdum>Bitcoin Core releases?

00:01:37.360 --> 00:01:42.420
<v Sjors Provoost>No, I can, however, tell you that Bitcoin Core version 27.0 will be the best

00:01:42.420 --> 00:01:44.240
<v Sjors Provoost>Bitcoin node ever.

00:01:44.800 --> 00:01:47.600
<v Aaron van Wirdum>Nice. So, Bitcoin Core 27.

00:01:49.610 --> 00:01:55.470
<v Aaron van Wirdum>As we're recording this, it's in release phase. What is it? Release candidate 1?

00:01:55.730 --> 00:01:58.390
<v Sjors Provoost>Yes, exactly. So people who would like to test it, they can.

00:01:58.890 --> 00:02:03.190
<v Aaron van Wirdum>For any new listeners, Sjors, what does it mean that there's a new Bitcoin Core release?

00:02:04.120 --> 00:02:08.800
<v Sjors Provoost>It kind of means nothing because in Bitcoin Core, there is a new release roughly

00:02:08.800 --> 00:02:13.560
<v Sjors Provoost>every six months, regardless of what is finished. So whatever is finished goes

00:02:13.560 --> 00:02:18.140
<v Sjors Provoost>into the release. What is not finished does not go into the release. It is not...

00:02:18.690 --> 00:02:20.510
<v Sjors Provoost>Yeah, that's special, I guess.

00:02:20.710 --> 00:02:25.170
<v Aaron van Wirdum>We should next time just ask Stein, our editor, to just cut this from the

00:02:25.170 --> 00:02:27.110
<v Aaron van Wirdum>previous episode. You don't have to repeat.

00:02:27.290 --> 00:02:29.630
<v Sjors Provoost>To see that I'm answering the question inconsistently.

00:02:30.170 --> 00:02:34.010
<v Aaron van Wirdum>So yeah, every half year there's a big Core release. Whatever is ready by then

00:02:34.010 --> 00:02:36.810
<v Aaron van Wirdum>goes into the release. Whatever is not, is not.

00:02:37.030 --> 00:02:40.610
<v Sjors Provoost>Yeah, though one thing that I believe was observed is that the release started

00:02:40.610 --> 00:02:45.580
<v Sjors Provoost>drifting a bit. So, you know, maybe it was in January on one year. And then the

00:02:45.580 --> 00:02:49.700
<v Sjors Provoost>next year it was in February, and the next year it was in March. So this release

00:02:49.700 --> 00:02:52.720
<v Sjors Provoost>is a relatively short one to try and reset the schedule a bit.

00:02:53.470 --> 00:02:56.430
<v Aaron van Wirdum>I see. Okay, so when was the previous one? Do you know this?

00:02:56.790 --> 00:03:00.970
<v Sjors Provoost>I think it was in November, maybe. It should be every six months.

00:03:01.210 --> 00:03:02.510
<v Aaron van Wirdum>That's six months ago.

00:03:04.240 --> 00:03:08.300
<v Aaron van Wirdum>Okay, so Release Candidate 1, what does that mean? Also for new listeners?

00:03:08.760 --> 00:03:13.000
<v Sjors Provoost>Yeah, so what happens is there's a couple of phases to the release. The first

00:03:13.000 --> 00:03:14.360
<v Sjors Provoost>phase is the so-called...

00:03:16.470 --> 00:03:21.610
<v Sjors Provoost>sort of the bug fix time. So there's a master branch where all the changes go

00:03:21.610 --> 00:03:25.270
<v Sjors Provoost>that Bitcoin Core makes. And everything in the master branch should be bug free.

00:03:25.990 --> 00:03:30.890
<v Sjors Provoost>But sometimes it's not. And the idea is that a few weeks before the branch off

00:03:30.890 --> 00:03:35.720
<v Sjors Provoost>point, which I'll explain in a bit, people stop merging or maintainers stop

00:03:35.720 --> 00:03:40.220
<v Sjors Provoost>merging things that are features and try to merge only somewhat more conservative

00:03:40.220 --> 00:03:45.180
<v Sjors Provoost>bug fixes, typo changes, that sort of stuff to make sure that there are, you

00:03:45.180 --> 00:03:48.840
<v Sjors Provoost>know, to reduce the chance of having any bugs on that master branch in the first place.

00:03:51.120 --> 00:03:56.380
<v Sjors Provoost>And then what happens is this branch off, which is where a separate Git branch is

00:03:56.380 --> 00:04:01.600
<v Sjors Provoost>created where all the changes, which only has bug fixes.

00:04:02.560 --> 00:04:05.940
<v Sjors Provoost>So to understand what that means is there is still the master branch, and people

00:04:05.940 --> 00:04:08.700
<v Sjors Provoost>are still developing on that, but anything that goes onto the master branch will

00:04:08.700 --> 00:04:09.780
<v Sjors Provoost>not go into the release.

00:04:10.700 --> 00:04:14.900
<v Aaron van Wirdum>Wait, but I was asking about the release process, basically. We're in release

00:04:14.900 --> 00:04:16.120
<v Aaron van Wirdum>candidate one.

00:04:16.240 --> 00:04:16.660
<v Sjors Provoost>We'll get there.

00:04:17.120 --> 00:04:17.980
<v Aaron van Wirdum>Oh, okay.

00:04:18.120 --> 00:04:19.380
<v Sjors Provoost>I'm just going a little bit back there.

00:04:19.460 --> 00:04:19.860
<v Aaron van Wirdum>Okay, go.

00:04:20.020 --> 00:04:23.920
<v Sjors Provoost>So, yeah, so the master branch, people can continue to have fun there. That's

00:04:23.920 --> 00:04:26.440
<v Sjors Provoost>going to be for the next release. Meanwhile, there is this separate branch for

00:04:26.440 --> 00:04:32.320
<v Sjors Provoost>the release, which has only maybe very minor bug fixes. And then

00:04:32.320 --> 00:04:37.960
<v Sjors Provoost>to that branch are added a few things to change the version number. And then

00:04:37.960 --> 00:04:43.180
<v Sjors Provoost>that is turned into a release candidate. And that release candidate is

00:04:43.240 --> 00:04:48.160
<v Sjors Provoost>first, let's say people

00:04:48.160 --> 00:04:53.360
<v Sjors Provoost>test it a little bit who are developers. And then once that's done, there is a

00:04:53.360 --> 00:04:56.460
<v Sjors Provoost>binary release that people can download and test that.

00:04:57.710 --> 00:05:02.010
<v Aaron van Wirdum>So what do we have now? Where are we? Do we have a binary release?

00:05:02.170 --> 00:05:04.730
<v Sjors Provoost>Yes, there's a binary release for release candidate.

00:05:04.950 --> 00:05:07.670
<v Aaron van Wirdum>Okay, so how many release candidates are there going to be?

00:05:07.870 --> 00:05:11.230
<v Sjors Provoost>Well, so what happens then is for about two weeks, people can test it. And then

00:05:11.230 --> 00:05:16.310
<v Sjors Provoost>if they don't find any bugs, then we essentially make the same binary and call it

00:05:16.310 --> 00:05:17.190
<v Sjors Provoost>the final version.

00:05:17.370 --> 00:05:17.550
<v Aaron van Wirdum>Right.

00:05:17.630 --> 00:05:21.290
<v Sjors Provoost>It's not technically the same binary. We talked about hashes before. The version

00:05:21.290 --> 00:05:25.290
<v Sjors Provoost>number is in the binary. So a different version number means a different hash.

00:05:25.820 --> 00:05:28.080
<v Sjors Provoost>But other than the version number, it should be identical.

00:05:28.400 --> 00:05:31.940
<v Aaron van Wirdum>Okay, so the current release candidate could potentially be the next Bitcoin Core

00:05:31.940 --> 00:05:35.600
<v Aaron van Wirdum>27, but maybe bugs are found, then the bugs are fixed, and then there will be

00:05:35.600 --> 00:05:38.640
<v Aaron van Wirdum>another release candidate, and then that could be the next Bitcoin Core 27.

00:05:38.960 --> 00:05:43.180
<v Sjors Provoost>Yeah, and so whenever a bug is fixed, it is first fixed on the master branch, so

00:05:43.180 --> 00:05:48.640
<v Sjors Provoost>it also applies to future releases, and then it's backported, as it's called, to

00:05:48.640 --> 00:05:51.990
<v Sjors Provoost>the release branch. And that means that the same fix that was applied to the

00:05:51.990 --> 00:05:56.330
<v Sjors Provoost>master branch is then also applied to the release branch. That's extra work. So

00:05:56.330 --> 00:06:01.890
<v Sjors Provoost>ideally that should not happen too often. Hence the need to not have bugs in the

00:06:01.890 --> 00:06:02.410
<v Sjors Provoost>master branch.

00:06:03.090 --> 00:06:06.890
<v Aaron van Wirdum>Right. Anyways, as soon as there's no bugs in the release candidate, we have a

00:06:06.890 --> 00:06:09.870
<v Aaron van Wirdum>new Bitcoin Core release, which in this case will be Bitcoin Core 27.

00:06:10.450 --> 00:06:10.890
<v Sjors Provoost>Exactly.

00:06:11.290 --> 00:06:16.420
<v Aaron van Wirdum>And we are going to discuss some of the... highlights of this new Bitcoin Core

00:06:16.420 --> 00:06:20.120
<v Aaron van Wirdum>release. Why should people download it? Why should people care? Why, dear

00:06:20.120 --> 00:06:25.100
<v Aaron van Wirdum>listener, do you want to use Bitcoin Core 27? Sjors will explain it all today.

00:06:25.620 --> 00:06:29.880
<v Sjors Provoost>Exactly. Well, first of all, there's something that's not in Bitcoin Core version

00:06:29.880 --> 00:06:30.420
<v Sjors Provoost>27.

00:06:31.470 --> 00:06:37.150
<v Aaron van Wirdum>Yeah, something was jacked out. libbitcoinconsensus, which has nothing to do with

00:06:37.150 --> 00:06:37.790
<v Aaron van Wirdum>libbitcoin.

00:06:38.170 --> 00:06:42.840
<v Sjors Provoost>Yeah, although I think I should say it's not removed, it's deprecated, which

00:06:42.840 --> 00:06:46.380
<v Sjors Provoost>means that this is your last warning. It's going to go away in 28.

00:06:48.390 --> 00:06:52.550
<v Aaron van Wirdum>Okay. Wait, so it's still... Okay, just explain what it is.

00:06:52.690 --> 00:06:57.690
<v Sjors Provoost>Yeah, so deprecation is always a warning, like this thing is going to go away the

00:06:57.690 --> 00:07:01.570
<v Sjors Provoost>next time. So sometimes if you use a feature that's deprecated, it will tell you,

00:07:01.630 --> 00:07:05.030
<v Sjors Provoost>hey, this feature is deprecated. Sometimes you even have to actively set a

00:07:05.030 --> 00:07:09.330
<v Sjors Provoost>configuration to use a deprecated feature. So the first time you try to use it,

00:07:09.390 --> 00:07:14.080
<v Sjors Provoost>it says no. And then you make a change to the configuration, says, okay, I'll do

00:07:14.080 --> 00:07:17.840
<v Sjors Provoost>it, but it's going to go away next time. So, you know, be careful there.

00:07:17.960 --> 00:07:18.600
<v Aaron van Wirdum>You've been warned.

00:07:18.840 --> 00:07:20.680
<v Sjors Provoost>Yeah. So this thing goes away.

00:07:20.840 --> 00:07:23.720
<v Aaron van Wirdum>So what is this thing? And why is it going away?

00:07:23.940 --> 00:07:29.840
<v Sjors Provoost>So in the early days, there was a demand to have or a

00:07:29.840 --> 00:07:35.120
<v Sjors Provoost>desire to have the core functionality of Bitcoin Core. So the part that checks

00:07:35.120 --> 00:07:39.970
<v Sjors Provoost>the consensus rules to somehow split that off from the rest. Other people can

00:07:39.970 --> 00:07:44.510
<v Sjors Provoost>make their own node software or do other things and don't care about all the

00:07:44.510 --> 00:07:47.890
<v Sjors Provoost>whistles and bells that are in Bitcoin Core. So they don't want a GUI, they don't

00:07:47.890 --> 00:07:48.690
<v Sjors Provoost>want...

00:07:48.690 --> 00:07:53.530
<v Aaron van Wirdum>So in other words, that would basically be the rules that define which blocks are

00:07:53.530 --> 00:07:57.250
<v Aaron van Wirdum>valid, right? That's really the core consensus rules?

00:07:57.470 --> 00:08:02.190
<v Sjors Provoost>Well, yeah, the question is, what is exactly the core consensus rules? That's an

00:08:02.190 --> 00:08:07.980
<v Sjors Provoost>open question still. But at the time, this library, this libbitcoinconsensus, was

00:08:07.980 --> 00:08:11.960
<v Sjors Provoost>limited to, I believe, things that can check signatures. It wasn't even fully

00:08:11.960 --> 00:08:15.940
<v Sjors Provoost>checking a block. It could just verify individual transactions and signatures.

00:08:16.300 --> 00:08:16.780
<v Aaron van Wirdum>Okay.

00:08:17.020 --> 00:08:22.370
<v Sjors Provoost>So it was a very limited subset of what we consider the validity.

00:08:23.010 --> 00:08:24.890
<v Aaron van Wirdum>Okay, but that's because it wasn't finished yet?

00:08:25.810 --> 00:08:28.230
<v Sjors Provoost>Yeah, it was a work in progress. It was the first attempt.

00:08:29.490 --> 00:08:33.630
<v Sjors Provoost>But it wasn't finished, and it's quite difficult to maintain. Wow.

00:08:33.970 --> 00:08:37.650
<v Aaron van Wirdum>So do you know why it wasn't finished? What's hard to maintain about it?

00:08:39.130 --> 00:08:43.940
<v Sjors Provoost>Not really. It was just a pain in the ass. And now we have the kernel project,

00:08:43.940 --> 00:08:46.860
<v Sjors Provoost>which tries it again and uses a different approach.

00:08:47.160 --> 00:08:51.280
<v Aaron van Wirdum>Right. I mean, from what I understand or what I remember, at least years ago when

00:08:51.280 --> 00:08:56.340
<v Aaron van Wirdum>I heard about this, the Bitcoin Core... at least as it was then and probably

00:08:56.340 --> 00:09:00.760
<v Aaron van Wirdum>still, or at least as Satoshi released, it was kind of spaghetti code. Spaghetti

00:09:00.760 --> 00:09:04.000
<v Aaron van Wirdum>code where everything sort of refers to everything else and some of it was

00:09:04.000 --> 00:09:08.940
<v Aaron van Wirdum>consensus and some of it was not. So it was very hard to sort of derive from that

00:09:08.940 --> 00:09:14.100
<v Aaron van Wirdum>mess what actually was consensus. And that sort of was the big challenge to

00:09:14.100 --> 00:09:19.860
<v Aaron van Wirdum>getting this done. So it sounds like this project was started. I

00:09:19.860 --> 00:09:24.410
<v Aaron van Wirdum>think especially Jorge Timon was working on this. And it sounds like he kind of

00:09:24.410 --> 00:09:28.310
<v Aaron van Wirdum>went away and probably people sort of stopped caring about this project. And now

00:09:28.310 --> 00:09:33.170
<v Aaron van Wirdum>Bitcoin Core Dev said, let's just get rid of this thing. Let's start over. Let's

00:09:33.170 --> 00:09:33.630
<v Aaron van Wirdum>start fresh.

00:09:34.130 --> 00:09:36.770
<v Sjors Provoost>Yeah, I think so, and I think it was also getting in the way of some other

00:09:36.770 --> 00:09:38.650
<v Sjors Provoost>refactoring cleanup projects.

00:09:38.910 --> 00:09:42.610
<v Aaron van Wirdum>Right, and this Bitcoin kernel you just mentioned, have we talked about this on the podcast?

00:09:43.450 --> 00:09:48.130
<v Sjors Provoost>We've mentioned it a couple of times. The TLDR is it's an attempt, again, to take

00:09:48.130 --> 00:09:52.370
<v Sjors Provoost>the essence of Bitcoin Core and make it available for other software. Now,

00:09:52.450 --> 00:09:56.770
<v Sjors Provoost>there's still an open question of what should and should not be part of the

00:09:56.770 --> 00:10:02.230
<v Sjors Provoost>kernel. For example, does the mempool belong to the kernel or just blocks?

00:10:03.730 --> 00:10:07.850
<v Sjors Provoost>And we've seen that even network rules impact consensus. We've seen that very

00:10:07.850 --> 00:10:12.510
<v Sjors Provoost>clearly with an episode we did about a btcd bug.

00:10:13.690 --> 00:10:19.330
<v Sjors Provoost>Yeah, I think it was a btcd bug for using with LND, where a block was sent and it

00:10:19.330 --> 00:10:22.370
<v Sjors Provoost>was rejected. But it wasn't rejected based on the consensus rules. It was

00:10:22.370 --> 00:10:27.010
<v Sjors Provoost>rejected based on a network rule, saying that the block had too many, I don't

00:10:27.010 --> 00:10:27.510
<v Sjors Provoost>know what it was.

00:10:27.890 --> 00:10:28.090
<v Aaron van Wirdum>Yeah.

00:10:28.290 --> 00:10:29.170
<v Sjors Provoost>We have a little episode about it.

00:10:29.530 --> 00:10:34.390
<v Aaron van Wirdum>Okay. Anyways, libbitcoinconsensus is deprecated.

00:10:34.630 --> 00:10:38.050
<v Sjors Provoost>Yes. So as a user, you will not notice this at all.

00:10:39.260 --> 00:10:44.460
<v Aaron van Wirdum>Right. Okay. Let's move to something that you might use as a user, might notice

00:10:44.460 --> 00:10:44.980
<v Aaron van Wirdum>as a user.

00:10:47.080 --> 00:10:50.420
<v Aaron van Wirdum>Actually, I don't think the next one is going to be noticeable by a user either.

00:10:50.860 --> 00:10:51.820
<v Sjors Provoost>No, it might be. It might be.

00:10:51.960 --> 00:10:52.160
<v Aaron van Wirdum>Okay.

00:10:53.920 --> 00:10:55.300
<v Aaron van Wirdum>This is about the mempool.

00:10:55.920 --> 00:10:59.260
<v Sjors Provoost>Yeah, to be precise, it's about saving the mempool.

00:10:59.680 --> 00:11:01.620
<v Aaron van Wirdum>About saving the mempools.

00:11:02.310 --> 00:11:03.950
<v Sjors Provoost>Well, your mempool, yeah.

00:11:04.730 --> 00:11:08.110
<v Aaron van Wirdum>Saving the mempool. Saving my mempool. How are we going to save my mempool?

00:11:08.490 --> 00:11:13.270
<v Sjors Provoost>Yeah, so Bitcoin Core, when it's running, it receives new transactions. It holds

00:11:13.270 --> 00:11:17.930
<v Sjors Provoost>onto those, usually in memory. And then at some point, you shut Bitcoin Core down.

00:11:17.930 --> 00:11:19.990
<v Aaron van Wirdum>This is before they're included in a block.

00:11:20.500 --> 00:11:24.700
<v Sjors Provoost>Yes, exactly. And then either if a block arrives to go out of the mempool because

00:11:24.700 --> 00:11:29.780
<v Sjors Provoost>now they're in a block, or if you shut down Bitcoin Core but the transaction is

00:11:29.780 --> 00:11:33.640
<v Sjors Provoost>still not in a block, it's going to remember it by saving it to disk. And then

00:11:33.640 --> 00:11:36.880
<v Sjors Provoost>next time you start Bitcoin Core, it loads it from disk. Otherwise, you'd have to

00:11:36.880 --> 00:11:39.580
<v Sjors Provoost>wait for somebody else to announce it again to you, which is not ideal.

00:11:39.680 --> 00:11:41.120
<v Aaron van Wirdum>Or it's in a block, right, by then.

00:11:41.560 --> 00:11:42.020
<v Sjors Provoost>Yeah.

00:11:42.620 --> 00:11:45.780
<v Aaron van Wirdum>I mean, there's no real... What's actually the point now that I ask this

00:11:45.780 --> 00:11:50.720
<v Aaron van Wirdum>question? Like, why should I care as a regular user that my mempool is cleared?

00:11:51.140 --> 00:11:55.080
<v Sjors Provoost>Well, we did an episode about why the mempool is useful in general.

00:11:56.360 --> 00:12:00.920
<v Sjors Provoost>You know, it helps with things like block relay. It makes it quicker for you to

00:12:00.920 --> 00:12:06.090
<v Sjors Provoost>verify a new block because you already verified those transactions before. So

00:12:06.090 --> 00:12:09.850
<v Sjors Provoost>then when you restart Bitcoin Core, it helps you to verify all those new blocks

00:12:09.850 --> 00:12:12.590
<v Sjors Provoost>that you're going to catch up with with that mempool that you still had.

00:12:12.950 --> 00:12:18.490
<v Aaron van Wirdum>Right, okay. So yeah, I have a Bitcoin Core node and the mempool, when I shut

00:12:18.490 --> 00:12:22.910
<v Aaron van Wirdum>down my computer, my entire mempool is just saved on disk and then I start the

00:12:22.910 --> 00:12:26.690
<v Aaron van Wirdum>computer again and Bitcoin Core starts up and it remembers what was in the mempool.

00:12:26.890 --> 00:12:27.230
<v Sjors Provoost>Exactly.

00:12:27.450 --> 00:12:29.470
<v Aaron van Wirdum>Okay, so what's the problem?

00:12:29.730 --> 00:12:31.330
<v Sjors Provoost>The problem is that...

00:12:32.560 --> 00:12:36.700
<v Sjors Provoost>There, you might have a virus scanner, and that virus scanner is looking for

00:12:36.700 --> 00:12:42.340
<v Sjors Provoost>suspicious files. And if some joker creates a

00:12:42.340 --> 00:12:46.600
<v Sjors Provoost>transaction and then puts one of this OP_RETURN spam inscriptions, whatever it

00:12:46.600 --> 00:12:50.520
<v Sjors Provoost>is, in there, they could put something in that looks like a virus.

00:12:51.710 --> 00:12:53.690
<v Aaron van Wirdum>Whether it is a virus or not. Well,

00:12:54.150 --> 00:12:57.850
<v Sjors Provoost>that's a philosophical question. Is a photo of a virus a virus? I don't think so

00:12:57.850 --> 00:13:00.250
<v Sjors Provoost>because it's not going to replicate or do any harm.

00:13:00.450 --> 00:13:00.650
<v Aaron van Wirdum>Okay.

00:13:00.910 --> 00:13:03.510
<v Sjors Provoost>Right? So it's more like a picture of a virus, I guess.

00:13:03.670 --> 00:13:03.810
<v Aaron van Wirdum>Okay.

00:13:03.810 --> 00:13:08.350
<v Sjors Provoost>It might be the exact same code. It's not that your node is suddenly going to run

00:13:08.350 --> 00:13:13.610
<v Sjors Provoost>the virus and destroy itself. But the virus scanner doesn't understand that. So

00:13:13.610 --> 00:13:17.050
<v Sjors Provoost>it sees something that looks like a virus and says, I'm going to put this in

00:13:17.050 --> 00:13:21.980
<v Sjors Provoost>quarantine now, and then puts your whole mempool in quarantine. And now when you

00:13:21.980 --> 00:13:25.720
<v Sjors Provoost>start the node again, it's not going to break. It's just going to say, oh, I

00:13:25.720 --> 00:13:27.760
<v Sjors Provoost>guess you don't have a mempool yet. Let me make a new one.

00:13:29.230 --> 00:13:29.490
<v Aaron van Wirdum>Uh-huh.

00:13:30.170 --> 00:13:33.250
<v Sjors Provoost>That's not ideal because we just explained why we saved this thing in the first

00:13:33.250 --> 00:13:34.490
<v Sjors Provoost>place.

00:13:34.790 --> 00:13:38.770
<v Aaron van Wirdum>Can't say I feel very stressed about this problem, but sure, go on.

00:13:38.970 --> 00:13:43.310
<v Sjors Provoost>No, this is why this problem has not been fixed for the past 10 years. We do the

00:13:43.310 --> 00:13:48.010
<v Sjors Provoost>same thing for blocks that are stored on disk. Well, what we'll do, we'll explain

00:13:48.010 --> 00:13:51.590
<v Sjors Provoost>in a bit, but we have the same problem for blocks. I think that actually did

00:13:51.590 --> 00:13:56.490
<v Sjors Provoost>happen in like 10 years ago. Some joker put something in a block that looked like a virus.

00:13:56.650 --> 00:13:57.830
<v Aaron van Wirdum>It's better to solve the problem.

00:13:58.030 --> 00:14:03.210
<v Sjors Provoost>Yeah, because if your blocks are killed by the virus scanner, then your node

00:14:03.210 --> 00:14:03.950
<v Sjors Provoost>doesn't work anymore.

00:14:04.150 --> 00:14:04.550
<v Aaron van Wirdum>Right.

00:14:04.810 --> 00:14:05.810
<v Sjors Provoost>So that's more important.

00:14:05.930 --> 00:14:06.170
<v Aaron van Wirdum>Yes.

00:14:07.440 --> 00:14:13.440
<v Aaron van Wirdum>And so transactions, yeah, okay, so what's the solution here? What are we trying to do?

00:14:14.020 --> 00:14:19.630
<v Sjors Provoost>The solution here... is to basically fool the virus scanner

00:14:19.630 --> 00:14:25.450
<v Sjors Provoost>by encrypting the file. Now, encrypting sounds very fancy. It's not the

00:14:25.450 --> 00:14:30.010
<v Sjors Provoost>strongest encryption ever, but it is using XOR, basically.

00:14:31.230 --> 00:14:31.970
<v Aaron van Wirdum>And what's XOR?

00:14:33.530 --> 00:14:38.610
<v Sjors Provoost>XOR, well, I guess the easiest is to explain it. It's like a one-time pad. So

00:14:38.610 --> 00:14:43.940
<v Sjors Provoost>this is one of the oldest forms of encryptions that exist. You take a text that

00:14:43.940 --> 00:14:48.860
<v Sjors Provoost>you want to encrypt, like the word hello, and then you add to it a set of random

00:14:48.860 --> 00:14:53.920
<v Sjors Provoost>letters. That's the easiest way to see it that you've agreed to before. So you

00:14:53.920 --> 00:14:58.700
<v Sjors Provoost>and I want to communicate. We exchange a long piece of paper with lots of letters

00:14:58.700 --> 00:15:04.340
<v Sjors Provoost>on it. And then we say whenever we write a letter to each other, we both

00:15:04.340 --> 00:15:08.460
<v Sjors Provoost>start with that piece of paper and we add the letter on that piece of paper to

00:15:08.460 --> 00:15:13.890
<v Sjors Provoost>every letter that we write. Or I add the letter and you subtract it. And that

00:15:13.890 --> 00:15:14.430
<v Sjors Provoost>way...

00:15:14.430 --> 00:15:18.790
<v Aaron van Wirdum>Wait, so this sounds like the Caesar cipher. Do you know what this is?

00:15:19.210 --> 00:15:21.050
<v Sjors Provoost>No, it's much more secure.

00:15:21.770 --> 00:15:23.250
<v Aaron van Wirdum>Oh, it is more secure than that?

00:15:23.350 --> 00:15:28.110
<v Sjors Provoost>Yeah, I think the Caesar cipher was... Actually, I don't know. It might be similar.

00:15:28.350 --> 00:15:33.010
<v Aaron van Wirdum>The Caesar cipher, which I describe... in the Genesis book.

00:15:33.190 --> 00:15:34.350
<v Sjors Provoost>Oh, yes, you wrote a book.

00:15:35.490 --> 00:15:41.250
<v Aaron van Wirdum>It's basically you take the word hello and then you do like plus five and then

00:15:41.250 --> 00:15:47.130
<v Aaron van Wirdum>for each letter you replace the letter in hello for like the fifth next letter

00:15:47.130 --> 00:15:47.710
<v Aaron van Wirdum>in the alphabet.

00:15:48.150 --> 00:15:52.130
<v Sjors Provoost>Yeah, but if you do it just plus five for every letter, that's a bit easy to crack.

00:15:52.290 --> 00:15:54.250
<v Aaron van Wirdum>I mean, it is, but that's the Caesar cipher.

00:15:54.310 --> 00:15:59.850
<v Sjors Provoost>So this cipher means every... Every character gets, you add a different letter or

00:15:59.850 --> 00:16:01.250
<v Sjors Provoost>a different number to every character.

00:16:02.600 --> 00:16:06.820
<v Sjors Provoost>And that number is random every time. So you have a page with completely random

00:16:06.820 --> 00:16:10.780
<v Sjors Provoost>numbers that you created with dice throwing, whatever it is. Numbers 0 to 26,

00:16:11.160 --> 00:16:12.440
<v Sjors Provoost>right? Or 0 to 25.

00:16:14.590 --> 00:16:19.170
<v Sjors Provoost>And when I'm writing you the message, I'm adding a different number to every

00:16:19.170 --> 00:16:22.990
<v Sjors Provoost>letter of my message, and you have to keep track of where I am, and then you can

00:16:22.990 --> 00:16:27.870
<v Sjors Provoost>subtract the same number. And then you burn the piece of paper that we used as a

00:16:27.870 --> 00:16:33.150
<v Sjors Provoost>cipher. So that means anybody who intercepts the communication midway can no

00:16:33.150 --> 00:16:33.930
<v Sjors Provoost>longer decipher it.

00:16:35.330 --> 00:16:37.570
<v Aaron van Wirdum>Anyways, so the mempool is encrypted.

00:16:38.070 --> 00:16:42.070
<v Sjors Provoost>Using roughly that technique, except a very insecure version of it, because the

00:16:42.070 --> 00:16:46.490
<v Sjors Provoost>entire thing is only like eight characters long, and it just repeats the same

00:16:46.490 --> 00:16:49.770
<v Sjors Provoost>eight characters, which is insecure. And also at the start of the file, the

00:16:49.770 --> 00:16:54.230
<v Sjors Provoost>cipher is actually revealed, so it is totally insecure, because it's not the goal

00:16:54.230 --> 00:16:56.430
<v Sjors Provoost>to be secure, it's the goal to fool the virus scanner.

00:16:57.750 --> 00:17:00.880
<v Aaron van Wirdum>Yep. Okay, that's it. Mempool upgrade.

00:17:01.180 --> 00:17:05.940
<v Sjors Provoost>Yeah, and so the little thing there is that means you can't downgrade. Because

00:17:05.940 --> 00:17:09.060
<v Sjors Provoost>older versions of the node, if you wanted to go back to an old version, won't

00:17:09.060 --> 00:17:15.020
<v Sjors Provoost>understand the mempool file. But they'll just start a new one. So it's not a big deal.

00:17:15.820 --> 00:17:17.680
<v Aaron van Wirdum>Okay. Next one.

00:17:20.950 --> 00:17:26.730
<v Aaron van Wirdum>BIP 324. We made an episode on that. That's network encryption. And that's

00:17:26.730 --> 00:17:28.070
<v Aaron van Wirdum>now on by default.

00:17:28.490 --> 00:17:28.970
<v Sjors Provoost>Yes.

00:17:29.210 --> 00:17:32.910
<v Aaron van Wirdum>So it was already an option in the previous Bitcoin Core release.

00:17:32.990 --> 00:17:33.150
<v Sjors Provoost>Yep.

00:17:33.630 --> 00:17:37.210
<v Aaron van Wirdum>Maybe even the one before that? No, probably the previous one, I think, right?

00:17:37.350 --> 00:17:40.670
<v Sjors Provoost>I think the previous one or the one before it, it was made default.

00:17:41.030 --> 00:17:41.790
<v Aaron van Wirdum>No, it was.

00:17:41.950 --> 00:17:43.650
<v Sjors Provoost>It was available. You could turn it on.

00:17:43.710 --> 00:17:43.890
<v Aaron van Wirdum>Yeah.

00:17:44.130 --> 00:17:45.310
<v Sjors Provoost>And now it's on by default.

00:17:45.490 --> 00:17:48.810
<v Aaron van Wirdum>Right. Okay. Quick reminder what it was again.

00:17:48.990 --> 00:17:49.850
<v Sjors Provoost>Episode 77.

00:17:51.340 --> 00:17:52.060
<v Aaron van Wirdum>No, sure.

00:17:53.040 --> 00:17:56.540
<v Sjors Provoost>Stein can just paste it. No, that's fine.

00:17:57.920 --> 00:18:03.880
<v Sjors Provoost>The idea is that you and I have a connection, and instead of sending everything

00:18:03.880 --> 00:18:06.520
<v Sjors Provoost>in plain text, we encrypt everything.

00:18:06.860 --> 00:18:10.580
<v Aaron van Wirdum>Yep. Okay, I mean, I guess, actually, yeah, that's good enough. If you do want to

00:18:10.580 --> 00:18:11.720
<v Aaron van Wirdum>know more, we made an episode on it.

00:18:11.720 --> 00:18:14.840
<v Sjors Provoost>Which starts with the Diffie-Hellman key exchange, which you have described in

00:18:14.840 --> 00:18:15.260
<v Sjors Provoost>your book.

00:18:15.890 --> 00:18:17.710
<v Aaron van Wirdum>Oh, thanks. You're plugging it as well.

00:18:17.810 --> 00:18:22.870
<v Sjors Provoost>And then you use a stream cipher, which is essentially a one-time pad where this

00:18:22.870 --> 00:18:27.270
<v Sjors Provoost>piece of paper that we talked about, we know that given the key exchange we did,

00:18:27.410 --> 00:18:31.490
<v Sjors Provoost>we know what that page has to look like. So we don't have to give each other a

00:18:31.490 --> 00:18:36.430
<v Sjors Provoost>piece of paper with the cipher on it. We both construct the same cipher, but it's

00:18:36.430 --> 00:18:42.130
<v Sjors Provoost>the same cryptographic idea. So that's pretty cool. It's on by default.

00:18:42.130 --> 00:18:46.500
<v Sjors Provoost>This does not mean that all your connections are now encrypted by default. The

00:18:46.500 --> 00:18:52.220
<v Sjors Provoost>devil is in the details here. When you connect to a new node, you will try

00:18:52.220 --> 00:18:57.200
<v Sjors Provoost>this encryption only if you think the other side supports it.

00:18:58.050 --> 00:19:02.230
<v Sjors Provoost>And we talked in a very, very early episode about DNS seeds, probably episode two.

00:19:03.180 --> 00:19:03.880
<v Aaron van Wirdum>Oh, wow.

00:19:04.200 --> 00:19:09.480
<v Sjors Provoost>Where, you know, the way nodes bootstrap is they get a list of other nodes and

00:19:09.480 --> 00:19:12.820
<v Sjors Provoost>then they call those other nodes and say, hey, do you know about other nodes? And

00:19:12.820 --> 00:19:17.320
<v Sjors Provoost>you keep a list of which nodes exist in the network. But you don't just keep

00:19:17.320 --> 00:19:21.260
<v Sjors Provoost>track of which nodes exist and their IP addresses. You also check which features

00:19:21.260 --> 00:19:25.400
<v Sjors Provoost>they support. And one of those features can be that they support this encrypted

00:19:25.400 --> 00:19:31.000
<v Sjors Provoost>communication. So only if through the gossip circuit you heard

00:19:31.000 --> 00:19:35.280
<v Sjors Provoost>that this node supports encryption, then you're going to try it. Otherwise,

00:19:35.300 --> 00:19:40.360
<v Sjors Provoost>you're not. And so this will probably be a future change. If we know that this

00:19:40.360 --> 00:19:46.140
<v Sjors Provoost>works, then we might just try an encrypted connection all the time and fall

00:19:46.140 --> 00:19:50.690
<v Sjors Provoost>back to unencrypted if it doesn't work. So now this is, even though it's on by

00:19:50.690 --> 00:19:51.950
<v Sjors Provoost>default, it's still a bit conservative.

00:19:53.630 --> 00:19:58.390
<v Aaron van Wirdum>Right. Okay, so so far we talked about something that was removed,

00:19:58.410 --> 00:20:01.070
<v Aaron van Wirdum>something that's a very niche problem.

00:20:01.940 --> 00:20:03.420
<v Sjors Provoost>Not niche if you use Windows,

00:20:04.780 --> 00:20:06.100
<v Sjors Provoost>but...

00:20:06.710 --> 00:20:10.710
<v Aaron van Wirdum>Well, no, I think you're... We're not there yet.

00:20:10.850 --> 00:20:11.150
<v Sjors Provoost>Okay.

00:20:11.840 --> 00:20:17.020
<v Aaron van Wirdum>I said so far we've talked about something that was removed, something that

00:20:17.020 --> 00:20:20.680
<v Aaron van Wirdum>solves a weird virus thing.

00:20:20.980 --> 00:20:25.240
<v Sjors Provoost>Yeah, but that may not be a weird problem. If somebody does this, then it's going

00:20:25.240 --> 00:20:28.400
<v Sjors Provoost>to affect everybody who runs a virus scanner, like not just a few people.

00:20:28.580 --> 00:20:33.420
<v Aaron van Wirdum>I'm not impressed, Sjors. Where are my soft forks? Where are my...

00:20:34.710 --> 00:20:37.370
<v Aaron van Wirdum>Does this make number go up? I don't think so.

00:20:37.490 --> 00:20:38.830
<v Sjors Provoost>This is finally fixed Lightning.

00:20:39.430 --> 00:20:44.630
<v Aaron van Wirdum>Yes, please. Okay, moving on to the next one. Network adjusted time removed.

00:20:44.830 --> 00:20:46.190
<v Sjors Provoost>Speaking of unimportant problems.

00:20:47.480 --> 00:20:53.310
<v Sjors Provoost>Yeah, so there is this rule that says if you see a new block, that

00:20:53.310 --> 00:20:57.610
<v Sjors Provoost>it cannot be from the future. Well, it cannot be for more than two hours in the

00:20:57.610 --> 00:21:01.610
<v Sjors Provoost>future. There's a little grace period there. Question is, what is two hours in

00:21:01.610 --> 00:21:05.460
<v Sjors Provoost>the future? What if your clock is wrong? You might be wrong about that.

00:21:05.520 --> 00:21:10.060
<v Aaron van Wirdum>Wait, let me repeat that for those that don't know and didn't quite follow. Yeah,

00:21:10.240 --> 00:21:15.280
<v Aaron van Wirdum>you find a new block or someone sends you a new block. The block has a time in

00:21:15.280 --> 00:21:20.060
<v Aaron van Wirdum>it. And then one of the things you do to check if the block is valid is to check

00:21:20.060 --> 00:21:24.100
<v Aaron van Wirdum>that it wasn't mined in the future or in the past, I guess, right?

00:21:24.420 --> 00:21:26.920
<v Sjors Provoost>No, the past is fine because you might be catching up on all blocks.

00:21:27.100 --> 00:21:31.500
<v Aaron van Wirdum>Okay, yeah. It's not mined in the future. And the future means two hours or more

00:21:31.500 --> 00:21:32.180
<v Aaron van Wirdum>into the future.

00:21:32.460 --> 00:21:35.520
<v Sjors Provoost>Yeah. Now, there are limitations to the past, by the way, but that is relative to

00:21:35.520 --> 00:21:36.420
<v Sjors Provoost>earlier blocks, right?

00:21:36.500 --> 00:21:36.620
<v Aaron van Wirdum>Right.

00:21:37.020 --> 00:21:38.240
<v Sjors Provoost>Blocks can't go back in time.

00:21:38.480 --> 00:21:38.640
<v Aaron van Wirdum>Right.

00:21:38.880 --> 00:21:42.760
<v Sjors Provoost>But, yeah, you cannot accept the block.

00:21:42.860 --> 00:21:44.600
<v Aaron van Wirdum>Right, now we're talking about blocks in the future.

00:21:44.920 --> 00:21:45.240
<v Sjors Provoost>Yeah.

00:21:45.340 --> 00:21:49.620
<v Aaron van Wirdum>They can't be mined in the future, which is two hours in the future, and now what

00:21:49.620 --> 00:21:54.080
<v Aaron van Wirdum>you said is how do you define what is the future? Well, usually you use a clock,

00:21:54.220 --> 00:21:55.560
<v Aaron van Wirdum>and I guess that's what you're getting at.

00:21:55.620 --> 00:21:59.120
<v Sjors Provoost>Yeah, and so I think it was Satoshi or maybe one of the earlier contributors who

00:21:59.120 --> 00:22:03.060
<v Sjors Provoost>thought, well, what if your clock is wrong? You might be rejecting blocks even

00:22:03.060 --> 00:22:07.820
<v Sjors Provoost>though they're valid because your clock is wrong, not the miner's clock. And the

00:22:07.820 --> 00:22:12.450
<v Sjors Provoost>solution to that was to when you connect to other peers, you ask them, hey, what

00:22:12.450 --> 00:22:16.610
<v Sjors Provoost>time is it? What time is it? What time is it? You know, not that long ago, that's

00:22:16.610 --> 00:22:18.170
<v Sjors Provoost>a question you would ask people on the street.

00:22:18.290 --> 00:22:18.470
<v Aaron van Wirdum>Yeah.

00:22:19.650 --> 00:22:20.210
<v Sjors Provoost>It's amazing.

00:22:20.410 --> 00:22:21.030
<v Aaron van Wirdum>Do you have the time?

00:22:21.210 --> 00:22:27.170
<v Sjors Provoost>Yeah, exactly. Nowadays, well, we stopped doing that as humans, and

00:22:27.170 --> 00:22:31.510
<v Sjors Provoost>Bitcoin Core stops doing that now too. Well, not entirely, but it doesn't do

00:22:31.510 --> 00:22:35.790
<v Sjors Provoost>anything with it anymore. That's the change. Because the problem is, what if your

00:22:35.790 --> 00:22:41.660
<v Sjors Provoost>peers are lying to you about the clock? That's not ideal. And also, you know,

00:22:42.020 --> 00:22:47.960
<v Sjors Provoost>I think most computers nowadays get their clocks set by a network, you know,

00:22:48.360 --> 00:22:51.400
<v Sjors Provoost>get the time from the network, from their internet provider or from some other

00:22:51.400 --> 00:22:55.940
<v Sjors Provoost>source. And so my thinking is that they're generally either very accurate within

00:22:55.940 --> 00:22:59.630
<v Sjors Provoost>the second or they are completely wrong because...

00:22:59.630 --> 00:23:00.510
<v Aaron van Wirdum>Yeah, it's 1900.

00:23:01.190 --> 00:23:07.090
<v Sjors Provoost>Yeah, I've had one of these cheap computers where the little battery is dead. So

00:23:07.090 --> 00:23:12.910
<v Sjors Provoost>when you turn it on, the clock is back at the second zero, which is January 1st,

00:23:12.970 --> 00:23:13.410
<v Sjors Provoost>1970.

00:23:14.550 --> 00:23:15.010
<v Aaron van Wirdum>Is that it?

00:23:15.170 --> 00:23:17.530
<v Sjors Provoost>That's typically the year zero for a computer. Right.

00:23:19.130 --> 00:23:19.390
<v Aaron van Wirdum>Okay.

00:23:19.590 --> 00:23:24.450
<v Sjors Provoost>So yeah, so now I think it will still warn you. Like, hey, this block seems to be

00:23:24.450 --> 00:23:29.970
<v Sjors Provoost>[unclear]… Yeah. No, I think it'll warn you saying, hey, your peers think that

00:23:29.970 --> 00:23:34.730
<v Sjors Provoost>time is different than I think it is, but that's it. It's just going to work.

00:23:34.830 --> 00:23:35.910
<v Sjors Provoost>It's going to use its own clock.

00:23:36.390 --> 00:23:40.930
<v Aaron van Wirdum>Do you think that in the future when religion is just displaced, we'll actually

00:23:40.930 --> 00:23:46.050
<v Aaron van Wirdum>use 1970 as the year zero? You think future humans will think that way? Sure.

00:23:47.400 --> 00:23:51.260
<v Sjors Provoost>Do you think that when we invent something better than a QWERTY keyboard, we'll

00:23:51.260 --> 00:23:51.920
<v Sjors Provoost>actually use it?

00:23:53.160 --> 00:23:56.300
<v Aaron van Wirdum>I'm still holding my breath. I'm not going to hold my breath for that one.

00:23:56.500 --> 00:23:58.100
<v Sjors Provoost>I don't think we're going to change this.

00:23:58.480 --> 00:23:58.700
<v Aaron van Wirdum>Okay.

00:24:01.730 --> 00:24:04.130
<v Aaron van Wirdum>Because the QWERTY keyboard is not going to change?

00:24:04.310 --> 00:24:08.690
<v Sjors Provoost>If we don't change the QWERTY keyboard with obvious productivity benefits, why

00:24:08.690 --> 00:24:13.110
<v Sjors Provoost>would we replace the calendar system, which doesn't matter?

00:24:14.320 --> 00:24:14.800
<v Aaron van Wirdum>Never?

00:24:16.520 --> 00:24:19.040
<v Sjors Provoost>I'm sure at some point people will be like, oh, it's the year

00:24:19.040 --> 00:24:24.880
<v Sjors Provoost>370,225,695. Yeah, that

00:24:24.880 --> 00:24:28.700
<v Sjors Provoost>gets a little tedious. But maybe they'll just not count the thousands or

00:24:28.700 --> 00:24:29.320
<v Sjors Provoost>something like that.

00:24:30.120 --> 00:24:34.560
<v Aaron van Wirdum>Or we change it to 1971. That's what Bitcoiners will agree with.

00:24:36.020 --> 00:24:37.560
<v Aaron van Wirdum>Should we move on to the next point?

00:24:37.740 --> 00:24:39.780
<v Sjors Provoost>A rounding error in 300 million years.

00:24:41.620 --> 00:24:42.360
<v Aaron van Wirdum>Next point.

00:24:46.390 --> 00:24:47.990
<v Sjors Provoost>Another amazing problem.

00:24:49.860 --> 00:24:54.640
<v Aaron van Wirdum>External signing for Windows disabled. Oh, yeah. This is about hardware wallets.

00:24:54.980 --> 00:24:59.040
<v Sjors Provoost>Yes. So there is a feature in Bitcoin Core where you can connect a hardware

00:24:59.040 --> 00:25:02.680
<v Sjors Provoost>wallet to your USB port, and then you have to install HWI.

00:25:02.720 --> 00:25:07.470
<v Aaron van Wirdum>Some people think that Bitcoin itself will be used as a clock, Sjors. What do you

00:25:07.470 --> 00:25:08.150
<v Aaron van Wirdum>think of that?

00:25:08.270 --> 00:25:09.070
<v Sjors Provoost>That annoys me.

00:25:09.070 --> 00:25:09.930
<v Aaron van Wirdum>That's philosophical.

00:25:10.570 --> 00:25:16.340
<v Sjors Provoost>Because Bitcoin is not a clock. Bitcoin nodes use a clock. A trusted clock, even.

00:25:16.460 --> 00:25:19.810
<v Aaron van Wirdum>You measure the time in blocks nowadays.

00:25:20.230 --> 00:25:21.510
<v Sjors Provoost>No, you do not.

00:25:22.360 --> 00:25:23.180
<v Aaron van Wirdum>Why not?

00:25:24.510 --> 00:25:27.790
<v Sjors Provoost>Because your node checks the blocks to see that their times are valid.

00:25:27.930 --> 00:25:29.770
<v Aaron van Wirdum>Yeah, I guess that's what we were just talking about.

00:25:29.950 --> 00:25:30.550
<v Sjors Provoost>Yeah, exactly.

00:25:30.930 --> 00:25:34.090
<v Aaron van Wirdum>Okay, moving on to hardware wallets. I won't interrupt you anymore.

00:25:34.450 --> 00:25:38.370
<v Sjors Provoost>Yeah, so there is a tool called HWI. We have talked about that in the past. It's

00:25:38.370 --> 00:25:42.110
<v Sjors Provoost>a separate thing you download. You tell Bitcoin Core where it is, and then you

00:25:42.110 --> 00:25:45.810
<v Sjors Provoost>can use hardware wallets right from the GUI. As simple as, like, create a new

00:25:45.810 --> 00:25:50.910
<v Sjors Provoost>wallet. It says, oh, would you like to use your COLDCARD if you connected it?

00:25:51.390 --> 00:25:52.170
<v Aaron van Wirdum>Good choice.

00:25:52.930 --> 00:25:57.350
<v Sjors Provoost>And it'll import the keys. You can send with it. It'll just work. It's pretty

00:25:57.350 --> 00:26:01.940
<v Sjors Provoost>cool. However, Windows support has always been a bit iffy. It's been disabled a

00:26:01.940 --> 00:26:03.720
<v Sjors Provoost>few times. It's been enabled a few times.

00:26:03.920 --> 00:26:05.360
<v Aaron van Wirdum>What's iffy about it? Why is it iffy?

00:26:05.900 --> 00:26:07.700
<v Sjors Provoost>Windows is just painful.

00:26:08.480 --> 00:26:11.740
<v Aaron van Wirdum>Hard to program for? Like, what's the problem?

00:26:11.860 --> 00:26:17.220
<v Sjors Provoost>Yeah, I think it would just... Either it was broken in Windows or the support for

00:26:17.220 --> 00:26:19.380
<v Sjors Provoost>Windows broke something else that we needed.

00:26:20.710 --> 00:26:22.770
<v Aaron van Wirdum>So this is a Windows-only problem.

00:26:23.370 --> 00:26:27.750
<v Sjors Provoost>Yes, and we've removed support for it, I think, a year ago. It wasn't mentioned

00:26:27.750 --> 00:26:31.450
<v Sjors Provoost>in the release notes. Nobody complained about it. Then it was added back, which I

00:26:31.450 --> 00:26:34.750
<v Sjors Provoost>think was also not mentioned in the release notes. Nobody was excited about it.

00:26:34.970 --> 00:26:39.530
<v Sjors Provoost>Now it's removed again, which is mentioned in the release notes, and it should be

00:26:39.530 --> 00:26:44.210
<v Sjors Provoost>back again in the next version. I think nobody's going to care about it.

00:26:45.040 --> 00:26:49.860
<v Aaron van Wirdum>If you have a hardware wallet and you're using Windows and you have a Bitcoin

00:26:49.860 --> 00:26:52.780
<v Aaron van Wirdum>Core node where you use the wallet with the hardware wallet,

00:26:52.980 --> 00:26:55.520
<v Sjors Provoost>then maybe you shouldn't upgrade.

00:26:56.260 --> 00:26:57.920
<v Aaron van Wirdum>And you're using HWI as a tool.

00:26:58.040 --> 00:27:01.220
<v Sjors Provoost>Because there's other tools, right? There's Sparrow Wallet and there's Spectre.

00:27:01.440 --> 00:27:05.180
<v Sjors Provoost>Those will work around the problem. So it's only those very specific

00:27:05.180 --> 00:27:07.620
<v Sjors Provoost>circumstances that it would cause a problem for you.

00:27:07.840 --> 00:27:10.760
<v Aaron van Wirdum>Okay. And you think that's basically no one is using it that way?

00:27:11.430 --> 00:27:14.350
<v Sjors Provoost>Well, based on the fact that nobody complained the last time it was removed.

00:27:15.700 --> 00:27:19.660
<v Aaron van Wirdum>Yeah, but most people aren't gonna, they don't even know where to find you.

00:27:20.270 --> 00:27:21.730
<v Sjors Provoost>But they know where to complain.

00:27:22.010 --> 00:27:25.410
<v Aaron van Wirdum>Do they? What's the service number for Bitcoin Core?

00:27:25.550 --> 00:27:26.250
<v Sjors Provoost>X.com?

00:27:27.470 --> 00:27:28.150
<v Aaron van Wirdum>That's true.

00:27:29.900 --> 00:27:33.400
<v Sjors Provoost>This would have gone viral if somebody was bothered by this. Maybe so, yeah.

00:27:33.420 --> 00:27:37.870
<v Sjors Provoost>Clearly, clearly. Anyway, yeah. So yeah, if you do need this, yeah, then I guess

00:27:37.870 --> 00:27:43.250
<v Sjors Provoost>don't upgrade to 27.0. Wait for 28.0. It'll be fixed again, probably.

00:27:43.750 --> 00:27:46.590
<v Aaron van Wirdum>Okay. The last part, we have one more, and that one is actually kind of

00:27:46.590 --> 00:27:47.010
<v Aaron van Wirdum>interesting.

00:27:47.110 --> 00:27:47.390
<v Sjors Provoost>Yes.

00:27:47.510 --> 00:27:53.270
<v Aaron van Wirdum>I think. So this is about UTXO selection in the

00:27:53.270 --> 00:27:59.190
<v Aaron van Wirdum>wallet. And there's a new algorithm, as I understand it, called CoinGrinder. Is

00:27:59.190 --> 00:27:59.930
<v Aaron van Wirdum>it a new algorithm?

00:28:00.750 --> 00:28:01.230
<v Sjors Provoost>Yes.

00:28:01.590 --> 00:28:05.310
<v Aaron van Wirdum>Right. So this is about you want to send coins from your wallet and then your

00:28:05.310 --> 00:28:10.470
<v Aaron van Wirdum>wallet has to decide which coins to use. And there's like a way to determine

00:28:10.470 --> 00:28:13.090
<v Aaron van Wirdum>which UTXOs, which coins it's going to use.

00:28:13.350 --> 00:28:13.510
<v Sjors Provoost>Yeah.

00:28:13.670 --> 00:28:15.290
<v Aaron van Wirdum>So what's new about CoinGrinder?

00:28:15.610 --> 00:28:18.990
<v Sjors Provoost>Yeah. So a little bit of a background on coin selection. The initial coin

00:28:18.990 --> 00:28:23.190
<v Sjors Provoost>selection it was built in was using something called the Knapsack algorithm,

00:28:23.190 --> 00:28:27.880
<v Sjors Provoost>which I guess is what it sounds like. You have a bag and you want to put a bunch

00:28:27.880 --> 00:28:31.340
<v Sjors Provoost>of stones in it from different sizes. And the question is, how do you

00:28:31.340 --> 00:28:35.300
<v Sjors Provoost>optimally... What's the maximum number of stones you can fit into the bag or a

00:28:35.300 --> 00:28:38.840
<v Sjors Provoost>problem like that? If you only put the big stones in, then you have lots of room

00:28:38.840 --> 00:28:42.720
<v Sjors Provoost>left. If you only put the small stones in, then it's not efficient either.

00:28:43.040 --> 00:28:47.880
<v Aaron van Wirdum>The analogy here would be a lot of room left is a lot of change, right? But

00:28:47.880 --> 00:28:48.700
<v Aaron van Wirdum>that's not really a problem.

00:28:48.820 --> 00:28:52.680
<v Sjors Provoost>Yeah, I don't know. Well, the problem is, in this case, if you use lots of very

00:28:52.680 --> 00:28:57.590
<v Sjors Provoost>small coins, then you're paying lots of fees because every coin you put into a

00:28:57.590 --> 00:29:01.410
<v Sjors Provoost>transaction increases the fees. And that general problem is the knapsack problem,

00:29:01.410 --> 00:29:06.090
<v Sjors Provoost>if my computer science understanding is correctly. It's correct, and that's

00:29:06.090 --> 00:29:10.650
<v Sjors Provoost>unsolvable. There's no perfect solution. You can just approximately solve it.

00:29:10.750 --> 00:29:12.350
<v Aaron van Wirdum>It's one of these hard problems, right?

00:29:12.510 --> 00:29:18.490
<v Sjors Provoost>Yes. So there were other algorithms. Branch and bound was one. I don't

00:29:18.490 --> 00:29:22.590
<v Sjors Provoost>actually know exactly how it works, but it boils down to it. It tries to find a

00:29:22.590 --> 00:29:27.350
<v Sjors Provoost>reasonable set of coins to put into the bag to spend with, but not necessarily

00:29:27.350 --> 00:29:28.610
<v Sjors Provoost>the cheapest one.

00:29:28.890 --> 00:29:33.970
<v Aaron van Wirdum>Branch and bound try to optimize for not having any change, I think, right?

00:29:34.740 --> 00:29:35.500
<v Sjors Provoost>I think,

00:29:36.730 --> 00:29:42.230
<v Sjors Provoost>yeah, that's as little waste as possible. So I think we do want to have change.

00:29:42.490 --> 00:29:48.070
<v Sjors Provoost>Well, I think either it tries to find a coin that just spends it directly. That's

00:29:48.070 --> 00:29:52.510
<v Sjors Provoost>nice if you don't need change at all. But otherwise, you actually, if you do have

00:29:52.510 --> 00:29:54.790
<v Sjors Provoost>change, then you don't want to have the absolute minimum amount of change.

00:29:56.430 --> 00:29:58.170
<v Aaron van Wirdum>You don't? I mean, it's just one.

00:29:58.170 --> 00:29:59.010
<v Sjors Provoost>No, because of privacy.

00:29:59.030 --> 00:30:00.590
<v Aaron van Wirdum>Change is also one UTXO, right?

00:30:00.890 --> 00:30:05.200
<v Sjors Provoost>Yeah, but for privacy reasons, you don't want to reveal which side is change. And

00:30:05.200 --> 00:30:09.220
<v Sjors Provoost>so it deliberately spends a bit more and creates higher change.

00:30:09.360 --> 00:30:11.720
<v Aaron van Wirdum>Oh, I remember that. Yeah, we mentioned that in the earlier episode.

00:30:11.820 --> 00:30:15.140
<v Sjors Provoost>I don't know if that is actually dependent on the algorithm used, whether you use

00:30:15.140 --> 00:30:18.160
<v Sjors Provoost>Knapsack or Branch and Bound or this other one. It might just be something that

00:30:18.160 --> 00:30:21.940
<v Sjors Provoost>we do anyway. And then there's a different algorithm to find coins based on that

00:30:21.940 --> 00:30:25.780
<v Sjors Provoost>choice. I don't actually know that much about coin selection. Should ask Murch.

00:30:25.880 --> 00:30:29.540
<v Sjors Provoost>He wrote a whole thesis on it. And he also designed this algorithm.

00:30:29.720 --> 00:30:31.380
<v Aaron van Wirdum>It's kind of a science of its own.

00:30:31.380 --> 00:30:34.220
<v Sjors Provoost>Yeah, there's all sorts of trade-offs, right? For privacy reasons, you want to

00:30:34.220 --> 00:30:36.600
<v Sjors Provoost>maybe have a bit more change than you really need.

00:30:38.040 --> 00:30:43.400
<v Sjors Provoost>But also, there's a time preference element here where the cheapest transaction

00:30:43.400 --> 00:30:48.640
<v Sjors Provoost>right now, so using the fewest coins as possible, that's great now, but in the

00:30:48.640 --> 00:30:52.040
<v Sjors Provoost>long run, it's going to create lots of very small coins in your wallet, and then

00:30:52.040 --> 00:30:53.140
<v Sjors Provoost>eventually you have to pay.

00:30:54.380 --> 00:30:58.820
<v Sjors Provoost>So normally the wallet does not try to find the very cheapest transaction. It

00:30:58.820 --> 00:31:03.880
<v Sjors Provoost>tries to also act in your own long-term interest. However, and this is where the

00:31:03.880 --> 00:31:08.900
<v Sjors Provoost>new algorithm CoinGrinder comes in, if fees are very high, which in this case is

00:31:08.900 --> 00:31:14.180
<v Sjors Provoost>defined as more than 30 sats per byte, but you can change that, then it's going

00:31:14.180 --> 00:31:16.140
<v Sjors Provoost>to find the cheapest way to spend it.

00:31:19.180 --> 00:31:22.260
<v Sjors Provoost>So it's going to ignore the future. It's going to say, okay, right now fees are

00:31:22.260 --> 00:31:25.580
<v Sjors Provoost>high. Hopefully they'll go down again in the future. I'm just going to do

00:31:25.580 --> 00:31:27.040
<v Sjors Provoost>whatever's cheap because otherwise...

00:31:27.040 --> 00:31:30.820
<v Aaron van Wirdum>I can make this payment with using only one UTXO, so that's what I'm going to do

00:31:30.820 --> 00:31:31.960
<v Aaron van Wirdum>because that's the cheapest way.

00:31:32.240 --> 00:31:35.680
<v Sjors Provoost>Yeah, because there were situations where fees were 600 sats per byte and the

00:31:35.680 --> 00:31:39.080
<v Sjors Provoost>Bitcoin Core wallet was like, oh, let me spend 25 coins now.

00:31:40.060 --> 00:31:40.420
<v Aaron van Wirdum>Right.

00:31:40.580 --> 00:31:43.020
<v Sjors Provoost>And then you were paying, I don't know, hundreds of dollars in fees.

00:31:43.580 --> 00:31:48.730
<v Aaron van Wirdum>Right. Okay, so it does that if... fees are 30

00:31:48.730 --> 00:31:50.490
<v Aaron van Wirdum>vbytes per...

00:31:50.490 --> 00:31:51.950
<v Sjors Provoost>30 sats per vbyte or more.

00:31:52.050 --> 00:31:55.330
<v Aaron van Wirdum>[unclear]. But you say you can adjust that manually?

00:31:55.630 --> 00:31:57.750
<v Sjors Provoost>Yeah, I believe there's a setting. It's specified in the [unclear].

00:31:57.810 --> 00:32:03.050
<v Aaron van Wirdum>It's not just an algorithmically changing thing, but for now...

00:32:03.050 --> 00:32:08.110
<v Sjors Provoost>No, I guess the problem is what is high depends on the exchange rate and also

00:32:08.110 --> 00:32:09.530
<v Sjors Provoost>depends on the long-term fee rates.

00:32:12.150 --> 00:32:17.320
<v Sjors Provoost>Because if fees will never go below 30, then you should really... not use this

00:32:17.320 --> 00:32:20.260
<v Sjors Provoost>algorithm even at 30. It's really designed for spikes.

00:32:21.530 --> 00:32:22.610
<v Sjors Provoost>But what is a spike?

00:32:22.870 --> 00:32:28.340
<v Aaron van Wirdum>Well, I mean, there's probably some way... Murch, if you're listening, we need an

00:32:28.340 --> 00:32:31.400
<v Aaron van Wirdum>algorithm to algorithmically adjust your algorithm.

00:32:32.490 --> 00:32:36.430
<v Sjors Provoost>Yeah, well, one of the problems is that if you're not running your node all the

00:32:36.430 --> 00:32:41.210
<v Sjors Provoost>time, you don't necessarily know what the fee rates are historically. Because if

00:32:41.210 --> 00:32:43.890
<v Sjors Provoost>you only look at what's in blocks, you could be fooled by the miners into

00:32:43.890 --> 00:32:48.230
<v Sjors Provoost>thinking fees are higher than they are. So it's a very tricky problem.

00:32:48.510 --> 00:32:52.290
<v Aaron van Wirdum>Yeah. Anyway, so that's in Bitcoin Core 27 now.

00:32:52.570 --> 00:32:53.070
<v Sjors Provoost>That's right.

00:32:53.250 --> 00:32:59.190
<v Aaron van Wirdum>So if fees go up, then this will sort of click on in the

00:32:59.190 --> 00:33:02.230
<v Aaron van Wirdum>same way that everything in your home Sjors clicks on automatically.

00:33:02.410 --> 00:33:02.810
<v Sjors Provoost>Exactly.

00:33:03.230 --> 00:33:07.610
<v Aaron van Wirdum>For those that don't know that, Sjors doesn't like touching things, so he has

00:33:07.610 --> 00:33:08.670
<v Aaron van Wirdum>everything automated.

00:33:09.310 --> 00:33:11.350
<v Sjors Provoost>And spend more time maintaining it.

00:33:12.220 --> 00:33:16.960
<v Aaron van Wirdum>It's like Doc from Back to the Future where feeding the dog is automated.

00:33:18.200 --> 00:33:18.680
<v Sjors Provoost>Exactly.

00:33:21.670 --> 00:33:25.010
<v Aaron van Wirdum>I think that's it for our episode, right?

00:33:25.310 --> 00:33:28.070
<v Sjors Provoost>Yeah, I think we should mention there is a testing guide. Hopefully we'll

00:33:28.070 --> 00:33:32.910
<v Sjors Provoost>remember to put that in the show notes, which takes you by the hand and explains

00:33:32.910 --> 00:33:37.590
<v Sjors Provoost>if you wanted to test this new version, ideally with fake coins, testnet coins,

00:33:37.710 --> 00:33:42.380
<v Sjors Provoost>signet coins. It'll tell you how to do that. And that's nice because we prefer it

00:33:42.380 --> 00:33:46.700
<v Sjors Provoost>when people find bugs before the release is final. So help is welcome.

00:33:47.360 --> 00:33:52.960
<v Aaron van Wirdum>Okay, one other quick question. I also saw, so there's also new releases, like

00:33:52.960 --> 00:33:58.320
<v Aaron van Wirdum>26.1. I saw, what's the point of that actually right now?

00:33:58.320 --> 00:34:01.840
<v Sjors Provoost>Yeah, so let's say, you know, you're really passionate about libbitcoinconsensus.

00:34:02.160 --> 00:34:02.460
<v Aaron van Wirdum>Uh-huh.

00:34:02.860 --> 00:34:05.880
<v Sjors Provoost>And, well, in this case, that doesn't matter because it's still in there, but

00:34:05.880 --> 00:34:07.080
<v Sjors Provoost>let's say it's removed.

00:34:07.300 --> 00:34:11.320
<v Aaron van Wirdum>Well, or you're very passionate about using hardware wallets on Bitcoin Core with

00:34:11.320 --> 00:34:12.920
<v Aaron van Wirdum>the thing on Windows.

00:34:13.260 --> 00:34:19.030
<v Sjors Provoost>Yes. Exactly. If that's your passion, you can use an

00:34:19.030 --> 00:34:23.110
<v Sjors Provoost>older, instead of only using the old release, which probably has bugs in it,

00:34:23.330 --> 00:34:29.130
<v Sjors Provoost>there is a 0.1, 0.2, etc. that only fixes bugs in that

00:34:29.130 --> 00:34:31.030
<v Sjors Provoost>earlier release, but doesn't add any of the new features.

00:34:31.330 --> 00:34:32.870
<v Aaron van Wirdum>Okay, there's a new old release.

00:34:33.620 --> 00:34:39.600
<v Sjors Provoost>Yeah, so this is quite typical in software development. You have a major version

00:34:39.600 --> 00:34:44.540
<v Sjors Provoost>that's released, and then there'll be backports for older versions. So something

00:34:44.540 --> 00:34:49.860
<v Sjors Provoost>like Python, you might have version Python 3.7.9, but also

00:34:49.860 --> 00:34:55.840
<v Sjors Provoost>3.6.12 and 3.5.11, whatever it is. So this is indeed

00:34:55.840 --> 00:35:01.620
<v Sjors Provoost>to not force you into using the latest and greatest version. but also not saying,

00:35:01.740 --> 00:35:04.720
<v Sjors Provoost>oh, well, if you use the old version, you can have all the bugs in it. It's a bit

00:35:04.720 --> 00:35:07.780
<v Sjors Provoost>subjective what goes into these backport releases.

00:35:09.750 --> 00:35:13.730
<v Sjors Provoost>Of course, because usually the more relevant bugs.

00:35:15.320 --> 00:35:20.440
<v Aaron van Wirdum>Anyways, [unclear] get Bitcoin Core 27. Get up to date, get the newest,

00:35:20.790 --> 00:35:26.230
<v Aaron van Wirdum>the shiny release soon to be found on bitcoincore.org

00:35:26.230 --> 00:35:30.290
<v Sjors Provoost>or wherever you find Bitcoin nodes. Thank you for listening to Bitcoin,

00:35:30.910 --> 00:35:31.650
<v Aaron van Wirdum>Explained.

