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

00:00:16.460 --> 00:00:18.980
<v Aaron van Wirdum>Live from Utrecht, this is Bitcoin

00:00:18.980 --> 00:00:20.420
<v Sjors Provoost>Explained.

00:00:20.740 --> 00:00:21.200
<v Aaron van Wirdum>Hey Sjors.

00:00:21.580 --> 00:00:21.960
<v Sjors Provoost>Hello.

00:00:22.420 --> 00:00:23.180
<v Aaron van Wirdum>Welcome back.

00:00:23.500 --> 00:00:24.980
<v Sjors Provoost>Welcome back. It's just been a few days.

00:00:25.890 --> 00:00:31.210
<v Aaron van Wirdum>Yeah, well, this episode is delayed by like two weeks. We were supposed to record

00:00:31.210 --> 00:00:37.490
<v Aaron van Wirdum>this at MIT in Massachusetts at the Bitcoin Expo, which you did attend.

00:00:37.810 --> 00:00:41.730
<v Sjors Provoost>I did attend it and I did join some panels there.

00:00:43.010 --> 00:00:44.450
<v Sjors Provoost>But we couldn't do the podcast.

00:00:44.910 --> 00:00:48.490
<v Aaron van Wirdum>Yeah, we were supposed to do the podcast on stage. Big spectacle.

00:00:48.970 --> 00:00:52.930
<v Sjors Provoost>But you got deported to El Salvador, and it was complicated to get you out there.

00:00:53.250 --> 00:00:58.310
<v Aaron van Wirdum>It was a long story, Sjors. I'm surprised you didn't get deported to El Salvador.

00:00:58.790 --> 00:00:59.490
<v Sjors Provoost>I'm happy.

00:00:59.690 --> 00:01:05.110
<v Aaron van Wirdum>You look like MS-13. I mean, that's what people usually say when I say, yeah, I

00:01:05.110 --> 00:01:09.590
<v Aaron van Wirdum>record a podcast with Sjors, and they say, oh, that's the MS-13 guy? And I have

00:01:09.590 --> 00:01:13.550
<v Aaron van Wirdum>to explain, no, no, he just looks like that. He's actually a Bitcoin Core

00:01:13.550 --> 00:01:13.990
<v Aaron van Wirdum>developer.

00:01:14.590 --> 00:01:15.230
<v Sjors Provoost>All right.

00:01:15.910 --> 00:01:18.400
<v Aaron van Wirdum>Well, somehow you made it back.

00:01:18.620 --> 00:01:19.560
<v Sjors Provoost>I made it back.

00:01:19.880 --> 00:01:24.000
<v Aaron van Wirdum>So we're going to record an episode on Bitcoin Core 29.

00:01:24.300 --> 00:01:24.860
<v Sjors Provoost>That's right.

00:01:25.080 --> 00:01:28.980
<v Aaron van Wirdum>Which means it's been about six months since the previous Bitcoin Core release.

00:01:29.280 --> 00:01:29.980
<v Sjors Provoost>That's right.

00:01:30.560 --> 00:01:36.680
<v Aaron van Wirdum>And as usual, that means there's some new features which we're going to discuss.

00:01:37.180 --> 00:01:38.080
<v Sjors Provoost>Yep, that's right.

00:01:39.710 --> 00:01:44.560
<v Aaron van Wirdum>Let's just get into it. What's up? Yeah, we have a sponsor.

00:01:44.920 --> 00:01:45.580
<v Sjors Provoost>That's right.

00:01:45.840 --> 00:01:51.800
<v Aaron van Wirdum>We are being sponsored by our very generous contributors to the show, Coinkite,

00:01:52.080 --> 00:01:57.220
<v Aaron van Wirdum>who produce the COLDCARD hardware wallet. Right now I'm holding the...

00:01:57.220 --> 00:01:58.480
<v Sjors Provoost>I think it's called the Q.

00:01:58.760 --> 00:02:02.200
<v Aaron van Wirdum>COLDCARD Q, which looks like a big calculator.

00:02:02.540 --> 00:02:03.440
<v Sjors Provoost>Or BlackBerry.

00:02:04.810 --> 00:02:06.490
<v Aaron van Wirdum>You can store your Bitcoin on it.

00:02:07.780 --> 00:02:10.300
<v Aaron van Wirdum>Have you actually used it or is it just laying around here?

00:02:10.740 --> 00:02:11.600
<v Sjors Provoost>This one.

00:02:11.820 --> 00:02:12.040
<v Aaron van Wirdum>Yeah.

00:02:12.950 --> 00:02:14.310
<v Sjors Provoost>I'm not going to answer that question.

00:02:15.410 --> 00:02:18.060
<v Aaron van Wirdum>Smart. I'll take that as a yes.

00:02:19.420 --> 00:02:20.820
<v Sjors Provoost>I will check that it's still here.

00:02:22.310 --> 00:02:27.740
<v Aaron van Wirdum>All right. So there's a new Bitcoin Core release. And then what we're going to do

00:02:27.740 --> 00:02:30.760
<v Aaron van Wirdum>is we're going to highlight some features that are in this Bitcoin Core release.

00:02:31.540 --> 00:02:36.220
<v Aaron van Wirdum>There's a bunch of features, including bug fixes and all kinds of smaller stuff.

00:02:36.360 --> 00:02:41.100
<v Aaron van Wirdum>But we highlighted some features that are at least kind of worth discussing for a

00:02:41.100 --> 00:02:41.580
<v Aaron van Wirdum>couple of minutes.

00:02:41.760 --> 00:02:46.040
<v Sjors Provoost>I think they are. I mean, I had to convince you of some of them. But, yeah.

00:02:46.800 --> 00:02:50.120
<v Aaron van Wirdum>I mean, you know, none of them are major of course, but

00:02:50.120 --> 00:02:51.920
<v Sjors Provoost>I think some of them are major.

00:02:52.200 --> 00:02:57.360
<v Aaron van Wirdum>Okay, let's get into it. So the first one is called UPnP has dropped.

00:02:57.960 --> 00:03:01.000
<v Sjors Provoost>That's right. And by has dropped, I mean has been dropped.

00:03:01.510 --> 00:03:05.250
<v Aaron van Wirdum>I mean, it's, wait, oh yeah, it's not included anymore.

00:03:05.250 --> 00:03:06.090
<v Sjors Provoost>Yeah, it's removed. That's what that means.

00:03:06.290 --> 00:03:10.300
<v Aaron van Wirdum>Yeah, I was thinking dropping, like, you know, dropping a new album. Yeah,

00:03:10.300 --> 00:03:10.560
<v Sjors Provoost>exactly.

00:03:10.830 --> 00:03:15.690
<v Aaron van Wirdum>The Bitcoin Core developers have dropped UPnP. Okay, it's no longer in Bitcoin

00:03:15.690 --> 00:03:16.270
<v Aaron van Wirdum>Core, actually.

00:03:16.410 --> 00:03:16.550
<v Sjors Provoost>Exactly.

00:03:16.750 --> 00:03:17.370
<v Aaron van Wirdum>That's what it means.

00:03:17.550 --> 00:03:17.670
<v Sjors Provoost>Yeah.

00:03:17.790 --> 00:03:18.970
<v Aaron van Wirdum>So what is UPnP?

00:03:19.390 --> 00:03:25.230
<v Sjors Provoost>Yeah, so UPnP is and was a way for you to make your Bitcoin node at home or

00:03:25.390 --> 00:03:31.360
<v Sjors Provoost>wherever it is, reachable from the outside. Because typically, so when

00:03:31.360 --> 00:03:35.500
<v Sjors Provoost>you're on a server, your node will find other peers to connect to, but it will

00:03:35.500 --> 00:03:39.060
<v Sjors Provoost>also listen for other peers that want to connect to it. And if you're sitting on

00:03:39.060 --> 00:03:43.160
<v Sjors Provoost>Amazon somewhere in a server park, that tends to just work. But if you're sitting

00:03:43.160 --> 00:03:49.100
<v Sjors Provoost>at home, most routers or your home create a firewall and anybody

00:03:49.100 --> 00:03:53.460
<v Sjors Provoost>that tries to connect to you will not succeed. You can connect to anybody you

00:03:53.460 --> 00:03:58.020
<v Sjors Provoost>want. but nobody can connect to you as sort of a standard safety measure because

00:03:58.020 --> 00:04:02.120
<v Sjors Provoost>they don't want, you know, random hackers to connect to random insecure Windows

00:04:02.120 --> 00:04:03.700
<v Sjors Provoost>computers that you might be running.

00:04:04.040 --> 00:04:09.480
<v Aaron van Wirdum>Yeah, okay, so... Because I always kind of wondered about this. Well, I always

00:04:09.480 --> 00:04:14.320
<v Aaron van Wirdum>sort of knew the answer, but this confirms it. Like in my case, I

00:04:14.320 --> 00:04:20.600
<v Aaron van Wirdum>do run Bitcoin Core, but I just downloaded the software, run it on my computer.

00:04:21.960 --> 00:04:27.640
<v Aaron van Wirdum>But in my case, that means that I'm not actually sharing blocks or transactions

00:04:27.640 --> 00:04:29.120
<v Aaron van Wirdum>with other nodes because...

00:04:29.120 --> 00:04:33.660
<v Sjors Provoost>You are. However, you're not receiving connections. So if you make a connection

00:04:33.660 --> 00:04:38.580
<v Sjors Provoost>to another node... you will send and receive blocks and transactions. So it's not

00:04:38.580 --> 00:04:43.400
<v Sjors Provoost>about, you're not a leecher, basically, as they used to call that in Torrent

00:04:43.400 --> 00:04:47.760
<v Sjors Provoost>jargon. You are sharing just as much. It doesn't really matter whether you are,

00:04:47.960 --> 00:04:52.140
<v Sjors Provoost>whether who initiates the connection. It's just that. If nobody in the world is

00:04:52.140 --> 00:04:57.640
<v Sjors Provoost>listening and everybody's trying to connect, then they have nowhere to connect

00:04:57.640 --> 00:04:59.140
<v Sjors Provoost>to. So somebody needs to listen.

00:04:59.480 --> 00:05:04.980
<v Aaron van Wirdum>Right, that's it. In your case, I don't know if you run a Node with or without

00:05:04.980 --> 00:05:05.540
<v Aaron van Wirdum>the firewall.

00:05:06.380 --> 00:05:08.640
<v Sjors Provoost>Yeah, so I run multiple nodes that you can reach.

00:05:08.960 --> 00:05:12.680
<v Aaron van Wirdum>Right, so then my node, because I never changed any settings, right? I just,

00:05:12.860 --> 00:05:17.720
<v Aaron van Wirdum>well, I changed some settings, but not this setting. So I basically run it out of

00:05:17.720 --> 00:05:22.580
<v Aaron van Wirdum>the box. So then I am connecting to you. So then I'm sharing blocks and

00:05:22.580 --> 00:05:27.080
<v Aaron van Wirdum>transactions with you that I might also get from like another source that is

00:05:27.080 --> 00:05:31.880
<v Aaron van Wirdum>doing the same thing. But I will not connect to another Aaron. because the other

00:05:31.880 --> 00:05:35.860
<v Aaron van Wirdum>Aaron is also running it out of the box. So I have no way of connecting to him

00:05:35.860 --> 00:05:40.920
<v Aaron van Wirdum>and he has no way of connecting to me. So then, yeah, I mean, isn't that a

00:05:40.920 --> 00:05:44.280
<v Aaron van Wirdum>problem? Like, isn't it a problem that if there's just too few, if there's too

00:05:44.280 --> 00:05:49.720
<v Aaron van Wirdum>many Aarons and too few Sjorses, that it just becomes a form of centralization

00:05:49.720 --> 00:05:53.640
<v Aaron van Wirdum>because everyone is running, you know, it becomes basically like a hub and spoke

