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

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

00:00:21.590 --> 00:00:22.030
<v Sjors Provoost>Explained.

00:00:22.390 --> 00:00:23.010
<v Aaron van Wirdum>Hey, Sjors.

00:00:23.130 --> 00:00:24.630
<v Sjors Provoost>Hey, Aaron. It's been a while.

00:00:25.270 --> 00:00:30.130
<v Aaron van Wirdum>Yes. Welcome back on our... Hey, this is our 100th episode, Sjors.

00:00:30.250 --> 00:00:31.990
<v Sjors Provoost>That is correct. Episode 100.

00:00:32.410 --> 00:00:37.370
<v Aaron van Wirdum>I did not think we would make it with our biannual podcast. But we're back.

00:00:37.390 --> 00:00:41.830
<v Sjors Provoost>We've exponentially approached it. Exponentially slowing down approached it. But

00:00:41.830 --> 00:00:44.950
<v Sjors Provoost>we made it. Well, at least we made it to the start.

00:00:45.490 --> 00:00:50.710
<v Aaron van Wirdum>Yeah, we're sticking to our semi-official rule to only record in person, so

00:00:50.710 --> 00:00:54.850
<v Aaron van Wirdum>that's why it took a while. I was not in the Netherlands, but now I'm back in

00:00:54.850 --> 00:00:59.870
<v Aaron van Wirdum>beautiful sunny Utrecht for a beautiful, fresh Bitcoin Explained episode.

00:01:00.230 --> 00:01:04.510
<v Sjors Provoost>Exactly, and we're going to pick a very fresh topic for a node that was released

00:01:04.510 --> 00:01:05.450
<v Sjors Provoost>only three months ago.

00:01:06.780 --> 00:01:11.200
<v Aaron van Wirdum>Yes, we do make an episode. I think we've made an episode for every new Bitcoin

00:01:11.200 --> 00:01:17.080
<v Aaron van Wirdum>Core release since we started the podcast. So we're at least keeping that up. But

00:01:17.080 --> 00:01:20.520
<v Aaron van Wirdum>yeah, so this is Bitcoin Core 31, which came out when?

00:01:21.220 --> 00:01:22.700
<v Sjors Provoost>In April 19th.

00:01:23.980 --> 00:01:24.360
<v Aaron van Wirdum>Fantastic.

00:01:24.360 --> 00:01:28.500
<v Sjors Provoost>And in fact, there is now a 31.1 release with some bug fixes.

00:01:28.600 --> 00:01:33.300
<v Aaron van Wirdum>Right, we're not even... Well, I guess these are just bug fixes. So when did this

00:01:33.300 --> 00:01:33.700
<v Aaron van Wirdum>come out?

00:01:33.840 --> 00:01:37.220
<v Sjors Provoost>But the bug fix is related to one of the features we're going to cover. So it's

00:01:37.220 --> 00:01:39.000
<v Sjors Provoost>good that we had to wait for this bug fix.

00:01:39.560 --> 00:01:45.340
<v Aaron van Wirdum>Okay. Well, oh, is CoinKite still sponsoring us, Sjors?

00:01:45.780 --> 00:01:46.620
<v Sjors Provoost>I think so.

00:01:47.100 --> 00:01:47.700
<v Aaron van Wirdum>Should I?

00:01:47.980 --> 00:01:50.220
<v Sjors Provoost>We're optimistically going to assume that they still are.

00:01:50.890 --> 00:01:55.090
<v Aaron van Wirdum>Should I endorse or advocate for their projects just in case?

00:01:55.250 --> 00:01:56.210
<v Sjors Provoost>We should at least thank them.

00:01:56.310 --> 00:02:02.130
<v Aaron van Wirdum>Dear listener, check out CoinKite with your favorite hardware wallet

00:02:02.130 --> 00:02:07.490
<v Aaron van Wirdum>vendor with the COLDCARD, the OPENDIME, the SATSCARD, the

00:02:07.490 --> 00:02:10.500
<v Aaron van Wirdum>TAPSIGNER. What else do they have, Sjors?

00:02:10.800 --> 00:02:11.720
<v Sjors Provoost>I have no idea.

00:02:12.900 --> 00:02:17.620
<v Aaron van Wirdum>Definitely these things. CoinKite.com. Check it out I assume that's their website.

00:02:17.620 --> 00:02:18.380
<v Sjors Provoost>Yes.

00:02:18.380 --> 00:02:22.140
<v Aaron van Wirdum>All right. Or just Google CoinKite and see where it takes you.

00:02:22.140 --> 00:02:23.860
<v Sjors Provoost>I'm pretty sure they have every conceivable domain.

00:02:24.240 --> 00:02:29.190
<v Aaron van Wirdum>I would think so. Okay, Sjors. So Bitcoin Core 31

00:02:29.190 --> 00:02:34.710
<v Aaron van Wirdum>released a couple of months ago, and you made a special selection for our dear

00:02:34.710 --> 00:02:39.990
<v Aaron van Wirdum>listeners of some of the highlights in the new Bitcoin Core release. Is that right?

00:02:40.130 --> 00:02:41.390
<v Sjors Provoost>A highly curated list.

00:02:41.990 --> 00:02:47.950
<v Aaron van Wirdum>Yeah. Okay, so the first one you picked, which we'll discuss, is there's been...

00:02:48.490 --> 00:02:51.050
<v Aaron van Wirdum>We wrote down Cluster mempool.

00:02:52.960 --> 00:02:58.840
<v Aaron van Wirdum>Is cluster mempool... First question, is this a completely new thing? So the term

00:02:58.840 --> 00:03:03.360
<v Aaron van Wirdum>cluster mempool, because I feel like I heard it before, is that just because we

00:03:03.360 --> 00:03:08.510
<v Aaron van Wirdum>were discussing that it was coming? So my question is... Has cluster mempool been

00:03:08.510 --> 00:03:11.510
<v Aaron van Wirdum>updated, or is cluster mempool a new thing in Bitcoin Core 31?

00:03:11.770 --> 00:03:16.330
<v Sjors Provoost>I believe that 31 is the first version that has cluster mempool in it. The

00:03:16.330 --> 00:03:19.530
<v Sjors Provoost>concept has been around for a few years, so it's been mentioned on different

00:03:19.530 --> 00:03:22.290
<v Sjors Provoost>podcasts, maybe even ours, but I'm not sure.

00:03:22.850 --> 00:03:27.750
<v Aaron van Wirdum>Okay, so this was a long time coming, and now, three months ago, in Bitcoin Core

00:03:27.750 --> 00:03:30.530
<v Aaron van Wirdum>31, there's now cluster mempool.

00:03:30.710 --> 00:03:32.910
<v Sjors Provoost>Yes, and you will probably not notice a difference.

00:03:33.670 --> 00:03:34.990
<v Aaron van Wirdum>As a regular user?

00:03:35.190 --> 00:03:35.650
<v Sjors Provoost>As a user, yeah.

00:03:35.770 --> 00:03:39.390
<v Aaron van Wirdum>Okay, so what is cluster mempool? Just take it from the top.

00:03:40.230 --> 00:03:43.730
<v Sjors Provoost>Well, I don't completely understand it, so maybe I'm not the right person to ask.

00:03:43.730 --> 00:03:44.430
<v Aaron van Wirdum>That's a great start.

00:03:44.590 --> 00:03:48.150
<v Sjors Provoost>But it is just a better or sane...

00:03:48.150 --> 00:03:51.530
<v Aaron van Wirdum>That's why people listen to our podcast, to get sort of half-baked, they think

00:03:51.530 --> 00:03:54.430
<v Aaron van Wirdum>this is how it works type of explanations.

00:03:54.810 --> 00:03:59.410
<v Sjors Provoost>Well, it depends on the subject, but I mean, the bottom line is that it is a sane

00:03:59.410 --> 00:04:04.680
<v Sjors Provoost>version of the mempool. The original mempool code was kind of awkward,

00:04:04.920 --> 00:04:09.770
<v Sjors Provoost>difficult to reason about. One of the weirdest aspects of it was that... So the

00:04:09.770 --> 00:04:14.790
<v Sjors Provoost>mempool is there to decide, or it should reflect what miners are going to mine

00:04:14.790 --> 00:04:19.670
<v Sjors Provoost>basically first. And so ideally, if your mempool is full and you need to kick

00:04:19.670 --> 00:04:23.510
<v Sjors Provoost>something out, then you're going to kick the most worthless transaction out and

00:04:23.510 --> 00:04:24.670
<v Sjors Provoost>not the most valuable one.

00:04:24.870 --> 00:04:27.910
<v Aaron van Wirdum>And by that you mean the transaction that pays the lowest fee?

00:04:28.030 --> 00:04:30.990
<v Sjors Provoost>Well, not necessarily, because it's more complicated than that, right? Because

00:04:30.990 --> 00:04:34.070
<v Sjors Provoost>it's not just about the fee that your transaction pays, but it's also how much

00:04:34.070 --> 00:04:38.550
<v Sjors Provoost>your parents pay or how much your uncles... and nephews and et cetera pay.

00:04:38.730 --> 00:04:39.890
<v Aaron van Wirdum>And I guess that's the point.

00:04:40.050 --> 00:04:43.910
<v Sjors Provoost>And that was very complicated to reason about. So there were some strange

00:04:43.910 --> 00:04:48.330
<v Sjors Provoost>scenarios where if the mempool was full, you would actually kick out the

00:04:48.330 --> 00:04:51.790
<v Sjors Provoost>transaction that if you were a miner would be the first one you'd want to mine

00:04:51.790 --> 00:04:55.690
<v Sjors Provoost>because of this intricate relationships between transactions.

00:04:56.030 --> 00:05:01.870
<v Aaron van Wirdum>Okay, but the simple example of this is child pays for parents, right?

00:05:02.130 --> 00:05:08.090
<v Aaron van Wirdum>So there's a transaction that pays a very low fee, but from that transaction are

00:05:08.090 --> 00:05:13.570
<v Aaron van Wirdum>coins spent again in a new transaction that pays a high fee. So as a miner...

00:05:13.760 --> 00:05:17.820
<v Aaron van Wirdum>You want to mine both of those, including the very low fee transaction, because

