WEBVTT

00:00:13.140 --> 00:00:15.840
<v Sjors Provoost>So with that, I think we should say...

00:00:16.000 --> 00:00:18.440
<v Aaron van Wirdum>Live from Amsterdam, this is Bitcoin.

00:00:17.890 --> 00:00:19.730
<v Sjors Provoost>Explained.

00:00:18.440 --> 00:00:20.240
<v Aaron van Wirdum>Hey, Sjors.

00:00:20.240 --> 00:00:20.680
<v Sjors Provoost>Hello.

00:00:20.680 --> 00:00:24.380
<v Aaron van Wirdum>This is the first time I can say that without lying.

00:00:24.980 --> 00:00:25.720
<v Sjors Provoost>Hey, Sjors?

00:00:25.720 --> 00:00:27.640
<v Aaron van Wirdum>No, yeah well, no, that we're live.

00:00:27.960 --> 00:00:29.280
<v Aaron van Wirdum>That's that.

00:00:28.060 --> 00:00:28.760
<v Sjors Provoost>Oh, okay.

00:00:28.940 --> 00:00:29.160
<v Sjors Provoost>Yes.

00:00:29.280 --> 00:00:33.320
<v Aaron van Wirdum>So I don't know if you even remember why I started saying that.

00:00:33.680 --> 00:00:35.100
<v Sjors Provoost>Why, you said live from Utrecht?

00:00:34.980 --> 00:00:38.180
<v Aaron van Wirdum>Yeah, I mean, we never actually record live, right?

00:00:35.300 --> 00:00:35.640
<v Sjors Provoost>Yes.

00:00:38.280 --> 00:00:41.200
<v Aaron van Wirdum>It's always recorded and even edited and...

00:00:41.480 --> 00:00:47.020
<v Aaron van Wirdum>But yeah, CK at the time, our manager at Bitcoin Magazine, he said we needed a...

00:00:47.020 --> 00:00:50.120
<v Aaron van Wirdum>That was the only pointer we got from him when we made our podcast.

00:00:50.320 --> 00:00:55.120
<v Aaron van Wirdum>He said you need a way, like a standard way to open the podcast and a standard way

00:00:55.120 --> 00:00:56.060
<v Aaron van Wirdum>to close the podcast.

00:00:56.280 --> 00:00:59.100
<v Aaron van Wirdum>And otherwise, you know, you have free reign.

00:00:59.320 --> 00:01:00.660
<v Aaron van Wirdum>And we didn't prepare anything.

00:01:00.800 --> 00:01:03.440
<v Aaron van Wirdum>And I think at the time was just the first thing that came to mind.

00:01:03.580 --> 00:01:04.300
<v Aaron van Wirdum>So we stuck with it.

00:01:03.840 --> 00:01:08.320
<v Sjors Provoost>Well, the first episode we ever recorded was a complete flop because we didn't

00:01:08.320 --> 00:01:08.780
<v Sjors Provoost>prepare it.

00:01:09.060 --> 00:01:12.920
<v Sjors Provoost>Because we thought like, ah, PSBT bugs in hardware wallets, that's not too

00:01:12.920 --> 00:01:13.380
<v Sjors Provoost>complicated.

00:01:13.380 --> 00:01:14.660
<v Sjors Provoost>We can explain it off the cuff.

00:01:14.900 --> 00:01:18.140
<v Sjors Provoost>And like within two sentences, it was like, I have no idea how this works.

00:01:18.440 --> 00:01:19.280
<v Aaron van Wirdum>Oh, that's right.

00:01:19.420 --> 00:01:20.280
<v Aaron van Wirdum>And also...

00:01:20.800 --> 00:01:26.420
<v Aaron van Wirdum>I think the original concept for our podcast, we wanted to do two

00:01:26.420 --> 00:01:27.780
<v Aaron van Wirdum>topics per episode.

00:01:28.860 --> 00:01:34.780
<v Aaron van Wirdum>We want to do two topics per episode and because I at that time I was still kind

00:01:34.780 --> 00:01:38.640
<v Aaron van Wirdum>of working as technical editor I was still on my late sort of stage of being the

00:01:38.640 --> 00:01:43.620
<v Aaron van Wirdum>technical editor before writing a book and becoming editor-in-chief and and so I

00:01:43.620 --> 00:01:48.100
<v Aaron van Wirdum>was still covering technical stuff like very regularly and I think the original

00:01:48.100 --> 00:01:50.740
<v Aaron van Wirdum>idea was I will explain a topic you will explain a

00:01:50.740 --> 00:01:55.020
<v Aaron van Wirdum>topic to me and I'll explain a topic to you because sometimes maybe I had something

00:01:55.020 --> 00:01:56.140
<v Aaron van Wirdum>that you didn't know

00:01:55.780 --> 00:01:58.200
<v Sjors Provoost>You had an idea of explaining a topic to me?

00:01:58.000 --> 00:02:00.300
<v Aaron van Wirdum>Yeah, you don't even remember.

00:02:01.360 --> 00:02:03.200
<v Aaron van Wirdum>That's how far we drifted from that.

00:02:03.360 --> 00:02:06.620
<v Aaron van Wirdum>We completely abandoned that concept and now it's just me.

00:02:07.380 --> 00:02:09.560
<v Aaron van Wirdum>Sjors knows everything and I know nothing basically.

00:02:09.840 --> 00:02:15.540
<v Sjors Provoost>Well, you do know a lot, but the recipe is usually we have like a call before and

00:02:15.540 --> 00:02:16.500
<v Sjors Provoost>we did that today as well.

00:02:17.090 --> 00:02:21.470
<v Sjors Provoost>to kind of go through it a bit and then hopefully the real thing will be better,

00:02:21.610 --> 00:02:22.850
<v Sjors Provoost>but we'll see how it goes.

00:02:22.770 --> 00:02:24.510
<v Aaron van Wirdum>Yeah, and just out of interest.

00:02:24.830 --> 00:02:30.520
<v Aaron van Wirdum>So I assume most people have at least listened to it.

00:02:30.560 --> 00:02:33.060
<v Aaron van Wirdum>Is there anyone in the room that has never listened to our podcast?

00:02:33.280 --> 00:02:34.520
<v Aaron van Wirdum>That doesn't know our podcast?

00:02:34.920 --> 00:02:39.160
<v Aaron van Wirdum>Okay, that's actually unsurprisingly, but it's still a big number.

00:02:38.010 --> 00:02:41.630
<v Sjors Provoost>It also doesn't add up because I asked the opposite question and we got like 10

00:02:41.630 --> 00:02:41.990
<v Sjors Provoost>hands.

00:02:42.850 --> 00:02:48.770
<v Aaron van Wirdum>so a lot of neutrals is there anyone who knew that we do

00:02:43.150 --> 00:02:44.690
<v Sjors Provoost>So a lot of people have good OPSEC.

00:02:48.770 --> 00:02:53.670
<v Aaron van Wirdum>still make a podcast sometimes because we used to make it like weekly at one point

00:02:53.670 --> 00:02:58.350
<v Aaron van Wirdum>and now it's three or four a year maybe anyway okay so

00:02:57.260 --> 00:03:00.600
<v Sjors Provoost>Yeah, I mean, part of the problem was just it became exponentially...

00:03:00.600 --> 00:03:04.340
<v Sjors Provoost>In the beginning, we did episodes about topics that I already knew something about,

00:03:04.210 --> 00:03:06.370
<v Aaron van Wirdum>yeah yeah

00:03:04.380 --> 00:03:08.480
<v Sjors Provoost>but at some point you run out, and then I had to spend like a day preparing the

00:03:08.480 --> 00:03:12.320
<v Sjors Provoost>podcast, which makes no sense unless you're like Peter McCormack famous.

00:03:13.060 --> 00:03:18.140
<v Aaron van Wirdum>yeah yeah and and also we want to make it in person and I haven't been living in

00:03:16.760 --> 00:03:17.200
<v Sjors Provoost>Yes,

00:03:18.140 --> 00:03:23.330
<v Aaron van Wirdum>the netherlands for the last year and a half two years so that doesn't help So

00:03:23.330 --> 00:03:25.030
<v Aaron van Wirdum>anyways, we'll make a new episode.

00:03:25.190 --> 00:03:30.330
<v Aaron van Wirdum>So yeah, the general concept for those to know basically every episode we pick a

00:03:30.330 --> 00:03:34.610
<v Aaron van Wirdum>topic about Bitcoin, a technical topic that we then explain.

00:03:36.360 --> 00:03:40.980
<v Aaron van Wirdum>And or we've also made, so now actually most of our podcasts are if there's a new

00:03:40.980 --> 00:03:45.340
<v Aaron van Wirdum>Bitcoin Core release and then we kind of go over what's new in the new Bitcoin Core

00:03:45.340 --> 00:03:45.680
<v Aaron van Wirdum>release.

00:03:46.000 --> 00:03:47.740
<v Aaron van Wirdum>That's what we'll be doing today, right?

00:03:47.610 --> 00:03:47.990
<v Sjors Provoost>exactly.

00:03:48.200 --> 00:03:50.300
<v Aaron van Wirdum>So we're going to talk about Bitcoin Core 32.

00:03:50.680 --> 00:03:54.000
<v Aaron van Wirdum>I don't even, is it even, is it released?

00:03:50.690 --> 00:03:51.490
<v Sjors Provoost>Point one,

00:03:53.710 --> 00:03:54.690
<v Sjors Provoost>yes.

00:03:54.200 --> 00:03:55.140
<v Aaron van Wirdum>I don't even know that.

00:03:55.260 --> 00:03:55.980
<v Aaron van Wirdum>When was it released?

00:03:55.810 --> 00:03:59.090
<v Sjors Provoost>So v32.0 was never released.

00:03:59.990 --> 00:04:03.310
<v Sjors Provoost>V32.1 was released, I don't know, two weeks ago, one week ago.

00:04:03.570 --> 00:04:07.650
<v Aaron van Wirdum>Okay, so we actually, I didn't even know this, but it's a good timing to make this

00:04:07.650 --> 00:04:08.070
<v Aaron van Wirdum>podcast.

00:04:07.770 --> 00:04:08.310
<v Sjors Provoost>Yes.

00:04:08.290 --> 00:04:10.130
<v Aaron van Wirdum>That's right, because we planned it a while ago.

00:04:09.940 --> 00:04:10.680
<v Sjors Provoost>Yes.

00:04:10.890 --> 00:04:16.150
<v Aaron van Wirdum>But we, Bitcoin Core comes out every like six months is, so we could at least make

00:04:16.150 --> 00:04:17.530
<v Aaron van Wirdum>a good estimate.

00:04:18.010 --> 00:04:22.610
<v Aaron van Wirdum>Yeah, so the way we make these episodes is we go through the release notes of

00:04:22.610 --> 00:04:26.450
<v Aaron van Wirdum>Bitcoin Core, we write down the...

00:04:26.600 --> 00:04:31.120
<v Aaron van Wirdum>four or five maybe six topics that sort of are more interesting because there's

00:04:31.120 --> 00:04:34.740
<v Aaron van Wirdum>always a bunch of bug fixes and there's always a bunch of stuff that you can't

00:04:34.740 --> 00:04:39.600
<v Aaron van Wirdum>really talk much about although in this episode we will talk about some bug fixes

00:04:36.470 --> 00:04:37.210
<v Sjors Provoost>Yes.

00:04:39.600 --> 00:04:45.420
<v Aaron van Wirdum>because they're particularly relevant but we'll start out So we, again, we picked

00:04:41.250 --> 00:04:41.990
<v Sjors Provoost>Yes.

00:04:45.420 --> 00:04:48.500
<v Aaron van Wirdum>out like a handful of topics that are interesting

00:04:48.500 --> 00:04:53.420
<v Aaron van Wirdum>enough, at least for those that are interested in this kind of stuff, to talk about

00:04:53.420 --> 00:04:53.700
<v Aaron van Wirdum>a bit.

00:04:53.940 --> 00:04:57.280
<v Aaron van Wirdum>And then mostly Sjors will do the explaining and I'll do the asking questions.

00:04:58.110 --> 00:04:59.050
<v Sjors Provoost>Sounds good.

00:04:58.140 --> 00:04:58.380
<v Aaron van Wirdum>Good?

00:04:58.820 --> 00:04:59.420
<v Aaron van Wirdum>You're ready?

00:04:59.110 --> 00:05:00.070
<v Sjors Provoost>Go for it.

00:04:59.920 --> 00:05:00.360
<v Aaron van Wirdum>Okay.

00:05:00.920 --> 00:05:03.880
<v Aaron van Wirdum>So the first one we wrote down is proof of work.

00:05:04.420 --> 00:05:06.600
<v Aaron van Wirdum>I can't even read my own handwriting.

00:05:07.200 --> 00:05:08.320
<v Sjors Provoost>Proof work with Tor.

00:05:07.580 --> 00:05:08.660
<v Aaron van Wirdum>Proof of work defenses.

00:05:09.530 --> 00:05:11.210
<v Aaron van Wirdum>Yeah, so there's, okay, go on.

00:05:09.830 --> 00:05:10.190
<v Sjors Provoost>Yeah.

00:05:11.340 --> 00:05:12.080
<v Sjors Provoost>So.

00:05:11.370 --> 00:05:12.970
<v Aaron van Wirdum>I'll hand you the floor.

00:05:13.020 --> 00:05:15.560
<v Sjors Provoost>So everybody presumably knows the Tor network.

00:05:16.640 --> 00:05:22.370
<v Sjors Provoost>They've been under attack quite a lot in recent years by, well, they have some

00:05:22.370 --> 00:05:25.430
<v Sjors Provoost>suspicions of who these people are, but it doesn't really matter.

00:05:25.790 --> 00:05:27.470
<v Sjors Provoost>Their network is constantly under attack.

00:05:27.620 --> 00:05:28.700
<v Aaron van Wirdum>What is the attack?

00:05:29.230 --> 00:05:33.890
<v Sjors Provoost>Basically a DOS, denial of service, so your Tor node, especially your hidden

00:05:33.890 --> 00:05:37.930
<v Sjors Provoost>service sites, becomes unreachable or you can't connect to something, and that's

00:05:37.930 --> 00:05:38.410
<v Sjors Provoost>kind of annoying.

00:05:39.030 --> 00:05:39.930
<v Sjors Provoost>And remember that...

00:05:39.220 --> 00:05:43.060
<v Aaron van Wirdum>Yeah, so you're running a Tor node or a Bitcoin node, I guess, over Tor and you

00:05:43.060 --> 00:05:45.120
<v Aaron van Wirdum>just get tons of connection requests.

00:05:44.690 --> 00:05:50.030
<v Sjors Provoost>Yeah, so on Tor you are you know as a consumer you are browsing stuff on Tor

00:05:50.030 --> 00:05:55.030
<v Sjors Provoost>network or outside and There are websites on Tor called the darknet But a Bitcoin

00:05:55.030 --> 00:05:59.530
<v Sjors Provoost>node can actually be like a darknet website as in you can be reachable on Tor as a

00:05:59.530 --> 00:06:00.010
<v Sjors Provoost>hidden service

00:06:01.310 --> 00:06:05.450
<v Sjors Provoost>And yeah, so the Tor project itself came up with a solution, or at least a partial

00:06:05.450 --> 00:06:06.630
<v Sjors Provoost>solution, called Proof of Work.

00:06:07.350 --> 00:06:08.710
<v Sjors Provoost>We're familiar with this idea.

00:06:09.710 --> 00:06:14.190
<v Sjors Provoost>It's not one difficulty, I believe.