00:05:53.640 --> 00:05:55.440
<v Aaron van Wirdum>network, I guess would be the technical term.

00:05:55.600 --> 00:06:00.760
<v Sjors Provoost>Yes, now we're nowhere near that point. because there are many, many thousands of

00:06:00.760 --> 00:06:05.640
<v Sjors Provoost>nodes that are listening. So there's no shortage. However, we talked about in an

00:06:05.640 --> 00:06:09.600
<v Sjors Provoost>earlier episode about ASMAP, which is like a map of the internet of which

00:06:09.600 --> 00:06:13.800
<v Sjors Provoost>providers. And one of the things that Bitcoin Core wants to do in the future is

00:06:13.800 --> 00:06:18.660
<v Sjors Provoost>to have more diverse connections. And I don't mean that in a DEI sense. I mean

00:06:18.660 --> 00:06:22.280
<v Sjors Provoost>that in a sense of you should not have all your connections to Amazon. You should

00:06:22.280 --> 00:06:27.680
<v Sjors Provoost>have one connection to Amazon, maybe one to Google, one to some ISP in Kenya, one

00:06:27.680 --> 00:06:33.620
<v Sjors Provoost>to some ISP in Germany. So that if somebody is trying to mess with you, it's very

00:06:33.620 --> 00:06:37.720
<v Sjors Provoost>difficult for them because they have to somehow pretend to be a lot of different

00:06:37.720 --> 00:06:42.840
<v Sjors Provoost>internet providers in the world. And if we do that, and that means that the

00:06:42.840 --> 00:06:44.300
<v Sjors Provoost>number of nodes that are listening...

00:06:45.880 --> 00:06:50.040
<v Sjors Provoost>The nodes that are listening now that are sitting on Amazon and Google, exactly

00:06:50.040 --> 00:06:54.160
<v Sjors Provoost>the kind of places where it's easy to set that up, they will get fewer

00:06:54.160 --> 00:06:59.840
<v Sjors Provoost>connections. And all the nodes in obscure apartments

00:06:59.840 --> 00:07:04.680
<v Sjors Provoost>and... random countries will get a lot more connections. And it could be,

00:07:04.860 --> 00:07:07.900
<v Sjors Provoost>depending on the simulation, that that's too much, that you would start

00:07:07.900 --> 00:07:10.420
<v Sjors Provoost>overloading the more obscure places.

00:07:10.900 --> 00:07:13.820
<v Aaron van Wirdum>Yeah, because there's only one guy in Kenya running a node.

00:07:14.080 --> 00:07:14.320
<v Sjors Provoost>Exactly.

00:07:14.500 --> 00:07:17.280
<v Aaron van Wirdum>So that everyone wants to connect to the one guy in Kenya node.

00:07:17.460 --> 00:07:18.820
<v Sjors Provoost>Yes, because it's not Amazon.

00:07:19.040 --> 00:07:19.180
<v Aaron van Wirdum>Yeah.

00:07:19.460 --> 00:07:23.000
<v Sjors Provoost>So in order to prevent that, it's probably necessary to increase the number of

00:07:23.000 --> 00:07:24.260
<v Sjors Provoost>listening nodes at least somewhat.

00:07:25.490 --> 00:07:29.410
<v Sjors Provoost>Now, so there are two kinds of nodes that listen by default.

00:07:30.690 --> 00:07:36.500
<v Sjors Provoost>One is... Oh, sorry. No, let me rephrase that. There

00:07:36.500 --> 00:07:41.440
<v Sjors Provoost>is another node that listens by default, which is a Tor node. Because if you set

00:07:41.440 --> 00:07:47.350
<v Sjors Provoost>up Tor, you set it up usually to also use a hidden service. And it turns out that

00:07:47.350 --> 00:07:52.470
<v Sjors Provoost>projects like Umbrel will do that automatically for you. And that's easier. But

00:07:52.470 --> 00:07:55.490
<v Sjors Provoost>those are only on Tor, so it's not that useful if you're not on Tor.

00:07:55.750 --> 00:07:59.370
<v Aaron van Wirdum>Yeah, they would only connect to other Tor users.

00:07:59.590 --> 00:08:02.970
<v Sjors Provoost>And if you're running in a data center, then typically everything is just wide

00:08:02.970 --> 00:08:05.030
<v Sjors Provoost>open, so everybody can connect to you.

00:08:06.330 --> 00:08:09.850
<v Sjors Provoost>But there's also a tool that used to be included in very early versions of

00:08:09.850 --> 00:08:13.650
<v Sjors Provoost>Bitcoin Core called UPnP. And what this would do is it would look for your

00:08:13.650 --> 00:08:16.810
<v Sjors Provoost>router. So from the inside, it would look at the router and say, hey, router,

00:08:16.970 --> 00:08:21.530
<v Sjors Provoost>please open this port for me, open this door, so that everybody who wants to talk

00:08:21.530 --> 00:08:22.370
<v Sjors Provoost>to me can talk to me.

00:08:23.830 --> 00:08:28.490
<v Aaron van Wirdum>And that worked. UPnP is the setting you use if you want to be a listening node.

00:08:29.010 --> 00:08:33.090
<v Sjors Provoost>It was, yes. And so this was introduced quite a while ago, and that's why there

00:08:33.090 --> 00:08:36.970
<v Sjors Provoost>are, from the beginning, there were quite a few listening nodes. I think it was

00:08:36.970 --> 00:08:41.570
<v Sjors Provoost>on by default. So everybody who downloaded Bitcoin Core would... If possible,

00:08:41.810 --> 00:08:44.310
<v Sjors Provoost>punch a hole in their router and start listening.

00:08:44.570 --> 00:08:45.390
<v Aaron van Wirdum>Right, okay, yeah.

00:08:45.610 --> 00:08:50.780
<v Sjors Provoost>Or in their firewall, I guess. Problem is that UPnP as a software package was

00:08:50.780 --> 00:08:56.160
<v Sjors Provoost>extremely insecure. There were multiple bugs found in it. That would, say, allow

00:08:56.160 --> 00:08:59.000
<v Sjors Provoost>somebody to take over your computer and steal your coins.

00:09:00.660 --> 00:09:01.740
<v Aaron van Wirdum>That sounds bad.

00:09:02.120 --> 00:09:07.900
<v Sjors Provoost>Yes, exactly. And so this was not removed, but it was turned off by default.

00:09:08.500 --> 00:09:11.780
<v Sjors Provoost>So as a result, for many, many years, if you installed a new version of Bitcoin

00:09:11.780 --> 00:09:16.300
<v Sjors Provoost>Core, it would simply not do any of this unless you turned it on yourself at your own risk.

00:09:16.480 --> 00:09:18.520
<v Aaron van Wirdum>Do you know when this change was made?

00:09:18.740 --> 00:09:20.780
<v Sjors Provoost>Many, many years ago. Probably 2012.

00:09:21.730 --> 00:09:24.550
<v Aaron van Wirdum>Okay, so if I had downloaded...

00:09:24.550 --> 00:09:28.970
<v Sjors Provoost>If you had downloaded Bitcoin in 2011 or something like that, you would be listening.

00:09:29.110 --> 00:09:29.270
<v Aaron van Wirdum>Right.

00:09:29.630 --> 00:09:33.790
<v Sjors Provoost>If you were still running a node from 2011, you would be listening and you would

00:09:33.790 --> 00:09:34.190
<v Sjors Provoost>be hacked.

00:09:35.600 --> 00:09:37.040
<v Sjors Provoost>But yeah, you could.

00:09:38.480 --> 00:09:40.200
<v Sjors Provoost>So, you know, it's been...

00:09:40.200 --> 00:09:44.380
<v Aaron van Wirdum>In any case, this setting was called, I mean, it's still called UPnP

00:09:44.620 --> 00:09:45.000
<v Sjors Provoost>Yes.

00:09:45.140 --> 00:09:47.560
<v Aaron van Wirdum>And this was removed.

00:09:47.780 --> 00:09:53.180
<v Sjors Provoost>Yes. And in recent years, we've added a whole new system to it. I'll skip some

00:09:53.180 --> 00:09:55.860
<v Sjors Provoost>intermediate steps. So basically, we added something called Port Control

00:09:55.860 --> 00:10:01.320
<v Sjors Provoost>Protocol, PCP, which is a much more modern way of doing the same thing, of asking

00:10:01.320 --> 00:10:05.700
<v Sjors Provoost>your router to please open it. But it is much simpler in terms of code.

00:10:05.880 --> 00:10:09.160
<v Sjors Provoost>Therefore, we're a little less worried about any security vulnerabilities there.

00:10:09.960 --> 00:10:11.800
<v Sjors Provoost>But still not turned on by default.

00:10:13.150 --> 00:10:17.950
<v Sjors Provoost>So nothing really changes. You still, if you download Bitcoin Core and you have

00:10:17.950 --> 00:10:23.720
<v Sjors Provoost>the GUI, there's a settings dialog and you can click on basically PCP now. Where

00:10:23.720 --> 00:10:26.120
<v Sjors Provoost>it used to say UPnP, it now says PCP.

00:10:28.880 --> 00:10:34.160
<v Aaron van Wirdum>Okay, maybe you just said it, but is PCP new in this Bitcoin Core release?

00:10:34.380 --> 00:10:34.640
<v Sjors Provoost>Yes.

00:10:34.840 --> 00:10:38.100
<v Aaron van Wirdum>Okay, and that's why now UPnP has been removed.

00:10:38.950 --> 00:10:44.190
<v Sjors Provoost>Yes, exactly. It's essentially a replacement. And then perhaps we'll turn it on

00:10:44.190 --> 00:10:47.110
<v Sjors Provoost>by default in the future. I mean, that's something that has to be considered

00:10:47.110 --> 00:10:49.510
<v Sjors Provoost>somewhat carefully because it would impact a lot of different nodes.

00:10:50.740 --> 00:10:56.220
<v Aaron van Wirdum>Okay, but the functionality has not changed so far. It's just

00:10:56.220 --> 00:10:58.720
<v Aaron van Wirdum>fewer bugs, presumably.

00:10:59.420 --> 00:11:02.580
<v Sjors Provoost>Now, the bugs that were originally found were fixed, but the problem is, of

00:11:02.580 --> 00:11:05.680
<v Sjors Provoost>course, if you found multiple really bad bugs in a project, do you still want to

00:11:05.680 --> 00:11:08.920
<v Sjors Provoost>use it? Maybe not, because maybe you didn't find all of them.

00:11:09.240 --> 00:11:11.980
<v Aaron van Wirdum>And did I understand correctly that...

00:11:13.250 --> 00:11:19.150
<v Aaron van Wirdum>PCP, either PCP itself or the integration of PCP. Okay, first question.

00:11:19.430 --> 00:11:22.390
<v Aaron van Wirdum>Is PCP a Bitcoin-specific project?

00:11:22.630 --> 00:11:22.870
<v Sjors Provoost>No.

00:11:23.030 --> 00:11:23.250
<v Aaron van Wirdum>Okay.

00:11:23.490 --> 00:11:27.170
<v Sjors Provoost>No, it's a general project, simply just like UPnP, which was not a Bitcoin

00:11:27.170 --> 00:11:31.330
<v Sjors Provoost>-specific project. It was used by torrent clients, all that sort of stuff, to be

00:11:31.330 --> 00:11:34.790
<v Sjors Provoost>able to open your ports automatically. Games tend to use this stuff like this.

00:11:35.150 --> 00:11:40.880
<v Aaron van Wirdum>Right. And then, did I understand that? Then the integration of PCP into

00:11:40.880 --> 00:11:42.940
<v Aaron van Wirdum>Bitcoin Core was done by Wladimir van der Laan?

00:11:43.080 --> 00:11:48.120
<v Sjors Provoost>That's right, yes. And he actually re-implemented it. So he rewrote the code

00:11:48.120 --> 00:11:51.080
<v Sjors Provoost>specifically in C++. So that's kind of nice.