00:05:17.820 --> 00:05:20.120
<v Aaron van Wirdum>then you also get the high fee from the next transaction.

00:05:20.420 --> 00:05:23.860
<v Sjors Provoost>Yeah, and as far as I know, that worked. But once you make the scenarios more

00:05:23.860 --> 00:05:26.220
<v Sjors Provoost>complicated, things do not behave very well.

00:05:26.480 --> 00:05:31.340
<v Aaron van Wirdum>Yeah, but so that's the point I'm making. That already worked, right? Bitcoin

00:05:31.340 --> 00:05:36.700
<v Aaron van Wirdum>Core already had at least the basic child pays for parent logic.

00:05:37.540 --> 00:05:39.320
<v Aaron van Wirdum>Also in the mempool, I think, right?

00:05:39.540 --> 00:05:43.220
<v Sjors Provoost>Yeah, as far as I, my limited understanding is that it was able to reason

00:05:43.220 --> 00:05:48.060
<v Sjors Provoost>basically from the ancestors down to the children or from the children up to the

00:05:48.060 --> 00:05:51.760
<v Sjors Provoost>ancestors. Like you can go down the family graph up or down.

00:05:52.000 --> 00:05:52.540
<v Aaron van Wirdum>Like one step.

00:05:52.580 --> 00:05:57.690
<v Sjors Provoost>But not sideways. And I think now it can take into account like, oh, you know,

00:05:57.770 --> 00:06:01.030
<v Sjors Provoost>this parent and child are worthless, but they have a rich cousin that's paying a

00:06:01.030 --> 00:06:04.650
<v Sjors Provoost>lot of fees. And so we should include that.

00:06:04.750 --> 00:06:08.570
<v Aaron van Wirdum>So they're connected through, I don't know, like the grandfather in this analogy.

00:06:09.130 --> 00:06:10.530
<v Aaron van Wirdum>You could just draw more.

00:06:10.630 --> 00:06:12.010
<v Sjors Provoost>Yeah, so you have a parent, a child.

00:06:12.030 --> 00:06:18.010
<v Aaron van Wirdum>The term cluster kind of says it. You can take a bigger cluster of transactions

00:06:18.010 --> 00:06:24.000
<v Aaron van Wirdum>into account. when it comes to which transactions you want to keep in the mempool

00:06:24.000 --> 00:06:26.040
<v Aaron van Wirdum>or kick out of the mempool.

00:06:26.160 --> 00:06:30.500
<v Sjors Provoost>Yeah and where this becomes important is we have talked about this previously I

00:06:30.500 --> 00:06:35.260
<v Sjors Provoost>think in equally vague terms things like pinning attacks where you're trying to

00:06:35.260 --> 00:06:38.760
<v Sjors Provoost>escape from a Lightning channel so you broadcast a transaction and then somebody

00:06:38.760 --> 00:06:43.840
<v Sjors Provoost>else makes a child of that transaction that makes it so that you will never get

00:06:43.840 --> 00:06:48.140
<v Sjors Provoost>confirmed because the total fee is too low and so you want to bump that fee but

00:06:48.140 --> 00:06:52.700
<v Sjors Provoost>you can't because you hit some sort of limit and there's a lot of these annoying

00:06:52.700 --> 00:06:54.140
<v Sjors Provoost>complicated cases.

00:06:55.470 --> 00:06:58.810
<v Aaron van Wirdum>Real quick, I don't know if you know the answer to this question, but is it the

00:06:58.810 --> 00:07:04.060
<v Aaron van Wirdum>case that the more sophisticated miners and mining pools were

00:07:04.060 --> 00:07:08.900
<v Aaron van Wirdum>practically already doing this, but Bitcoin Core was just not keeping up and

00:07:08.900 --> 00:07:13.320
<v Aaron van Wirdum>therefore mempools weren't really reflecting what was actually being mined? Or is

00:07:13.320 --> 00:07:15.900
<v Aaron van Wirdum>this also really an innovation that miners are going to use?

00:07:16.100 --> 00:07:21.280
<v Sjors Provoost>There's a couple of different things happening here. As far as people that have

00:07:21.280 --> 00:07:26.680
<v Sjors Provoost>looked at what blocks look like, the quirks in the blocks suggest that they use

00:07:26.680 --> 00:07:31.120
<v Sjors Provoost>Bitcoin Core to decide what goes in the block. However, they might have tweaked

00:07:31.120 --> 00:07:36.700
<v Sjors Provoost>things like the minimum fee rate. So last summer we saw that...

00:07:36.680 --> 00:07:42.600
<v Sjors Provoost>suddenly miners started including 0.1 sats per vbyte transactions. And that is a

00:07:42.600 --> 00:07:47.780
<v Sjors Provoost>case of the miners are ahead of what Bitcoin Core was doing by default. And then

00:07:47.780 --> 00:07:50.820
<v Sjors Provoost>Bitcoin Core tends to follow what the miners are doing because of this rule that

00:07:50.820 --> 00:07:53.860
<v Sjors Provoost>we want to basically anticipate what's going to be mined.

00:07:55.400 --> 00:07:59.540
<v Sjors Provoost>So I wouldn't say that they use some sort of sophisticated algorithm as far as I

00:07:59.540 --> 00:08:04.460
<v Sjors Provoost>know. In fact, it's kind of the opposite. If the mempool is not as sophisticated

00:08:04.460 --> 00:08:09.470
<v Sjors Provoost>as it can be, There is an incentive for somebody to say, hey, I can make better

00:08:09.470 --> 00:08:13.550
<v Sjors Provoost>block templates than Bitcoin Core does. Why don't you send the transactions to me

00:08:13.550 --> 00:08:19.270
<v Sjors Provoost>as sort of an accelerator? And then you get centralization pressure. So Bitcoin

00:08:19.270 --> 00:08:24.330
<v Sjors Provoost>Core kind of needs to be as good as possible while not wasting too many resources

00:08:24.330 --> 00:08:28.130
<v Sjors Provoost>of the node. Because there's a computational time there, right? Every time a

00:08:28.130 --> 00:08:31.210
<v Sjors Provoost>transaction comes in, you need to do some calculation to see if it's good or bad.

00:08:32.090 --> 00:08:37.990
<v Aaron van Wirdum>Yeah, as good as possible from the... perspective of a miner that wants

00:08:37.990 --> 00:08:40.430
<v Aaron van Wirdum>to maximize fee revenue, right?

00:08:40.650 --> 00:08:40.890
<v Sjors Provoost>Yes.

00:08:42.390 --> 00:08:48.290
<v Aaron van Wirdum>Was this just something that was kind of always on Bitcoin Core's to

00:08:48.290 --> 00:08:52.790
<v Aaron van Wirdum>-do list, but it's hard and it's complicated and that's why it took a while? Or is

00:08:52.790 --> 00:08:56.890
<v Aaron van Wirdum>there a more specific reason it was implemented?

00:08:58.110 --> 00:09:01.370
<v Aaron van Wirdum>I think you told me that it has something to do with Ark maybe also.

00:09:01.670 --> 00:09:06.490
<v Sjors Provoost>No, it predates it. So the idea of cluster mempool predates Ark, I think by

00:09:06.490 --> 00:09:07.150
<v Sjors Provoost>several years.

00:09:07.390 --> 00:09:07.590
<v Aaron van Wirdum>Okay.

00:09:08.190 --> 00:09:13.710
<v Sjors Provoost>I mean, over the past 10 years or so, I guess since Lightning especially, there's

00:09:13.710 --> 00:09:18.390
<v Sjors Provoost>been a lot of discussion about pinning attacks that I just described before. And

00:09:18.390 --> 00:09:22.250
<v Sjors Provoost>then you have things like RBF, which has a bunch of different rules. Like it has

00:09:22.250 --> 00:09:26.030
<v Sjors Provoost>some rules in the BIP and it has some rules, actual rules that are not in the BIP.

00:09:27.400 --> 00:09:32.330
<v Sjors Provoost>And, you know, it got quite convoluted. It wasn't very elegant. It was kind of a

00:09:32.330 --> 00:09:36.810
<v Sjors Provoost>hot, sort of a hodgepodge of, well, if we make this rule and this exception, and

00:09:36.810 --> 00:09:41.470
<v Sjors Provoost>then, you know, we have a carve out here. It was kind of a messy set of rules

00:09:41.470 --> 00:09:45.850
<v Sjors Provoost>that was just good enough, but then people kept finding ways to still pin you as

00:09:45.850 --> 00:09:49.410
<v Sjors Provoost>a Lightning operator. So there were stakes. And this was kind of a redesign of

00:09:49.410 --> 00:09:53.850
<v Sjors Provoost>it, which people came up with several years ago, thinking of how can we design

00:09:53.850 --> 00:09:58.990
<v Sjors Provoost>the mempool logic from scratch. the sorting logic from scratch in a way that

00:09:59.310 --> 00:10:03.770
<v Sjors Provoost>gets rid of all these weird exceptions too. So I think a couple of rules have

00:10:03.770 --> 00:10:08.960
<v Sjors Provoost>been dropped in how RBFs are processed and exceptions have been removed. So it's

00:10:08.960 --> 00:10:10.760
<v Sjors Provoost>more elegant and it seems to be more robust.

00:10:10.940 --> 00:10:15.180
<v Aaron van Wirdum>Okay. And this is a very, I mean, we're talking about the mempool as a kind of a

00:10:15.180 --> 00:10:18.760
<v Aaron van Wirdum>very individual thing in the sense of you have your own mempool and, you know,

00:10:18.840 --> 00:10:23.540
<v Aaron van Wirdum>every node has that. But this, I assume automatically, or I mean, you can answer

00:10:23.540 --> 00:10:27.180
<v Aaron van Wirdum>it automatically. This also applies to what you share with your peers.

00:10:29.180 --> 00:10:33.840
<v Sjors Provoost>As far as I know, you share with your peers the moment you add it into your own mempool.

00:10:33.980 --> 00:10:34.500
<v Aaron van Wirdum>Right, exactly.

00:10:34.740 --> 00:10:38.960
<v Sjors Provoost>So that doesn't really change. I mean, if for some reason a transaction now goes

00:10:38.960 --> 00:10:42.280
<v Sjors Provoost>into your mempool because of these different heuristics, give a slightly