00:06:14.410 --> 00:06:19.590
<v Sjors Provoost>It's just every node for themselves decides how much they want the clients to work.

00:06:19.790 --> 00:06:22.310
<v Sjors Provoost>And that's sort of a way for them to rate limit the attack.

00:06:22.430 --> 00:06:25.270
<v Sjors Provoost>Makes the attack just more expensive, because the attacker has to do a bunch of

00:06:25.270 --> 00:06:25.530
<v Sjors Provoost>work.

00:06:25.790 --> 00:06:27.950
<v Sjors Provoost>Whereas the legitimate users can do it.

00:06:26.730 --> 00:06:30.770
<v Aaron van Wirdum>And the work like in Bitcoin, it just means you have to make a bunch of hashes

00:06:30.770 --> 00:06:35.780
<v Aaron van Wirdum>until you come up with like a valid hash as determined by your node, like how many

00:06:33.540 --> 00:06:34.800
<v Sjors Provoost>Yeah, I don't know if it's a hash.

00:06:35.780 --> 00:06:36.580
<v Aaron van Wirdum>zeros it needs.

00:06:36.620 --> 00:06:39.520
<v Sjors Provoost>Yeah, I don't know what exactly the proof of work they use.

00:06:39.740 --> 00:06:41.580
<v Sjors Provoost>Probably not SHA-256 or something else.

00:06:42.900 --> 00:06:44.120
<v Sjors Provoost>But yeah, that's the idea.

00:06:45.260 --> 00:06:49.720
<v Sjors Provoost>And now Bitcoin Core, because it can also be a listening Tor node, if you have that

00:06:49.720 --> 00:06:52.280
<v Sjors Provoost>installed, it will turn that feature on.

00:06:52.860 --> 00:06:56.100
<v Sjors Provoost>So there's nothing that Bitcoin Core is doing other than telling the Tor software,

00:06:56.220 --> 00:06:56.940
<v Sjors Provoost>like, use this.

00:06:57.660 --> 00:07:01.960
<v Aaron van Wirdum>Right, okay, so I'm using Bitcoin Core over Tor and you are using Bitcoin Core over

00:07:01.960 --> 00:07:07.380
<v Aaron van Wirdum>Tor, let's say I want to connect to your node and now I have to do some, my node

00:07:07.380 --> 00:07:12.020
<v Aaron van Wirdum>has to do some work in order for that connection to be accepted by you.

00:07:11.850 --> 00:07:16.990
<v Sjors Provoost>Yeah, your Tor software has to do some work for my Tor software to

00:07:12.440 --> 00:07:16.320
<v Aaron van Wirdum>Yeah, right.

00:07:16.990 --> 00:07:18.990
<v Sjors Provoost>let the nodes talk to each other.

00:07:19.110 --> 00:07:21.590
<v Sjors Provoost>So the nodes don't really bother with any of this.

00:07:21.730 --> 00:07:23.610
<v Sjors Provoost>It's the underlying Tor software that's doing it.

00:07:26.550 --> 00:07:31.590
<v Aaron van Wirdum>Why do you think because I wrote a book right on the prehistory of Bitcoin so also

00:07:31.590 --> 00:07:35.970
<v Aaron van Wirdum>about the invention of proof-of-work which Adam Back at least a Bitcoin version of

00:07:35.970 --> 00:07:40.630
<v Aaron van Wirdum>it was invented by Adam Back and for him at the time he saw proof-of-work kind of

00:07:40.630 --> 00:07:46.590
<v Aaron van Wirdum>as a stopgap until digital cash was invented as a way to make a payment

00:07:46.590 --> 00:07:48.390
<v Aaron van Wirdum>basically right but you have to

00:07:48.390 --> 00:07:53.630
<v Aaron van Wirdum>prove work so wouldn't it be much cooler if Tor actually starts to use Bitcoin now

00:07:53.630 --> 00:07:58.590
<v Aaron van Wirdum>that Bitcoin exists and then you send a couple of sats to a node in order to be

00:07:58.590 --> 00:08:01.510
<v Aaron van Wirdum>connected so we can skip that proof of work aspect.

00:08:01.720 --> 00:08:03.240
<v Sjors Provoost>If I take your question...

00:08:02.030 --> 00:08:05.350
<v Aaron van Wirdum>Why don't you lobby the Tor project to implement that?

00:08:05.270 --> 00:08:08.310
<v Sjors Provoost>Well, your question was, would it be cooler?

00:08:08.550 --> 00:08:10.590
<v Aaron van Wirdum>Yes, agreed.

00:08:08.630 --> 00:08:09.570
<v Sjors Provoost>And the answer is yes.

00:08:10.650 --> 00:08:14.190
<v Sjors Provoost>The question is, would it be easier?

00:08:14.410 --> 00:08:15.870
<v Sjors Provoost>And the answer is absolutely not.

00:08:16.610 --> 00:08:20.490
<v Sjors Provoost>So the Bitcoin proof of work itself is ridiculously simple, right?

00:08:20.550 --> 00:08:24.350
<v Sjors Provoost>You just count the number of zeros before the hash or some equivalent problem.

00:08:24.950 --> 00:08:29.690
<v Sjors Provoost>And like I said in the introduction here, we don't need...

00:08:30.750 --> 00:08:32.270
<v Sjors Provoost>global coordination of the proof of work.

00:08:32.410 --> 00:08:36.290
<v Sjors Provoost>So in Bitcoin, the complexity is in coordinating all the nodes to agree on what the

00:08:36.290 --> 00:08:37.850
<v Sjors Provoost>proof of work is, what the difficulty is.

00:08:38.470 --> 00:08:40.570
<v Sjors Provoost>As far as I know, for Tor, it's a local thing.

00:08:40.690 --> 00:08:41.930
<v Sjors Provoost>Your node is getting dosed.

00:08:42.230 --> 00:08:43.810
<v Sjors Provoost>It just increases the proof of work.

00:08:44.230 --> 00:08:46.410
<v Sjors Provoost>until the DOS becomes manageable.

00:08:47.150 --> 00:08:51.630
<v Sjors Provoost>That's not a coordination problem, so it's just much easier to do that way.

00:08:52.270 --> 00:08:57.730
<v Sjors Provoost>I could imagine one day perhaps them using something like ecash because, yes, they

00:08:57.730 --> 00:09:00.330
<v Sjors Provoost>could use Lightning, but the problem with Lightning is now you need to have your

00:09:00.330 --> 00:09:04.010
<v Sjors Provoost>Tor network, have the Lightning channels routing across the Tor network, but you

00:09:04.010 --> 00:09:04.890
<v Sjors Provoost>have this chicken-egg problem.

00:09:04.930 --> 00:09:10.190
<v Sjors Provoost>If your Tor network goes down, you can't pay somebody to bypass the DOS, but ecash

00:09:10.190 --> 00:09:12.950
<v Sjors Provoost>would bypass it, but ecash, as in Cashu, is...

00:09:13.170 --> 00:09:13.710
<v Sjors Provoost>custodial.

00:09:15.070 --> 00:09:16.470
<v Sjors Provoost>But it could help here.

00:09:16.610 --> 00:09:19.610
<v Sjors Provoost>And I think there's also a philosophical difference, which could be a legal

00:09:19.610 --> 00:09:19.970
<v Sjors Provoost>difference.

00:09:20.430 --> 00:09:24.070
<v Sjors Provoost>Right now, the Tor network is entirely volunteer run.

00:09:24.490 --> 00:09:28.610
<v Sjors Provoost>As soon as you start paying people, governments have opinions about that that are

00:09:28.610 --> 00:09:30.190
<v Sjors Provoost>different than when you're not paying people.

00:09:30.790 --> 00:09:33.130
<v Sjors Provoost>Although, you know, we've seen that not always work out.

00:09:33.340 --> 00:09:34.140
<v Aaron van Wirdum>Yeah, okay.

00:09:34.420 --> 00:09:37.380
<v Aaron van Wirdum>TLDR, it's just much easier to use proof of work and that's new.

00:09:36.900 --> 00:09:41.140
<v Sjors Provoost>In theory, your nodes on Tor should now be better reachable when there's a DOS

00:09:41.140 --> 00:09:41.400
<v Sjors Provoost>attack.

00:09:41.600 --> 00:09:43.680
<v Sjors Provoost>But I haven't looked at any measurements here.

00:09:43.640 --> 00:09:44.100
<v Aaron van Wirdum>Right.

00:09:44.380 --> 00:09:46.360
<v Aaron van Wirdum>Okay, next point then.

00:09:46.600 --> 00:09:51.240
<v Aaron van Wirdum>I believe this isn't even a new thing, but we decided to include it anyways.

00:09:52.520 --> 00:09:56.400
<v Aaron van Wirdum>So it has to do with CJDNS.

00:09:56.390 --> 00:09:56.970
<v Sjors Provoost>That's right.

00:09:56.720 --> 00:09:58.360
<v Aaron van Wirdum>Okay, explain.

00:09:58.360 --> 00:09:59.740
<v Sjors Provoost>I have no idea what it is.

00:09:59.740 --> 00:10:00.420
<v Aaron van Wirdum>Yeah.

00:10:00.380 --> 00:10:06.080
<v Sjors Provoost>Apparently it's something like Tor and I2P, like a privacy network, using a

00:10:06.080 --> 00:10:06.820
<v Sjors Provoost>different mechanism.

00:10:07.420 --> 00:10:12.320
<v Sjors Provoost>The main issue, and Bitcoin Core added support for that years ago, and apparently

00:10:12.320 --> 00:10:16.260
<v Sjors Provoost>very few people use it, and it does add complexity to the code base.

00:10:16.480 --> 00:10:21.240
<v Sjors Provoost>So the call to action to Bitcoin Core users is, if you like this feature,

00:10:21.660 --> 00:10:24.980
<v Sjors Provoost>speak out, because otherwise we might disappear it.

00:10:25.150 --> 00:10:25.930
<v Aaron van Wirdum>Right, okay.

00:10:26.050 --> 00:10:30.890
<v Aaron van Wirdum>So it's another potential privacy layer for Bitcoin Core that you can use.

00:10:31.110 --> 00:10:35.870
<v Aaron van Wirdum>It is available now, but because it's so little use, there's now an open question

00:10:35.870 --> 00:10:37.310
<v Aaron van Wirdum>like, should we even keep this?

00:10:37.280 --> 00:10:40.540
<v Sjors Provoost>Yeah, so if you have like three peers on the network, it's not...

00:10:37.950 --> 00:10:42.210
<v Aaron van Wirdum>And so what if one person says, I love cjdns.

00:10:42.530 --> 00:10:45.270
<v Aaron van Wirdum>Is it then going to stay or what's the...

00:10:45.270 --> 00:10:47.130
<v Aaron van Wirdum>How is this decision going to be made?

00:10:45.340 --> 00:10:49.380
<v Sjors Provoost>My guess is then that person would have to fix all the bugs related to it.

00:10:49.720 --> 00:10:51.840
<v Sjors Provoost>And if they do that, then it might stay.

00:10:52.110 --> 00:10:52.750
<v Aaron van Wirdum>All right.

00:10:52.500 --> 00:10:55.080
<v Sjors Provoost>I haven't looked into details, but that's typically how it goes.

00:10:53.610 --> 00:10:54.730
<v Aaron van Wirdum>So it's part...

00:10:55.180 --> 00:10:58.660
<v Sjors Provoost>If you want a feature to stay, then you should take some responsibility.

00:11:00.350 --> 00:11:03.170
<v Sjors Provoost>If you want a feature to stay and you're not willing to do the work, then it will

00:11:03.170 --> 00:11:03.850
<v Sjors Provoost>definitely go away.

00:11:04.390 --> 00:11:06.850
<v Sjors Provoost>If you are willing to do the work, then it might not go away.

00:11:06.670 --> 00:11:07.370
<v Aaron van Wirdum>Right.

00:11:07.950 --> 00:11:08.470
<v Aaron van Wirdum>Yeah.

00:11:08.040 --> 00:11:11.980
<v Sjors Provoost>This is also how Windows survives and the wallet survives and the GUI survives and

00:11:11.980 --> 00:11:14.920
<v Sjors Provoost>all these things that there's always people that want to get rid of it because it's

00:11:14.920 --> 00:11:18.920
<v Sjors Provoost>extra stuff But then there's people say no don't take it away from me and I'll

00:11:18.920 --> 00:11:22.020
<v Sjors Provoost>maintain it and then that's how it stays in Then

00:11:21.640 --> 00:11:26.900
<v Aaron van Wirdum>Yeah, I told you this in the preparation, but I think I randomly know this guy from

00:11:26.900 --> 00:11:28.340
<v Aaron van Wirdum>years ago.

00:11:28.780 --> 00:11:31.620
<v Aaron van Wirdum>I was at a conference and I just slept at his place.

00:11:31.820 --> 00:11:32.420
<v Aaron van Wirdum>He offered me...

00:11:32.420 --> 00:11:34.240
<v Aaron van Wirdum>I had no idea what CJDNS was.

00:11:34.360 --> 00:11:35.660
<v Aaron van Wirdum>I had no idea who the guy was.

00:11:35.880 --> 00:11:38.300
<v Aaron van Wirdum>But it's like now 10 years later, I come across this.

00:11:38.420 --> 00:11:39.280
<v Aaron van Wirdum>I know that guy.

00:11:39.480 --> 00:11:40.440
<v Aaron van Wirdum>I think his name is Caleb.

00:11:41.120 --> 00:11:43.240
<v Aaron van Wirdum>Maybe I should reach out to him and ask about this.

00:11:41.380 --> 00:11:43.000
<v Sjors Provoost>you should maybe talk to him.

00:11:43.120 --> 00:11:43.760
<v Sjors Provoost>Yeah, exactly.

00:11:43.760 --> 00:11:44.300
<v Aaron van Wirdum>Should I?

00:11:44.420 --> 00:11:46.080
<v Aaron van Wirdum>Is that something you would want?

00:11:47.080 --> 00:11:48.300
<v Sjors Provoost>It sounds like...

00:11:47.130 --> 00:11:48.330
<v Aaron van Wirdum>I think I know the guy.

00:11:48.300 --> 00:11:51.300
<v Sjors Provoost>He should pitch it.

00:11:48.470 --> 00:11:50.410
<v Aaron van Wirdum>I think I have his number randomly again.

00:11:51.520 --> 00:11:51.620
<v Sjors Provoost>Yeah.

00:11:52.680 --> 00:11:54.600
<v Aaron van Wirdum>Okay, let's move on to the next topic.

00:11:52.780 --> 00:11:53.220
<v Sjors Provoost>Okay.

00:11:53.620 --> 00:11:54.060
<v Sjors Provoost>Oh,

00:11:56.670 --> 00:11:57.070
<v Aaron van Wirdum>Increase...

00:11:57.070 --> 00:12:00.390
<v Aaron van Wirdum>Jeez, my handwriting and the light also does help.

00:12:01.530 --> 00:12:04.860
<v Aaron van Wirdum>Increase inbound activity.

00:12:05.480 --> 00:12:06.660
<v Sjors Provoost>you're going slightly different.

00:12:06.100 --> 00:12:07.160
<v Aaron van Wirdum>Is that the next one?

00:12:06.900 --> 00:12:09.200
<v Sjors Provoost>You're not doing lib event or is that later on your list?

00:12:09.410 --> 00:12:09.930
<v Aaron van Wirdum>What's that?

00:12:09.780 --> 00:12:12.460
<v Sjors Provoost>There should be one about libevent still, HTTP.