00:11:51.540 --> 00:11:55.260
<v Aaron van Wirdum>Right. Yeah, that's cool. Nice to hear that Wladimir is back at it.

00:11:55.700 --> 00:11:55.920
<v Sjors Provoost>Yep.

00:11:56.080 --> 00:11:59.720
<v Aaron van Wirdum>In case there's listeners that don't know, Wladimir was the lead developer of

00:11:59.720 --> 00:12:02.770
<v Aaron van Wirdum>Bitcoin Core for eight years?

00:12:03.130 --> 00:12:03.950
<v Sjors Provoost>Very long time.

00:12:03.990 --> 00:12:08.050
<v Aaron van Wirdum>Yeah, a whole while. Took a step back. So very nice to hear that he's back at it.

00:12:08.540 --> 00:12:12.980
<v Sjors Provoost>Well, not back at the annoying work of being a maintainer, but simply doing the...

00:12:12.980 --> 00:12:13.500
<v Aaron van Wirdum>Contributing.

00:12:13.660 --> 00:12:15.240
<v Sjors Provoost>Doing the interesting stuff. Yeah, exactly.

00:12:16.860 --> 00:12:21.240
<v Aaron van Wirdum>Okay, the next one has definitely the coolest name out of the list.

00:12:21.580 --> 00:12:22.440
<v Sjors Provoost>Ephemeral Dust.

00:12:22.900 --> 00:12:24.580
<v Aaron van Wirdum>There we go. Although,

00:12:26.430 --> 00:12:31.200
<v Aaron van Wirdum>yeah, no, that's got to be the coolest one. Okay, Ephemeral Dust. What does it

00:12:31.200 --> 00:12:32.600
<v Aaron van Wirdum>do? What is it? What are we talking about?

00:12:32.780 --> 00:12:36.900
<v Sjors Provoost>It's a new Finnish metal band started by Martti Malmi. No.

00:12:37.140 --> 00:12:38.200
<v Aaron van Wirdum>Embedded in Bitcoin Core?

00:12:38.840 --> 00:12:39.280
<v Sjors Provoost>Exactly.

00:12:39.390 --> 00:12:40.450
<v Aaron van Wirdum>Plays by default?

00:12:40.450 --> 00:12:45.290
<v Sjors Provoost>I guess embedded in Bitcoin Core would also be a nice metal band name but

00:12:45.290 --> 00:12:50.730
<v Sjors Provoost>in any case basically the idea we've talked about

00:12:50.730 --> 00:12:56.170
<v Sjors Provoost>child pays for parent kind of situations in the mempool back in our episode about

00:12:56.170 --> 00:13:00.230
<v Sjors Provoost>version 28 which I think is just two episodes ago so for you it would have been

00:13:00.230 --> 00:13:02.450
<v Sjors Provoost>20 minutes ago if you're listening to the whole series in one go

00:13:03.370 --> 00:13:08.990
<v Aaron van Wirdum>Child pays for parent means you are receiving a transaction, but the fee is so

00:13:08.990 --> 00:13:13.810
<v Aaron van Wirdum>low that it's just sort of hanging around in the mempool. kind of being

00:13:13.810 --> 00:13:18.110
<v Aaron van Wirdum>unconfirmed in your wallet. And then the way you can solve that is to actually

00:13:18.110 --> 00:13:23.790
<v Aaron van Wirdum>spend these coins to yourself with a higher fee in the new transaction. And then

00:13:23.790 --> 00:13:27.830
<v Aaron van Wirdum>miners will sort of make the overall calculation that if they include both

00:13:27.830 --> 00:13:31.950
<v Aaron van Wirdum>transactions, both the original transaction to you, as well as the new

00:13:31.950 --> 00:13:36.790
<v Aaron van Wirdum>transaction you just made to yourself with the same coins, then they're both

00:13:36.790 --> 00:13:40.880
<v Aaron van Wirdum>getting confirmed and your coins are finally... In your wallet.

00:13:41.120 --> 00:13:44.780
<v Sjors Provoost>Exactly. So you have to bring some of your own coins in order to pay the fees for

00:13:44.780 --> 00:13:47.940
<v Sjors Provoost>the transaction that you want to receive. Now, in your example, it was still in

00:13:47.940 --> 00:13:51.420
<v Sjors Provoost>the mempool. But imagine the fees are so low that they're not even in the

00:13:51.420 --> 00:13:57.000
<v Sjors Provoost>mempool. Then you have to relay them together because nobody's mempool will

00:13:57.000 --> 00:14:00.780
<v Sjors Provoost>accept it if the fee of the original is too low. And this is called package

00:14:00.780 --> 00:14:05.310
<v Sjors Provoost>relay, which we covered in that episode. So you relay two packages, two

00:14:05.310 --> 00:14:09.610
<v Sjors Provoost>transactions as a package. And then every node along the way can reason about it

00:14:09.610 --> 00:14:13.430
<v Sjors Provoost>and say, hey, okay, this is fine. This should be interesting enough for a miner

00:14:13.430 --> 00:14:13.930
<v Sjors Provoost>to include.

00:14:14.210 --> 00:14:18.990
<v Aaron van Wirdum>Yeah, so basically nodes would start to use... How far are we with this? I know

00:14:18.990 --> 00:14:20.430
<v Aaron van Wirdum>we covered it in previous episodes.

00:14:20.730 --> 00:14:23.770
<v Sjors Provoost>Yeah, we covered most of this, but this might be useful to go to the basics.

00:14:23.910 --> 00:14:26.890
<v Sjors Provoost>That's what a package is. And the only form of packages that Bitcoin Core

00:14:26.890 --> 00:14:32.090
<v Sjors Provoost>supports is one parent, one child. And that has simply to do with the fact that

00:14:32.090 --> 00:14:34.770
<v Sjors Provoost>it's complicated to reason about anything bigger than that.

00:14:34.930 --> 00:14:37.210
<v Aaron van Wirdum>Well, that was included in the previous Bitcoin Core release.

00:14:37.350 --> 00:14:37.730
<v Sjors Provoost>Yes, in 28.

00:14:38.150 --> 00:14:43.790
<v Aaron van Wirdum>Yeah, so, I mean, the idea then is basically that nodes will use a similar

00:14:43.790 --> 00:14:44.710
<v Aaron van Wirdum>-ish...

00:14:47.070 --> 00:14:52.530
<v Aaron van Wirdum>strategy as miners. Like miners already make this calculation and now nodes have

00:14:52.530 --> 00:14:56.330
<v Aaron van Wirdum>been starting to make a similar calculation to decide if transactions show up in

00:14:56.330 --> 00:14:57.490
<v Aaron van Wirdum>the mempool. Yes.

00:14:57.790 --> 00:15:03.350
<v Sjors Provoost>And so then the part where dust comes in, part of the ephemeral part, is that,

00:15:03.390 --> 00:15:07.570
<v Sjors Provoost>well, there's other rules that don't allow you to relay stuff in the mempool. And

00:15:07.570 --> 00:15:11.430
<v Sjors Provoost>one of them is if you're creating an output that is too small. It used to be like

00:15:11.430 --> 00:15:17.060
<v Sjors Provoost>543 bytes. sorry, sats, if you had an output that was less than 543

00:15:17.060 --> 00:15:21.760
<v Sjors Provoost>sats, nodes would say, this is dust, I'm not going to relay it. It's valid in the

00:15:21.760 --> 00:15:25.060
<v Sjors Provoost>blockchain, but I'm not going to relay it. That was just basically a way to

00:15:25.060 --> 00:15:28.620
<v Sjors Provoost>prevent somebody from creating lots of very small outputs. And the UTXO set that

00:15:28.620 --> 00:15:32.150
<v Sjors Provoost>are just wasting everybody's memory, or whatever they're wasting.

00:15:34.470 --> 00:15:40.100
<v Sjors Provoost>And so... If you have a one-child-one-parent construction, but the child is...

00:15:40.100 --> 00:15:43.760
<v Sjors Provoost>Basically, the parent has a bunch of dust as the output, and the child is

00:15:43.760 --> 00:15:48.250
<v Sjors Provoost>consuming the dust, and then paying their own fees. So they might be paying

00:15:48.250 --> 00:15:52.250
<v Sjors Provoost>enough fees, but because there's dust involved, the nodes would still reject it,

00:15:52.450 --> 00:15:57.810
<v Sjors Provoost>because they don't like dust. And the ultimate example of dust is a zero output.

00:15:58.340 --> 00:15:59.980
<v Aaron van Wirdum>Yeah, which is apparently possible.

00:16:00.600 --> 00:16:05.340
<v Sjors Provoost>Yes, yeah, definitely. There was, I think, a year ago, back when everybody was,

00:16:06.160 --> 00:16:08.180
<v Sjors Provoost>you know, remember this ordinals inscriptions hype?

00:16:08.400 --> 00:16:08.660
<v Aaron van Wirdum>Mm-hmm.

00:16:09.100 --> 00:16:12.780
<v Sjors Provoost>So the ordinals inscriptions, they come up with this set of rules that are not

00:16:12.780 --> 00:16:15.760
<v Sjors Provoost>consensus rules, so just their own rules, and it would count, like, you know, you

00:16:15.760 --> 00:16:19.640
<v Sjors Provoost>are sat number one, sat number two, yadda yadda yadda. And it turns out, I think

00:16:19.640 --> 00:16:23.640
<v Sjors Provoost>they didn't take account of the possibility to have a transaction that has zero

00:16:23.640 --> 00:16:26.180
<v Sjors Provoost>sats as an input and zero sats as an output.

00:16:27.910 --> 00:16:31.970
<v Sjors Provoost>Somebody made one as a joke, like just sent it directly to a miner because it's

00:16:31.970 --> 00:16:37.030
<v Sjors Provoost>consensus valid, even though it's not standard. And so all their tools were off

00:16:37.030 --> 00:16:40.670
<v Sjors Provoost>by one. Because the numbering system was broken, basically.

00:16:41.170 --> 00:16:45.750
<v Aaron van Wirdum>Okay, so you can, because I didn't, I don't know, I don't think I knew this. You

00:16:45.750 --> 00:16:49.710
<v Aaron van Wirdum>can apparently, in Bitcoin, spend zero Bitcoin.

00:16:50.010 --> 00:16:50.410
<v Sjors Provoost>Yes.

00:16:50.610 --> 00:16:55.150
<v Aaron van Wirdum>To an address that then receives zero Bitcoin. That's like a valid transaction.

00:16:55.390 --> 00:16:56.790
<v Sjors Provoost>Yeah, and you're paying zero fees.

00:16:57.090 --> 00:17:01.810
<v Aaron van Wirdum>And zero fees, yeah. So as long as a miner includes that in a block, then

00:17:01.810 --> 00:17:04.770
<v Aaron van Wirdum>everyone's going to say, yeah, makes sense. Zero, zero to zero.

00:17:04.770 --> 00:17:07.970
<v Sjors Provoost>Yes, and of course miners have no financial. good financial reason to do that

00:17:07.970 --> 00:17:11.510
<v Sjors Provoost>unless they're being paid out of band so we don't want to encourage this but yeah

00:17:11.510 --> 00:17:14.430
<v Sjors Provoost>you can fill a whole block with just zero fee transactions as far as I know.

00:17:14.430 --> 00:17:15.090
<v Aaron van Wirdum>Okay, what's…

00:17:15.090 --> 00:17:15.690
<v Sjors Provoost>Zero amount.

00:17:15.690 --> 00:17:20.490
<v Aaron van Wirdum>And I know we were getting there but what is the what's the benefit of making

00:17:20.490 --> 00:17:23.650
<v Aaron van Wirdum>because there is apparently an actual benefit to doing this sometimes

00:17:23.650 --> 00:17:29.210
<v Sjors Provoost>so I think the easiest example would be a Lightning transaction or so we you and