00:10:42.280 --> 00:10:44.920
<v Sjors Provoost>different result, then yeah, you would be sharing it with your peers.

00:10:45.510 --> 00:10:50.550
<v Aaron van Wirdum>Yeah, but that was like a whole project, right? That Gloria in particular was

00:10:50.550 --> 00:10:55.070
<v Aaron van Wirdum>working on, I think, with the package relay. So is this related to that? Is this

00:10:55.070 --> 00:10:56.730
<v Aaron van Wirdum>kind of the same project in that sense?

00:10:56.870 --> 00:10:59.550
<v Sjors Provoost>So my understanding is that this will make package relay...

00:11:01.320 --> 00:11:06.080
<v Sjors Provoost>So what we discussed in a previous episode, the one parent, one child, special

00:11:06.080 --> 00:11:10.280
<v Sjors Provoost>case of package relay. So it's a package of two. And this is quite useful because

00:11:10.280 --> 00:11:12.760
<v Sjors Provoost>if you need to get out of a Lightning channel, that's usually just two

00:11:12.760 --> 00:11:17.540
<v Sjors Provoost>transactions. One is the penalty transaction that you want to apply or the escape

00:11:17.540 --> 00:11:21.800
<v Sjors Provoost>transaction. And the other is the fees that you want to add because when you make

00:11:21.800 --> 00:11:26.060
<v Sjors Provoost>the channel, you agreed on either very low fees or in the case of ephemeral dust,

00:11:26.240 --> 00:11:31.920
<v Sjors Provoost>no fees at all. And so the special case of two was possible

00:11:31.920 --> 00:11:36.160
<v Sjors Provoost>even without cluster mempool. But the hope is that with cluster mempool, you can

00:11:36.160 --> 00:11:40.300
<v Sjors Provoost>reason about a much larger set of transactions. And then my optimistic take, and

00:11:40.300 --> 00:11:44.380
<v Sjors Provoost>could be wrong, is that things like Ark would now become possible. Because with

00:11:44.380 --> 00:11:48.840
<v Sjors Provoost>Ark, you have, say, 25 transactions to get out. And don't ask me how Arks work.

00:11:50.600 --> 00:11:55.500
<v Sjors Provoost>You might have a package of 25 because you have a tree of transactions that are

00:11:55.500 --> 00:12:00.840
<v Sjors Provoost>needed to escape. But right now, the nodes tend to process transactions one at a

00:12:00.840 --> 00:12:05.660
<v Sjors Provoost>time. Whereas in such a scenario, maybe all the transactions don't pay enough

00:12:05.660 --> 00:12:09.960
<v Sjors Provoost>fees except the very last one, which pays all the fees. And the node needs to

00:12:09.960 --> 00:12:14.100
<v Sjors Provoost>understand that it needs to consider all 25 of them and that the last one is

00:12:14.100 --> 00:12:18.180
<v Sjors Provoost>paying all the fees. And I think that's possible with package relay. And then

00:12:18.180 --> 00:12:21.680
<v Sjors Provoost>hopefully cluster mempool makes it so that the node can reason about these big

00:12:21.680 --> 00:12:25.360
<v Sjors Provoost>packages. It doesn't right now. It just has the better architecture under it.

00:12:28.210 --> 00:12:32.590
<v Aaron van Wirdum>Sorry, that last sentence caught me off guard. It doesn't have it right now?

00:12:32.730 --> 00:12:36.530
<v Sjors Provoost>No. We have cluster mempool, so it's a better architecture that might allow

00:12:36.530 --> 00:12:39.750
<v Sjors Provoost>packages larger than two, but we don't do that yet.

00:12:40.970 --> 00:12:44.970
<v Aaron van Wirdum>Oh, okay, but that gets back to how do you even get the transactions in the first

00:12:44.970 --> 00:12:48.330
<v Aaron van Wirdum>place and if other pairs don't get the whole cluster to you?

00:12:49.790 --> 00:12:54.710
<v Sjors Provoost>Well, okay, so the cluster is a bunch of transactions that might have been given

00:12:54.710 --> 00:12:58.370
<v Sjors Provoost>to you sequentially. So it builds up over time.

00:12:58.610 --> 00:13:02.590
<v Aaron van Wirdum>Right. But you need to keep them in order to know if the child or the parents are

00:13:02.590 --> 00:13:05.710
<v Aaron van Wirdum>also valid, right? You need to not eject them, which is the point.

00:13:05.910 --> 00:13:09.310
<v Sjors Provoost>Yeah. When you start out, you will accept anything that's over one sat per V-byte

00:13:09.310 --> 00:13:11.150
<v Sjors Provoost>because your mempool is empty. You've got 300 megabytes.

00:13:11.390 --> 00:13:13.390
<v Aaron van Wirdum>Yeah, or 0.1 sat per V-byte, I think.

00:13:13.590 --> 00:13:17.630
<v Sjors Provoost>Yes, exactly. So you build up this mempool, including the clusters that are in it

00:13:17.630 --> 00:13:21.530
<v Sjors Provoost>of related transactions. And then at some point, your mempool starts overflowing.

00:13:21.670 --> 00:13:25.020
<v Sjors Provoost>And so you now have to decide which one are you going to throw out. And that is

00:13:25.020 --> 00:13:28.380
<v Sjors Provoost>when you look at these clusters and you find the worst cluster and then each

00:13:28.380 --> 00:13:33.460
<v Sjors Provoost>cluster is divided into chunks. So you take any given set of transactions that

00:13:33.460 --> 00:13:39.400
<v Sjors Provoost>are related as a cluster and you kind of squash it in a line in a way

00:13:39.400 --> 00:13:43.060
<v Sjors Provoost>that the best part of the cluster is at the top and the worst part of the cluster

00:13:43.060 --> 00:13:48.800
<v Sjors Provoost>is at the bottom. And so you take the worst part of the cluster and you throw

00:13:48.800 --> 00:13:51.380
<v Sjors Provoost>that out. And that's a very fast calculation now.

00:13:52.280 --> 00:13:55.580
<v Aaron van Wirdum>Okay, but you throw that out in a way that the rest of the cluster is still

00:13:55.580 --> 00:13:56.080
<v Aaron van Wirdum>valid.

00:13:56.280 --> 00:14:00.440
<v Sjors Provoost>Yes, so the way you squash the cluster, like you flatten it, you flatten it in a

00:14:00.440 --> 00:14:05.300
<v Sjors Provoost>way that one side of it doesn't need the other side of it.

00:14:06.180 --> 00:14:09.900
<v Sjors Provoost>There's a certain order to it. So you want to order transactions by the most fees

00:14:09.900 --> 00:14:14.720
<v Sjors Provoost>first, whenever possible. But if that's not possible because there's a child for

00:14:14.720 --> 00:14:18.880
<v Sjors Provoost>parents, you might have the first transaction is a cheap parent, the second

00:14:18.880 --> 00:14:23.480
<v Sjors Provoost>transaction is a... cheap child, and then the third transaction is a

00:14:23.480 --> 00:14:29.070
<v Sjors Provoost>grandchild that pays a lot. And that's the first chunk. And then the next chunk

00:14:29.070 --> 00:14:34.410
<v Sjors Provoost>might be some other uncle transaction that pays a little bit less than the super

00:14:34.410 --> 00:14:39.430
<v Sjors Provoost>rich child, etc. And that means that if you cut the tail off from the cluster,

00:14:40.000 --> 00:14:43.480
<v Sjors Provoost>you're throwing away the least valuable part of it, but you're keeping it. And

00:14:43.480 --> 00:14:48.360
<v Sjors Provoost>you can cut it at multiple places. But not at all places, right? Because like you

00:14:48.360 --> 00:14:53.640
<v Sjors Provoost>said, some transactions depend on each other. And so it's sorted in a way that

00:14:53.640 --> 00:14:56.900
<v Sjors Provoost>you can cut it in a number of places without breaking those dependencies.

00:14:58.410 --> 00:14:58.770
<v Aaron van Wirdum>Right.

00:14:58.950 --> 00:15:03.330
<v Sjors Provoost>And then you cut the worst part. And for mining, you do the opposite. So for

00:15:03.330 --> 00:15:05.970
<v Sjors Provoost>mining, you look at the best cluster and the best part of the cluster.

00:15:07.570 --> 00:15:12.990
<v Aaron van Wirdum>Maybe I'm going a bit too much into the weeds right now, but in this hypothetical

00:15:12.990 --> 00:15:16.910
<v Aaron van Wirdum>scenario that you describe, you're starting with an empty mempool, basically.

00:15:17.530 --> 00:15:23.130
<v Aaron van Wirdum>But in this scenario that you describe, you're starting with an empty mempool, basically.

00:15:23.220 --> 00:15:23.660
<v Sjors Provoost>Yes.

00:15:23.470 --> 00:15:27.550
<v Aaron van Wirdum>But in reality, most of the time, you don't start with an empty mempool. Your

00:15:27.550 --> 00:15:29.710
<v Aaron van Wirdum>mempool is kind of always full by default, right?

00:15:29.930 --> 00:15:34.690
<v Sjors Provoost>Well, not today, but let's say it is full, and a new transaction comes in. So

00:15:34.690 --> 00:15:38.350
<v Sjors Provoost>then what you have to do, as far as I understand it, is you look at your mempool

00:15:38.350 --> 00:15:42.090
<v Sjors Provoost>and see which is this relevant to any of the clusters I have, or is it a

00:15:42.090 --> 00:15:46.200
<v Sjors Provoost>completely new cluster because it's unrelated to anything I've seen. If it is a

00:15:46.200 --> 00:15:50.960
<v Sjors Provoost>new cluster, then you just see, okay, is this new cluster better than any of my

00:15:50.960 --> 00:15:51.640
<v Sjors Provoost>existing clusters?

00:15:51.740 --> 00:15:54.540
<v Aaron van Wirdum>But then you need the other transactions in the cluster as well, right?

00:15:55.580 --> 00:15:56.780
<v Aaron van Wirdum>Otherwise, how can you tell?

00:15:56.940 --> 00:16:00.140
<v Sjors Provoost>So a new transaction can be a cluster of one. It's not related to anything else