00:12:12.520 --> 00:12:13.540
<v Aaron van Wirdum>Am I skipping one?

00:12:13.450 --> 00:12:14.790
<v Sjors Provoost>Yes, there's another.

00:12:14.620 --> 00:12:15.680
<v Aaron van Wirdum>Sorry, what am I skipping?

00:12:16.540 --> 00:12:20.980
<v Sjors Provoost>Removing libevent in favor of HTTP ourselves.

00:12:21.490 --> 00:12:22.770
<v Aaron van Wirdum>That's the next one on my list.

00:12:22.970 --> 00:12:24.810
<v Sjors Provoost>Well, it's in the theme of removing things.

00:12:26.000 --> 00:12:26.540
<v Sjors Provoost>Okay.

00:12:26.040 --> 00:12:26.840
<v Aaron van Wirdum>Okay, yeah, go.

00:12:27.060 --> 00:12:27.600
<v Aaron van Wirdum>Okay, sure.

00:12:27.780 --> 00:12:28.160
<v Aaron van Wirdum>We can skip.

00:12:28.850 --> 00:12:33.160
<v Sjors Provoost>So we have a bunch of dependencies in Bitcoin Core.

00:12:33.460 --> 00:12:34.940
<v Sjors Provoost>One of them is called libevent.

00:12:35.100 --> 00:12:36.040
<v Sjors Provoost>It's a very old library.

00:12:36.440 --> 00:12:38.100
<v Sjors Provoost>It helps us...

00:12:38.440 --> 00:12:40.000
<v Sjors Provoost>to HTTP stuff.

00:12:40.240 --> 00:12:43.740
<v Sjors Provoost>You might ask yourself, what is Bitcoin Core doing that has anything to do with

00:12:43.740 --> 00:12:44.000
<v Sjors Provoost>HTTP?

00:12:44.180 --> 00:12:48.640
<v Sjors Provoost>Well, we have something called the RPC, which is the way your node talks to any

00:12:48.640 --> 00:12:50.360
<v Sjors Provoost>kind of other software, typically.

00:12:49.580 --> 00:12:49.880
<v Aaron van Wirdum>Yeah.

00:12:51.540 --> 00:12:55.080
<v Aaron van Wirdum>Which could be wallets, which could be applications, which could be...

00:12:52.820 --> 00:12:56.420
<v Sjors Provoost>Which could be external wallets, can be your lightning node, probably.

00:12:56.400 --> 00:13:00.220
<v Aaron van Wirdum>Yeah, just if you want your node to talk with anything else and that's what you

00:13:00.220 --> 00:13:00.640
<v Aaron van Wirdum>would use

00:13:01.320 --> 00:13:02.680
<v Sjors Provoost>Anything else on your computer?

00:13:02.630 --> 00:13:03.590
<v Aaron van Wirdum>Yeah,

00:13:02.920 --> 00:13:03.200
<v Sjors Provoost>Yes.

00:13:03.780 --> 00:13:07.840
<v Sjors Provoost>So your computer, so your Bitcoin node spins up a little web server that speaks

00:13:07.840 --> 00:13:12.460
<v Sjors Provoost>JSON and it gets a command like get blockchain info and it replies, you know, this

00:13:12.460 --> 00:13:13.500
<v Sjors Provoost>is the height, this is etc.

00:13:14.260 --> 00:13:18.420
<v Sjors Provoost>So it's a very simple web server and that web server is powered by LibEvent.

00:13:18.600 --> 00:13:20.280
<v Sjors Provoost>I think LibEvent was also doing some other things.

00:13:20.920 --> 00:13:23.380
<v Sjors Provoost>But now we've taken the essence.

00:13:24.020 --> 00:13:26.680
<v Sjors Provoost>that we need, the HTTP part.

00:13:26.820 --> 00:13:29.220
<v Sjors Provoost>We implemented that and threw away lib event.

00:13:29.440 --> 00:13:30.640
<v Sjors Provoost>So fewer dependencies.

00:13:31.100 --> 00:13:33.840
<v Sjors Provoost>Now we have to maintain some HTTP server code.

00:13:34.020 --> 00:13:36.320
<v Sjors Provoost>But apparently, that trade-off is worth it.

00:13:36.100 --> 00:13:41.080
<v Aaron van Wirdum>yeah, explain why is few I mean for those that don't know why is fewer dependencies

00:13:41.080 --> 00:13:41.500
<v Aaron van Wirdum>better?

00:13:41.720 --> 00:13:43.000
<v Aaron van Wirdum>Why are dependencies a problem?

00:13:43.060 --> 00:13:47.460
<v Sjors Provoost>We did a whole episode about dependencies in general, with multiple reasons.

00:13:47.600 --> 00:13:52.380
<v Sjors Provoost>Dependencies are software maintained by other people, and other people could put

00:13:52.380 --> 00:13:54.920
<v Sjors Provoost>backdoors in them, so that's one reason.

00:13:55.260 --> 00:14:00.780
<v Sjors Provoost>But also, our software, Bitcoin Core, keeps modernizing in terms of the code,

00:14:01.000 --> 00:14:03.260
<v Sjors Provoost>so using newer versions of C++, etc.

00:14:04.250 --> 00:14:10.070
<v Sjors Provoost>And if your dependencies are not also modernizing, then you kind of have a problem,

00:14:10.110 --> 00:14:13.790
<v Sjors Provoost>because you have to maintain compatibility with some older ways of doing things.

00:14:14.250 --> 00:14:18.150
<v Sjors Provoost>That can be a reason, or it can just cause all sorts of bugs that are difficult to

00:14:18.150 --> 00:14:18.710
<v Sjors Provoost>debug.

00:14:19.770 --> 00:14:24.950
<v Sjors Provoost>So a reason to get rid of dependencies can be security, can be easier maintenance,

00:14:25.590 --> 00:14:28.450
<v Sjors Provoost>and just reducing complexity, those kind of arguments.

00:14:28.630 --> 00:14:32.270
<v Sjors Provoost>I'm not sure about the exact argument here, but yeah.

00:14:28.680 --> 00:14:30.180
<v Aaron van Wirdum>Yes Yeah,

00:14:33.020 --> 00:14:37.760
<v Aaron van Wirdum>so as much as possible we would want Bitcoin Core to be standalone software that

00:14:37.760 --> 00:14:40.720
<v Aaron van Wirdum>doesn't require Right,

00:14:38.990 --> 00:14:43.310
<v Sjors Provoost>Yeah, but there is a trade-off because if you implement everything yourself, that

00:14:43.310 --> 00:14:47.010
<v Sjors Provoost>is more work, first of all, but also you might not be the best at it, right?

00:14:47.090 --> 00:14:48.710
<v Sjors Provoost>You have specialization of labor in the world.

00:14:48.850 --> 00:14:53.250
<v Sjors Provoost>Some people are very good at writing HTTP servers and other people are not.

00:14:53.410 --> 00:14:58.550
<v Sjors Provoost>And the HTTP server in Bitcoin Core that we have written now is not the best one in

00:14:58.550 --> 00:14:58.850
<v Sjors Provoost>the world.

00:14:59.050 --> 00:15:03.710
<v Sjors Provoost>In fact, it is the worst one in the world because it is trying to do only what it

00:15:03.710 --> 00:15:06.230
<v Sjors Provoost>needs to talk to these other pieces of software.

00:15:06.730 --> 00:15:12.630
<v Sjors Provoost>It is not trying to power, I don't know, NSA.gov or some super popular

00:15:12.630 --> 00:15:12.970
<v Sjors Provoost>website.

00:15:13.290 --> 00:15:16.730
<v Sjors Provoost>So it's not designed to be fast or amazing.

00:15:16.890 --> 00:15:18.630
<v Sjors Provoost>It's just designed to be simple.

00:15:19.720 --> 00:15:21.600
<v Aaron van Wirdum>okay in any case Right,

00:15:19.750 --> 00:15:24.530
<v Sjors Provoost>And to run on a somewhat trusted environment because RPC is usually not something

00:15:24.530 --> 00:15:25.950
<v Sjors Provoost>you expose to the internet.

00:15:25.950 --> 00:15:29.750
<v Sjors Provoost>You just expose it on your own computer to your own software or your own Docker

00:15:29.750 --> 00:15:31.010
<v Sjors Provoost>container or something like that.

00:15:31.880 --> 00:15:36.060
<v Aaron van Wirdum>okay in any case so this this dependency is now removed in the new version of

00:15:35.590 --> 00:15:36.150
<v Sjors Provoost>Gone.

00:15:36.060 --> 00:15:42.020
<v Aaron van Wirdum>Bitcoin it's gone yes all right and so then let's so then I

00:15:37.610 --> 00:15:38.470
<v Sjors Provoost>It's gone.

00:15:42.020 --> 00:15:45.340
<v Aaron van Wirdum>have the increase inbound activity point

00:15:46.010 --> 00:15:46.570
<v Sjors Provoost>Yes.

00:15:47.130 --> 00:15:51.410
<v Sjors Provoost>Okay, so Bitcoin Core connects to nodes when you start it up.

00:15:51.470 --> 00:15:55.750
<v Sjors Provoost>It tries to connect to about eight peers in general for everything, and then two

00:15:55.750 --> 00:15:58.790
<v Sjors Provoost>peers just for blocks, not for mempool stuff.

00:15:56.700 --> 00:16:02.630
<v Aaron van Wirdum>mm-hmm yeah so eight peers for

00:15:59.590 --> 00:16:00.110
<v Sjors Provoost>And

00:16:02.630 --> 00:16:04.970
<v Aaron van Wirdum>blocks and transactions and two for only blocks

00:16:03.980 --> 00:16:09.640
<v Sjors Provoost>depending on if you're on a data center or at home and your router allows it, it

00:16:09.640 --> 00:16:11.340
<v Sjors Provoost>also listens to peers.

00:16:11.340 --> 00:16:12.940
<v Sjors Provoost>We've done some episodes about that.

00:16:13.520 --> 00:16:16.180
<v Sjors Provoost>It will listen to at most 125.

00:16:17.180 --> 00:16:18.540
<v Sjors Provoost>peers that can connect to you.

00:16:18.720 --> 00:16:23.680
<v Sjors Provoost>Again, if they can get through your router and to you, it is up to 125.

00:16:24.700 --> 00:16:26.860
<v Sjors Provoost>That number has now gone up to 200.

00:16:27.180 --> 00:16:29.880
<v Sjors Provoost>So number go up, even if the market doesn't go up, number go up.

00:16:30.340 --> 00:16:31.360
<v Sjors Provoost>There is a catch.

00:16:33.040 --> 00:16:38.760
<v Sjors Provoost>These extra nodes are only used for block relay, not for mempool relay.

00:16:38.890 --> 00:16:44.750
<v Aaron van Wirdum>the 75 extra block peers are only used for blocks that you will only share blocks

00:16:43.350 --> 00:16:45.900
<v Sjors Provoost>Yeah, exactly.

00:16:44.750 --> 00:16:50.130
<v Aaron van Wirdum>with them no transactions right and why was this change made or why wasn't it

00:16:50.130 --> 00:16:52.590
<v Aaron van Wirdum>already the case or why now yeah

00:16:51.390 --> 00:16:55.230
<v Sjors Provoost>So relaying blocks takes a lot less bandwidth, because most of the time nothing

00:16:55.230 --> 00:16:57.570
<v Sjors Provoost>happens, and then suddenly something happens.

00:16:58.090 --> 00:17:00.730
<v Sjors Provoost>And these block announcements are the most important things.

00:17:01.110 --> 00:17:02.850
<v Sjors Provoost>You really need to know what the next block is.

00:17:02.870 --> 00:17:06.030
<v Sjors Provoost>If you miss a few mempool transactions, this is not a big deal, or if you get them

00:17:06.030 --> 00:17:06.470
<v Sjors Provoost>a bit later.

00:17:08.680 --> 00:17:13.520
<v Sjors Provoost>But the reason why we're doing this now is because later on we want to start

00:17:13.520 --> 00:17:15.480
<v Sjors Provoost>connecting to more of these nodes.

00:17:16.130 --> 00:17:20.030
<v Sjors Provoost>So remember we have now eight, I believe it's eight regular outbounds and then two

00:17:20.030 --> 00:17:21.130
<v Sjors Provoost>ones that are blocks only.

00:17:21.710 --> 00:17:27.150
<v Sjors Provoost>We want to increase that to maybe 10 blocks only so we get a better view of the

00:17:27.150 --> 00:17:27.550
<v Sjors Provoost>network.

00:17:28.290 --> 00:17:32.390
<v Sjors Provoost>But you don't want to do that until the listening side is actually able to because

00:17:32.390 --> 00:17:34.550
<v Sjors Provoost>right now a lot of nodes are just full.

00:17:34.650 --> 00:17:38.130
<v Sjors Provoost>You connect to them and they just say like, sorry, or they hang up on somebody

00:17:38.130 --> 00:17:38.370
<v Sjors Provoost>else.

00:17:39.410 --> 00:17:44.790
<v Aaron van Wirdum>it still sounds very out of out of whack almost so you have 10 outgoing connections

00:17:44.790 --> 00:17:46.730
<v Aaron van Wirdum>and 200 incoming now

00:17:46.030 --> 00:17:49.750
<v Sjors Provoost>Yeah, but keep in mind that the number of nodes that are listening is much smaller

00:17:49.750 --> 00:17:52.630
<v Sjors Provoost>than the number of nodes that are connecting outwards because a lot of nodes are

00:17:52.630 --> 00:17:55.710
<v Sjors Provoost>running on home networks that are protected by a router.

00:17:56.150 --> 00:17:57.370
<v Sjors Provoost>So there's an asymmetry there.

00:17:57.470 --> 00:17:59.390
<v Sjors Provoost>That's why the number has to be asymmetric too.

00:17:59.270 --> 00:18:03.150
<v Aaron van Wirdum>right okay and but as a [unclear: boiler] right

00:18:01.490 --> 00:18:03.290
<v Sjors Provoost>And there's a big trust difference.

00:18:03.410 --> 00:18:06.330
<v Sjors Provoost>So you might say, well, if you just have all these incoming nodes that give you

00:18:06.330 --> 00:18:07.070
<v Sjors Provoost>blocks, you're happy.

00:18:07.730 --> 00:18:11.810
<v Sjors Provoost>But in general, we trust nodes that we connect to more than nodes that connect to

00:18:11.810 --> 00:18:12.070
<v Sjors Provoost>us.

00:18:12.270 --> 00:18:17.730
<v Sjors Provoost>If you go to a strange city and some guy approaches you and says, hey, I'm your

00:18:17.730 --> 00:18:19.690
<v Sjors Provoost>tour guide, you don't trust that guy.

00:18:20.550 --> 00:18:23.990
<v Sjors Provoost>But if you approach somebody randomly and say, where is the New York Stock

00:18:23.990 --> 00:18:24.350
<v Sjors Provoost>Exchange?

00:18:24.650 --> 00:18:28.390
<v Sjors Provoost>You will trust the answer from that person because you selected them and not the

00:18:28.390 --> 00:18:28.910
<v Sjors Provoost>other way around.

00:18:29.390 --> 00:18:29.650
<v Aaron van Wirdum>right

00:18:29.590 --> 00:18:32.010
<v Sjors Provoost>But they might trick you into thinking you selected them.

00:18:32.230 --> 00:18:35.670
<v Sjors Provoost>And that gets to the whole issue of eclipse attacks that we talked about many, many