00:17:29.210 --> 00:17:32.950
<v Sjors Provoost>I have a Lightning channel And there's two ways we can close it. One is we are

00:17:32.950 --> 00:17:36.470
<v Sjors Provoost>online together and we decide to close it cooperatively. We look at the fee

00:17:36.470 --> 00:17:40.050
<v Sjors Provoost>market and we just make a transaction that closes the channel, pays enough fees, done.

00:17:40.330 --> 00:17:40.530
<v Aaron van Wirdum>Yeah.

00:17:40.890 --> 00:17:44.670
<v Sjors Provoost>But the other scenario is one of us is not offline or one of us is trying to cheat.

00:17:45.010 --> 00:17:46.470
<v Aaron van Wirdum>But one of us is offline.

00:17:47.350 --> 00:17:51.450
<v Sjors Provoost>Yeah, sorry, is offline, is not online. One of us is trying to cheat some

00:17:51.450 --> 00:17:55.650
<v Sjors Provoost>scenario like that where we cannot cooperate. That means we have to broadcast the

00:17:55.650 --> 00:17:59.230
<v Sjors Provoost>transaction that we signed in the past. So we previously got together when we

00:17:59.230 --> 00:18:03.330
<v Sjors Provoost>were still buddies. We signed this transaction and we say, this closes the

00:18:03.330 --> 00:18:04.250
<v Sjors Provoost>channel for both of us.

00:18:05.680 --> 00:18:09.960
<v Sjors Provoost>However, we don't know when or if we're going to use this transaction. So we have

00:18:09.960 --> 00:18:11.520
<v Sjors Provoost>no idea how much fees to put in this thing.

00:18:13.390 --> 00:18:16.730
<v Sjors Provoost>So what Lightning nodes in the beginning had to do is just pick the worst case

00:18:16.730 --> 00:18:19.810
<v Sjors Provoost>possible fee and that was kind of annoying because you're reserving a lot of

00:18:19.810 --> 00:18:25.420
<v Sjors Provoost>money for a case that might never happen. So what you can do instead is you

00:18:25.420 --> 00:18:30.760
<v Sjors Provoost>add zero fees to this transaction and you say this has to be paid by a child. So

00:18:30.760 --> 00:18:35.420
<v Sjors Provoost>it's like bring your own fees. That way we don't have to decide in advance what

00:18:35.420 --> 00:18:41.210
<v Sjors Provoost>the fees are going to be. And if this scenario occurs... you or I want to close

00:18:41.210 --> 00:18:45.620
<v Sjors Provoost>the channel, we add one of our own inputs to it, and that pays for the fees.

00:18:46.280 --> 00:18:51.580
<v Aaron van Wirdum>Yeah, right. So basically, you and I establish a Lightning channel,

00:18:51.760 --> 00:18:57.500
<v Aaron van Wirdum>and the closing transaction, in case one of us is

00:18:57.500 --> 00:19:03.340
<v Aaron van Wirdum>unresponsive, in case Sjors ends up in the El Salvadoran prison, then I

00:19:03.340 --> 00:19:08.990
<v Aaron van Wirdum>can still broadcast the Lightning transaction with the zero fee. And the way I

00:19:08.990 --> 00:19:14.290
<v Aaron van Wirdum>get that included in an actual block is to take some of my own coins, spend these

00:19:14.290 --> 00:19:19.610
<v Aaron van Wirdum>to myself, child pays for parents style. But in that transaction also includes

00:19:19.610 --> 00:19:23.870
<v Aaron van Wirdum>that zero, zero to zero with zero fee transactions. So now that's part of one

00:19:23.870 --> 00:19:24.270
<v Aaron van Wirdum>transaction.

00:19:24.430 --> 00:19:26.410
<v Sjors Provoost>And it's not just zero fees, it's also zero amount.

00:19:26.830 --> 00:19:28.150
<v Aaron van Wirdum>Yeah, exactly. Zero to zero.

00:19:28.290 --> 00:19:32.870
<v Sjors Provoost>Yeah, exactly. So the nice thing is you have a transaction that is creating an

00:19:32.870 --> 00:19:36.610
<v Sjors Provoost>output that is zero, which is dust. and you have a transaction that spends the

00:19:36.610 --> 00:19:39.930
<v Sjors Provoost>dust. And so this transaction that creates dust normally would not get broadcast

00:19:39.930 --> 00:19:45.910
<v Sjors Provoost>because it is dust. But this thing called ephemeral dust is saying, well, as long

00:19:45.910 --> 00:19:49.650
<v Sjors Provoost>as you're creating dust and immediately removing the dust, we're going to allow

00:19:49.650 --> 00:19:54.810
<v Sjors Provoost>that. And so that's being relayed, and it's hopefully being mined as a pair. So

00:19:54.810 --> 00:19:56.230
<v Sjors Provoost>in the end, there's no dust.

00:19:56.510 --> 00:20:02.110
<v Aaron van Wirdum>Okay, so what's new here is, I think we're talking here about the relay

00:20:02.110 --> 00:20:08.090
<v Aaron van Wirdum>policy of Bitcoin Core now takes this into account. My Bitcoin

00:20:08.090 --> 00:20:12.630
<v Aaron van Wirdum>Core node or your Bitcoin Core node or anyone else's Bitcoin Core node, as long

00:20:12.630 --> 00:20:16.590
<v Aaron van Wirdum>as they upgrade it to Bitcoin Core 29, of course, they will actually look at

00:20:16.590 --> 00:20:20.640
<v Aaron van Wirdum>these transactions in tandem and they will say, okay, that's a dust transaction,

00:20:20.970 --> 00:20:25.810
<v Aaron van Wirdum>but because it's immediately being spent as well, it's fine. This is not going to

00:20:25.810 --> 00:20:30.970
<v Aaron van Wirdum>create an extra UTXO in my database or anyone else's database. In other words,

00:20:31.150 --> 00:20:32.130
<v Aaron van Wirdum>it's ephemeral.

00:20:32.790 --> 00:20:33.310
<v Sjors Provoost>Exactly.

00:20:34.580 --> 00:20:36.440
<v Aaron van Wirdum>Now we know why it has such a cool name.

00:20:36.860 --> 00:20:41.500
<v Sjors Provoost>Yeah, and my understanding is that there are some fancy future protocols people

00:20:41.500 --> 00:20:47.100
<v Sjors Provoost>have in mind, like LN-Symmetry, etc., where you might have a series of

00:20:47.100 --> 00:20:52.320
<v Sjors Provoost>transactions for whatever reason, like three in a row. And it's nice if all three

00:20:52.320 --> 00:20:56.540
<v Sjors Provoost>of them are the exact same amount versus, you know, transaction one is a little

00:20:56.540 --> 00:20:58.820
<v Sjors Provoost>bit lower than transaction two is a little bit lower than transaction three

00:20:58.820 --> 00:21:02.080
<v Sjors Provoost>because they're all paying for their own fees. Makes it easier to reason about if

00:21:02.080 --> 00:21:06.750
<v Sjors Provoost>the amounts stay identical. And so for those kind of constructs, ephemeral dust

00:21:06.750 --> 00:21:09.210
<v Sjors Provoost>is also useful to have, but that's for the future.

00:21:09.570 --> 00:21:11.250
<v Aaron van Wirdum>Okay. And just to wrap this up.

00:21:11.410 --> 00:21:14.450
<v Sjors Provoost>And apparently Lightning devs are super happy with this ephemeral dust stuff.

00:21:14.860 --> 00:21:19.780
<v Aaron van Wirdum>Well, that's how I wanted to wrap it up, basically. The practical benefit of this

00:21:19.780 --> 00:21:25.620
<v Aaron van Wirdum>is that so far, if you wanted to make a Lightning channel,

00:21:25.760 --> 00:21:30.660
<v Aaron van Wirdum>then you kind of had to be on the safe side and include a high fee for the

00:21:30.660 --> 00:21:34.800
<v Aaron van Wirdum>fallback transaction because you don't know how high fees are going to be in the

00:21:34.800 --> 00:21:40.680
<v Aaron van Wirdum>future. So you're likely going to overpay on fees if you use this fallback

00:21:40.680 --> 00:21:45.770
<v Aaron van Wirdum>mechanism. And now with this, you can just... make the exact right fee for

00:21:45.770 --> 00:21:48.570
<v Aaron van Wirdum>depending on how much in the rush you are.

00:21:48.790 --> 00:21:49.830
<v Sjors Provoost>And it means you can also use more.

00:21:49.830 --> 00:21:53.870
<v Aaron van Wirdum>In other words, you can use lower fees for closing Lightning channels.

00:21:53.870 --> 00:21:58.090
<v Sjors Provoost>Yeah, and it means in general you can use more of your channel because if you're,

00:21:58.090 --> 00:22:02.070
<v Sjors Provoost>you know, reserving 10% of your channel for a worst case fee, you can't actually

00:22:02.070 --> 00:22:02.610
<v Sjors Provoost>spend that.

00:22:03.070 --> 00:22:07.970
<v Aaron van Wirdum>Right, yeah. I see, yeah. So it improves the Lightning network in...

00:22:09.740 --> 00:22:14.520
<v Aaron van Wirdum>That way. Lower fees and therefore more actual liquidity on Lightning itself.

00:22:14.600 --> 00:22:19.220
<v Sjors Provoost>The little caveat there is that you do have to bring your own UTXO. So if you

00:22:19.220 --> 00:22:22.700
<v Sjors Provoost>have a Lightning wallet that only has a channel, now things get a little bit more

00:22:22.700 --> 00:22:26.420
<v Sjors Provoost>complicated because how are you actually going to do the child pay for parents if

00:22:26.420 --> 00:22:31.460
<v Sjors Provoost>you don't have any children? But, you know, the rabbit hole does not end here,

00:22:31.460 --> 00:22:32.820
<v Sjors Provoost>but it is a lot better this way.

00:22:32.920 --> 00:22:37.620
<v Aaron van Wirdum>You need to have at least one other UTXO or another channel in the same wallet.

00:22:38.020 --> 00:22:38.720
<v Sjors Provoost>Yeah, maybe.

00:22:39.680 --> 00:22:42.300
<v Aaron van Wirdum>I guess that could work, depending on how it's designed.

00:22:43.820 --> 00:22:49.750
<v Aaron van Wirdum>Okay, that was Ephemeral Dust. Then we go to a slightly less cool

00:22:49.750 --> 00:22:55.810
<v Aaron van Wirdum>name. Still pretty cool, but less cool. Block Reserved Weight.

00:22:57.050 --> 00:22:57.530
<v Sjors Provoost>Yes.

00:22:57.690 --> 00:22:59.870
<v Aaron van Wirdum>What is the update here? Block Reserved Weight.

00:23:00.330 --> 00:23:05.490
<v Sjors Provoost>Yeah, so basically a little background here is Bitcoin Core is able to make block

00:23:05.490 --> 00:23:10.570
<v Sjors Provoost>templates that miners can use to create a block, basically. And Bitcoin Core

00:23:10.570 --> 00:23:13.430
<v Sjors Provoost>tries to stuff as many transactions as it can into a block to give you the

00:23:13.430 --> 00:23:17.610
<v Sjors Provoost>maximum fees. However, as a miner, you need to bring your own Coinbase

00:23:17.610 --> 00:23:20.570
<v Sjors Provoost>transaction. That's just how the protocol works.

00:23:20.710 --> 00:23:25.570
<v Aaron van Wirdum>Yeah, that's the transaction that pays the coins, the new coins and the fees to

00:23:25.570 --> 00:23:26.130
<v Aaron van Wirdum>the miners.

00:23:26.150 --> 00:23:31.210
<v Sjors Provoost>It does that. It might also have some commitments to various, like, what's it

00:23:31.210 --> 00:23:33.070
<v Sjors Provoost>called? Like co-mining.