00:16:00.140 --> 00:16:03.280
<v Sjors Provoost>in the mempool. It's basically just spending from something that's confirmed.

00:16:03.520 --> 00:16:07.080
<v Aaron van Wirdum>Yes, but what if that is a very low fee-paying transaction and you don't see the

00:16:07.080 --> 00:16:10.620
<v Aaron van Wirdum>rest of the cluster yet, then you would normally throw it out, even though maybe the rest of it...

00:16:10.620 --> 00:16:12.760
<v Sjors Provoost>Yeah, so if you receive a new transaction...

00:16:12.760 --> 00:16:15.420
<v Aaron van Wirdum>So for that, you need package relay, ultimately, right? Or some form of it that

00:16:15.420 --> 00:16:16.700
<v Aaron van Wirdum>is so compatible with...

00:16:16.700 --> 00:16:20.540
<v Sjors Provoost>Yeah, so if you see a new transaction that is not related to any of the clusters

00:16:20.540 --> 00:16:25.080
<v Sjors Provoost>you're aware of, but it is part of a cluster, apparently... then yeah, you might

00:16:25.080 --> 00:16:30.040
<v Sjors Provoost>just reject it. And you'd need something like package relay, especially big

00:16:30.040 --> 00:16:33.720
<v Sjors Provoost>package relay to say, okay, here's somebody escaping from their Ark, for example,

00:16:33.860 --> 00:16:38.660
<v Sjors Provoost>25 transactions. I see the first one of that 25 transactions. I'm like, well,

00:16:38.720 --> 00:16:42.320
<v Sjors Provoost>this is a new cluster, but it pays nothing. So I'm going to ignore it. And the

00:16:42.320 --> 00:16:46.340
<v Sjors Provoost>second one, I'm also going to ignore it because it's paying from a parent that I,

00:16:46.520 --> 00:16:50.160
<v Sjors Provoost>you know, spending from a parent that I don't know about. So that's where this

00:16:50.160 --> 00:16:53.810
<v Sjors Provoost>comes in. But in the case where it's just a single transaction and you need to

00:16:53.810 --> 00:16:58.920
<v Sjors Provoost>evaluate it on its own, either it's better than any of your clusters or parts of

00:16:58.920 --> 00:17:02.280
<v Sjors Provoost>the clusters, and then you know where to sort it and you put it in the mempool,

00:17:02.480 --> 00:17:07.020
<v Sjors Provoost>or it's not and you ignore it. And that's a fast calculation, so you can do that

00:17:07.020 --> 00:17:08.800
<v Sjors Provoost>when you get lots of new transactions every second.

00:17:09.220 --> 00:17:12.620
<v Aaron van Wirdum>Okay, so then I think this will be my last question on this topic.

00:17:14.280 --> 00:17:18.700
<v Aaron van Wirdum>Ideally, we'd want package relay for clusters, right?

00:17:19.240 --> 00:17:21.760
<v Sjors Provoost>I think so, but some people might say no.

00:17:23.260 --> 00:17:24.020
<v Sjors Provoost>I'm not sure.

00:17:24.180 --> 00:17:26.900
<v Aaron van Wirdum>But in any case, that's not here yet. That's not here yet.

00:17:27.040 --> 00:17:30.080
<v Sjors Provoost>No, the only package relay for clusters is a cluster of two.

00:17:30.380 --> 00:17:34.660
<v Aaron van Wirdum>Okay, right. Okay, well, that answers my question. That was my question. So right

00:17:34.660 --> 00:17:39.080
<v Aaron van Wirdum>now, cluster mempool works for your mempool, and you make more complicated,

00:17:39.320 --> 00:17:44.780
<v Aaron van Wirdum>complex, advanced. calculations for that, but it's not necessarily all related as

00:17:44.780 --> 00:17:45.380
<v Aaron van Wirdum>a package yet.

00:17:45.880 --> 00:17:46.100
<v Sjors Provoost>Exactly.

00:17:46.380 --> 00:17:49.720
<v Aaron van Wirdum>And maybe you say there's arguments against doing that also.

00:17:50.360 --> 00:17:54.520
<v Sjors Provoost>Maybe. I mean, if you look at the one child, one parent example in Lightning, the

00:17:54.520 --> 00:17:58.920
<v Sjors Provoost>TRUC transactions or the ephemeral dust transactions, the question there is what

00:17:58.920 --> 00:18:03.700
<v Sjors Provoost>is the maximum cost that an attacker can impose on you? So right now I think

00:18:03.700 --> 00:18:05.180
<v Sjors Provoost>that's capped at like 10,000.

00:18:06.590 --> 00:18:10.890
<v Sjors Provoost>sats in total, so that's like $5 now, the worst that the attacker can do to you.

00:18:11.070 --> 00:18:15.210
<v Sjors Provoost>But if you say, okay, we're allowing a cluster package of size million

00:18:15.210 --> 00:18:18.750
<v Sjors Provoost>transactions, then, I don't know, maybe the attacker can do more damage to you.

00:18:19.370 --> 00:18:21.850
<v Sjors Provoost>But maybe that's not too bad. I don't know.

00:18:22.570 --> 00:18:27.550
<v Aaron van Wirdum>Okay, in any case, short summary, cluster mempool, your node, your mempool,

00:18:27.910 --> 00:18:32.670
<v Aaron van Wirdum>will make more advanced calculations to determine what to keep and what to throw

00:18:32.670 --> 00:18:37.830
<v Aaron van Wirdum>out. which benefits miners that would use this to create blocks and individual

00:18:37.830 --> 00:18:42.430
<v Aaron van Wirdum>nodes because then their mempools better reflect the blocks that are actually

00:18:42.430 --> 00:18:47.730
<v Aaron van Wirdum>mined, which benefits the estimation and stuff like that and relay. Correct?

00:18:48.030 --> 00:18:51.630
<v Sjors Provoost>Yeah, I think some of this will or is being used for fee estimation too.

00:18:52.470 --> 00:18:52.570
<v Aaron van Wirdum>Right.

00:18:54.280 --> 00:18:57.460
<v Aaron van Wirdum>Does that conclude our topic?

00:18:57.620 --> 00:18:58.680
<v Sjors Provoost>Yeah, I think so. We can move on.

00:18:59.460 --> 00:19:03.860
<v Aaron van Wirdum>Okay. So the next upgrade in Bitcoin Core 31,

00:19:04.390 --> 00:19:08.130
<v Aaron van Wirdum>there's now a function called private broadcast.

00:19:09.090 --> 00:19:11.170
<v Sjors Provoost>A startup option called private broadcast.

00:19:11.390 --> 00:19:14.030
<v Aaron van Wirdum>A startup option called private broadcast. Okay.

00:19:14.210 --> 00:19:19.190
<v Sjors Provoost>And it's been fixed in version 31.1. So if you want to use it, you should use 31

00:19:19.190 --> 00:19:24.710
<v Sjors Provoost>.1 to be on the safe side. What it does is, so right now, if you make a

00:19:24.710 --> 00:19:28.550
<v Sjors Provoost>transaction and you send it, it just goes to a bunch of your peers.

00:19:29.870 --> 00:19:33.270
<v Sjors Provoost>And that's not great if one of your peers happens to be Chainalysis and they can

00:19:33.270 --> 00:19:37.310
<v Sjors Provoost>sort of figure out, oh, well, I saw it from you first and not from others, so

00:19:37.310 --> 00:19:40.970
<v Sjors Provoost>maybe it's yours, right? So you're kind of leaking, potentially leaking the

00:19:40.970 --> 00:19:45.440
<v Sjors Provoost>origin of your own transaction. In the past, there were proposals like Dandelion.

00:19:45.680 --> 00:19:46.800
<v Sjors Provoost>I don't know if we've ever covered that.

00:19:47.100 --> 00:19:48.440
<v Aaron van Wirdum>Oh, that's years ago.

00:19:48.640 --> 00:19:48.880
<v Sjors Provoost>Yes.

00:19:48.960 --> 00:19:52.080
<v Aaron van Wirdum>That's like a 10-year-old proposal. I don't think we ever covered that.

00:19:52.180 --> 00:19:56.020
<v Sjors Provoost>Okay. Yeah, it's quite an old proposal. It's quite cool, but it basically said,

00:19:56.080 --> 00:19:59.900
<v Sjors Provoost>okay, we're going to send a transaction, one hop, another hop, another hop, like

00:19:59.900 --> 00:20:04.480
<v Sjors Provoost>just as a stem basically, and then it explodes at some random node in the distance.

00:20:04.740 --> 00:20:04.880
<v Aaron van Wirdum>Right.

00:20:05.460 --> 00:20:09.400
<v Sjors Provoost>That turns out to be extremely complicated to implement for all sorts of reasons.

00:20:11.210 --> 00:20:15.810
<v Sjors Provoost>But there's a sort of a poor man's dandelion, I guess, where it's this. So

00:20:15.810 --> 00:20:20.730
<v Sjors Provoost>instead of connecting to your peers, when you have this new transaction, you open

00:20:20.730 --> 00:20:22.150
<v Sjors Provoost>a new Tor connection.

00:20:23.350 --> 00:20:25.250
<v Aaron van Wirdum>Just good old Tor?

00:20:25.450 --> 00:20:30.680
<v Sjors Provoost>Yes. Completely new Tor circuit, I think. And then you find a peer randomly on

00:20:30.680 --> 00:20:35.870
<v Sjors Provoost>the internet. You connect to it. You say, hi, here's the transaction. Bye. And

00:20:35.870 --> 00:20:40.520
<v Sjors Provoost>then you wait. And you see if any of your peers, normal peers, announced this transaction.

00:20:40.960 --> 00:20:41.800
<v Aaron van Wirdum>To you, basically.

00:20:41.800 --> 00:20:44.780
<v Sjors Provoost>To you, because then you know it kind of went through the network. If not, then

00:20:44.780 --> 00:20:47.580
<v Sjors Provoost>you just keep trying another Tor peer, etc.

00:20:48.530 --> 00:20:48.890
<v Aaron van Wirdum>Right.

00:20:48.990 --> 00:20:51.370
<v Sjors Provoost>So this is still a bit cumbersome to use, but it's there.

00:20:52.360 --> 00:20:56.680
<v Aaron van Wirdum>Right, right, yeah. Okay, so yeah, the problem, I mean, yeah, one of the ways to