00:18:35.670 --> 00:18:36.290
<v Sjors Provoost>episodes ago.

00:18:37.210 --> 00:18:43.010
<v Aaron van Wirdum>Yeah, well, without going into that in detail, if we boil down the

00:18:43.010 --> 00:18:44.990
<v Aaron van Wirdum>benefit here, that is the benefit, right?

00:18:45.670 --> 00:18:50.390
<v Aaron van Wirdum>If you connect to more nodes, there's a smaller chance that all nodes are lying and

00:18:50.390 --> 00:18:54.570
<v Aaron van Wirdum>therefore that you're being censored and somehow that you're not seeing all the new

00:18:53.770 --> 00:18:54.250
<v Sjors Provoost>Yes.

00:18:54.570 --> 00:18:57.290
<v Aaron van Wirdum>blocks or all the new transactions or something like that.

00:18:56.270 --> 00:18:56.750
<v Sjors Provoost>Yes.

00:18:57.370 --> 00:19:00.470
<v Aaron van Wirdum>So in that sense, number go up is in fact actually better.

00:19:01.020 --> 00:19:01.500
<v Sjors Provoost>Yes.

00:19:01.490 --> 00:19:02.010
<v Aaron van Wirdum>Correct?

00:19:01.940 --> 00:19:02.420
<v Sjors Provoost>Yeah.

00:19:02.800 --> 00:19:06.900
<v Sjors Provoost>But we have to make the listening number go up before we can increase the number of

00:19:02.810 --> 00:19:04.050
<v Aaron van Wirdum>That's ultimately the benefit.

00:19:06.900 --> 00:19:08.020
<v Sjors Provoost>nodes that we connect to.

00:19:08.140 --> 00:19:09.440
<v Sjors Provoost>So that'll be in some later release.

00:19:09.530 --> 00:19:15.530
<v Aaron van Wirdum>right right okay yeah we're moving past our topics swiftly which

00:19:15.530 --> 00:19:21.010
<v Aaron van Wirdum>I like the next point I have is oh yeah this one so fetch

00:19:21.010 --> 00:19:25.410
<v Aaron van Wirdum>inputs in parallel this one gets pretty technical but it's a meaningful thing I

00:19:25.350 --> 00:19:25.830
<v Sjors Provoost>Yes.

00:19:25.410 --> 00:19:27.860
<v Aaron van Wirdum>think yeah

00:19:26.090 --> 00:19:30.870
<v Sjors Provoost>So when a new block comes in, we have to check that whole block.

00:19:31.410 --> 00:19:36.620
<v Sjors Provoost>And we basically check every transaction in a row or in sequence.

00:19:35.990 --> 00:19:37.670
<v Aaron van Wirdum>do the signatures check out

00:19:36.780 --> 00:19:41.200
<v Sjors Provoost>And for every transaction, we check the inputs first and then the outputs, roughly,

00:19:41.300 --> 00:19:41.560
<v Sjors Provoost>anyway.

00:19:42.090 --> 00:19:44.110
<v Sjors Provoost>How do you check an input, is then the question.

00:19:45.530 --> 00:19:48.850
<v Sjors Provoost>An input refers to a previous transaction, which was from a previous block.

00:19:49.430 --> 00:19:55.090
<v Sjors Provoost>And it has a script pub key, and that is stored in our UTXO set, at least in

00:19:55.090 --> 00:19:55.570
<v Sjors Provoost>Bitcoin Core.

00:19:55.890 --> 00:20:00.790
<v Sjors Provoost>So there's a file on our disk that is like 10 gigabytes these days, that has all

00:20:00.790 --> 00:20:04.900
<v Sjors Provoost>the still unspent outputs, basically, and the scripts.

00:20:04.940 --> 00:20:09.160
<v Aaron van Wirdum>It basically says who owns what without names of course, but just what is this

00:20:05.120 --> 00:20:05.880
<v Sjors Provoost>Yeah, it just

00:20:09.160 --> 00:20:12.100
<v Aaron van Wirdum>current state of balances on Bitcoin.

00:20:09.790 --> 00:20:11.250
<v Sjors Provoost>says...

00:20:12.300 --> 00:20:13.460
<v Aaron van Wirdum>I'm putting that in quote marks.

00:20:12.460 --> 00:20:14.940
<v Sjors Provoost>Yeah, the balance and the conditions that you can spend it with.

00:20:16.320 --> 00:20:18.500
<v Sjors Provoost>And those, we have to load them.

00:20:18.760 --> 00:20:24.000
<v Sjors Provoost>And right now, or before this change, what we would do is we would look at the

00:20:24.000 --> 00:20:27.860
<v Sjors Provoost>first transaction, the first input, we would fetch it, we would check it, then we

00:20:27.860 --> 00:20:31.020
<v Sjors Provoost>would load the second, and we would check it, and we would load the third, and we'd

00:20:31.020 --> 00:20:31.320
<v Sjors Provoost>check it.

00:20:31.520 --> 00:20:35.760
<v Sjors Provoost>And this change basically says we're going to optimistically, we're just going to

00:20:35.760 --> 00:20:40.520
<v Sjors Provoost>fetch all of them in a row, and while we're fetching them, we start checking them.

00:20:40.940 --> 00:20:42.420
<v Sjors Provoost>So it's like a zipper, basically.

00:20:43.540 --> 00:20:46.280
<v Sjors Provoost>And that just makes it much faster to validate a block.

00:20:46.400 --> 00:20:49.820
<v Sjors Provoost>I haven't looked at the numbers, but I think it's like tens of percents faster.

00:20:50.500 --> 00:20:54.080
<v Sjors Provoost>Because we're being less serial about things.

00:20:54.200 --> 00:20:55.220
<v Sjors Provoost>We're doing things more in parallel.

00:20:55.250 --> 00:21:01.110
<v Aaron van Wirdum>By doing more things at the same time, it's faster to check if a block is valid,

00:20:55.640 --> 00:20:55.940
<v Sjors Provoost>Yeah,

00:21:01.450 --> 00:21:01.810
<v Aaron van Wirdum>right?

00:21:02.040 --> 00:21:03.160
<v Sjors Provoost>exactly.

00:21:02.960 --> 00:21:05.280
<v Aaron van Wirdum>And the main benefit here...

00:21:05.560 --> 00:21:10.460
<v Aaron van Wirdum>I assume if you're syncing a node in particular.

00:21:10.760 --> 00:21:15.400
<v Aaron van Wirdum>So if you're starting out a new Bitcoin node, it can take hours or days depending

00:21:15.400 --> 00:21:16.040
<v Aaron van Wirdum>on your computer.

00:21:15.700 --> 00:21:16.180
<v Sjors Provoost>Exactly.

00:21:16.600 --> 00:21:18.800
<v Aaron van Wirdum>And this would speed that up by 10%.

00:21:19.110 --> 00:21:19.590
<v Sjors Provoost>Exactly.

00:21:19.310 --> 00:21:22.530
<v Aaron van Wirdum>Or roughly, you made a 10% estimate.

00:21:20.910 --> 00:21:23.370
<v Sjors Provoost>I don't know the number, but yeah, pretty dramatically.

00:21:23.950 --> 00:21:25.830
<v Sjors Provoost>The ultimate...

00:21:25.720 --> 00:21:29.180
<v Sjors Provoost>parallel software there, I think, is libbitcoin by Eric Voskuil.

00:21:29.060 --> 00:21:29.620
<v Aaron van Wirdum>Right.

00:21:29.300 --> 00:21:33.540
<v Sjors Provoost>He's always been sort of nagging Bitcoin Core about you guys are not doing things

00:21:33.540 --> 00:21:34.580
<v Sjors Provoost>in parallel enough.

00:21:34.980 --> 00:21:39.700
<v Sjors Provoost>And one way you can see that is if you have your node sync from the Genesis block

00:21:39.700 --> 00:21:44.920
<v Sjors Provoost>to now, and you look at it, and you look at the bandwidth it's using compared to

00:21:44.920 --> 00:21:45.700
<v Sjors Provoost>your internet speed.

00:21:45.860 --> 00:21:50.540
<v Sjors Provoost>So maybe you have a gigabit fiber connection, and maybe it's only downloading at 50

00:21:50.540 --> 00:21:51.340
<v Sjors Provoost>megabytes per second.

00:21:51.440 --> 00:21:53.840
<v Sjors Provoost>So you're like, well, it's definitely not limited by the bandwidth.

00:21:54.900 --> 00:22:00.860
<v Sjors Provoost>And you look at your CPUs, and you have 16 cores, and it's only using three at a

00:22:00.860 --> 00:22:02.820
<v Sjors Provoost>time, so it's not using all the cores.

00:22:03.340 --> 00:22:07.720
<v Sjors Provoost>And you're looking at your hard disk, and it's like a super fast SSD drive, but

00:22:07.720 --> 00:22:09.460
<v Sjors Provoost>it's not spinning at its maximum speed either.

00:22:09.760 --> 00:22:12.460
<v Sjors Provoost>So it's not using all its powers combined.

00:22:12.820 --> 00:22:14.260
<v Sjors Provoost>You'd want one of those three.

00:22:14.880 --> 00:22:16.400
<v Sjors Provoost>to be completely full.

00:22:16.620 --> 00:22:21.260
<v Sjors Provoost>So if you have a fast internet connection, then, you know, you would want to see

00:22:16.790 --> 00:22:17.350
<v Aaron van Wirdum>Ideally.

00:22:21.260 --> 00:22:24.160
<v Sjors Provoost>that internet connection just downloading blocks as fast as it can.

00:22:25.300 --> 00:22:28.900
<v Sjors Provoost>Or if, you know, your internet is very fast, but your CPU is not the fastest, then

00:22:28.900 --> 00:22:31.700
<v Sjors Provoost>you want your CPUs to be 100% with one of those three, and it's not.

00:22:31.920 --> 00:22:35.640
<v Sjors Provoost>And changes like this are making things more parallel, so that hopefully we can max

00:22:35.640 --> 00:22:37.240
<v Sjors Provoost>out at least one of the three.

00:22:37.520 --> 00:22:37.860
<v Aaron van Wirdum>Yeah.

00:22:38.740 --> 00:22:44.700
<v Aaron van Wirdum>I want to point out and emphasize that over the years, this is one of

00:22:44.700 --> 00:22:46.160
<v Aaron van Wirdum>Bitcoin's biggest challenges.

00:22:46.360 --> 00:22:47.500
<v Aaron van Wirdum>You have to...

00:22:47.510 --> 00:22:51.190
<v Aaron van Wirdum>Download the entire blockchain, validate every block, every transaction.

00:22:51.890 --> 00:22:54.230
<v Aaron van Wirdum>It's, you know, it's a hard problem.

00:22:54.530 --> 00:23:00.210
<v Aaron van Wirdum>And I think over the years, the work that Bitcoin Core developers do have

00:23:00.210 --> 00:23:04.310
<v Aaron van Wirdum>made it, have kept that a possibility, even for regular users.

00:23:04.580 --> 00:23:05.140
<v Sjors Provoost>Yeah, so

00:23:04.590 --> 00:23:10.370
<v Aaron van Wirdum>I think over the years, syncing has not become much slower just because constant

00:23:10.370 --> 00:23:14.430
<v Aaron van Wirdum>optimizations that I'm going to use this opportunity.

00:23:12.660 --> 00:23:16.660
<v Sjors Provoost>in 2017 I made a chart, okay?

00:23:15.230 --> 00:23:15.290
<v Aaron van Wirdum>Sure.

00:23:15.640 --> 00:23:20.300
<v Aaron van Wirdum>I'm going to use this opportunity as a live show to get the audience involved

00:23:20.300 --> 00:23:26.200
<v Aaron van Wirdum>because I do think this is the type of boring work that Bitcoin Core developers do

00:23:26.200 --> 00:23:30.340
<v Aaron van Wirdum>that keep Bitcoin absolutely usable for everyone.

00:23:30.640 --> 00:23:36.320
<v Aaron van Wirdum>And I think that deserves appreciation and really an applause for Sjors,

00:23:34.970 --> 00:23:35.730
<v Sjors Provoost>the [unclear: core devs?],

00:23:36.620 --> 00:23:41.520
<v Aaron van Wirdum>for guys like Sjors, for Bitcoin Core developers that are constantly working on

00:23:41.520 --> 00:23:44.820
<v Aaron van Wirdum>improving this type of work.

00:23:44.270 --> 00:23:46.070
<v Sjors Provoost>the excellent boring stuff.

00:23:46.350 --> 00:23:51.670
<v Aaron van Wirdum>Yeah, the boring stuff that no one else pays attention to, but it's so

00:23:46.410 --> 00:23:46.830
<v Sjors Provoost>Yeah,

00:23:51.670 --> 00:23:53.230
<v Aaron van Wirdum>vital that it happens.

00:23:53.310 --> 00:23:54.710
<v Sjors Provoost>and it's been going on for a long time.

00:23:54.870 --> 00:23:59.390
<v Sjors Provoost>So in 2017, I made a chart where what I did is I rented a bunch of these Amazon

00:23:59.390 --> 00:24:04.750
<v Sjors Provoost>machines, and I installed the oldest possible Bitcoin Core versions I could find,

00:24:04.830 --> 00:24:09.430
<v Sjors Provoost>or that I could still build, like 0.5, 0.6, 0.7, et cetera.

00:24:10.150 --> 00:24:11.910
<v Sjors Provoost>And I would just have it sync the whole blockchain.

00:24:12.210 --> 00:24:16.250
<v Sjors Provoost>And this was 10 years ago, so the blockchain was tiny relative to now, but it was

00:24:16.250 --> 00:24:16.990
<v Sjors Provoost>already considered big.

00:24:17.550 --> 00:24:21.770
<v Sjors Provoost>And, you know, the oldest node would not even sync ever, like, it would just not

00:24:21.770 --> 00:24:22.630
<v Sjors Provoost>make it.

00:24:23.690 --> 00:24:27.050
<v Sjors Provoost>But then eventually it might take, like, a whole day to sync the blockchain, and

00:24:27.050 --> 00:24:28.570
<v Sjors Provoost>the fastest nodes could do it in six hours.

00:24:28.870 --> 00:24:30.350
<v Sjors Provoost>So even then you could see the improvements.

00:24:30.590 --> 00:24:34.050
<v Sjors Provoost>But we kind of thought we'd maxed out on that, but we still haven't.

00:24:34.050 --> 00:24:36.610
<v Sjors Provoost>I think we can still sync two or three times faster.

00:24:38.290 --> 00:24:40.350
<v Sjors Provoost>But then, you know, at some point it's done.

00:24:40.630 --> 00:24:43.230
<v Sjors Provoost>At some point you have to deal with the fact that the blockchain keeps growing.

00:24:44.370 --> 00:24:49.490
<v Sjors Provoost>But back then, yeah, every time the blockchain kept getting bigger, but the node

00:24:49.490 --> 00:24:52.490
<v Sjors Provoost>kept getting faster, and it was sort of in balance there.

00:24:52.090 --> 00:24:52.610
<v Aaron van Wirdum>Yeah,

00:24:53.270 --> 00:24:55.310
<v Sjors Provoost>Like a Moore's law for Bitcoin core code.

00:24:55.570 --> 00:24:55.630
<v Aaron van Wirdum>right.

00:24:55.830 --> 00:25:00.050
<v Sjors Provoost>And then, of course, the critics would say, oh, we've got to increase the block

00:25:00.050 --> 00:25:00.370
<v Sjors Provoost>size.