00:23:34.470 --> 00:23:36.150
<v Aaron van Wirdum>Do you mean like the OCEAN thing?

00:23:36.710 --> 00:23:40.270
<v Sjors Provoost>Not OCEAN thing, but usually there's all these other protocols that you're mining

00:23:40.270 --> 00:23:41.370
<v Sjors Provoost>on, so merge mining.

00:23:41.530 --> 00:23:41.890
<v Aaron van Wirdum>Sure, yeah.

00:23:42.050 --> 00:23:45.070
<v Sjors Provoost>So there may be other stuff in the Coinbase that Bitcoin Core just doesn't do for

00:23:45.070 --> 00:23:49.540
<v Sjors Provoost>you. So what that means is that Bitcoin Core does not know how big the Coinbase

00:23:49.540 --> 00:23:53.080
<v Sjors Provoost>transaction is going to be. Therefore, it doesn't precisely know how much

00:23:53.080 --> 00:23:56.500
<v Sjors Provoost>transactions it can actually put in your block. Because the Coinbase does count

00:23:56.500 --> 00:24:01.400
<v Sjors Provoost>towards the limit, as does the header. You don't want to forget that.

00:24:03.020 --> 00:24:08.520
<v Sjors Provoost>So it used to be that Bitcoin Core, I think, tried to reserve 4,000

00:24:08.520 --> 00:24:14.250
<v Sjors Provoost>bytes for this. Basically just like here, okay, I'll just not use 4,000 bytes and

00:24:14.250 --> 00:24:14.990
<v Sjors Provoost>then you should be okay.

00:24:16.710 --> 00:24:21.190
<v Sjors Provoost>Accidentally, that was increased to 8,000 bytes. So it wasn't a complete accident

00:24:21.190 --> 00:24:24.810
<v Sjors Provoost>because the commit that did that, the pull request that did that had a comment

00:24:24.810 --> 00:24:28.030
<v Sjors Provoost>saying, oh, I think we're doing it twice now. And then the reaction was, yeah, it's fine.

00:24:29.140 --> 00:24:33.760
<v Aaron van Wirdum>That's the attitude I like to hear from the Bitcoin Core developers that are

00:24:33.760 --> 00:24:36.180
<v Aaron van Wirdum>building the future of money.

00:24:36.500 --> 00:24:40.940
<v Sjors Provoost>Well, it's better to be safe than sorry. But basically, you know, some miners

00:24:40.940 --> 00:24:44.020
<v Sjors Provoost>really want to squeeze out every last bit because the downside is, you know, if

00:24:44.020 --> 00:24:49.840
<v Sjors Provoost>we reserve 8,000 bytes by default, but you only need, I don't know,

00:24:50.890 --> 00:24:55.440
<v Sjors Provoost>500 bytes for your Coinbase. kind of, you know, you're throwing away some

00:24:55.440 --> 00:24:56.280
<v Sjors Provoost>potential fees there.

00:24:56.560 --> 00:25:01.000
<v Aaron van Wirdum>Yeah, you're leaving, you have unnecessary headroom.

00:25:01.280 --> 00:25:03.820
<v Sjors Provoost>Yeah, you're leaving sats on the table and then what happens is miners think,

00:25:03.960 --> 00:25:08.020
<v Sjors Provoost>hey, I'm leaving sats on the table. Let me edit the Bitcoin Core source code and

00:25:08.020 --> 00:25:12.180
<v Sjors Provoost>change this stuff so it uses the exact, you know, limit. And then they make a

00:25:12.180 --> 00:25:16.140
<v Sjors Provoost>mistake because Bitcoin Core stuff is hard to reason about and they produce a

00:25:16.140 --> 00:25:21.640
<v Sjors Provoost>block with 4,000,001 weight units and now they've lost hundreds of thousands of

00:25:21.640 --> 00:25:26.040
<v Sjors Provoost>dollars. while trying to save themselves two cents. So we want to discourage

00:25:26.040 --> 00:25:31.630
<v Sjors Provoost>that. And one way to do that is by giving people what they want, mostly, so that

00:25:31.630 --> 00:25:35.230
<v Sjors Provoost>they don't have to start doing this editing. So there's a new setting now that's

00:25:35.230 --> 00:25:39.410
<v Sjors Provoost>called block reserved weight. It defaults to this 8,000 number that Bitcoin Core

00:25:39.410 --> 00:25:42.570
<v Sjors Provoost>is already using, but you can set it lower if you know what you're doing.

00:25:42.950 --> 00:25:48.490
<v Aaron van Wirdum>Okay. So I think that was clear, but I'll repeat it anyways. So yeah, right

00:25:48.490 --> 00:25:54.240
<v Aaron van Wirdum>now... In blocks, Bitcoin Core reserves 8,000 bytes for

00:25:54.240 --> 00:25:55.460
<v Aaron van Wirdum>the Coinbase transaction.

00:25:55.760 --> 00:25:58.260
<v Sjors Provoost>8,000 weight units, but yeah.

00:25:58.580 --> 00:26:02.980
<v Aaron van Wirdum>Sure. That's a standard number, and now that's become configurable.

00:26:03.420 --> 00:26:09.420
<v Sjors Provoost>That's right. Not less than 2,000. We don't

00:26:09.420 --> 00:26:13.460
<v Sjors Provoost>think you should go below 2,000. If you do, then edit the source code, but don't blame us.

00:26:14.280 --> 00:26:18.740
<v Aaron van Wirdum>I mean, I have no idea what these numbers mean. I don't know how big is a

00:26:18.740 --> 00:26:19.940
<v Aaron van Wirdum>Coinbase transaction usually.

00:26:21.070 --> 00:26:24.390
<v Sjors Provoost>That really depends on what you're doing. Like OCEAN pool is trying to pay all of

00:26:24.390 --> 00:26:27.650
<v Sjors Provoost>their miners directly, so those are quite big. But they already know how to use

00:26:27.650 --> 00:26:28.330
<v Sjors Provoost>settings like this.

00:26:29.990 --> 00:26:33.950
<v Sjors Provoost>But, you know, a minimum Coinbase transaction might be a lot smaller. You also

00:26:33.950 --> 00:26:37.730
<v Sjors Provoost>have to include the block header. So the block header is 80 bytes, which times 4

00:26:37.730 --> 00:26:43.620
<v Sjors Provoost>is [unclear] units. And then a transaction might be another 400. So

00:26:43.620 --> 00:26:49.440
<v Sjors Provoost>maybe the minimum is 800, 900. But basically, while we were reviewing this pull

00:26:49.440 --> 00:26:52.940
<v Sjors Provoost>request, people kept getting confused. They're like, well, if this confuses us,

00:26:53.480 --> 00:26:56.820
<v Sjors Provoost>probably we should just pick a higher number than what we think it can be.

00:26:57.180 --> 00:26:58.220
<v Sjors Provoost>Because we might be wrong.

00:26:58.680 --> 00:27:03.620
<v Aaron van Wirdum>Okay, but why make the minimum, maximum, wait, which one is it?

00:27:03.760 --> 00:27:04.840
<v Sjors Provoost>The minimum is 2,000.

00:27:05.020 --> 00:27:07.250
<v Aaron van Wirdum>Yeah, why not? Why?

00:27:07.530 --> 00:27:10.670
<v Sjors Provoost>Because if you set a number that's too low, you produce a block that's invalid.

00:27:10.910 --> 00:27:13.940
<v Aaron van Wirdum>That's not your problem, though, as a Bitcoin developer.

00:27:13.070 --> 00:27:15.610
<v Sjors Provoost>Who do you think they're going to get angry at?

00:27:17.570 --> 00:27:23.030
<v Aaron van Wirdum>Okay, so you're still giving some room for error there, or some safety,

00:27:23.110 --> 00:27:24.270
<v Aaron van Wirdum>some seat belt.

00:27:24.430 --> 00:27:27.130
<v Sjors Provoost>Belt and suspenders, and if you really know what you're doing, you can edit the

00:27:27.130 --> 00:27:27.590
<v Sjors Provoost>source code.

00:27:27.810 --> 00:27:28.550
<v Aaron van Wirdum>Okay, fair enough.

00:27:28.550 --> 00:27:30.910
<v Sjors Provoost>You really shouldn't for those five sats extra.

00:27:31.850 --> 00:27:37.590
<v Aaron van Wirdum>Right. Okay, so that's new. Next one, there's

00:27:37.590 --> 00:27:43.570
<v Aaron van Wirdum>some mediation or solution. No, I'll just let you explain it. It has to do

00:27:43.570 --> 00:27:44.550
<v Aaron van Wirdum>with a time warp attack.

00:27:44.870 --> 00:27:49.090
<v Sjors Provoost>Exactly. So as you know, we talked about the time warp attack in general many

00:27:49.090 --> 00:27:49.830
<v Sjors Provoost>episodes ago.

00:27:51.360 --> 00:27:55.200
<v Sjors Provoost>Now, there is a new proposal called the Great Consensus Cleanup that tries to fix

00:27:55.200 --> 00:28:00.420
<v Sjors Provoost>the time warp attack once and for all. That is not deployed yet, but we do want

00:28:00.420 --> 00:28:05.040
<v Sjors Provoost>to deploy some code in the miner that makes sure no accidents happen should this

00:28:05.040 --> 00:28:06.080
<v Sjors Provoost>soft fork ever become active.

00:28:06.600 --> 00:28:10.540
<v Aaron van Wirdum>Okay, so there's now... I do want you to explain what the time warp attack was,

00:28:10.680 --> 00:28:14.740
<v Aaron van Wirdum>or at least in brief. But if I understand this upgrade correctly,

00:28:15.980 --> 00:28:21.090
<v Aaron van Wirdum>Bitcoin Core has included a solution to a potential

00:28:21.090 --> 00:28:26.030
<v Aaron van Wirdum>future problem based on a future upgrade. So the solution is now there, but the

00:28:26.030 --> 00:28:26.790
<v Aaron van Wirdum>problem not yet.

00:28:26.990 --> 00:28:31.630
<v Sjors Provoost>Basically, if you upgrade to V29 as a miner, but then you don't upgrade to

00:28:31.630 --> 00:28:36.250
<v Sjors Provoost>whatever new version has this eventual soft fork, you will not accidentally

00:28:36.250 --> 00:28:37.610
<v Sjors Provoost>violate the soft fork.

00:28:38.030 --> 00:28:43.190
<v Aaron van Wirdum>Right, okay. So yeah, I see how that makes sense. It sounded more

00:28:43.190 --> 00:28:47.870
<v Aaron van Wirdum>silly when I said it, but yeah, of course, sometimes miners will be slow to

00:28:47.870 --> 00:28:49.750
<v Aaron van Wirdum>upgrade, so actually it's a good idea to already.

00:28:49.930 --> 00:28:54.150
<v Sjors Provoost>Yeah, and generally with soft fork, it is important for miners to upgrade, but

00:28:54.150 --> 00:28:59.910
<v Sjors Provoost>there are, ideally, you need 90% of miners to upgrade just to signal

00:28:59.910 --> 00:29:04.990
<v Sjors Provoost>that they did so and safely enforce it so that there's no long reorgs.

00:29:04.990 --> 00:29:08.520
<v Aaron van Wirdum>That depends on... what settings you use, right?

00:29:08.740 --> 00:29:12.760
<v Sjors Provoost>If we ignore all the UASF stuff, the normal way that soft forks have been

00:29:12.760 --> 00:29:17.340
<v Sjors Provoost>deployed so far, most of them, all of them, depending on who you ask, is 90% of

00:29:17.340 --> 00:29:20.560
<v Sjors Provoost>the miners signal that they're ready to enforce it, which means that if a miner

00:29:20.560 --> 00:29:26.480
<v Sjors Provoost>doesn't upgrade, their block gets orphaned, but there's not going to be a long

00:29:26.480 --> 00:29:30.100
<v Sjors Provoost>chain split. Because if only half the miners enforce the soft fork, then you