00:20:56.680 --> 00:21:02.610
<v Aaron van Wirdum>de-anonymize Bitcoin users is basically for, you know, the companies

00:21:02.610 --> 00:21:04.630
<v Aaron van Wirdum>like Chainalysis.

00:21:06.020 --> 00:21:07.180
<v Aaron van Wirdum>Am I pronouncing it?

00:21:07.340 --> 00:21:09.680
<v Sjors Provoost>There are different people who pronounce it in different ways for different

00:21:09.680 --> 00:21:10.620
<v Sjors Provoost>reasons, but it's Chainalysis.

00:21:11.100 --> 00:21:15.420
<v Aaron van Wirdum>But there's different companies, right? They actually monitor the Bitcoin network

00:21:15.420 --> 00:21:19.960
<v Aaron van Wirdum>itself to see where transactions originate, which is not

00:21:19.960 --> 00:21:25.780
<v Aaron van Wirdum>foolproof, but at least it's supposedly used, right?

00:21:26.140 --> 00:21:29.980
<v Sjors Provoost>Yeah, so the first peer that you, if you're a spy and you're connecting to lots

00:21:29.980 --> 00:21:33.880
<v Sjors Provoost>of different nodes, and the first node you hear about for a given transaction is,

00:21:33.980 --> 00:21:38.060
<v Sjors Provoost>you know, more likely to be the original one than the second node you hear it from.

00:21:38.280 --> 00:21:42.340
<v Aaron van Wirdum>Yeah, exactly. Okay, so the, and then the solution now is to use, to just use,

00:21:42.480 --> 00:21:48.410
<v Aaron van Wirdum>sounds simple enough. Why is this new? I would say, I mean, I

00:21:48.410 --> 00:21:52.870
<v Aaron van Wirdum>didn't propose it 10 years, so it's easy to say now, but you would think someone

00:21:52.870 --> 00:21:58.400
<v Aaron van Wirdum>could have just come up with this 10 years ago. Is there something difficult

00:21:58.400 --> 00:21:59.020
<v Aaron van Wirdum>about this?

00:22:00.620 --> 00:22:04.540
<v Sjors Provoost>No, I suspect the idea itself actually might already be at least five years old,

00:22:04.580 --> 00:22:05.040
<v Sjors Provoost>if not more.

00:22:06.320 --> 00:22:10.580
<v Sjors Provoost>It's possible that somebody proposed it, then came up with Dandelion. That sounds

00:22:10.580 --> 00:22:14.220
<v Sjors Provoost>really cool. And then you try that and it doesn't work. It took another five

00:22:14.220 --> 00:22:18.520
<v Sjors Provoost>years to get this one-shot Tor thing through. I think the idea is not super new.

00:22:19.140 --> 00:22:23.060
<v Sjors Provoost>The downside, I think, is relying on Tor. Because it's kind of like this black

00:22:23.060 --> 00:22:27.460
<v Sjors Provoost>box trust assumption. Like, okay, we hope Tor actually works and doesn't. Because

00:22:27.460 --> 00:22:32.800
<v Sjors Provoost>if this doesn't work, let's say Tor was fake. Like, it doesn't actually protect

00:22:32.800 --> 00:22:37.640
<v Sjors Provoost>your privacy. Then you are creating a connection to the spy agency and telling

00:22:37.640 --> 00:22:39.100
<v Sjors Provoost>them, this is my transaction.

00:22:39.400 --> 00:22:40.760
<v Aaron van Wirdum>And I want to keep it private.

00:22:40.980 --> 00:22:45.060
<v Sjors Provoost>Because you're only using this connection to send your transactions. There's no

00:22:45.060 --> 00:22:45.520
<v Sjors Provoost>decoys.

00:22:46.790 --> 00:22:48.730
<v Aaron van Wirdum>Yeah, it's a dependency, right?

00:22:50.010 --> 00:22:51.810
<v Aaron van Wirdum>Ideally, you would not want to...

00:22:51.300 --> 00:22:54.170
<v Sjors Provoost>And there's some practical issues. How do you configure your node to use Tor,

00:22:54.310 --> 00:22:57.990
<v Sjors Provoost>etc.? Now, a lot of these node-in-the-box solutions will do that for you.

00:22:59.400 --> 00:23:04.720
<v Aaron van Wirdum>Okay, so this is new in Bitcoin Core 31, because

00:23:04.720 --> 00:23:08.780
<v Aaron van Wirdum>it's not by default, right? You have to actually opt in somehow?

00:23:08.800 --> 00:23:11.680
<v Sjors Provoost>Yeah, you have to turn on a setting, and then you have to do something special

00:23:11.680 --> 00:23:13.660
<v Sjors Provoost>when you make a transaction to use this, I think.

00:23:14.540 --> 00:23:19.260
<v Aaron van Wirdum>Okay, and if I understand correctly, this is not implemented in the wallet right

00:23:19.260 --> 00:23:24.320
<v Aaron van Wirdum>now. As a Bitcoin Core wallet user, you can't use this. You would have to... What

00:23:24.320 --> 00:23:26.720
<v Aaron van Wirdum>do you actually have to do? You have to construct your own transaction and

00:23:26.720 --> 00:23:27.340
<v Aaron van Wirdum>then...

00:23:27.340 --> 00:23:30.200
<v Sjors Provoost>Yeah, I think you create the transaction as normal, but you don't send it, you

00:23:30.200 --> 00:23:34.860
<v Sjors Provoost>don't broadcast it, you just copy it and then send it over, copy it to an RPC command.

00:23:35.770 --> 00:23:36.130
<v Aaron van Wirdum>Okay.

00:23:36.330 --> 00:23:37.190
<v Sjors Provoost>So it's a little tedious, but...

00:23:37.190 --> 00:23:38.490
<v Aaron van Wirdum>It's a little bit manual labor.

00:23:38.790 --> 00:23:43.530
<v Sjors Provoost>Yeah, but I can imagine that you could add this to the wallet. It's not rocket

00:23:43.530 --> 00:23:44.990
<v Sjors Provoost>science, it's just one step at a time.

00:23:46.120 --> 00:23:51.500
<v Aaron van Wirdum>Yeah. Okay, so that's a new option, that's a new feature in Bitcoin Core 31. I

00:23:51.500 --> 00:23:55.140
<v Aaron van Wirdum>think that basically covers it, right? It's kind of straightforward, or is there

00:23:55.140 --> 00:23:55.940
<v Aaron van Wirdum>more to say about this?

00:23:56.700 --> 00:23:57.580
<v Sjors Provoost>Yeah, no, that covers it.

00:23:57.840 --> 00:24:00.740
<v Aaron van Wirdum>Okay, great. More privacy is great. I like it. Okay.

00:24:03.320 --> 00:24:03.680
<v Aaron van Wirdum>ASMAP.

00:24:04.410 --> 00:24:10.350
<v Sjors Provoost>Or ASMAP, depending on your mood. We had an episode about this, so just listen to it.

00:24:12.880 --> 00:24:13.840
<v Sjors Provoost>Back then, we...

00:24:13.840 --> 00:24:17.100
<v Aaron van Wirdum>Did we do a whole episode on only ASMAP?

00:24:17.100 --> 00:24:21.440
<v Sjors Provoost>I think so. We had a whole bunch of episodes about eclipse attacks, and one of

00:24:21.440 --> 00:24:22.560
<v Sjors Provoost>them was about ASMAP.

00:24:22.960 --> 00:24:26.920
<v Aaron van Wirdum>Okay, but to recoup that a little bit.

00:24:27.080 --> 00:24:30.040
<v Sjors Provoost>The quick summary is that we don't like eclipse attacks.

00:24:30.220 --> 00:24:31.600
<v Aaron van Wirdum>What is an eclipse attack again?

00:24:31.640 --> 00:24:34.600
<v Sjors Provoost>It's where you are connected to only one.

00:24:36.130 --> 00:24:37.270
<v Aaron van Wirdum>Pretending to be several.

00:24:37.450 --> 00:24:40.630
<v Sjors Provoost>Pretending to be several. And then they can feed you maybe an alternative

00:24:40.630 --> 00:24:45.390
<v Sjors Provoost>blockchain or pretend there's no update or all sorts of shenanigans you don't want.

00:24:45.510 --> 00:24:51.170
<v Aaron van Wirdum>If every pair you're connecting to is actually the same attacker, then they can

00:24:51.170 --> 00:24:56.470
<v Aaron van Wirdum>give you blocks that are... double spending or whatever. It's not necessarily the

00:24:56.470 --> 00:24:57.710
<v Aaron van Wirdum>largest chain you're seeing then.

00:24:57.850 --> 00:25:02.310
<v Sjors Provoost>And if you are a miner, then they can make you produce a block that's not

00:25:02.310 --> 00:25:07.430
<v Sjors Provoost>actually on the most work chain, and then they can abuse you to double spend

00:25:07.430 --> 00:25:11.930
<v Sjors Provoost>somebody else. So it's not just you as a normal node, but it's also you as a

00:25:11.930 --> 00:25:15.300
<v Sjors Provoost>miner node where you do not want to be eclipsed.

00:25:16.080 --> 00:25:20.880
<v Aaron van Wirdum>Yeah. Bottom line, you want to be connected to the actual network. You want to

00:25:20.880 --> 00:25:25.390
<v Aaron van Wirdum>see actual blocks that the rest of the network sees. So an eclipse attack stops

00:25:25.390 --> 00:25:31.270
<v Aaron van Wirdum>that. So this is a solution, or this is a measure against eclipse attacks.

00:25:31.450 --> 00:25:34.610
<v Sjors Provoost>Yeah, so over the years, lots of different measures have been taken to prevent

00:25:34.610 --> 00:25:38.650
<v Sjors Provoost>eclipse attacks. One of the measures that's been in there for quite long, I think

00:25:38.650 --> 00:25:42.960
<v Sjors Provoost>from the beginning, is that when we decide who to connect to,

00:25:43.140 --> 00:25:48.980
<v Sjors Provoost>we use this thing called buckets. We have a whole

00:25:48.980 --> 00:25:53.890
<v Sjors Provoost>list of peers, or a whole list of... nodes in our database that we think are