00:25:00.510 --> 00:25:02.670
<v Sjors Provoost>It's like, well, we can barely keep up with this thing.

00:25:02.900 --> 00:25:08.850
<v Aaron van Wirdum>There was one more thing I want to say about this,

00:25:03.170 --> 00:25:04.470
<v Sjors Provoost>So maybe hold off a bit.

00:25:09.090 --> 00:25:10.010
<v Aaron van Wirdum>which I'm now forgetting.

00:25:10.360 --> 00:25:10.720
<v Sjors Provoost>Okay.

00:25:14.030 --> 00:25:15.970
<v Aaron van Wirdum>No, I think I'm blanking now.

00:25:16.210 --> 00:25:18.270
<v Aaron van Wirdum>Anyways, next topic then.

00:25:22.700 --> 00:25:25.160
<v Aaron van Wirdum>Okay, SEND is no longer experimental.

00:25:25.480 --> 00:25:27.620
<v Sjors Provoost>This is such a shameless plug of my own pull request.

00:25:26.750 --> 00:25:31.910
<v Aaron van Wirdum>Oh no, the thing I want to say is, so yeah, you mentioned that we do still have a

00:25:29.080 --> 00:25:29.520
<v Sjors Provoost>Oh,

00:25:31.910 --> 00:25:33.150
<v Aaron van Wirdum>lot of room for growth, right?

00:25:33.270 --> 00:25:38.830
<v Aaron van Wirdum>This is still a major, you know, part of the Bitcoin Core codebase, even now that

00:25:37.970 --> 00:25:38.410
<v Sjors Provoost>yes.

00:25:38.830 --> 00:25:41.570
<v Aaron van Wirdum>can, you know, be improved significantly, you think?

00:25:41.630 --> 00:25:43.110
<v Sjors Provoost>Yes, yeah, I think so.

00:25:42.470 --> 00:25:42.610
<v Aaron van Wirdum>Yeah.

00:25:43.190 --> 00:25:43.670
<v Aaron van Wirdum>Yeah.

00:25:43.470 --> 00:25:46.090
<v Sjors Provoost>And we know because libbitcoin is still faster.

00:25:46.400 --> 00:25:46.880
<v Aaron van Wirdum>Right.

00:25:47.200 --> 00:25:47.320
<v Aaron van Wirdum>Yeah.

00:25:47.210 --> 00:25:48.170
<v Sjors Provoost>But we'll catch up.

00:25:48.810 --> 00:25:49.270
<v Aaron van Wirdum>Eventually.

00:25:50.050 --> 00:25:50.330
<v Aaron van Wirdum>Okay.

00:25:50.910 --> 00:25:52.590
<v Aaron van Wirdum>SEND is no longer experimental.

00:25:52.830 --> 00:25:56.170
<v Sjors Provoost>Yeah, this is just a shameless plug for a simple pull request that I wrote.

00:25:56.110 --> 00:25:56.590
<v Aaron van Wirdum>Yeah.

00:25:56.890 --> 00:26:02.790
<v Sjors Provoost>Many, many years ago, I introduced the send RPC, which was just a more

00:26:02.790 --> 00:26:08.070
<v Sjors Provoost>modern way of doing what sendmany and sendtoaddress was doing, and also was sort of

00:26:08.070 --> 00:26:10.350
<v Sjors Provoost>a stepping stone towards working with hardware wallets.

00:26:11.930 --> 00:26:16.370
<v Sjors Provoost>And I marked it as experimental because we may want to break it, so people that are

00:26:16.370 --> 00:26:18.470
<v Sjors Provoost>relying on it should keep an eye on breaking changes.

00:26:18.850 --> 00:26:23.870
<v Sjors Provoost>But we haven't been making breaking changes in a long time, so I decided we should

00:26:23.870 --> 00:26:25.630
<v Sjors Provoost>not make it experimental, and people agree.

00:26:26.110 --> 00:26:28.570
<v Sjors Provoost>So nothing changed, it's just not experimental.

00:26:28.700 --> 00:26:29.180
<v Aaron van Wirdum>Right.

00:26:30.220 --> 00:26:31.840
<v Aaron van Wirdum>So that means it's staying,

00:26:33.110 --> 00:26:37.390
<v Sjors Provoost>It might be deleted entirely, but it's...

00:26:37.390 --> 00:26:37.710
<v Sjors Provoost>yeah.

00:26:38.610 --> 00:26:40.150
<v Aaron van Wirdum>not frivolously or what?

00:26:38.760 --> 00:26:42.500
<v Sjors Provoost>Things can still be deleted, but typically, when something is no longer

00:26:42.500 --> 00:26:45.860
<v Sjors Provoost>experimental, we're a little bit more like, okay, in this release we're deprecating

00:26:45.860 --> 00:26:47.640
<v Sjors Provoost>it, in the next release we're deleting it.

00:26:48.000 --> 00:26:50.820
<v Sjors Provoost>When something is experimental, things can happen more suddenly.

00:26:51.100 --> 00:26:53.100
<v Sjors Provoost>I don't think this is going away because it's useful.

00:26:54.300 --> 00:26:58.100
<v Sjors Provoost>Sending coins is something people like to do, even though they prefer to receive

00:26:58.100 --> 00:26:58.280
<v Sjors Provoost>them.

00:26:58.350 --> 00:27:03.390
<v Aaron van Wirdum>Then the last point of improvements when it comes to Bitcoin Core and then after

00:27:03.390 --> 00:27:06.790
<v Aaron van Wirdum>that we'll discuss some of the bugs that were found which is also interesting.

00:27:07.610 --> 00:27:11.630
<v Aaron van Wirdum>The last point of improvements which surprised me, it surprised me that this was

00:27:11.630 --> 00:27:17.410
<v Aaron van Wirdum>not a thing yet but there's now a watch-only function in Bitcoin Core,

00:27:17.360 --> 00:27:20.520
<v Sjors Provoost>Well, an export watch-only.

00:27:17.490 --> 00:27:18.390
<v Aaron van Wirdum>it has been added.

00:27:20.580 --> 00:27:21.920
<v Aaron van Wirdum>Yeah, yeah, right.

00:27:20.740 --> 00:27:24.220
<v Sjors Provoost>So, Bitcoin Cores had watch-only wallets for a very long time.

00:27:26.220 --> 00:27:30.660
<v Aaron van Wirdum>Watch-only wallet is basically a wallet that shows your balance and how many coins

00:27:30.660 --> 00:27:32.800
<v Aaron van Wirdum>you have, but you just can't spend from it.

00:27:32.960 --> 00:27:36.720
<v Aaron van Wirdum>Which also means that if you're running that on your computer and someone hacks

00:27:36.720 --> 00:27:38.760
<v Aaron van Wirdum>into your computer, they can't spend from it either.

00:27:39.300 --> 00:27:43.320
<v Aaron van Wirdum>It's really a window in your wallet without being a wallet, right?

00:27:42.740 --> 00:27:47.880
<v Sjors Provoost>So a setup you could imagine is you take a laptop, you install Bitcoin Core on it,

00:27:48.280 --> 00:27:54.120
<v Sjors Provoost>You take it to the mountains, you generate your entropy correctly with

00:27:54.120 --> 00:27:59.120
<v Sjors Provoost>whatever you use and you leave it in the mountain and the laptop never goes online

00:27:59.120 --> 00:27:59.380
<v Sjors Provoost>again.

00:27:59.900 --> 00:28:02.920
<v Sjors Provoost>But you want to watch your balance, receive transactions, etc.

00:28:03.340 --> 00:28:06.240
<v Sjors Provoost>And for that you want a watch-only wallet.

00:28:06.460 --> 00:28:12.420
<v Sjors Provoost>And so the new thing is that in the GUI there is a button that says export watch

00:28:12.420 --> 00:28:16.800
<v Sjors Provoost>-only wallet and it produces for you, this watch-only wallet that you put on your

00:28:16.800 --> 00:28:20.620
<v Sjors Provoost>USB stick and take home and then use it to watch.

00:28:20.790 --> 00:28:21.270
<v Aaron van Wirdum>Yeah.

00:28:21.080 --> 00:28:22.660
<v Sjors Provoost>And you could already do this.

00:28:22.020 --> 00:28:25.200
<v Aaron van Wirdum>Well, you can also receive coins through it, right?

00:28:22.780 --> 00:28:23.660
<v Sjors Provoost>You could export the script.

00:28:25.160 --> 00:28:26.040
<v Sjors Provoost>Yeah, yeah, for sure.

00:28:25.400 --> 00:28:29.280
<v Aaron van Wirdum>You still have like a list of your addresses and yeah, so you can do that, you just

00:28:26.180 --> 00:28:27.220
<v Sjors Provoost>You can generate addresses.

00:28:27.900 --> 00:28:28.300
<v Sjors Provoost>Exactly.

00:28:29.280 --> 00:28:29.920
<v Aaron van Wirdum>can't spend.

00:28:30.460 --> 00:28:30.520
<v Sjors Provoost>Yeah.

00:28:30.480 --> 00:28:35.480
<v Aaron van Wirdum>So it's a way to, yeah, like I said, keep track of what you own, have a window and

00:28:33.360 --> 00:28:38.720
<v Sjors Provoost>But you can make, for example, a PSBT and then take the PSBT to the mountains,

00:28:39.060 --> 00:28:42.460
<v Sjors Provoost>sign it, and then take the PSBT back and send it to the internet.

00:28:39.290 --> 00:28:40.090
<v Aaron van Wirdum>then...

00:28:42.430 --> 00:28:43.790
<v Aaron van Wirdum>Right, right, yeah, okay.

00:28:44.210 --> 00:28:48.610
<v Aaron van Wirdum>So yeah, and the exact thing that's new is that you can now easily export it from

00:28:48.610 --> 00:28:49.450
<v Aaron van Wirdum>your GUI.

00:28:49.610 --> 00:28:51.090
<v Aaron van Wirdum>Yeah, cool.

00:28:51.630 --> 00:28:57.190
<v Aaron van Wirdum>Okay, yeah, so these were the main improvements of Bitcoin Core 32 that we decided

00:28:57.190 --> 00:28:57.650
<v Aaron van Wirdum>to highlight.

00:28:59.030 --> 00:29:02.930
<v Aaron van Wirdum>And then there's the whole, it's been a hot topic, right?

00:29:03.430 --> 00:29:08.750
<v Aaron van Wirdum>Recently in Bitcoin in general, the AI revolution is

00:29:08.750 --> 00:29:09.910
<v Aaron van Wirdum>upon us.

00:29:10.930 --> 00:29:13.890
<v Aaron van Wirdum>Everything and everyone is getting hacks left and right.

00:29:14.290 --> 00:29:20.190
<v Aaron van Wirdum>And that has also, apart from Bitcoin Core, I should add, so far,

00:29:18.560 --> 00:29:19.200
<v Sjors Provoost>So far.

00:29:20.370 --> 00:29:24.210
<v Aaron van Wirdum>well, I mean, not just Bitcoin Core, by the way, but at least Bitcoin Core seems

00:29:24.210 --> 00:29:25.550
<v Aaron van Wirdum>mostly fine.

00:29:25.730 --> 00:29:27.530
<v Aaron van Wirdum>Although there were some bugs, which we'll discuss.

00:29:28.080 --> 00:29:33.570
<v Aaron van Wirdum>But before we get to the actual bugs, there's also a new

00:29:33.570 --> 00:29:36.610
<v Aaron van Wirdum>disclosure policy.

00:29:36.500 --> 00:29:36.900
<v Sjors Provoost>Yes.

00:29:36.930 --> 00:29:39.250
<v Aaron van Wirdum>So Bitcoin Core developers have...

00:29:39.250 --> 00:29:43.590
<v Aaron van Wirdum>Well, maybe start by explaining what even is a disclosure policy for those that

00:29:43.590 --> 00:29:43.910
<v Aaron van Wirdum>don't know.

00:29:44.190 --> 00:29:47.070
<v Aaron van Wirdum>How would it usually have worked if a bug is found?

00:29:47.110 --> 00:29:49.210
<v Sjors Provoost>Yeah, well, you can go back a little bit further.

00:29:50.250 --> 00:29:52.510
<v Sjors Provoost>Bitcoin cores often have bugs in the past.

00:29:52.960 --> 00:29:53.720
<v Sjors Provoost>that were fixed.

00:29:54.300 --> 00:29:58.400
<v Sjors Provoost>And often those fixes were done a little bit covertly so that people would have

00:29:58.400 --> 00:30:00.220
<v Sjors Provoost>updated by the time they would learn about it.

00:30:00.740 --> 00:30:03.440
<v Sjors Provoost>But then we often just forgot to actually disclose them.

00:30:03.920 --> 00:30:07.940
<v Sjors Provoost>So a couple of years ago, we systematized the disclosure process where there's

00:30:07.940 --> 00:30:13.900
<v Sjors Provoost>actually people that keep lists and analyze these disclosures at the right

00:30:13.900 --> 00:30:14.240
<v Sjors Provoost>time.

00:30:14.580 --> 00:30:15.660
<v Sjors Provoost>What is the right time?

00:30:15.800 --> 00:30:18.020
<v Sjors Provoost>There was a policy for that, the disclosure policy.

00:30:18.980 --> 00:30:23.910
<v Sjors Provoost>If it's a high severity issue, It's disclosed after the release is end of life.

00:30:24.070 --> 00:30:27.390
<v Sjors Provoost>So that's typically two years after the release that contains a fix.

00:30:28.630 --> 00:30:32.490
<v Aaron van Wirdum>Yeah, so the bug is fixed, but it's only made public really.

00:30:29.010 --> 00:30:29.570
<v Sjors Provoost>Years

00:30:32.870 --> 00:30:38.730
<v Aaron van Wirdum>Like by the way, that was this pretty bad bad bug in older Bitcoin Core and

00:30:33.730 --> 00:30:35.130
<v Sjors Provoost>later.

00:30:38.730 --> 00:30:39.750
<v Aaron van Wirdum>this is what it was.

00:30:39.920 --> 00:30:40.480
<v Sjors Provoost>Yeah.

00:30:40.070 --> 00:30:45.890
<v Aaron van Wirdum>So the software, the patch was out, but the actual explanation was not yet,

00:30:46.100 --> 00:30:46.660
<v Sjors Provoost>Exactly.

00:30:46.250 --> 00:30:46.370
<v Aaron van Wirdum>right?

00:30:46.750 --> 00:30:48.510
<v Aaron van Wirdum>Yeah, and that's and that's for severe bugs.

00:30:47.080 --> 00:30:47.140
<v Sjors Provoost>Yeah.

00:30:49.210 --> 00:30:51.510
<v Sjors Provoost>And there's different severity levels.

00:30:51.710 --> 00:30:55.750
<v Sjors Provoost>So for lower severity bugs, they might be announced like two weeks after the

00:30:55.750 --> 00:30:57.270
<v Sjors Provoost>release itself.

00:30:57.770 --> 00:30:59.230
<v Sjors Provoost>Anyway, that was systematized.

00:30:59.490 --> 00:31:01.510
<v Sjors Provoost>But this was in the age before LLMs.

00:31:01.690 --> 00:31:06.010
<v Sjors Provoost>And the problem that we started seeing is that, and we'll have an example of that

00:31:06.010 --> 00:31:11.290
<v Sjors Provoost>soon, is that three people in a row reporting the same

00:31:11.290 --> 00:31:14.270
<v Sjors Provoost>vulnerability, all found with different LLMs.

00:31:14.960 --> 00:31:20.560
<v Aaron van Wirdum>Yeah, so there was a bug and somehow it got reported multiple