00:29:30.100 --> 00:29:33.400
<v Sjors Provoost>might get two roughly equally sized blockchains going in different ways and it

00:29:33.400 --> 00:29:34.380
<v Sjors Provoost>becomes an absolute mess.

00:29:36.610 --> 00:29:40.610
<v Aaron van Wirdum>Strictly speaking, I think the 90% number has only been used once with Taproot.

00:29:40.990 --> 00:29:44.510
<v Aaron van Wirdum>But that's another topic, because I think SegWit was 95%.

00:29:44.510 --> 00:29:45.750
<v Sjors Provoost>That's even safer.

00:29:46.050 --> 00:29:51.150
<v Aaron van Wirdum>Sure. And then, of course, there's... Well, let's not rehash that.

00:29:51.150 --> 00:29:53.510
<v Sjors Provoost>The point is, what happens with miners that don't upgrade?

00:29:53.510 --> 00:29:59.450
<v Aaron van Wirdum>I think during the block size, whatever the thing was called, that was even

00:29:59.450 --> 00:30:02.210
<v Aaron van Wirdum>lower, like 75%. Anyways.

00:30:03.950 --> 00:30:08.270
<v Aaron van Wirdum>That was not the Bitcoin Core thing. That was the Jeff Garzik thing.

00:30:08.270 --> 00:30:12.210
<v Sjors Provoost>The question is, in this way that some people would like to see soft forks

00:30:12.210 --> 00:30:16.690
<v Sjors Provoost>happen, what happens to the miners that don't upgrade? Now, usually there's some,

00:30:16.850 --> 00:30:21.090
<v Sjors Provoost>for example, one of the reasons for standardness transactions is that if there's

00:30:21.090 --> 00:30:25.150
<v Sjors Provoost>a soft fork, the new transaction type that appears in this soft fork is non

00:30:25.150 --> 00:30:29.590
<v Sjors Provoost>-standard for the older nodes. So an old miner will think a transaction is non

00:30:29.590 --> 00:30:33.430
<v Sjors Provoost>-standard and won't include it in their blocks. So you cannot accidentally violate

00:30:33.430 --> 00:30:37.030
<v Sjors Provoost>the rules of a soft fork when it comes to transactions, even if you as a miner

00:30:37.030 --> 00:30:37.530
<v Sjors Provoost>don't upgrade.

00:30:38.820 --> 00:30:43.040
<v Aaron van Wirdum>Let's get away from a soft fork topic and let's go to the time warp topic. All

00:30:43.040 --> 00:30:44.820
<v Aaron van Wirdum>right. So what is the time warp attack?

00:30:45.140 --> 00:30:50.480
<v Sjors Provoost>The time warp attack is basically shenanigans with the timestamp where you make

00:30:50.480 --> 00:30:56.240
<v Sjors Provoost>it look by basically messing with the timestamps, you make it look like the block

00:30:56.240 --> 00:31:01.300
<v Sjors Provoost>period was four weeks instead of two weeks or six weeks instead of two weeks. And

00:31:01.300 --> 00:31:06.020
<v Sjors Provoost>then the difficulty goes down. And you do this because the timestamp of the first

00:31:06.020 --> 00:31:10.920
<v Sjors Provoost>block, basically the difficulty adjustment looks at the last block of the period

00:31:10.920 --> 00:31:14.900
<v Sjors Provoost>minus the first block of the period. Instead of what it should have done, the

00:31:14.900 --> 00:31:17.920
<v Sjors Provoost>first block of the new period minus the first block of the old period. So because

00:31:17.920 --> 00:31:21.600
<v Sjors Provoost>it doesn't overlap, you can mess with the timestamps, you decrease the difficulty

00:31:21.600 --> 00:31:27.310
<v Sjors Provoost>very rapidly, and somebody can basically bring the difficulty back

00:31:27.310 --> 00:31:33.040
<v Sjors Provoost>to one, which is basically a CPU miner. in 38 days,

00:31:33.380 --> 00:31:38.040
<v Sjors Provoost>I believe, and then they can just mine all the remaining subsidy and create a

00:31:38.040 --> 00:31:38.640
<v Sjors Provoost>complete mess.

00:31:39.540 --> 00:31:45.080
<v Aaron van Wirdum>This is a hypothetical form of attack that could be done. But then

00:31:45.080 --> 00:31:45.560
<v Aaron van Wirdum>there's...

00:31:45.560 --> 00:31:50.060
<v Sjors Provoost>Well, it's not hypothetical. You can just do it. Yeah. It's a bad idea, probably.

00:31:50.260 --> 00:31:54.480
<v Aaron van Wirdum>I mean, it's not that easy either. You need a majority of miners, right?

00:31:54.520 --> 00:31:54.680
<v Sjors Provoost>Yes.

00:31:54.940 --> 00:31:55.900
<v Aaron van Wirdum>I mean, okay.

00:31:56.570 --> 00:32:01.740
<v Sjors Provoost>You need a majority of miners to... So the main concern would be... not a full

00:32:01.740 --> 00:32:05.260
<v Sjors Provoost>time warp attack, but a limited time warp attack. For example, you can double the

00:32:05.260 --> 00:32:09.060
<v Sjors Provoost>speed of blocks to have one block every five minutes. That means miners are

00:32:09.060 --> 00:32:14.060
<v Sjors Provoost>getting paid two times the subsidy per day or per hour or per week.

00:32:16.030 --> 00:32:20.670
<v Sjors Provoost>And everybody gets, you know, double the block size. I mean, that's, you know, at

00:32:20.670 --> 00:32:22.630
<v Sjors Provoost>least something you can imagine actually happening.

00:32:23.984 --> 00:32:25.460
<v Sjors Provoost>And [unclear] still be very bad.

00:32:24.520 --> 00:32:28.620
<v Aaron van Wirdum>Sure, I mean, I'm not... Yes.

00:32:30.180 --> 00:32:31.740
<v Aaron van Wirdum>Agreed. And now there's a solution.

00:32:33.310 --> 00:32:37.370
<v Aaron van Wirdum>Again, there is like a proposed solution for that that might be rolled out in the

00:32:37.370 --> 00:32:40.730
<v Aaron van Wirdum>future. So what is the proposed solution that might be rolled out in the future?

00:32:40.830 --> 00:32:45.490
<v Sjors Provoost>So the proposed solution really boils down to putting some tie wrap around the

00:32:45.490 --> 00:32:50.660
<v Sjors Provoost>last block of the period and the first block of the new period. Because right

00:32:50.660 --> 00:32:54.500
<v Sjors Provoost>now, it's like they can just shift. You can shift them all the way back. But if

00:32:54.500 --> 00:32:57.860
<v Sjors Provoost>you tie-wrap them together, you can no longer mess with the timestamp. And so the

00:32:57.860 --> 00:33:02.660
<v Sjors Provoost>actual rule is the first block of the new period must be no older than the last

00:33:02.660 --> 00:33:06.250
<v Sjors Provoost>block of the previous period, minus two hours.

00:33:08.380 --> 00:33:14.060
<v Aaron van Wirdum>Okay. So, yeah, we just had a block

00:33:14.060 --> 00:33:19.440
<v Aaron van Wirdum>period of two weeks. The last block was mined at, you know,

00:33:19.760 --> 00:33:25.160
<v Aaron van Wirdum>January 1st at noon. So that means that the first block of the next period

00:33:25.600 --> 00:33:31.220
<v Aaron van Wirdum>the timestamp in that block can be at the earliest 10 a.m.

00:33:31.620 --> 00:33:33.200
<v Aaron van Wirdum>on January 1st, right?

00:33:33.500 --> 00:33:33.760
<v Sjors Provoost>Yes.

00:33:33.940 --> 00:33:39.180
<v Aaron van Wirdum>That's the proposed rule. And that proposed rule is there to

00:33:39.180 --> 00:33:41.500
<v Aaron van Wirdum>prevent this time warp attack.

00:33:41.660 --> 00:33:44.720
<v Sjors Provoost>Exactly. It prevents you from setting the timestamp [unclear] two weeks in the past.

00:33:45.120 --> 00:33:47.640
<v Aaron van Wirdum>Right. But now there's another problem.

00:33:48.790 --> 00:33:50.170
<v Sjors Provoost>Yes, the problem is...

00:33:50.170 --> 00:33:53.190
<v Aaron van Wirdum>Now there's a problem with the solution that needs to be fixed.

00:33:53.570 --> 00:33:53.650
<v Sjors Provoost>Exactly.

00:33:53.990 --> 00:33:58.790
<v Aaron van Wirdum>And again, the solution, this solution is actually now in Bitcoin Core for the

00:33:58.790 --> 00:33:59.910
<v Aaron van Wirdum>future problem potentially.

00:34:00.290 --> 00:34:00.470
<v Sjors Provoost>Exactly.

00:34:00.510 --> 00:34:01.230
<v Aaron van Wirdum>And what is the solution?

00:34:01.232 --> 00:34:03.070
<v Sjors Provoost>Now, testnet4 already has...

00:34:02.896 --> 00:34:03.088
<v Aaron van Wirdum>What's the problem?

00:34:03.770 --> 00:34:07.110
<v Sjors Provoost>Testnet4, well, the problem can be seen on testnet4 because testnet4 does have

00:34:07.110 --> 00:34:11.930
<v Sjors Provoost>the time warp fix deployed. However, instead of two hours, it uses 10 minutes as

00:34:11.930 --> 00:34:16.200
<v Sjors Provoost>the rule. So if your block was mined at 12 o'clock... the last block in the

00:34:16.200 --> 00:34:20.700
<v Sjors Provoost>period, the first block of the new period must be mined at no earlier, sorry, no

00:34:21.080 --> 00:34:24.020
<v Sjors Provoost>earlier than 10 minutes before 12.

00:34:24.220 --> 00:34:25.960
<v Aaron van Wirdum>Yeah, 11.50 a.m.

00:34:27.440 --> 00:34:33.240
<v Sjors Provoost>I think, yeah, exactly. Now, the problem is that if you,

00:34:33.420 --> 00:34:38.100
<v Sjors Provoost>let's say the last miner is a bit mean, the miner of the last block, they can put

00:34:38.100 --> 00:34:41.080
<v Sjors Provoost>their timestamp two hours in the future, because Bitcoin Core allows up to two

00:34:41.080 --> 00:34:45.860
<v Sjors Provoost>hours in the future. So now you are mining, and if you're just using your clock,

00:34:46.040 --> 00:34:51.320
<v Sjors Provoost>you will just use the time of today, of right now. But we've just said that you

00:34:51.320 --> 00:34:56.750
<v Sjors Provoost>have to be less than 10 minutes in the past from the last block. So now you've

00:34:56.750 --> 00:34:59.690
<v Sjors Provoost>created an invalid block under the new time warp rules.

00:34:59.910 --> 00:35:05.810
<v Aaron van Wirdum>Okay, so indeed, you, Sjors, you are mining, and then because you're

00:35:05.810 --> 00:35:11.760
<v Aaron van Wirdum>a criminal and a troll... You mine a block at noon on January

00:35:11.760 --> 00:35:15.600
<v Aaron van Wirdum>1st, but you put the timestamp in it of 2 p.m.

00:35:15.840 --> 00:35:16.100
<v Sjors Provoost>Exactly.

00:35:16.400 --> 00:35:22.000
<v Aaron van Wirdum>And now I'm also mining and I'm like a nice honest guy. So I now find the next

00:35:22.000 --> 00:35:26.640
<v Aaron van Wirdum>block at 10 past 12, 10 past noon. You know, I'm just putting the honest.

00:35:26.940 --> 00:35:27.080
<v Sjors Provoost>Yep.

00:35:27.350 --> 00:35:31.310
<v Aaron van Wirdum>time in there, but then because you were trolling and put the timestamp in the