00:25:53.890 --> 00:25:58.150
<v Sjors Provoost>nodes, so just a bunch of IP addresses, essentially. And we say, okay, let's take

00:25:58.150 --> 00:26:01.850
<v Sjors Provoost>all the IP addresses that start with a 1, and we make only one connection to

00:26:01.850 --> 00:26:05.270
<v Sjors Provoost>those, and then we look at all the IP addresses that start with a 5, and we only

00:26:05.270 --> 00:26:09.870
<v Sjors Provoost>make one connection to those, and that's how we diversify the people that we

00:26:09.870 --> 00:26:14.750
<v Sjors Provoost>connect to. And that's just based on what the IP addresses look like, which is

00:26:14.750 --> 00:26:19.270
<v Sjors Provoost>not great because there's companies like Amazon that have lots of different IP

00:26:19.270 --> 00:26:23.530
<v Sjors Provoost>addresses that start with different first digits, basically.

00:26:24.780 --> 00:26:30.700
<v Sjors Provoost>So ASMAP is a project to actually look at these owners and group those

00:26:30.700 --> 00:26:35.040
<v Sjors Provoost>and try to diversify across actual owners of the network.

00:26:36.850 --> 00:26:42.770
<v Sjors Provoost>So there's a bunch of university research projects out there that are

00:26:42.770 --> 00:26:46.170
<v Sjors Provoost>monitoring. I think it's basically the gossip between different internet

00:26:46.170 --> 00:26:51.120
<v Sjors Provoost>providers. So AS is an autonomous system. It's a group of IP addresses. It could

00:26:51.120 --> 00:26:57.080
<v Sjors Provoost>be your ISP. It could be Amazon. It could be Google. Like sort of one entity that

00:26:57.080 --> 00:27:00.420
<v Sjors Provoost>controls a group of IP addresses. And this stuff is gossiped around the internet

00:27:00.420 --> 00:27:05.900
<v Sjors Provoost>because it's needed in order for you to find a route from... A to B goes through

00:27:05.900 --> 00:27:10.580
<v Sjors Provoost>all these autonomous systems. And so there are these giant databases of exactly

00:27:10.580 --> 00:27:15.500
<v Sjors Provoost>which IP address belongs to which autonomous system. And what happens is every

00:27:15.500 --> 00:27:19.680
<v Sjors Provoost>month or so or every two months, a group of volunteers, Bitcoin Core-related

00:27:19.680 --> 00:27:23.320
<v Sjors Provoost>volunteers, come together and at the same time try to download these giant maps

00:27:23.320 --> 00:27:27.980
<v Sjors Provoost>from those research institutions, a couple of different ones in the world. And

00:27:27.980 --> 00:27:31.060
<v Sjors Provoost>then they do that at exactly the same time because this map changes every second

00:27:31.190 --> 00:27:36.080
<v Sjors Provoost>or more often. And then if they all have the exact same view,

00:27:36.760 --> 00:27:42.220
<v Sjors Provoost>some math is performed on it and it becomes like a one megabyte file that's added

00:27:42.220 --> 00:27:46.590
<v Sjors Provoost>to Bitcoin Core now. And this one megabyte file just means that for given any IP

00:27:46.590 --> 00:27:50.590
<v Sjors Provoost>address, tell me that it's like, what group does it belong to? It doesn't really

00:27:50.590 --> 00:27:53.890
<v Sjors Provoost>give you the name. It just says, okay, this IP address is a different group than

00:27:53.890 --> 00:27:57.410
<v Sjors Provoost>this other IP address. Because the only thing you care about is that you don't

00:27:57.410 --> 00:28:01.010
<v Sjors Provoost>connect to the same group twice, the same autonomous system twice.

00:28:02.700 --> 00:28:08.420
<v Aaron van Wirdum>Right, okay, the very, I think it's a pretty hypothetical attack, right? But

00:28:08.420 --> 00:28:14.240
<v Aaron van Wirdum>the potential attack here would be that, say, Amazon,

00:28:14.560 --> 00:28:20.310
<v Aaron van Wirdum>whoever controls Amazon or whoever hacked into Amazon. they control a whole

00:28:20.310 --> 00:28:24.290
<v Aaron van Wirdum>bunch of IP addresses now, and these IP addresses don't even look the same

00:28:24.290 --> 00:28:29.050
<v Aaron van Wirdum>because Amazon is so big. They have so many IP addresses under their control. So

00:28:29.050 --> 00:28:34.990
<v Aaron van Wirdum>to prevent an Eclipse attack from such an attacker, there's a more accurate

00:28:34.990 --> 00:28:40.970
<v Aaron van Wirdum>way to map which IP addresses belong to which entity or behind which ISP or

00:28:40.970 --> 00:28:41.570
<v Aaron van Wirdum>something like that.

00:28:41.710 --> 00:28:42.210
<v Sjors Provoost>Yeah, exactly.

00:28:42.950 --> 00:28:48.810
<v Aaron van Wirdum>Okay, and from there, these buckets are then used to... for a node to

00:28:48.810 --> 00:28:51.830
<v Aaron van Wirdum>say, okay, connect to a diverse range of it.

00:28:52.230 --> 00:28:52.630
<v Sjors Provoost>Yeah, exactly.

00:28:52.810 --> 00:28:56.170
<v Aaron van Wirdum>But we're not just connected to Amazon, we're connected to all kinds of different

00:28:56.170 --> 00:28:56.910
<v Aaron van Wirdum>ISPs.

00:28:57.290 --> 00:29:02.550
<v Sjors Provoost>Yes, and so in practice, this probably means that some obscure internet provider

00:29:02.550 --> 00:29:08.550
<v Sjors Provoost>in Zambia will now get more connections because they're sort of picked as the not

00:29:08.550 --> 00:29:10.930
<v Sjors Provoost>standard option and Amazon might get fewer connections.

00:29:11.350 --> 00:29:16.770
<v Aaron van Wirdum>Right, okay. And these maps, S-maps, these are actually...

00:29:17.710 --> 00:29:21.710
<v Aaron van Wirdum>These are files. You actually download these on your Bitcoin Core node. These are

00:29:21.710 --> 00:29:22.590
<v Aaron van Wirdum>now on your hard drive.

00:29:22.810 --> 00:29:26.890
<v Sjors Provoost>Yeah, so what's already been available is, basically since we did that episode in

00:29:26.890 --> 00:29:32.510
<v Sjors Provoost>2022, is this ability to download this ASMAP file, put it in your node,

00:29:32.730 --> 00:29:37.470
<v Sjors Provoost>and then enter it in your config, and it would use it. What's new now is that, by

00:29:37.470 --> 00:29:39.570
<v Sjors Provoost>default, Bitcoin Core comes with one of those maps.

00:29:40.440 --> 00:29:43.220
<v Aaron van Wirdum>Okay, and uses them. Or is that actually?

00:29:43.420 --> 00:29:44.840
<v Sjors Provoost>No, you still have to turn that on.

00:29:45.000 --> 00:29:45.320
<v Aaron van Wirdum>Okay.

00:29:45.440 --> 00:29:51.020
<v Sjors Provoost>But now you just set asmap=1. And it works. Rather than downloading a file,

00:29:51.100 --> 00:29:54.900
<v Sjors Provoost>putting it somewhere, etc. And then every time Bitcoin Core updates, the new

00:29:54.900 --> 00:29:59.300
<v Sjors Provoost>version will have a new map. If you've turned this feature on, it will use the

00:29:59.300 --> 00:29:59.700
<v Sjors Provoost>new map.

00:30:00.260 --> 00:30:03.420
<v Aaron van Wirdum>Right, yeah. It's not automatically updated or gossiped around. It's just

00:30:03.420 --> 00:30:07.800
<v Aaron van Wirdum>whenever there's a new Bitcoin Core release, you get the newest ASMAPs.

00:30:08.240 --> 00:30:12.400
<v Sjors Provoost>Yes. And you can still download your own or make your own, but that's kind of

00:30:12.400 --> 00:30:16.540
<v Sjors Provoost>difficult. And the reason it took so long is because... We kind of don't like

00:30:16.540 --> 00:30:21.680
<v Sjors Provoost>shipping a blob that is hard to reproduce, is hard to verify.

00:30:22.160 --> 00:30:25.880
<v Sjors Provoost>So that's why there's this ritual of like multiple people in different places of

00:30:25.880 --> 00:30:31.790
<v Sjors Provoost>the world try to make the same AS map file at the exact same time. And then

00:30:31.790 --> 00:30:35.770
<v Sjors Provoost>if like three of them or so have the same result, then there's at least some

00:30:35.770 --> 00:30:39.390
<v Sjors Provoost>auditability that this process was fair. And then you can look at the code and

00:30:39.390 --> 00:30:44.390
<v Sjors Provoost>see how it works. It's not ideal because the map of the internet, there's no

00:30:44.390 --> 00:30:45.530
<v Sjors Provoost>official map of the internet.

00:30:46.980 --> 00:30:51.720
<v Sjors Provoost>these basically maps that people are downloading exist for one second and then

00:30:51.720 --> 00:30:54.440
<v Sjors Provoost>they change. Just like Google Maps, I guess, you know, every time there's a

00:30:54.440 --> 00:30:56.820
<v Sjors Provoost>different street somewhere in the world, the whole map changes.

00:30:58.340 --> 00:31:02.880
<v Aaron van Wirdum>Yeah, there's no official map, but this is publicly available data. And the

00:31:02.880 --> 00:31:07.200
<v Aaron van Wirdum>Bitcoin Core developers themselves actually use that to turn it into maps. This

00:31:07.200 --> 00:31:08.980
<v Aaron van Wirdum>is a Bitcoin Core-specific project.

00:31:09.160 --> 00:31:12.600
<v Sjors Provoost>Yeah, I mean, I'm sure other projects could use it if they have the same need to

00:31:12.600 --> 00:31:13.420
<v Sjors Provoost>avoid eclipse attacks.

00:31:13.720 --> 00:31:14.160
<v Aaron van Wirdum>Right.

00:31:15.780 --> 00:31:18.770
<v Aaron van Wirdum>Okay. So that's also new in Bitcoin Core 31?