00:31:15.450 --> 00:31:17.130
<v Sjors Provoost>So basically, the LLMs are...

00:31:20.560 --> 00:31:22.520
<v Aaron van Wirdum>times, which is very unusual.

00:31:22.010 --> 00:31:25.490
<v Sjors Provoost>Which is an indication that this bug is way too easy to find because the number of

00:31:24.520 --> 00:31:25.080
<v Aaron van Wirdum>Right.

00:31:25.490 --> 00:31:28.110
<v Sjors Provoost>people that report it is not all the people that could see it.

00:31:29.410 --> 00:31:34.210
<v Sjors Provoost>Another way to judge that is if you know about a bug, somebody reports a bug, you

00:31:34.210 --> 00:31:37.290
<v Sjors Provoost>ask a subtle question to your LLM and it finds it.

00:31:37.590 --> 00:31:39.070
<v Sjors Provoost>You're like, okay, this is too easy to find.

00:31:39.350 --> 00:31:44.470
<v Sjors Provoost>So that is now a new class or a new category where we say

00:31:45.350 --> 00:31:51.290
<v Aaron van Wirdum>You could clearly see after the release of some new AI, Kimi I believe.

00:31:50.100 --> 00:31:55.260
<v Sjors Provoost>Kimi K3, the sort of Belgian-Korean K-pop band.

00:31:52.290 --> 00:31:55.490
<v Aaron van Wirdum>And then all of a sudden there were like several bug reports.

00:31:56.510 --> 00:31:59.110
<v Aaron van Wirdum>So that posed a challenge.

00:31:59.740 --> 00:32:04.180
<v Sjors Provoost>Yeah, so there the strategy of disclosing after two years is actually wrong because

00:32:04.180 --> 00:32:07.640
<v Sjors Provoost>all the bad guys will know about it and all the users won't know about it.

00:32:07.550 --> 00:32:13.050
<v Aaron van Wirdum>So what I just explained that the bug was fixed but it was not explained yet.

00:32:13.050 --> 00:32:18.690
<v Aaron van Wirdum>That doesn't really work anymore because now if there's some sort of fix someone

00:32:18.690 --> 00:32:19.570
<v Aaron van Wirdum>it will just...

00:32:20.060 --> 00:32:25.240
<v Aaron van Wirdum>people will pay attention or it's just easy to see something changed let's throw my

00:32:25.240 --> 00:32:29.940
<v Aaron van Wirdum>LLM at it and then all of a sudden everyone finds it so sort of keeping it a secret

00:32:28.020 --> 00:32:29.580
<v Sjors Provoost>Yeah, this comes back to...

00:32:29.940 --> 00:32:33.680
<v Aaron van Wirdum>doesn't really do anything anymore is that yeah

00:32:32.170 --> 00:32:33.250
<v Sjors Provoost>Roughly.

00:32:33.370 --> 00:32:38.690
<v Sjors Provoost>So one of the things is that when we fix something, usually the fixes are just done

00:32:38.690 --> 00:32:42.630
<v Sjors Provoost>on master and then every six months we make a new major release like we just

00:32:42.630 --> 00:32:43.770
<v Sjors Provoost>discussed version 32.

00:32:44.330 --> 00:32:48.830
<v Sjors Provoost>And so you can just, you know, if the bug is unknown, then it's fine to wait

00:32:48.830 --> 00:32:50.670
<v Sjors Provoost>several months and have the major release.

00:32:51.140 --> 00:32:53.700
<v Sjors Provoost>And everybody gradually upgrades in the coming year.

00:32:53.980 --> 00:32:55.640
<v Sjors Provoost>And then two years later, you announce it.

00:32:55.740 --> 00:32:56.480
<v Sjors Provoost>That timeline works.

00:32:57.020 --> 00:33:01.280
<v Sjors Provoost>But if you want people to upgrade faster, you're going to have to backport it,

00:33:01.400 --> 00:33:05.960
<v Sjors Provoost>which means that we ship a release like 31.2 or 30.3.

00:33:07.000 --> 00:33:11.280
<v Sjors Provoost>But those backports are smaller changes.

00:33:11.300 --> 00:33:15.240
<v Sjors Provoost>So when you see a .release, yeah, there's only a few commits you need to look at as

00:33:15.240 --> 00:33:17.560
<v Sjors Provoost>an attacker to realize where the possible exploit was.

00:33:17.820 --> 00:33:20.240
<v Sjors Provoost>There was already a problem, but with LLMs, it's even worse.

00:33:20.890 --> 00:33:25.510
<v Sjors Provoost>So anyway, the trade-off now is, for some bugs, it's better to just immediately

00:33:25.510 --> 00:33:31.070
<v Sjors Provoost>announce it, have a fix, and encourage people to deploy the fix.

00:33:32.690 --> 00:33:37.150
<v Aaron van Wirdum>but so and that's only so the the qualification for that is

00:33:37.900 --> 00:33:39.100
<v Sjors Provoost>Easily discoverable.

00:33:39.170 --> 00:33:41.250
<v Aaron van Wirdum>Yeah, so there's basically a new category.

00:33:41.530 --> 00:33:46.030
<v Aaron van Wirdum>There's a new category where Bitcoin Core developers will say, okay, this bug is

00:33:46.030 --> 00:33:51.390
<v Aaron van Wirdum>easily discoverable by an LLM, by AI in particular, and therefore there's no point

00:33:51.390 --> 00:33:52.070
<v Aaron van Wirdum>keeping it secret.

00:33:52.070 --> 00:33:56.990
<v Aaron van Wirdum>We're just immediately going to tell you what it is and everyone basically just now

00:33:54.340 --> 00:33:54.860
<v Sjors Provoost>It

00:33:56.990 --> 00:33:57.870
<v Aaron van Wirdum>has to upgrade, right?

00:33:58.010 --> 00:33:59.590
<v Aaron van Wirdum>That's what it comes down to.

00:34:00.790 --> 00:34:06.670
<v Aaron van Wirdum>And this new policy really was installed because there were easily

00:34:06.670 --> 00:34:08.350
<v Aaron van Wirdum>discoverable bugs found.

00:34:07.570 --> 00:34:13.230
<v Sjors Provoost>seems to me rather coincident that a week after announcing this new policy, there

00:34:13.230 --> 00:34:14.290
<v Sjors Provoost>were three such bugs.

00:34:14.080 --> 00:34:16.540
<v Aaron van Wirdum>yeah yeah

00:34:15.530 --> 00:34:17.070
<v Sjors Provoost>So we could go into those.

00:34:19.350 --> 00:34:25.330
<v Aaron van Wirdum>yeah so the first bug okay let's uh so the first bug was undo undo file

00:34:25.330 --> 00:34:30.930
<v Aaron van Wirdum>overflow under extreme conditions undo file overflow under extreme conditions

00:34:27.860 --> 00:34:28.380
<v Sjors Provoost>Yes.

00:34:30.770 --> 00:34:35.090
<v Sjors Provoost>And before I explain the actual bug, this bug has a timeline, and the timeline

00:34:30.930 --> 00:34:32.870
<v Aaron van Wirdum>so what yeah

00:34:35.090 --> 00:34:40.570
<v Sjors Provoost>basically says in August, sorry, in July 8th this year, Project Loupe reported it.

00:34:40.690 --> 00:34:45.110
<v Sjors Provoost>Project Loupe is a project by Spiral, I believe, that scans a bunch of these open

00:34:45.110 --> 00:34:45.870
<v Sjors Provoost>source projects.

00:34:46.170 --> 00:34:47.450
<v Sjors Provoost>They've been doing that for a while.

00:34:48.010 --> 00:34:50.330
<v Sjors Provoost>Then L0rinc, one of the contributors...

00:34:51.220 --> 00:34:55.120
<v Sjors Provoost>reported the same issue on August 21, independently.

00:34:55.720 --> 00:35:01.660
<v Sjors Provoost>And then Andrew Dorman on October 23, disclosed the same

00:35:01.660 --> 00:35:01.980
<v Sjors Provoost>issue.

00:35:02.200 --> 00:35:05.500
<v Sjors Provoost>So we clearly have something that three people found independently.

00:35:02.470 --> 00:35:03.490
<v Aaron van Wirdum>yeah

00:35:05.920 --> 00:35:06.840
<v Aaron van Wirdum>yeah

00:35:06.960 --> 00:35:09.740
<v Sjors Provoost>So this is a very classic example.

00:35:09.860 --> 00:35:14.500
<v Sjors Provoost>Now what is the bug has to do with something called the undo file.

00:35:15.020 --> 00:35:19.060
<v Sjors Provoost>So we talked about earlier today about how we synchronize a block.

00:35:20.550 --> 00:35:25.650
<v Sjors Provoost>We check what's in the block, and then we have to check that every previous input

00:35:25.650 --> 00:35:26.670
<v Sjors Provoost>is correct, et cetera.

00:35:27.390 --> 00:35:31.810
<v Sjors Provoost>And then once the block is correct, we update our UTXO set.

00:35:32.010 --> 00:35:34.030
<v Sjors Provoost>So our database on disk is now changed.

00:35:32.220 --> 00:35:33.220
<v Aaron van Wirdum>right

00:35:34.410 --> 00:35:36.410
<v Sjors Provoost>The question is, what happens if there's a reorg?

00:35:36.730 --> 00:35:38.230
<v Sjors Provoost>How do we go back?

00:35:38.350 --> 00:35:39.790
<v Sjors Provoost>Because we don't know what it was before.

00:35:40.230 --> 00:35:45.710
<v Sjors Provoost>And the block itself does not tell you what it was before, because the block

00:35:45.710 --> 00:35:49.150
<v Sjors Provoost>has inputs that are referring to something that's in the UTXO set.

00:35:50.100 --> 00:35:54.800
<v Sjors Provoost>So we don't know what was in the UTXO set because we just changed the UTXO set.

00:35:54.780 --> 00:35:59.860
<v Aaron van Wirdum>Yeah, you basically you basically have to apply in case of a reorg in order to

00:35:55.080 --> 00:35:56.400
<v Sjors Provoost>We deleted these coins.

00:35:59.860 --> 00:36:05.180
<v Aaron van Wirdum>switch to the new chain you have to basically do the last block in reverse but

00:36:05.180 --> 00:36:09.300
<v Aaron van Wirdum>because of the how the UTXO set works that's not actually possible.

00:36:09.920 --> 00:36:15.820
<v Aaron van Wirdum>So then instead Bitcoin Core creates a different file an undo file in case of such

00:36:15.820 --> 00:36:20.040
<v Aaron van Wirdum>a scenario then it knows exactly what to do and how to jump back a little bit in

00:36:17.990 --> 00:36:23.450
<v Sjors Provoost>So for every block we have the undo file

00:36:20.040 --> 00:36:21.680
<v Aaron van Wirdum>order to rebuild the chain.

00:36:23.450 --> 00:36:25.420
<v Sjors Provoost>and they're grouped.

00:36:26.120 --> 00:36:28.740
<v Sjors Provoost>So I think it's 128 or so.

00:36:29.120 --> 00:36:34.720
<v Sjors Provoost>So for every undo file contains 128 blocks, I believe.

00:36:35.860 --> 00:36:40.380
<v Sjors Provoost>And now the problem is that the size of the undo file can be surprisingly large.

00:36:41.060 --> 00:36:44.240
<v Sjors Provoost>You'd think they would be the same size or smaller than blocks, but they're

00:36:44.240 --> 00:36:47.940
<v Sjors Provoost>actually, they can be much bigger because we're spending inputs.

00:36:46.360 --> 00:36:52.300
<v Aaron van Wirdum>Yeah, so even if a block is at most 4 megabytes the undo file for that

00:36:52.300 --> 00:36:54.080
<v Aaron van Wirdum>block can be way bigger.

00:36:54.100 --> 00:36:54.580
<v Sjors Provoost>Yes.

00:36:54.560 --> 00:36:55.000
<v Aaron van Wirdum>Yeah,

00:36:54.860 --> 00:37:00.700
<v Sjors Provoost>And since there's 128 blocks in a single undo file, you might get them too

00:37:00.700 --> 00:37:00.940
<v Sjors Provoost>big.

00:37:01.560 --> 00:37:05.820
<v Sjors Provoost>A simple example is you have inputs that are 10 kilobytes scriptPubKeys.

00:37:06.480 --> 00:37:08.360
<v Sjors Provoost>Then every input is 10 kilobytes.

00:37:08.480 --> 00:37:11.040
<v Sjors Provoost>And you have like 1,000 inputs per transaction times.

00:37:11.280 --> 00:37:12.180
<v Sjors Provoost>Anyway, it adds up.

00:37:12.600 --> 00:37:16.680
<v Sjors Provoost>And it could add up to over 2 gigabytes or over 4 megabytes.

00:37:16.880 --> 00:37:18.140
<v Sjors Provoost>Sorry, 4 gigabytes.

00:37:19.020 --> 00:37:22.540
<v Aaron van Wirdum>the undo file can be over 4 gigabytes potentially.

00:37:21.590 --> 00:37:22.070
<v Sjors Provoost>Yes.

00:37:23.130 --> 00:37:24.770
<v Sjors Provoost>And then you say, why is that a problem?

00:37:24.970 --> 00:37:29.070
<v Sjors Provoost>Well, because in the undo file, we track where things are.

00:37:29.350 --> 00:37:31.310
<v Sjors Provoost>And we track that with a 32-bit number.

00:37:31.510 --> 00:37:35.510
<v Sjors Provoost>And a 32-bit number only goes up to 4 gigabytes.

00:37:35.510 --> 00:37:36.670
<v Sjors Provoost>And then it circles around.

00:37:36.910 --> 00:37:38.610
<v Sjors Provoost>So what you end up doing is...

00:37:39.180 --> 00:37:44.020
<v Sjors Provoost>You're saying, oh, this information is in the undo file at position 5 billion, but

00:37:44.020 --> 00:37:49.060
<v Sjors Provoost>that's actually position 1 billion, and now you've either overwritten it or you're

00:37:49.060 --> 00:37:50.100
<v Sjors Provoost>pointing to the wrong place.

00:37:51.200 --> 00:37:52.980
<v Sjors Provoost>And that's not a problem immediately.

00:37:53.340 --> 00:37:55.020
<v Sjors Provoost>At that point, your disk is corrupt, right?

00:37:55.440 --> 00:37:57.680
<v Sjors Provoost>You've overwritten part of your undo information.

00:37:58.080 --> 00:37:59.700
<v Sjors Provoost>But that's fine, as long as there's no reorg.

00:38:00.140 --> 00:38:02.720
<v Sjors Provoost>So the attack would be somebody creating these blocks.

00:38:03.390 --> 00:38:07.430
<v Sjors Provoost>that fill up your undo file, and then they cause a reorg, your node tries to

00:38:07.430 --> 00:38:11.050
<v Sjors Provoost>unwind, it hits this data that doesn't exist, and it just crashes.

00:38:12.210 --> 00:38:18.210
<v Aaron van Wirdum>Yeah, so just in order to successfully pull off this attack

00:38:13.360 --> 00:38:15.180
<v Sjors Provoost>And then it...

00:38:18.210 --> 00:38:23.870
<v Aaron van Wirdum>you first need to feed a node essentially with transactions

00:38:23.870 --> 00:38:24.590
<v Aaron van Wirdum>that...

00:38:25.610 --> 00:38:29.990
<v Aaron van Wirdum>make the undo file that big right which is not organic use it would have to be

00:38:27.210 --> 00:38:27.930
<v Sjors Provoost>Yes.