00:35:31.310 --> 00:35:36.450
<v Aaron van Wirdum>future, now my block that is actually telling the truth with the timestamp, that

00:35:36.450 --> 00:35:37.830
<v Aaron van Wirdum>one is now considered invalid.

00:35:38.010 --> 00:35:38.290
<v Sjors Provoost>Exactly.

00:35:38.450 --> 00:35:41.910
<v Aaron van Wirdum>So you successfully trolled me and robbed me of my money.

00:35:42.130 --> 00:35:42.570
<v Sjors Provoost>Exactly.

00:35:42.790 --> 00:35:45.470
<v Aaron van Wirdum>Well, you didn't get the money, but at least I didn't get it either.

00:35:45.490 --> 00:35:46.110
<v Sjors Provoost>I trolled you?

00:35:46.490 --> 00:35:50.590
<v Aaron van Wirdum>That in itself is a source of pleasure for you.

00:35:51.260 --> 00:35:54.200
<v Sjors Provoost>Yeah, well, I trolled you, I may have trolled the person after you because people

00:35:54.200 --> 00:35:57.520
<v Sjors Provoost>may try to keep finding the first block and until actually two hours have passed,

00:35:57.640 --> 00:36:02.080
<v Sjors Provoost>they will lose. So there's two solutions to this. One is that we just made the

00:36:02.080 --> 00:36:06.460
<v Sjors Provoost>margin two hours so that you can't really exploit this anymore because you can't

00:36:06.460 --> 00:36:08.020
<v Sjors Provoost>put the clock more than two hours in the future.

00:36:08.220 --> 00:36:08.520
<v Aaron van Wirdum>Right.

00:36:08.680 --> 00:36:10.940
<v Sjors Provoost>So you can't attack somebody who uses the real clock.

00:36:11.060 --> 00:36:15.640
<v Aaron van Wirdum>Right. So while on testnet, it's 10 minutes. So that's why the example that I

00:36:15.640 --> 00:36:18.440
<v Aaron van Wirdum>just gave worked on the actual mainnet.

00:36:20.170 --> 00:36:21.470
<v Sjors Provoost>The difference is two hours.

00:36:21.670 --> 00:36:27.310
<v Aaron van Wirdum>It's two hours. So even if you try to troll me by putting the clock two hours in

00:36:27.310 --> 00:36:32.930
<v Aaron van Wirdum>the future on your miner, then me, the honest guy with the real time in the

00:36:32.930 --> 00:36:36.190
<v Aaron van Wirdum>block, that's still going to be fine because there's a margin of two hours.

00:36:36.330 --> 00:36:36.610
<v Sjors Provoost>Exactly.

00:36:38.230 --> 00:36:39.790
<v Aaron van Wirdum>So, okay, so...

00:36:39.790 --> 00:36:43.850
<v Sjors Provoost>But basically, you want to, yeah, but it's not, you know, it's nice to solve a

00:36:43.850 --> 00:36:48.950
<v Sjors Provoost>problem in multiple ways, I guess, to make sure that it really works. And this

00:36:48.950 --> 00:36:52.730
<v Sjors Provoost>solution also works in Testnet 4, so that's kind of nice. With this slightly more

00:36:52.730 --> 00:36:55.610
<v Sjors Provoost>strict rule, the nice thing about Testnet 4 is it helps reveal bugs like this.

00:36:55.750 --> 00:36:57.310
<v Aaron van Wirdum>But what is the solution?

00:36:57.470 --> 00:37:02.130
<v Sjors Provoost>The solution is that Bitcoin Core will, when it creates a block template, it also

00:37:02.130 --> 00:37:05.130
<v Sjors Provoost>provides some hints of what, you know... Remember, you have to make your own

00:37:05.130 --> 00:37:08.510
<v Sjors Provoost>Coinbase, but Bitcoin Core will give you hints of what to put in that Coinbase.

00:37:08.650 --> 00:37:13.570
<v Sjors Provoost>And one of the hints is the minimum time. So it will say, your timestamp must be

00:37:13.570 --> 00:37:17.570
<v Sjors Provoost>at least this timestamp. So it will tell you your timestamp should be one hour

00:37:17.570 --> 00:37:21.250
<v Sjors Provoost>and 15 minutes in the future. And as long as your mining software actually pays

00:37:21.250 --> 00:37:25.350
<v Sjors Provoost>attention to that, they should be fine. Now we found some open source software

00:37:25.350 --> 00:37:29.390
<v Sjors Provoost>that did not pay attention to that hint. So that even if Bitcoin Core fixes this,

00:37:29.810 --> 00:37:33.090
<v Sjors Provoost>they're still... they still have a problem because they're not looking at the

00:37:33.090 --> 00:37:37.050
<v Sjors Provoost>hint that Bitcoin Core gives them. But we don't know if mining pools have this

00:37:37.050 --> 00:37:39.530
<v Sjors Provoost>bug because all the mining pool software is closed source.

00:37:40.780 --> 00:37:43.000
<v Sjors Provoost>That's why you want to have sort of a double solution.

00:37:42.952 --> 00:37:46.880
<v Aaron van Wirdum>Hang on. Let me repeat the solution just to make sure I got that part right.

00:37:47.040 --> 00:37:47.180
<v Sjors Provoost>Yeah.

00:37:47.400 --> 00:37:53.040
<v Aaron van Wirdum>Okay. So it's noon on January 1st, and you Sjors are mining and

00:37:53.040 --> 00:37:58.990
<v Aaron van Wirdum>trolling and putting the timestamp in there of 2 p.m. Now me, I'm

00:37:58.990 --> 00:38:04.470
<v Aaron van Wirdum>also mining super honest guy, I want to put the real time in there. But then

00:38:04.470 --> 00:38:09.650
<v Aaron van Wirdum>Bitcoin Core says, no, no, no. If you're being honest right now, then your block

00:38:09.650 --> 00:38:13.530
<v Aaron van Wirdum>will be invalid. So you also have to troll along with Sjors.

00:38:13.850 --> 00:38:14.170
<v Sjors Provoost>Yeah.

00:38:14.350 --> 00:38:18.510
<v Aaron van Wirdum>And then I will put the block time also at like 2 p.m. or 2.1 or whatever.

00:38:18.850 --> 00:38:21.790
<v Sjors Provoost>And generally, Bitcoin Core will give you two values. It does that for every

00:38:21.790 --> 00:38:26.810
<v Sjors Provoost>block. It says the minimum time. Like, do not go below this number. And it's a

00:38:26.810 --> 00:38:30.030
<v Sjors Provoost>field called the current time. but now it's going to lie about the current time.

00:38:30.530 --> 00:38:36.090
<v Aaron van Wirdum>Okay, so because you were lying and cheating and stealing and being your usual

00:38:36.090 --> 00:38:41.570
<v Aaron van Wirdum>self, now I go along in that behavior, but only for the first block of the period.

00:38:41.650 --> 00:38:41.790
<v Sjors Provoost>Exactly.

00:38:41.790 --> 00:38:46.450
<v Aaron van Wirdum>After that, because that's the time warp block, that's where that matters. And

00:38:46.450 --> 00:38:50.870
<v Aaron van Wirdum>then whoever is mining after me, they'll start using the real time again.

00:38:51.150 --> 00:38:51.350
<v Sjors Provoost>Yes.

00:38:51.610 --> 00:38:52.370
<v Aaron van Wirdum>Right? Okay.

00:38:53.190 --> 00:38:55.650
<v Sjors Provoost>Bitcoin Core will suggest the real time again. Yeah.

00:38:56.040 --> 00:38:58.640
<v Aaron van Wirdum>When you say suggest...

00:38:58.640 --> 00:39:02.980
<v Sjors Provoost>It's only a suggestion. Bitcoin Core says you should put this stuff in the block,

00:39:03.100 --> 00:39:08.410
<v Sjors Provoost>these transactions, and it says you should put this timestamp in the block with

00:39:08.480 --> 00:39:11.360
<v Sjors Provoost>one field saying this is the absolute minimum. So maybe you don't want to use the

00:39:11.360 --> 00:39:15.440
<v Sjors Provoost>timestamp that Bitcoin Core suggests for whatever reason, but it does say do not

00:39:15.440 --> 00:39:19.160
<v Sjors Provoost>go below this number. Again, we don't know what miners are doing because it's all

00:39:19.160 --> 00:39:24.220
<v Sjors Provoost>closed source. Now, on testnet 4, there's another weird little thing.

00:39:24.930 --> 00:39:30.010
<v Sjors Provoost>that exposes this problem. So there is another rule called the MTP rule, which is

00:39:30.010 --> 00:39:35.860
<v Sjors Provoost>that the timestamp of every block has to be higher

00:39:35.860 --> 00:39:40.560
<v Sjors Provoost>than the median timestamp of the last 11 blocks. I don't know if you're familiar

00:39:40.560 --> 00:39:41.060
<v Sjors Provoost>with that rule.

00:39:41.160 --> 00:39:42.180
<v Aaron van Wirdum>I mean, I've heard of it, yeah.

00:39:42.560 --> 00:39:47.120
<v Sjors Provoost>Yeah, so in practice, that tends to mean that... your timestamp must be at least

00:39:47.120 --> 00:39:51.820
<v Sjors Provoost>no more than one hour in the past or something like that, right? Because it's six

00:39:51.820 --> 00:39:57.510
<v Sjors Provoost>blocks per hour. So typically the median block from the last 11 would be the

00:39:57.510 --> 00:40:02.010
<v Sjors Provoost>middle one, which is about an hour old. So typically your minimum time is about

00:40:02.010 --> 00:40:05.230
<v Sjors Provoost>an hour in the past. So you don't even pay attention to this. You don't pay

00:40:05.230 --> 00:40:08.720
<v Sjors Provoost>attention to minimum time. You just use the current time. But on Testnet 4,

00:40:08.760 --> 00:40:13.450
<v Sjors Provoost>there's some crazy people that are CPU mining. as much as they can, and they're

00:40:13.450 --> 00:40:18.490
<v Sjors Provoost>putting blocks two hours in the future to CPU mine for weird reasons. So because

00:40:18.490 --> 00:40:22.990
<v Sjors Provoost>all these miners are putting their blocks two hours in the future, the actual

00:40:22.990 --> 00:40:28.960
<v Sjors Provoost>median time past is one hour in the future, not one hour in the past. So if

00:40:28.960 --> 00:40:33.400
<v Sjors Provoost>a miner does not use the field that Bitcoin Core gives them, the min time and the

00:40:33.400 --> 00:40:36.900
<v Sjors Provoost>current time field, which are both lies, well, the current time field is a lie.

00:40:37.750 --> 00:40:41.070
<v Sjors Provoost>Because the mining code will say, you must use one hour in the future as a

00:40:41.070 --> 00:40:44.070
<v Sjors Provoost>timestamp, otherwise it's invalid. You seem confused.

00:40:44.330 --> 00:40:50.130
<v Aaron van Wirdum>I mean, you are getting very into the... Also, you're talking about Testnet now, right?

00:40:50.370 --> 00:40:51.030
<v Sjors Provoost>This is Testnet.

00:40:51.190 --> 00:40:53.830
<v Aaron van Wirdum>I don't care about Testnet.

00:40:53.910 --> 00:40:57.830
<v Sjors Provoost>Well, Testnet is how we found this problem, basically. Because these people are

00:40:57.830 --> 00:41:03.360
<v Sjors Provoost>doing weird things on Testnet, being degens... Timestamps in testnet are actually

00:41:03.360 --> 00:41:08.960
<v Sjors Provoost>in the future, which doesn't happen on mainnet. And therefore, the Bitcoin Core

00:41:08.960 --> 00:41:12.860
<v Sjors Provoost>mining code always tells you to lie. It always says you should produce a block

00:41:12.860 --> 00:41:15.860
<v Sjors Provoost>one hour in the future or it's going to be invalid. And especially around that