00:31:19.110 --> 00:31:19.590
<v Sjors Provoost>Mm-hmm.

00:31:19.830 --> 00:31:21.550
<v Aaron van Wirdum>Did that cover it?

00:31:21.920 --> 00:31:22.520
<v Sjors Provoost>Yeah, I think so.

00:31:22.520 --> 00:31:23.300
<v Aaron van Wirdum>Is there anything else to say about that?

00:31:23.730 --> 00:31:23.930
<v Sjors Provoost>No.

00:31:24.190 --> 00:31:29.000
<v Aaron van Wirdum>Okay. Smaller risk of eclipse attacks. Also sounds good.

00:31:29.460 --> 00:31:29.900
<v Sjors Provoost>Yeah.

00:31:30.360 --> 00:31:35.480
<v Aaron van Wirdum>I like privacy. I like smaller risks of eclipse attacks as well. All good so far.

00:31:35.760 --> 00:31:35.980
<v Sjors Provoost>Great.

00:31:36.360 --> 00:31:41.130
<v Aaron van Wirdum>What was the first thing again? Oh, cluster mempool. I like more fees and more

00:31:41.130 --> 00:31:44.190
<v Aaron van Wirdum>accurate mempools as well, Sjors. All good so far.

00:31:44.270 --> 00:31:44.970
<v Sjors Provoost>I'm glad you're happy.

00:31:45.430 --> 00:31:51.360
<v Aaron van Wirdum>Very. Last one. Oh, no, I was to ask. Wait, was this this topic or the last

00:31:51.360 --> 00:31:56.580
<v Aaron van Wirdum>one? No, this was the last topic on the private broadcast. I do want to ask. So

00:31:56.580 --> 00:32:00.100
<v Aaron van Wirdum>you mentioned there was a bug and it's fixed. What was the bug, actually?

00:32:00.820 --> 00:32:04.220
<v Sjors Provoost>Yeah, if I remember, it's related to another episode we probably have done, which

00:32:04.220 --> 00:32:10.200
<v Sjors Provoost>is about the V2 transport, the encrypted peer-to-peer network. What

00:32:10.200 --> 00:32:13.200
<v Sjors Provoost>happens is if you try to connect to a node that has the encrypted...

00:32:14.520 --> 00:32:17.780
<v Sjors Provoost>So if you try to connect to another node and you want to use a new encrypted

00:32:17.780 --> 00:32:22.240
<v Sjors Provoost>communication protocol, if that doesn't work because they don't actually speak

00:32:22.240 --> 00:32:26.220
<v Sjors Provoost>the encrypted protocol, you kind of disconnect and reconnect and then try the

00:32:26.220 --> 00:32:29.660
<v Sjors Provoost>unencrypted protocol. Now, for Tor, it doesn't matter whether you use encrypted

00:32:29.660 --> 00:32:33.960
<v Sjors Provoost>or unencrypted, if both sides are on Tor anyway, because Tor itself encrypts too,

00:32:34.100 --> 00:32:38.180
<v Sjors Provoost>so it's going to double, but maybe you're connecting via Tor to somebody who's

00:32:38.180 --> 00:32:43.580
<v Sjors Provoost>not on Tor through the exit nodes, right? So you need the encryption, but the...

00:32:44.840 --> 00:32:49.260
<v Sjors Provoost>The problem was, I think that if the V2 connection didn't work, it would

00:32:49.260 --> 00:32:52.900
<v Sjors Provoost>disconnect and reconnect, but the reconnection would not go over Tor.

00:32:53.640 --> 00:32:53.980
<v Aaron van Wirdum>Right.

00:32:54.160 --> 00:32:55.060
<v Sjors Provoost>So that's very bad.

00:32:55.340 --> 00:32:59.980
<v Aaron van Wirdum>Right, so you're trying to get privacy, but then when it fails, you just give up

00:32:59.980 --> 00:33:00.500
<v Aaron van Wirdum>on the privacy.

00:33:00.620 --> 00:33:04.040
<v Sjors Provoost>Yeah, and this is exactly what I said. One of the reasons why these features like

00:33:04.040 --> 00:33:09.330
<v Sjors Provoost>this are scary is because you are trusting the black box Tor, and in this case,

00:33:09.430 --> 00:33:13.820
<v Sjors Provoost>if you make a mistake, because you're only using this connection, for this thing

00:33:13.820 --> 00:33:18.360
<v Sjors Provoost>that you say it's yours, it's extra dangerous when something goes wrong, like

00:33:18.360 --> 00:33:18.800
<v Sjors Provoost>this.

00:33:19.260 --> 00:33:22.020
<v Aaron van Wirdum>Right, and so it did go wrong at the initial release.

00:33:22.020 --> 00:33:25.920
<v Sjors Provoost>Yeah, I'm sure it was somewhat of an edge case, but it still makes it clear that

00:33:25.920 --> 00:33:29.340
<v Sjors Provoost>you want to be careful with features like this, because they can be a foot gun if

00:33:29.340 --> 00:33:30.520
<v Sjors Provoost>they go wrong.

00:33:30.680 --> 00:33:33.660
<v Aaron van Wirdum>Right, and in any case, it was fixed in 31.1.

00:33:33.880 --> 00:33:35.620
<v Sjors Provoost>Yeah, and that's why we waited with this episode, right?

00:33:36.120 --> 00:33:36.480
<v Aaron van Wirdum>Exactly.

00:33:37.970 --> 00:33:41.010
<v Aaron van Wirdum>Okay, last topic. I think that's the last topic for us, right?

00:33:41.170 --> 00:33:41.450
<v Sjors Provoost>Already?

00:33:41.730 --> 00:33:41.850
<v Aaron van Wirdum>Yeah.

00:33:44.190 --> 00:33:50.090
<v Aaron van Wirdum>I wrote down IPC interface, and I already forgot what it... IPC interface, Sjors?

00:33:50.490 --> 00:33:50.930
<v Aaron van Wirdum>Tell me.

00:33:51.110 --> 00:33:53.010
<v Sjors Provoost>Oh, yeah, that's the mining-related stuff.

00:33:53.170 --> 00:33:53.650
<v Aaron van Wirdum>Oh, right, yeah.

00:33:53.750 --> 00:33:54.530
<v Sjors Provoost>Stratum V2-related.

00:33:55.310 --> 00:33:59.270
<v Aaron van Wirdum>Right. So this is... Okay, just take it. Go for it.

00:33:59.690 --> 00:34:03.890
<v Sjors Provoost>Yeah, I don't know how much we've covered that Stratum V2 in earlier discussions, but...

00:34:03.890 --> 00:34:07.410
<v Aaron van Wirdum>I think we had a whole episode on that also at some point. But that's maybe,

00:34:07.550 --> 00:34:10.710
<v Aaron van Wirdum>like... three years ago by now. I think that's been a while.

00:34:10.870 --> 00:34:15.570
<v Sjors Provoost>In any case, the Stratum V2 system allows you to make your own block templates,

00:34:16.090 --> 00:34:17.170
<v Sjors Provoost>among other things.

00:34:17.370 --> 00:34:18.390
<v Aaron van Wirdum>If you're a miner, yeah.

00:34:18.890 --> 00:34:21.630
<v Sjors Provoost>Exactly. Well, you can make them even if you're not mining.

00:34:22.090 --> 00:34:23.190
<v Aaron van Wirdum>It's kind of useless.

00:34:25.910 --> 00:34:31.910
<v Sjors Provoost>So the initial idea was to have Bitcoin Core actually speak the

00:34:31.910 --> 00:34:36.880
<v Sjors Provoost>Stratum V2 protocol and provide block templates. but it was a bit controversial

00:34:36.880 --> 00:34:40.140
<v Sjors Provoost>to add even more complexity to Bitcoin Core because it's already a big project.

00:34:40.440 --> 00:34:44.980
<v Sjors Provoost>So the idea then became to say, okay, we're not going to implement Stratum V2

00:34:44.980 --> 00:34:48.580
<v Sjors Provoost>itself, but we're going to just offer all the information that Stratum V2 needs.

00:34:48.920 --> 00:34:52.840
<v Sjors Provoost>So you install Bitcoin Core, and then you install a separate piece of software

00:34:52.840 --> 00:34:58.590
<v Sjors Provoost>called a template provider. That template provider speaks to your own node on one

00:34:58.590 --> 00:35:02.270
<v Sjors Provoost>side, and it speaks to Stratum v2, the rest of the Stratum V2 ecosystem on the

00:35:02.270 --> 00:35:02.790
<v Sjors Provoost>other side.

00:35:03.190 --> 00:35:04.310
<v Aaron van Wirdum>It's kind of like a translator.

00:35:05.940 --> 00:35:09.380
<v Sjors Provoost>The mining pool or yet another piece of software, because Stratum V2 can be

00:35:09.380 --> 00:35:10.500
<v Sjors Provoost>multiple pieces of software.

00:35:10.780 --> 00:35:10.960
<v Aaron van Wirdum>Okay.

00:35:11.280 --> 00:35:15.720
<v Sjors Provoost>So in the scenario where you are mining your own block templates, you have

00:35:15.720 --> 00:35:19.540
<v Sjors Provoost>Bitcoin Core that talks to the template provider. The template provider then

00:35:19.540 --> 00:35:22.940
<v Sjors Provoost>talks to the job declarator server, sorry, client.

00:35:24.200 --> 00:35:26.660
<v Sjors Provoost>And the job declarator client talks to the mining pool.

00:35:28.410 --> 00:35:33.070
<v Sjors Provoost>to declare the job so it doesn't really matter like in practice nowadays I think

00:35:33.070 --> 00:35:37.090
<v Sjors Provoost>there's wizards and so you just say do you want to solo mine or do you want to

00:35:37.090 --> 00:35:39.950
<v Sjors Provoost>use a pool do you want to make your own templates yes no and it just installs

00:35:39.950 --> 00:35:44.350
<v Sjors Provoost>whatever you need so it hopefully gets to a simplicity level that's comparable to

00:35:44.350 --> 00:35:49.610
<v Sjors Provoost>what DATUM is doing where you just download like one thing but

00:35:49.610 --> 00:35:55.530
<v Sjors Provoost>basically Bitcoin Core does not speak does not understand any of that all it