00:38:29.990 --> 00:38:35.410
<v Aaron van Wirdum>someone that's actually trying to achieve that for for yeah maybe like a hundred

00:38:30.230 --> 00:38:34.320
<v Sjors Provoost>No, you'd have to fill out quite a few blocks.

00:38:35.410 --> 00:38:40.410
<v Aaron van Wirdum>blocks time you just fill it with like specific types of transactions that stuff

00:38:40.380 --> 00:38:46.280
<v Sjors Provoost>Yes, and not every node has the same undo files, because it depends

00:38:40.410 --> 00:38:43.030
<v Aaron van Wirdum>the undo file right that yeah

00:38:46.280 --> 00:38:49.720
<v Sjors Provoost>on some coincidences on historically how your node grew.

00:38:50.120 --> 00:38:52.980
<v Sjors Provoost>So it's not easy to get an attack that would hit every node.

00:38:53.180 --> 00:38:57.200
<v Sjors Provoost>And then you have to create this one block that spends them all, and then you have

00:38:57.200 --> 00:38:59.500
<v Sjors Provoost>to reorg either that block or a similar block.

00:39:00.320 --> 00:39:03.140
<v Sjors Provoost>And if any of that fails, you just have to start from scratch.

00:39:03.340 --> 00:39:05.540
<v Sjors Provoost>So it's not the most practical attack.

00:39:04.220 --> 00:39:10.220
<v Aaron van Wirdum>yeah Yeah, but just to run this one more time, if I'm

00:39:10.220 --> 00:39:14.240
<v Aaron van Wirdum>an attacker and I want to do this, I first have to stuff 100 blocks full with these

00:39:14.240 --> 00:39:19.000
<v Aaron van Wirdum>transactions and then I basically myself have to cause a reorg, so mine a block

00:39:19.000 --> 00:39:23.660
<v Aaron van Wirdum>myself that's in conflict with another block so that miners or maybe even two

00:39:23.660 --> 00:39:26.120
<v Aaron van Wirdum>blocks in order to get longer and only

00:39:25.030 --> 00:39:26.270
<v Sjors Provoost>Yeah, I guess...

00:39:26.120 --> 00:39:28.920
<v Aaron van Wirdum>then the attack will be triggered and then what happens?

00:39:29.080 --> 00:39:30.540
<v Aaron van Wirdum>So what happens to the nodes?

00:39:30.200 --> 00:39:34.500
<v Sjors Provoost>At that point, your node tries to reorg, but it can't because the undo file is

00:39:34.500 --> 00:39:34.800
<v Sjors Provoost>corrupt.

00:39:34.760 --> 00:39:35.240
<v Aaron van Wirdum>Right.

00:39:35.280 --> 00:39:36.580
<v Sjors Provoost>And so it just crashes.

00:39:37.270 --> 00:39:39.630
<v Aaron van Wirdum>It crashes or it stays on the old chain?

00:39:39.780 --> 00:39:40.760
<v Sjors Provoost>No, I think it crashes.

00:39:40.390 --> 00:39:41.690
<v Aaron van Wirdum>It crashes, okay.

00:39:41.360 --> 00:39:43.660
<v Sjors Provoost>And by extension, you know, it's never...

00:39:41.950 --> 00:39:42.950
<v Aaron van Wirdum>So what's

00:39:44.910 --> 00:39:49.890
<v Sjors Provoost>Yeah, and then by extension, I guess you'd have to somehow bring it back and ignore

00:39:45.380 --> 00:39:45.520
<v Aaron van Wirdum>that?

00:39:49.890 --> 00:39:52.090
<v Sjors Provoost>the new block or something, but it'd be annoying.

00:39:51.600 --> 00:39:52.580
<v Aaron van Wirdum>Right, right.

00:39:52.880 --> 00:39:54.440
<v Aaron van Wirdum>Okay, so that's a bug.

00:39:54.580 --> 00:40:00.220
<v Aaron van Wirdum>It's unlikely to be exploited and that's because it's also classified as medium or

00:39:59.470 --> 00:40:03.510
<v Sjors Provoost>Yeah, it was classified as low severity, but easily discoverable.

00:40:00.220 --> 00:40:00.740
<v Aaron van Wirdum>something, right?

00:40:01.360 --> 00:40:03.080
<v Aaron van Wirdum>Low severity even, yeah, okay.

00:40:04.000 --> 00:40:04.120
<v Aaron van Wirdum>Right.

00:40:05.000 --> 00:40:07.660
<v Aaron van Wirdum>But and this bug was now fixed, yes?

00:40:07.370 --> 00:40:11.230
<v Sjors Provoost>Yes, and this block was probably not worth doing a new release for.

00:40:12.250 --> 00:40:16.170
<v Sjors Provoost>But there were three bugs at the same time, so they were kind of all fixed.

00:40:16.070 --> 00:40:16.670
<v Aaron van Wirdum>Right.

00:40:16.830 --> 00:40:18.470
<v Sjors Provoost>The other one,

00:40:17.300 --> 00:40:21.360
<v Aaron van Wirdum>and it was immediately as pointed out was immediately disclosed for the reasons

00:40:21.360 --> 00:40:23.640
<v Aaron van Wirdum>because it was easy to find yeah

00:40:22.700 --> 00:40:26.920
<v Sjors Provoost>immediately once we had the new policy, because remember, it's been reported three

00:40:25.370 --> 00:40:31.330
<v Aaron van Wirdum>right right right yeah it does not cover that bug

00:40:26.920 --> 00:40:27.660
<v Sjors Provoost>times in three months.

00:40:31.220 --> 00:40:31.660
<v Sjors Provoost>Yep.

00:40:31.330 --> 00:40:35.990
<v Aaron van Wirdum>should we get into how it was fixed or does it get very like technical and it come

00:40:35.360 --> 00:40:41.260
<v Sjors Provoost>It gets fixed by using a 64-bit number, but that still leaves Windows

00:40:37.110 --> 00:40:39.050
<v Aaron van Wirdum>okay right

00:40:41.260 --> 00:40:42.000
<v Sjors Provoost>vulnerable.

00:40:44.580 --> 00:40:45.800
<v Sjors Provoost>And FAT32 system.

00:40:45.900 --> 00:40:51.600
<v Sjors Provoost>So if you have an ancient FAT32 file system, that's a 32-bit file system.

00:40:51.720 --> 00:40:53.660
<v Sjors Provoost>So files cannot be bigger than, I think, 2 gigabytes.

00:40:54.220 --> 00:40:58.200
<v Sjors Provoost>And so once your undo file is bigger than 2 gigabytes, your node just crashes.

00:40:58.520 --> 00:41:02.680
<v Sjors Provoost>But then the reasoning is nobody runs an important node on Windows.

00:41:03.420 --> 00:41:05.940
<v Sjors Provoost>And so the attack is just really not worth doing.

00:41:06.180 --> 00:41:07.940
<v Sjors Provoost>And it will be fixed, hopefully,

00:41:07.890 --> 00:41:13.090
<v Aaron van Wirdum>so it takes a ton of effort and then even then the only node you'll affect yeah

00:41:10.740 --> 00:41:12.920
<v Sjors Provoost>to crash a bunch of Windows nodes.

00:41:13.100 --> 00:41:13.300
<v Sjors Provoost>Yeah.

00:41:14.170 --> 00:41:17.290
<v Aaron van Wirdum>okay then there's another bug was this higher severity

00:41:18.550 --> 00:41:21.410
<v Sjors Provoost>Yes, the second one we're discovering is medium severity.

00:41:22.260 --> 00:41:23.800
<v Aaron van Wirdum>Can you just read what it's called?

00:41:23.980 --> 00:41:26.100
<v Aaron van Wirdum>Because I can't read my own.

00:41:24.820 --> 00:41:25.400
<v Sjors Provoost>You

00:41:26.650 --> 00:41:27.290
<v Sjors Provoost>can't read your handwriting.

00:41:27.630 --> 00:41:33.450
<v Sjors Provoost>The bug is called unbounded memory growth through TCP urgent data on

00:41:33.450 --> 00:41:35.210
<v Sjors Provoost>non-Linux systems.

00:41:35.990 --> 00:41:36.810
<v Sjors Provoost>Many words.

00:41:37.110 --> 00:41:38.490
<v Aaron van Wirdum>Yes, too many for me.

00:41:38.650 --> 00:41:39.890
<v Aaron van Wirdum>That's too complicated already.

00:41:40.390 --> 00:41:41.170
<v Aaron van Wirdum>Okay, what is it?

00:41:41.930 --> 00:41:45.350
<v Sjors Provoost>Okay, so the first words are unbounded memory growth.

00:41:43.270 --> 00:41:44.050
<v Aaron van Wirdum>What's this bug?

00:41:45.530 --> 00:41:46.410
<v Sjors Provoost>That is bad.

00:41:47.310 --> 00:41:48.650
<v Sjors Provoost>So we're talking about RAM here.

00:41:49.210 --> 00:41:53.870
<v Sjors Provoost>If you start using up more RAM than you have, if a program tries to use more RAM

00:41:53.870 --> 00:41:55.250
<v Sjors Provoost>than you have, the program crashes.

00:41:56.360 --> 00:42:00.440
<v Sjors Provoost>And if the node crashes, then you can do all sorts of shenanigans, like, you know,

00:42:00.640 --> 00:42:04.240
<v Sjors Provoost>plunder the lightning or whatever, if they don't detect your...

00:42:04.240 --> 00:42:07.680
<v Sjors Provoost>Because you just keep crashing it, and they never get a chance to see the new

00:42:07.680 --> 00:42:09.920
<v Sjors Provoost>blocks, or their lightning node just doesn't react.

00:42:10.360 --> 00:42:10.880
<v Sjors Provoost>Things like that.

00:42:11.460 --> 00:42:12.380
<v Sjors Provoost>So we don't want that.

00:42:13.300 --> 00:42:14.680
<v Sjors Provoost>So that's the first three words.

00:42:15.160 --> 00:42:18.160
<v Sjors Provoost>Then something called TCP urgent data.

00:42:19.610 --> 00:42:20.970
<v Sjors Provoost>We should talk about that, I guess.

00:42:21.670 --> 00:42:27.270
<v Sjors Provoost>So TCP is one of the lower layers of the internet, just the

00:42:27.270 --> 00:42:28.970
<v Sjors Provoost>messages between different IP addresses.

00:42:30.390 --> 00:42:33.350
<v Sjors Provoost>The Bitcoin P2P protocol kind of lives on top of that.

00:42:33.490 --> 00:42:37.150
<v Sjors Provoost>So when you ask for a block, it's like a four megabyte message.

00:42:37.350 --> 00:42:41.330
<v Sjors Provoost>That message is chunked into little bits, and that's what TCP does that.

00:42:44.440 --> 00:42:45.700
<v Sjors Provoost>And then there is a...

00:42:45.990 --> 00:42:51.890
<v Sjors Provoost>At this TCP protocol, there is something called an urgent flag or some

00:42:51.890 --> 00:42:53.230
<v Sjors Provoost>exception protocol.

00:42:54.510 --> 00:42:55.970
<v Sjors Provoost>That's like a meta protocol.

00:42:56.170 --> 00:42:58.210
<v Sjors Provoost>I think it was introduced in the very early days of the Internet.

00:42:58.450 --> 00:43:02.590
<v Sjors Provoost>I think it was something like if you're downloading a big file and you decide

00:43:02.590 --> 00:43:06.210
<v Sjors Provoost>halfway you don't want to do it, you set this flag and that's how you tell the

00:43:06.210 --> 00:43:07.110
<v Sjors Provoost>other side to stop.

00:43:07.570 --> 00:43:12.690
<v Sjors Provoost>And so you're distinguishing this from the content because the other node is just

00:43:12.690 --> 00:43:13.250
<v Sjors Provoost>seeing bytes.

00:43:13.490 --> 00:43:18.070
<v Sjors Provoost>But there's a special byte that says stop what you're doing and then you continue.

00:43:18.670 --> 00:43:20.850
<v Sjors Provoost>That has no purpose in Bitcoin.

00:43:21.270 --> 00:43:22.430
<v Sjors Provoost>And so...

00:43:22.670 --> 00:43:24.510
<v Sjors Provoost>We didn't really deal with it specifically.

00:43:25.450 --> 00:43:28.590
<v Sjors Provoost>But apparently it allowed an attack to happen.

00:43:29.830 --> 00:43:31.650
<v Sjors Provoost>And then we get to why that happens.

00:43:31.670 --> 00:43:35.410
<v Sjors Provoost>We get to the sort of lower level traffic control of the Bitcoin node.

00:43:36.210 --> 00:43:37.630
<v Sjors Provoost>Let's say our nodes are connected.

00:43:37.990 --> 00:43:39.270
<v Sjors Provoost>I am sending you stuff.

00:43:39.370 --> 00:43:40.330
<v Sjors Provoost>You are sending me stuff.

00:43:42.750 --> 00:43:48.570
<v Sjors Provoost>And if you are sending me stuff, I get these bytes and I have to

00:43:48.570 --> 00:43:52.150
<v Sjors Provoost>park them somewhere and then process them.

00:43:53.020 --> 00:43:57.940
<v Sjors Provoost>For example, I get four megabytes of bytes from you, and then I see the first,

00:43:57.960 --> 00:44:00.200
<v Sjors Provoost>maybe first megabyte of that is a block.

00:44:00.580 --> 00:44:04.420
<v Sjors Provoost>So I take that block, I do something with the block, and then I look at the next

00:44:04.420 --> 00:44:05.520
<v Sjors Provoost>bytes you've been sending me.

00:44:06.260 --> 00:44:10.300
<v Sjors Provoost>But that parking lot takes up memory, and if that parking lot gets bigger than my

00:44:10.300 --> 00:44:12.280
<v Sjors Provoost>own memory, then I crash.

00:44:12.660 --> 00:44:16.840
<v Sjors Provoost>So there's a rate limiting in Bitcoin Core that says, if there's too much stuff on

00:44:16.840 --> 00:44:19.260
<v Sjors Provoost>the parking lot, I will not accept new bytes from you.

00:44:19.320 --> 00:44:20.400
<v Sjors Provoost>I will just simply ignore them.

00:44:22.150 --> 00:44:25.350
<v Sjors Provoost>that TCP protocol makes sure that you're not sending bytes.

00:44:26.140 --> 00:44:28.020
<v Sjors Provoost>That was a good safety mechanism.

00:44:28.260 --> 00:44:32.080
<v Sjors Provoost>But unfortunately, when somebody sets this urgent byte, this urgent flag in the

00:44:32.080 --> 00:44:37.720
<v Sjors Provoost>protocol level, we would accidentally also start reading bytes,

00:44:38.020 --> 00:44:40.460
<v Sjors Provoost>even though the traffic light was on red.

00:44:40.760 --> 00:44:43.260
<v Sjors Provoost>So it's kind of a way to bypass the red traffic light.

00:44:40.790 --> 00:44:41.470
<v Aaron van Wirdum>Right.

00:44:42.970 --> 00:44:43.650
<v Aaron van Wirdum>Yeah.

00:44:43.540 --> 00:44:46.000
<v Sjors Provoost>And so a very easy way to crash nodes.

00:44:46.570 --> 00:44:47.250
<v Aaron van Wirdum>Yeah.

00:44:47.490 --> 00:44:53.430
<v Aaron van Wirdum>And so as I understand it, this is really a bug in kind of the really lower

00:44:53.430 --> 00:44:55.510
<v Aaron van Wirdum>level code of Bitcoin Core.