00:41:15.860 --> 00:41:19.210
<v Sjors Provoost>time warp window, of course, it's even more clear. And then people started

00:41:19.210 --> 00:41:22.930
<v Sjors Provoost>producing invalid blocks. And they were like, why am I producing invalid blocks?

00:41:23.230 --> 00:41:26.550
<v Sjors Provoost>Well, it's because your software is not checking these values that Bitcoin Core

00:41:26.550 --> 00:41:27.390
<v Sjors Provoost>is telling you to use.

00:41:28.850 --> 00:41:30.050
<v Sjors Provoost>So that happened.

00:41:31.730 --> 00:41:35.930
<v Sjors Provoost>But it was with some open source mining projects and maybe the real mining

00:41:35.930 --> 00:41:40.420
<v Sjors Provoost>projects do actually check the hint. Because otherwise this could happen on mainnet.

00:41:41.890 --> 00:41:46.010
<v Aaron van Wirdum>Let's move to the next topic. I think, right? We're done with the...

00:41:46.010 --> 00:41:46.810
<v Sjors Provoost>Yeah, I think so.

00:41:48.780 --> 00:41:54.090
<v Aaron van Wirdum>Time warp potential future attack solution that's been implemented.

00:41:54.430 --> 00:41:57.130
<v Sjors Provoost>I think we'll do the other three topics a little quickly.

00:41:57.950 --> 00:42:03.670
<v Aaron van Wirdum>Yeah, that sounds good. I mean, okay, the first one is we can run through this in

00:42:03.670 --> 00:42:06.330
<v Aaron van Wirdum>a... Let's see in 20 seconds.

00:42:06.630 --> 00:42:08.990
<v Sjors Provoost>Yeah, I think the mainstream media has already covered this one.

00:42:09.210 --> 00:42:15.210
<v Aaron van Wirdum>Right. Okay, Mempool, the full RBF is now the standard in Bitcoin

00:42:15.210 --> 00:42:16.730
<v Aaron van Wirdum>Core. There are no other options.

00:42:17.190 --> 00:42:17.530
<v Sjors Provoost>Exactly.

00:42:17.770 --> 00:42:23.270
<v Aaron van Wirdum>So if you run a Bitcoin node and you receive a transaction and then you receive a

00:42:23.270 --> 00:42:27.550
<v Aaron van Wirdum>conflicting transaction, so spending the same coins, but that has a higher fee.

00:42:27.880 --> 00:42:31.760
<v Aaron van Wirdum>then now your node will say, that's perfectly fine by me, I'll just take this one

00:42:31.760 --> 00:42:32.880
<v Aaron van Wirdum>and throw the other one out.

00:42:32.920 --> 00:42:37.140
<v Sjors Provoost>It's more complicated than just a higher fee, but you don't need to signal

00:42:37.140 --> 00:42:40.020
<v Sjors Provoost>anymore. Because it used to be that we would only, we would take the first

00:42:40.020 --> 00:42:45.300
<v Sjors Provoost>transaction seen, unless it's signaled this RBF flag, then we would say, okay,

00:42:45.380 --> 00:42:48.980
<v Sjors Provoost>we'll look at the fees. But we also look at the fee rate has to be higher, the

00:42:48.980 --> 00:42:52.660
<v Sjors Provoost>absolute fee has to be higher, a bunch of other rules that decide whether you

00:42:52.660 --> 00:42:53.380
<v Sjors Provoost>replace it or not.

00:42:54.700 --> 00:42:56.740
<v Aaron van Wirdum>Okay, yeah, yeah. I mean, sure.

00:42:57.080 --> 00:43:00.160
<v Sjors Provoost>The marketeers always like to say, oh, we just replace everything with a better

00:43:00.160 --> 00:43:03.380
<v Sjors Provoost>fee. It's like, eh, it's more complicated. But anyway, that's the default now.

00:43:03.520 --> 00:43:06.220
<v Sjors Provoost>We've done multiple episodes on RBF and mempool full RBF.

00:43:06.500 --> 00:43:09.560
<v Aaron van Wirdum>Yeah, I think including the last one. So step by step.

00:43:11.130 --> 00:43:16.810
<v Aaron van Wirdum>Bitcoin Core has been moving more towards a world where highest fee

00:43:16.810 --> 00:43:21.550
<v Aaron van Wirdum>just sort of wins. Of course, needless to say, but I'll say it anyways, this is

00:43:21.550 --> 00:43:27.470
<v Aaron van Wirdum>all before a transaction is included in a block. Which transaction is a miner

00:43:27.470 --> 00:43:32.660
<v Aaron van Wirdum>going to include in a block? rather than looking at which transaction is received

00:43:32.660 --> 00:43:36.720
<v Aaron van Wirdum>first, or like this flag that you mentioned, it will just say, okay, this one is

00:43:36.720 --> 00:43:37.500
<v Aaron van Wirdum>paying a higher fee.

00:43:38.280 --> 00:43:41.420
<v Sjors Provoost>Unconfirmed transactions are unsafe. They were always unsafe. They are now

00:43:41.420 --> 00:43:46.590
<v Sjors Provoost>marginally more unsafe. But that's sort of the direction. This was sort of slowly

00:43:46.590 --> 00:43:48.910
<v Sjors Provoost>coming. There was mostly an argument about how soon.

00:43:50.210 --> 00:43:54.450
<v Aaron van Wirdum>Okay, we far exceeded our 20-second limit for that one, so let's move on to the

00:43:54.450 --> 00:43:56.710
<v Aaron van Wirdum>next one, which is CMake.

00:43:57.050 --> 00:44:00.350
<v Sjors Provoost>Yes, so as a user, you won't notice anything, but this was a giant change under

00:44:00.350 --> 00:44:04.270
<v Sjors Provoost>the hood in the way that you go from the source code to the actual binary. So

00:44:04.270 --> 00:44:08.770
<v Sjors Provoost>source code stays more or less the same, binary stays more or less the same, at

00:44:08.770 --> 00:44:10.730
<v Sjors Provoost>least from what you experience as a user.

00:44:12.080 --> 00:44:16.340
<v Sjors Provoost>But the way you go from source to binary has been revamped by using this thing

00:44:16.340 --> 00:44:21.680
<v Sjors Provoost>called CMake that everybody else already used. And yeah, this makes things much better.

00:44:21.980 --> 00:44:25.960
<v Aaron van Wirdum>So Sjors and other Bitcoin Core developers, they're writing their code on their

00:44:25.960 --> 00:44:31.400
<v Aaron van Wirdum>keyboards. And it looks all like C++-y. But then your computer needs to translate

00:44:31.400 --> 00:44:35.500
<v Aaron van Wirdum>it into ones and zeros. And now there's a new way for computers to translate.

00:44:35.780 --> 00:44:41.520
<v Sjors Provoost>Yes, we used to type make and then hit enter. And now we type cmake and then hit enter.

00:44:42.980 --> 00:44:47.760
<v Aaron van Wirdum>It's not what I was referring to, but also good to know for people that you know,

00:44:47.840 --> 00:44:51.110
<v Aaron van Wirdum>well, that... Must be a drag, though. That's like an extra...

00:44:51.110 --> 00:44:52.150
<v Sjors Provoost>An extra character, yes.

00:44:52.290 --> 00:44:54.470
<v Aaron van Wirdum>An extra character you have to work with.

00:44:54.750 --> 00:44:56.650
<v Sjors Provoost>You can make shortcuts, so it doesn't matter.

00:44:58.090 --> 00:45:02.650
<v Aaron van Wirdum>Okay. Again, nothing that regular users like myself will ever notice, but

00:45:02.650 --> 00:45:03.390
<v Aaron van Wirdum>developers...

00:45:03.390 --> 00:45:05.510
<v Sjors Provoost>You will see fewer grumpy developers.

00:45:07.200 --> 00:45:08.460
<v Sjors Provoost>But yeah, that's about it.

00:45:11.640 --> 00:45:15.860
<v Aaron van Wirdum>You're always... Even you, Sjors? Even [unclear]?

00:45:15.880 --> 00:45:20.140
<v Sjors Provoost>I don't work on the build system. You will see more happy build system developers

00:45:20.140 --> 00:45:20.800
<v Sjors Provoost>Let's put it that way.

00:45:22.000 --> 00:45:24.620
<v Aaron van Wirdum>Okay, last one then. We're almost there.

00:45:26.380 --> 00:45:31.880
<v Aaron van Wirdum>Oh, UTXO to SQLite. That's also, there's a new feature in Bitcoin Core, which is

00:45:31.880 --> 00:45:36.320
<v Aaron van Wirdum>you can dump the UTXO set into SQ...

00:45:37.860 --> 00:45:38.460
<v Aaron van Wirdum>SQLite, yeah.

00:45:38.760 --> 00:45:40.140
<v Sjors Provoost>Or SQLite, depending on who you ask.

00:45:40.240 --> 00:45:40.560
<v Aaron van Wirdum>Exactly.

00:45:41.360 --> 00:45:46.560
<v Sjors Provoost>So it's been possible for a while to make a snapshot of the UTXO set just to dump

00:45:46.560 --> 00:45:50.520
<v Sjors Provoost>it. That's used by AssumeUTXO as well to load the UTXO set, but you can do it at

00:45:50.520 --> 00:45:54.600
<v Sjors Provoost>any height. And it's just a list of every coin that exists, but the format is

00:45:54.600 --> 00:45:59.600
<v Sjors Provoost>very unusable. So there's now a little script that takes that unusable format and

00:45:59.600 --> 00:46:04.280
<v Sjors Provoost>turns it into a SQLite file, which is much easier to edit. It's not a spreadsheet

00:46:04.280 --> 00:46:07.820
<v Sjors Provoost>quite yet, but it's a lot closer for most people that know what to do with

00:46:07.820 --> 00:46:12.220
<v Sjors Provoost>databases. So it's basically a research tool. If you want to study what coins

00:46:12.220 --> 00:46:17.780
<v Sjors Provoost>exist, or maybe you want to make multiple snapshots over time and compare how the

00:46:17.780 --> 00:46:21.580
<v Sjors Provoost>UTXO set changes over time, this will make your life easier.

00:46:22.410 --> 00:46:27.550
<v Aaron van Wirdum>Yeah, okay, so it's basically a new tool for data nerds,

00:46:27.690 --> 00:46:32.930
<v Aaron van Wirdum>researchers that want to figure out how are coins moving over the blockchain or

00:46:32.930 --> 00:46:38.450
<v Aaron van Wirdum>how are coins distributed across different addresses

00:46:38.450 --> 00:46:43.890
<v Aaron van Wirdum>and how long does it take before UTXOs are spent compared to older

00:46:43.890 --> 00:46:48.330
<v Aaron van Wirdum>UTXOs or whatever you may come up with and you want to research. Now there's an

00:46:48.330 --> 00:46:53.970
<v Aaron van Wirdum>easier tool to get that data from. Bitcoin Core into whatever.

00:46:54.730 --> 00:47:00.290
<v Sjors Provoost>So anyway, go to BitcoinCore.org, download version 29, do the checks for the

00:47:00.290 --> 00:47:05.790
<v Sjors Provoost>checksums, and have fun with it. So is that all we got?

00:47:07.510 --> 00:47:11.530
<v Aaron van Wirdum>Where can people find Bitcoin Core 29?

00:47:12.190 --> 00:47:13.130
<v Sjors Provoost>BitcoinCore.org.

00:47:13.250 --> 00:47:14.130
<v Aaron van Wirdum>Did you already mention that?

00:47:14.310 --> 00:47:14.510
<v Sjors Provoost>I did.

00:47:14.650 --> 00:47:16.030
<v Aaron van Wirdum>Good. Okay, then we're there.

00:47:16.290 --> 00:47:18.090
<v Sjors Provoost>All right. Thank you for listening to Bitcoin.

00:47:18.330 --> 00:47:18.810
<v Aaron van Wirdum>Explained.