00:35:55.530 --> 00:36:01.390
<v Sjors Provoost>does is just create new block templates for you And the way the Stratum

00:36:01.390 --> 00:36:04.430
<v Sjors Provoost>software talks to the node is using this thing called IPC, inter-process

00:36:04.430 --> 00:36:09.390
<v Sjors Provoost>communication. And it's just a more efficient way than RPC, what we had before.

00:36:11.870 --> 00:36:16.050
<v Sjors Provoost>And that was all part of Bitcoin Core v30, so we might have even covered it two

00:36:16.050 --> 00:36:16.910
<v Sjors Provoost>or three episodes ago.

00:36:20.350 --> 00:36:25.410
<v Aaron van Wirdum>What's new? Because I imagine you could already solo mine, for example, with

00:36:25.410 --> 00:36:29.070
<v Aaron van Wirdum>Bitcoin Core. You could already construct a block, right? You could already...

00:36:29.340 --> 00:36:31.900
<v Aaron van Wirdum>say I want to mine or if I were to mine.

00:36:31.900 --> 00:36:35.480
<v Sjors Provoost>Yeah, Stratum V1 or just Stratum has been around forever and that was using the

00:36:35.480 --> 00:36:40.620
<v Sjors Provoost>RPC and you would call a method called getblocktemplate and it would create a

00:36:40.620 --> 00:36:43.740
<v Sjors Provoost>very large JSON blob with all the transactions you need, etc.

00:36:45.710 --> 00:36:51.430
<v Sjors Provoost>The problem with that was that it was kind of poll-based. So you as the

00:36:51.430 --> 00:36:56.150
<v Sjors Provoost>mining software or the miner, you need to constantly tell your node, okay, can

00:36:56.150 --> 00:37:00.670
<v Sjors Provoost>you make a new block for me? Can you make a new block for me? Etc. And there was

00:37:00.670 --> 00:37:04.330
<v Sjors Provoost>a way to say, okay, make me a block and let me know when there's a better block

00:37:04.330 --> 00:37:07.970
<v Sjors Provoost>available. But the only thing it did was check if anything changed in the

00:37:07.970 --> 00:37:11.650
<v Sjors Provoost>mempool. And maybe there was a long time ago that that was actually interesting,

00:37:11.670 --> 00:37:15.270
<v Sjors Provoost>but nowadays the mempool changes all the time, so you would just get a new block

00:37:15.270 --> 00:37:17.690
<v Sjors Provoost>every fraction of a second, which is not useful.

00:37:19.230 --> 00:37:20.130
<v Aaron van Wirdum>That's not useful?

00:37:21.060 --> 00:37:24.500
<v Sjors Provoost>No, you don't want to have... You don't want to have a new block if it's not any

00:37:24.500 --> 00:37:28.600
<v Sjors Provoost>better. So something changed in the mempool could be like the bottom one gigabyte

00:37:28.600 --> 00:37:32.300
<v Sjors Provoost>of your mempool changed and you get a new template. That's not useful.

00:37:32.720 --> 00:37:38.640
<v Aaron van Wirdum>It sounds like this maybe ties into the first thing with the cluster mempool.

00:37:38.740 --> 00:37:42.520
<v Sjors Provoost>So what the Stratum V2 stuff lets you do, the IPC interface lets you do, is...

00:37:43.100 --> 00:37:46.020
<v Sjors Provoost>First, you ask for a block template. That's kind of similar to how it worked before.

00:37:46.420 --> 00:37:47.560
<v Aaron van Wirdum>It's what goes into a block.

00:37:47.680 --> 00:37:51.980
<v Sjors Provoost>Yeah, a little bit more efficient in terms of the encoding. But for this

00:37:51.980 --> 00:37:56.160
<v Sjors Provoost>discussion, it doesn't matter. And then you can subscribe to updates. And in

00:37:56.160 --> 00:38:00.860
<v Sjors Provoost>particular, you can say, give me a new block if the fees have gone up by at least

00:38:00.860 --> 00:38:05.640
<v Sjors Provoost>one sat per vbyte. So not any change in the mempool, but the actual block itself

00:38:05.640 --> 00:38:06.100
<v Sjors Provoost>is better.

00:38:06.260 --> 00:38:06.920
<v Aaron van Wirdum>Yeah, okay.

00:38:07.040 --> 00:38:10.960
<v Sjors Provoost>And you can make it a thousand or whatever number there is because... you have

00:38:10.960 --> 00:38:15.460
<v Sjors Provoost>some mining infrastructure, some ASICs that maybe you don't want to give them a

00:38:15.460 --> 00:38:19.280
<v Sjors Provoost>new template like 100 times a second because it takes them time to update.

00:38:19.680 --> 00:38:19.820
<v Aaron van Wirdum>Right.

00:38:20.280 --> 00:38:26.200
<v Sjors Provoost>And updating is... When it's updating, it's not mining, so you're losing

00:38:26.200 --> 00:38:30.000
<v Sjors Provoost>some revenue, so maybe you only want a new template if it's 100 sats or whatever

00:38:30.000 --> 00:38:30.800
<v Sjors Provoost>number makes sense.

00:38:31.200 --> 00:38:35.320
<v Aaron van Wirdum>Right. Okay, so if I understand correctly, this is not...

00:38:37.500 --> 00:38:43.400
<v Aaron van Wirdum>technically a Stratum V2 upgrade but it is very compatible with Stratum V2

00:38:43.400 --> 00:38:48.640
<v Aaron van Wirdum>so Bitcoin Core 31 released something that's particularly compatible with Stratum

00:38:48.640 --> 00:38:53.700
<v Aaron van Wirdum>V2 and and specifically when it comes to creating your own blocks you know as a

00:38:53.700 --> 00:38:56.280
<v Aaron van Wirdum>miner deciding what transactions you want to include in a block

00:38:56.280 --> 00:38:57.800
<v Sjors Provoost>yeah this was in V30

00:38:57.800 --> 00:39:01.780
<v Aaron van Wirdum>you still need some other pieces of software that's the actual Stratum V2

00:39:01.780 --> 00:39:07.240
<v Aaron van Wirdum>software that takes that data and mines or connects to a pool and or

00:39:07.240 --> 00:39:10.580
<v Aaron van Wirdum>whatever else is needed. We don't have to get into that.

00:39:10.740 --> 00:39:15.480
<v Sjors Provoost>Yeah, exactly. So you still need to install some extra software, but Bitcoin Core

00:39:15.480 --> 00:39:20.060
<v Sjors Provoost>has methods that are tailor-made for that software, but could be used by some

00:39:20.060 --> 00:39:21.520
<v Sjors Provoost>other mining protocol too.

00:39:22.000 --> 00:39:22.200
<v Aaron van Wirdum>Right.

00:39:22.540 --> 00:39:26.400
<v Sjors Provoost>It could even be used for Stratum V1-style mining, right? If you run some pool

00:39:26.400 --> 00:39:28.440
<v Sjors Provoost>software, it could use the IPC too.

00:39:29.730 --> 00:39:33.170
<v Aaron van Wirdum>Right, and you mentioned DATUM, so is this also compatible with DATUM?

00:39:33.290 --> 00:39:36.130
<v Sjors Provoost>If they want to. They're not currently using it, but they could. As far as I

00:39:36.130 --> 00:39:39.910
<v Sjors Provoost>know, there's nothing magic that they're doing that doesn't work with this, and

00:39:39.910 --> 00:39:41.970
<v Sjors Provoost>otherwise they should open a GitHub issue.

00:39:42.560 --> 00:39:44.020
<v Aaron van Wirdum>Do you know why they don't use it?

00:39:44.600 --> 00:39:48.760
<v Sjors Provoost>I think partly because they were building this before the IPC interface was even

00:39:48.760 --> 00:39:51.290
<v Sjors Provoost>finished. So it's a matter of just sequencing.

00:39:51.330 --> 00:39:53.430
<v Aaron van Wirdum>Because Bitcoin core is woke source. That's what I heard.

00:39:53.610 --> 00:39:58.710
<v Sjors Provoost>That's possible. Maybe there's some evil feature in there. I remember making a

00:39:58.710 --> 00:39:59.630
<v Sjors Provoost>GitHub issue on the Bitcoin.

00:39:59.630 --> 00:40:03.670
<v Aaron van Wirdum>We were just discussing ASMAP. That's at the very least a bit queer, don't you think?

00:40:04.730 --> 00:40:10.280
<v Sjors Provoost>So I was making a GitHub issue. on the Bitcoin Core repo, asking the DATUM

00:40:10.280 --> 00:40:14.140
<v Sjors Provoost>people, like, hey, is there something you need in the IPC interface? And I think

00:40:14.140 --> 00:40:17.580
<v Sjors Provoost>Luke probably replied with something like, well, you guys are fascists or

00:40:17.580 --> 00:40:21.540
<v Sjors Provoost>dictators or something like that. So, like, okay, I guess not. But they can still

00:40:21.540 --> 00:40:22.840
<v Sjors Provoost>ask for things if they're missing something.

00:40:23.440 --> 00:40:26.740
<v Aaron van Wirdum>Right. Okay. In any case, this is very compatible with Stratum V2.

00:40:28.080 --> 00:40:34.030
<v Sjors Provoost>And so this was already in V30, but V31 just made it better. It fixed

00:40:34.030 --> 00:40:36.330
<v Sjors Provoost>some bugs, added some whistles, some bells.

00:40:36.590 --> 00:40:36.830
<v Aaron van Wirdum>Right.

00:40:36.990 --> 00:40:37.690
<v Sjors Provoost>So it's great.

00:40:39.180 --> 00:40:39.540
<v Aaron van Wirdum>Okay.

00:40:41.330 --> 00:40:44.190
<v Sjors Provoost>I think that's all I've got. So anything else?

00:40:44.310 --> 00:40:49.940
<v Aaron van Wirdum>Yeah, I think so as well. I mean, no, I think this was our 100th

00:40:49.940 --> 00:40:51.320
<v Aaron van Wirdum>episode then, Sjors.

00:40:51.740 --> 00:40:54.260
<v Sjors Provoost>Excellent. Well, thank you again then for listening to Bitcoin.

00:40:54.760 --> 00:40:55.120
<v Aaron van Wirdum>Explained.