00:44:54.600 --> 00:45:00.440
<v Sjors Provoost>Yeah, this is like 15 year old code that two people understand and they're all

00:44:55.710 --> 00:44:57.310
<v Aaron van Wirdum>That's the type two

00:45:00.440 --> 00:45:06.380
<v Sjors Provoost>not that active Yeah, no two Bitcoin Core developers plus the attackers Probably

00:45:00.890 --> 00:45:03.010
<v Aaron van Wirdum>Bitcoin Core developers or just two people?

00:45:04.170 --> 00:45:04.510
<v Aaron van Wirdum>Okay.

00:45:06.380 --> 00:45:10.280
<v Sjors Provoost>a few more but not a lot It's one of those areas of the code that you you know kind

00:45:10.280 --> 00:45:14.440
<v Sjors Provoost>of don't want to look at unless unless you have to and we have to

00:45:11.530 --> 00:45:12.210
<v Aaron van Wirdum>Yeah.

00:45:13.230 --> 00:45:13.750
<v Aaron van Wirdum>Yeah.

00:45:14.670 --> 00:45:18.250
<v Aaron van Wirdum>It's kind of, it's almost not, well it's kind of not Bitcoin related.

00:45:18.510 --> 00:45:21.890
<v Aaron van Wirdum>It's just deeper in there and that's where the bug...

00:45:20.420 --> 00:45:23.780
<v Sjors Provoost>Well, yeah, this is one of those cases where we could have used a library, but we

00:45:23.780 --> 00:45:24.460
<v Sjors Provoost>didn't use a library.

00:45:24.600 --> 00:45:27.720
<v Sjors Provoost>We wrote our own networking code, but then you are responsible for doing it

00:45:27.720 --> 00:45:29.720
<v Sjors Provoost>correctly, and it's a hard problem.

00:45:29.880 --> 00:45:30.400
<v Aaron van Wirdum>Right.

00:45:31.160 --> 00:45:36.720
<v Aaron van Wirdum>Maybe you said this, but if the attack is exploited, what's the worst thing?

00:45:36.880 --> 00:45:38.100
<v Aaron van Wirdum>It brings down your node.

00:45:37.860 --> 00:45:38.820
<v Sjors Provoost>Yeah, it crashes your node.

00:45:38.320 --> 00:45:39.240
<v Aaron van Wirdum>Yeah, it crashes your node.

00:45:39.300 --> 00:45:40.060
<v Aaron van Wirdum>You did mention that.

00:45:40.560 --> 00:45:41.000
<v Aaron van Wirdum>Right.

00:45:41.320 --> 00:45:47.160
<v Aaron van Wirdum>And this is also, I think, a very typical AI, LLM type of thing

00:45:47.160 --> 00:45:48.520
<v Aaron van Wirdum>to find, right?

00:45:48.720 --> 00:45:53.060
<v Aaron van Wirdum>Because you guys, as mentioned, it's kind of not really what you're working on or

00:45:53.060 --> 00:45:54.480
<v Aaron van Wirdum>thinking about even.

00:45:53.450 --> 00:45:57.870
<v Sjors Provoost>Yeah, so the AI looks at the [unclear: agent/ancient] code and is like, oh, I think

00:45:54.700 --> 00:45:54.940
<v Aaron van Wirdum>Right.

00:45:57.870 --> 00:46:02.090
<v Sjors Provoost>this could be crashed in this and this way because it remembers the details of the

00:46:02.090 --> 00:46:04.050
<v Sjors Provoost>TCP protocol or all of that stuff.

00:46:04.630 --> 00:46:04.990
<v Sjors Provoost>Yeah.

00:46:05.020 --> 00:46:07.100
<v Aaron van Wirdum>Okay, and so this was fixed.

00:46:07.440 --> 00:46:12.040
<v Aaron van Wirdum>Again, is it worth going into what the fix is or do you even know?

00:46:10.900 --> 00:46:12.720
<v Sjors Provoost>The fix boils down to...

00:46:14.320 --> 00:46:15.940
<v Sjors Provoost>ignoring this emergency signal.

00:46:16.150 --> 00:46:16.750
<v Aaron van Wirdum>Right.

00:46:16.640 --> 00:46:20.340
<v Sjors Provoost>So there's like three, kind of whenever the node is working, it's doing three

00:46:20.340 --> 00:46:20.900
<v Sjors Provoost>things in a row.

00:46:21.100 --> 00:46:24.460
<v Sjors Provoost>It's sending what it needs to send, it's receiving what it needs to receive, and

00:46:24.460 --> 00:46:26.400
<v Sjors Provoost>it's checking this urgent flag.

00:46:26.700 --> 00:46:28.660
<v Sjors Provoost>And we just ignore the urgent flag.

00:46:28.940 --> 00:46:31.600
<v Sjors Provoost>So then when you set it, nothing happens, roughly.

00:46:31.780 --> 00:46:34.540
<v Sjors Provoost>But then on Windows, there's a deep rabbit hole.

00:46:34.470 --> 00:46:35.070
<v Aaron van Wirdum>Yeah.

00:46:34.980 --> 00:46:36.580
<v Sjors Provoost>But for now, we've fixed it.

00:46:36.680 --> 00:46:38.040
<v Sjors Provoost>But yeah, it's kind of annoying.

00:46:37.290 --> 00:46:37.390
<v Aaron van Wirdum>Yeah.

00:46:38.200 --> 00:46:40.380
<v Sjors Provoost>And I think the only reason why this is...

00:46:38.910 --> 00:46:43.750
<v Aaron van Wirdum>And it's kind of the type of code you don't like touching because it's...

00:46:43.510 --> 00:46:43.970
<v Sjors Provoost>Yeah.

00:46:43.750 --> 00:46:44.090
<v Aaron van Wirdum>Yeah.

00:46:44.450 --> 00:46:49.130
<v Sjors Provoost>So the good news is there's only a problem on Mac OS and Windows and not on Linux.

00:46:49.370 --> 00:46:51.750
<v Sjors Provoost>And most of the critical infrastructure runs on Linux.

00:46:52.210 --> 00:46:54.690
<v Sjors Provoost>Because otherwise I think this would have been a high severity one.

00:46:54.730 --> 00:46:58.170
<v Sjors Provoost>Because if you can crash every node in the Bitcoin network, that's pretty bad.

00:46:58.730 --> 00:47:01.790
<v Aaron van Wirdum>Do you know why Linux is unaffected?

00:47:02.250 --> 00:47:06.410
<v Sjors Provoost>Because there are two, I would say, network traffic control systems.

00:47:06.850 --> 00:47:09.350
<v Sjors Provoost>One is called Select and the other is called Poll.

00:47:10.330 --> 00:47:15.130
<v Sjors Provoost>And on Linux we use one and on the other systems we use the other.

00:47:15.080 --> 00:47:15.660
<v Aaron van Wirdum>Right.

00:47:16.340 --> 00:47:20.760
<v Sjors Provoost>And I think that one of them is more modern, and we kind of want to switch over to

00:47:20.760 --> 00:47:24.740
<v Sjors Provoost>the modern version everywhere, but that's a whole separate big refactor that

00:47:24.740 --> 00:47:27.880
<v Sjors Provoost>somebody needs to do, which means somebody needs to be motivated to look at this

00:47:27.880 --> 00:47:29.680
<v Sjors Provoost>horrible low-level network code.

00:47:29.830 --> 00:47:30.210
<v Aaron van Wirdum>Yeah.

00:47:31.560 --> 00:47:36.380
<v Aaron van Wirdum>You did mention three bugs, but we only wrote down two or at least I only wrote...

00:47:34.420 --> 00:47:37.660
<v Sjors Provoost>Yeah, there was a third one that was a bit similar to this one, but we're not going

00:47:37.660 --> 00:47:38.200
<v Sjors Provoost>to go into that.

00:47:38.330 --> 00:47:39.810
<v Aaron van Wirdum>We're skipping the third one.

00:47:39.930 --> 00:47:41.950
<v Aaron van Wirdum>Was that high, low, that was low severity?

00:47:40.960 --> 00:47:41.680
<v Sjors Provoost>That was low.

00:47:41.940 --> 00:47:42.860
<v Sjors Provoost>I believe it was low.

00:47:42.920 --> 00:47:44.860
<v Aaron van Wirdum>Right, but still easy to find, yeah?

00:47:44.220 --> 00:47:47.160
<v Sjors Provoost>It was also a way to make somebody run out of memory, but it would take much

00:47:47.160 --> 00:47:47.460
<v Sjors Provoost>longer.

00:47:48.160 --> 00:47:48.700
<v Aaron van Wirdum>Right, okay.

00:47:49.430 --> 00:47:51.510
<v Aaron van Wirdum>Awesome, how long have we been recording Sjors?

00:47:52.080 --> 00:47:53.160
<v Sjors Provoost>About 48 minutes.

00:47:53.380 --> 00:47:55.460
<v Sjors Provoost>So I think in terms of the normal episode we're good.

00:47:55.680 --> 00:47:57.300
<v Sjors Provoost>But unless you have any other questions.

00:47:55.810 --> 00:47:59.810
<v Aaron van Wirdum>That's roughly what an episode is, so...

00:47:58.920 --> 00:48:01.420
<v Sjors Provoost>Then I say thank you for listening to Bitcoin.

00:48:01.250 --> 00:48:02.630
<v Aaron van Wirdum>Explained.

00:48:03.290 --> 00:48:04.690
<v Aaron van Wirdum>Thanks for being here.

00:48:11.450 --> 00:48:13.350
<v Aaron van Wirdum>Now that we're here, do we...

00:48:13.350 --> 00:48:16.050
<v Aaron van Wirdum>We're not recording anymore, but...

00:48:16.050 --> 00:48:18.550
<v Aaron van Wirdum>You already did a Q&A session, right?

00:48:16.160 --> 00:48:17.120
<v Sjors Provoost>I'll leave it on but.

00:48:19.510 --> 00:48:19.950
<v Sjors Provoost>Yes.

00:48:19.670 --> 00:48:20.510
<v Aaron van Wirdum>Could be fun.

00:48:20.650 --> 00:48:21.930
<v Aaron van Wirdum>Does anyone have a question for Sjors?

00:48:22.190 --> 00:48:23.910
<v Aaron van Wirdum>This is like a good opportunity, maybe?

00:48:23.560 --> 00:48:24.380
<v Sjors Provoost>Or for Aaron.

00:48:24.130 --> 00:48:24.550
<v Aaron van Wirdum>Yeah.

00:48:25.270 --> 00:48:27.470
<v Audience member>You guys were talking about the watch-only wallet.

00:48:28.070 --> 00:48:30.930
<v Audience member>What is the difference with just a regular xpub

00:48:28.310 --> 00:48:28.670
<v Sjors Provoost>Yes.

00:48:31.420 --> 00:48:33.620
<v Sjors Provoost>The wallet comes with all the stuff.

00:48:33.840 --> 00:48:39.840
<v Sjors Provoost>So it comes with your transaction, history, the labels you've added, the

00:48:39.840 --> 00:48:40.420
<v Sjors Provoost>descriptors.

00:48:41.730 --> 00:48:43.870
<v Sjors Provoost>An xpub is just one thing.

00:48:44.110 --> 00:48:47.950
<v Sjors Provoost>In general, we prefer descriptors over xpub because descriptors tell you what to do

00:48:47.950 --> 00:48:48.570
<v Sjors Provoost>with the xpub.

00:48:50.700 --> 00:48:54.740
<v Sjors Provoost>But yeah, in principle, you could already do these things by just ferrying an XPUB

00:48:54.740 --> 00:48:55.000
<v Sjors Provoost>around.

00:48:55.780 --> 00:48:59.320
<v Sjors Provoost>Now you just ferry all the extra metadata.

00:48:58.340 --> 00:49:02.200
<v Audience member>Yeah, because there are some things you could do with a watch-only wallet that you

00:49:02.200 --> 00:49:05.680
<v Audience member>mentioned, like creating transactions and seeing your history, but you can do this

00:49:05.680 --> 00:49:07.640
<v Audience member>with like [unclear] wallet and xpub.

00:49:07.940 --> 00:49:08.660
<v Audience member>You can do the same thing.

00:49:08.300 --> 00:49:12.800
<v Sjors Provoost>You can because there are conventions on what you can do with an XPUB.

00:49:15.320 --> 00:49:17.400
<v Sjors Provoost>But these conventions are also foot guns.

00:49:17.460 --> 00:49:21.760
<v Sjors Provoost>Because if you take an XPUB that was supposed to be used for the legacy one blah

00:49:21.760 --> 00:49:26.860
<v Sjors Provoost>blah blah address, and then you decide to use it to create a SegWit address, Then

00:49:26.860 --> 00:49:30.900
<v Sjors Provoost>you import your mnemonic, and your mnemonic is actually looking in the wrong place,

00:49:31.000 --> 00:49:32.240
<v Sjors Provoost>and you think your coins are gone.

00:49:32.360 --> 00:49:34.900
<v Sjors Provoost>They're not actually gone, but they're like, you will spend a bunch of time

00:49:34.900 --> 00:49:35.740
<v Sjors Provoost>figuring out where they are.

00:49:36.640 --> 00:49:38.440
<v Sjors Provoost>So descriptors are there.

00:49:38.660 --> 00:49:42.780
<v Sjors Provoost>The descriptors is just a bunch of text around the XPUB saying, this is a legacy

00:49:42.780 --> 00:49:43.040
<v Sjors Provoost>address.

00:49:43.160 --> 00:49:44.180
<v Sjors Provoost>This is a taproot address.

00:49:44.800 --> 00:49:47.720
<v Sjors Provoost>This is a derivation from, if you [unclear: start at the seed?], do this

00:49:47.720 --> 00:49:49.640
<v Sjors Provoost>derivation, do this derivation, do this derivation.

00:49:50.240 --> 00:49:51.800
<v Sjors Provoost>Then it says, this is the XPUB.

00:49:52.190 --> 00:49:53.270
<v Sjors Provoost>And then everything else.

00:49:53.470 --> 00:49:55.130
<v Sjors Provoost>So that's what descriptors do.

00:49:55.170 --> 00:49:58.370
<v Sjors Provoost>But you could already export descriptors, too, in read-only format.

00:49:59.570 --> 00:50:01.730
<v Sjors Provoost>And then manually import them again.

00:50:01.930 --> 00:50:02.870
<v Sjors Provoost>But this is quite tedious.

00:50:03.230 --> 00:50:09.150
<v Sjors Provoost>So now you just copy the whole wallet file, just that one file or directory.

00:50:09.730 --> 00:50:10.910
<v Off-mic speaker>Sounds like a great feature.

00:50:11.320 --> 00:50:12.180
<v Sjors Provoost>I think so, too.

00:50:13.370 --> 00:50:17.790
<v Aaron van Wirdum>Alright, should we wrap it or we can do like one more question if anyone has one?

00:50:18.640 --> 00:50:19.740
<v Aaron van Wirdum>But I don't think so.

00:50:20.200 --> 00:50:21.520
<v Aaron van Wirdum>Okay, then let's just wrap it.

00:50:20.590 --> 00:50:21.070
<v Sjors Provoost>Cool.

00:50:21.370 --> 00:50:22.010
<v Sjors Provoost>Thank you.

00:50:22.000 --> 00:50:22.680
<v Aaron van Wirdum>Sjors, thanks.

00:50:23.100 --> 00:50:24.480
<v Aaron van Wirdum>Everyone, thanks for being here.
