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

00:00:07.220 --> 00:00:09.920
<v Aaron van Wirdum>Live from Utrecht, this is the Van Wirdum Sjorsnado.

00:00:10.420 --> 00:00:10.620
<v Sjors Provoost>Hello.

00:00:11.300 --> 00:00:11.780
<v Aaron van Wirdum>Hey, Sjors.

00:00:12.120 --> 00:00:12.540
<v Sjors Provoost>What's up?

00:00:14.200 --> 00:00:15.080
<v Sjors Provoost>What's going on?

00:00:15.420 --> 00:00:16.000
<v Aaron van Wirdum>Ruben is back.

00:00:16.280 --> 00:00:17.180
<v Sjors Provoost>Ruben is back.

00:00:17.360 --> 00:00:17.560
<v Ruben Somsen>Hello.

00:00:18.240 --> 00:00:18.620
<v Aaron van Wirdum>Ruben.

00:00:19.120 --> 00:00:19.260
<v Ruben Somsen>Yeah.

00:00:20.220 --> 00:00:22.880
<v Aaron van Wirdum>Did you subscribe to the Van Wirdum Sjorsnado?

00:00:23.360 --> 00:00:25.720
<v Ruben Somsen>Indeed, I did. I am a subscriber now.

00:00:25.940 --> 00:00:28.600
<v Aaron van Wirdum>Nice. Because we do have our own RSS feed now.

00:00:29.070 --> 00:00:29.470
<v Ruben Somsen>Awesome.

00:00:29.710 --> 00:00:33.450
<v Aaron van Wirdum>You can find us in your favorite podcast app. I think this is the last time I'm

00:00:33.450 --> 00:00:36.570
<v Aaron van Wirdum>going to mention it. Sjors, what do you think? Maybe one more time next week?

00:00:36.710 --> 00:00:40.030
<v Sjors Provoost>Well, we have no influence over that because our editor can just make you say

00:00:40.030 --> 00:00:41.010
<v Sjors Provoost>whatever he wants you to say.

00:00:41.150 --> 00:00:46.390
<v Aaron van Wirdum>He'll just edit it in there if we forget, apparently. That's right. Ruben, you

00:00:46.390 --> 00:00:51.670
<v Aaron van Wirdum>contacted us last week because you listened to our last episode about... Assume

00:00:51.670 --> 00:00:56.560
<v Aaron van Wirdum>UTXO. That's what it was about. Assume UTXO. Yeah. And you told us, Aaron, Sjors,

00:00:56.760 --> 00:01:00.960
<v Aaron van Wirdum>you're being such idiots. There's a huge difference between assume UTXO and

00:01:00.960 --> 00:01:01.980
<v Aaron van Wirdum>assume valid, actually.

00:01:02.120 --> 00:01:03.600
<v Ruben Somsen>No, that's not how I put it at all.

00:01:03.820 --> 00:01:09.280
<v Aaron van Wirdum>So you're going to issue the correction for us now. What is the difference? By

00:01:09.280 --> 00:01:12.280
<v Aaron van Wirdum>the way, this isn't what the episode is going to be about. That's right, yeah.

00:01:12.460 --> 00:01:16.320
<v Aaron van Wirdum>Just to start out. What's the difference? What did we forget to mention?

00:01:16.480 --> 00:01:21.790
<v Ruben Somsen>So there was just kind of one difference between assume UTXO and assume valid. i

00:01:21.790 --> 00:01:25.350
<v Ruben Somsen>personally think is kind of interesting and i just wanted to kind of point that

00:01:25.350 --> 00:01:28.750
<v Ruben Somsen>out and it's not you know there's nothing you didn't you guys didn't say anything

00:01:28.750 --> 00:01:32.610
<v Ruben Somsen>wrong it was just something that i thought would be good to as an addition

00:01:32.610 --> 00:01:36.970
<v Ruben Somsen>basically to what you guys were talking about so the specific difference is that

00:01:36.970 --> 00:01:41.090
<v Ruben Somsen>with assume valid you have miners also

00:01:42.340 --> 00:01:47.800
<v Ruben Somsen>indirectly saying that the most proof of work chain of headers is a valid chain.

00:01:48.220 --> 00:01:51.400
<v Ruben Somsen>And because of that, you kind of have a double proof with assume valid. You have

00:01:51.400 --> 00:01:54.960
<v Ruben Somsen>to prove that miners are saying it's correct. Presumably, this is kind of SPV

00:01:55.360 --> 00:01:57.760
<v Ruben Somsen>proof security. So it's not something you want to fully rely on.

00:01:57.840 --> 00:02:01.700
<v Aaron van Wirdum>As a quick recap. Yeah. And we're not going to redo the episode. I was going to say,

00:02:01.820 --> 00:02:03.040
<v Ruben Somsen>listen to the last episode.

00:02:03.300 --> 00:02:09.220
<v Aaron van Wirdum>Assume valid is you insert the hash somewhere in the code. Wait, I got to listen

00:02:09.220 --> 00:02:10.320
<v Aaron van Wirdum>to our own episode. Exactly.

00:02:10.840 --> 00:02:12.040
<v Ruben Somsen>That would be the best way of doing it.

00:02:12.120 --> 00:02:16.440
<v Aaron van Wirdum>If that hash is in the blockchain, so it's a block header hash, then you assume

00:02:16.440 --> 00:02:20.500
<v Aaron van Wirdum>that everything that happened before it has valid signatures. That's right. So at

00:02:20.500 --> 00:02:24.870
<v Aaron van Wirdum>that point, you're trusting developers that they put in a hash that is in the

00:02:24.870 --> 00:02:30.310
<v Aaron van Wirdum>valid version of the blockchain and you're also trusting miners that that is in

00:02:30.310 --> 00:02:34.990
<v Aaron van Wirdum>the valid wait yeah so miners had to actually expend energy to produce that hash

00:02:34.990 --> 00:02:37.050
<v Aaron van Wirdum>yeah and everything that came after it

00:02:37.050 --> 00:02:40.650
<v Ruben Somsen>otherwise it wouldn't be in the most proof work chain anymore and then even

00:02:40.650 --> 00:02:44.970
<v Ruben Somsen>though like let's say in bitcoin core it said lol this hash this block all the

00:02:44.970 --> 00:02:48.550
<v Ruben Somsen>blocks before it all the signatures are valid but then that specific block is no

00:02:48.550 --> 00:02:50.650
<v Ruben Somsen>longer in the longest most proof of work chain yeah

00:02:50.650 --> 00:02:54.450
<v Aaron van Wirdum>so the thing is you're not just trusting developers even though you're kind of

00:02:54.450 --> 00:02:58.790
<v Aaron van Wirdum>trusting them a bit yeah and you're also not just trusting miners yeah they gotta

00:02:58.790 --> 00:03:03.110
<v Aaron van Wirdum>both collude somehow and that's why it's sort of secure that's right and now

00:03:03.110 --> 00:03:07.110
<v Aaron van Wirdum>there's assume utxo and you're saying there's slightly slight difference yeah

00:03:07.110 --> 00:03:10.970
<v Ruben Somsen>so i'm saying with assume utxo because there's not an actual commitment to the

00:03:10.970 --> 00:03:15.720
<v Ruben Somsen>utxo set inside of each block it means that miners haven't really committed to

00:03:15.720 --> 00:03:21.600
<v Ruben Somsen>that state. So what that means is that if in Bitcoin Core, you have to

00:03:21.600 --> 00:03:27.200
<v Ruben Somsen>assume UTXO and somehow there's a mistake introduced inside of that UTXO set,

00:03:27.460 --> 00:03:31.920
<v Ruben Somsen>then miners are not going to reject that block because the hash of that UTXO set

00:03:31.920 --> 00:03:35.720
<v Ruben Somsen>is not going to be contained within that block. So you don't have that. double

00:03:35.720 --> 00:03:37.320
<v Ruben Somsen>assurance of miners as well

00:03:37.320 --> 00:03:42.660
<v Aaron van Wirdum>right so so the reason i think that's negligible yeah that's probably a very

00:03:42.660 --> 00:03:48.260
<v Aaron van Wirdum>mispronunciation of that word negligible yeah exactly it's because the only way

00:03:48.260 --> 00:03:52.140
<v Aaron van Wirdum>to use that to your benefits as a developer in this case let's say you're a

00:03:52.140 --> 00:03:57.980
<v Aaron van Wirdum>developer and you create this utxo set for assume utxo yeah and you say hey

00:03:57.980 --> 00:04:03.070
<v Aaron van Wirdum>i've actually on my address i got a thousand billion million bitcoins The only

00:04:03.070 --> 00:04:07.870
<v Aaron van Wirdum>way you can ever benefit from that is if in a block after that, a miner is

00:04:07.870 --> 00:04:11.650
<v Aaron van Wirdum>willing to include it. So you're still relying on proof of work in that sense.

00:04:11.790 --> 00:04:16.390
<v Ruben Somsen>Unless you find an idiot that sells zero confirmation Lambos. I mean...

00:04:16.390 --> 00:04:21.930
<v Aaron van Wirdum>Right. So I guess that would be the one example where it would be a difference.

00:04:22.290 --> 00:04:25.450
<v Sjors Provoost>But a zero confirmation Lambo person, you can just double spend.

00:04:25.870 --> 00:04:28.910
<v Ruben Somsen>Yeah, there are probably other ways to screw that person up, but that's true.

00:04:29.480 --> 00:04:34.620
<v Aaron van Wirdum>All right, so far, last episode. Another episode with extra Ruben. This time

00:04:34.620 --> 00:04:39.420
<v Aaron van Wirdum>we're not going to discuss one of your proposals. You're just here to discuss a

00:04:39.420 --> 00:04:45.100
<v Aaron van Wirdum>proposal with us. And the proposal we're discussing this week is Utreexo.

00:04:45.260 --> 00:04:50.800
<v Sjors Provoost>That is correct. Utreexo. And the tree is for a tree, the thing that grows in the forest.

00:04:51.500 --> 00:04:55.720
<v Aaron van Wirdum>Did you know that was the pun, Ruben? I didn't realize.

00:04:56.120 --> 00:05:01.500
<v Ruben Somsen>Well, I mean, I heard Tadge say that, so I was aware of that.

00:05:01.900 --> 00:05:06.400
<v Ruben Somsen>But there is a very specific reason why I was kind of enthusiastic to talk about

00:05:06.400 --> 00:05:10.000
<v Ruben Somsen>it. Well, one, I've kind of like used it in one of the things I've been working

00:05:10.000 --> 00:05:14.920
<v Ruben Somsen>on. So I kind of like Utreexo a lot conceptually. But there is also a close

00:05:14.920 --> 00:05:19.880
<v Ruben Somsen>friend of mine, Calvin Kim, who was a regular attendee of the Seoul Bitcoin

00:05:19.880 --> 00:05:25.340
<v Ruben Somsen>meetup. who is now actively working on Utreexo together with Tadge and i i told

00:05:25.340 --> 00:05:29.260
<v Ruben Somsen>him i would shout out the other guys that are working on the project Janus

00:05:29.260 --> 00:05:32.640
<v Ruben Somsen>Troelsen, which is apparently not a dutch person i think he's like german or

00:05:32.640 --> 00:05:37.700
<v Ruben Somsen>something and Niklas Gögge, hopefully i pronounced it correctly but those are the

00:05:37.700 --> 00:05:42.560
<v Ruben Somsen>four guys that are currently kind of working on uh Utreexo hopefully kind of will

00:05:42.560 --> 00:05:46.800
<v Ruben Somsen>eventually get to a point where This can be useful for Bitcoin Core. But we

00:05:46.800 --> 00:05:50.340
<v Ruben Somsen>should obviously start explaining what Utreexo is because we're just talking

00:05:50.340 --> 00:05:51.780
<v Ruben Somsen>about the kind of conceptual idea right now.

00:05:51.780 --> 00:05:52.740
<v Aaron van Wirdum>Oh, we've got to keep it exciting.

00:05:53.040 --> 00:05:55.060
<v Sjors Provoost>Well, really quick, are these guys with DGLab?

00:05:55.160 --> 00:06:00.120
<v Ruben Somsen>No, no, that's completely separate. Yeah. There's MIT. I'm not super familiar

00:06:00.120 --> 00:06:04.940
<v Ruben Somsen>with this, but Tadge is with MIT. And then the other three guys are just working

00:06:04.940 --> 00:06:09.640
<v Ruben Somsen>on this separately. So they're not involved with MIT or DGLab. DGLab mainly works

00:06:09.640 --> 00:06:12.340
<v Ruben Somsen>on DLC. That's kind of one of their main projects.

00:06:12.520 --> 00:06:16.730
<v Aaron van Wirdum>Okay. So Sjors, what problem are we solving?

00:06:17.740 --> 00:06:23.700
<v Sjors Provoost>Problem, problem, challenge. So one of the constraints when

00:06:23.700 --> 00:06:28.480
<v Sjors Provoost>you're syncing a new Bitcoin node, we talked about sync a couple of times, is the

00:06:28.480 --> 00:06:32.640
<v Sjors Provoost>amount of RAM memory you have. Now, it's not a hard constraint. You don't need a

00:06:32.640 --> 00:06:37.250
<v Sjors Provoost>lot of RAM, but if you want to sync it fast, you do. And the reason is this thing

00:06:37.250 --> 00:06:41.450
<v Sjors Provoost>called the UTXO set. The UTXO set is the list of coins that you own. We talked

00:06:41.450 --> 00:06:46.070
<v Sjors Provoost>about that last time, I guess. But every time the new block comes in, what you do

00:06:46.070 --> 00:06:49.890
<v Sjors Provoost>is for every transaction in the block, you check if it's spending something that

00:06:49.890 --> 00:06:55.570
<v Sjors Provoost>exists, namely one UTXO. And so in order to check if something exists,

00:06:55.910 --> 00:07:00.490
<v Sjors Provoost>well, it has to be somewhere. It has to be in a database of sorts. And where is

00:07:00.490 --> 00:07:05.600
<v Sjors Provoost>that database? Well, if that database is sitting in your RAM memory, That's

00:07:05.600 --> 00:07:10.360
<v Sjors Provoost>extremely fast. If on the other hand, that database is sitting on your hard disk,

00:07:10.520 --> 00:07:12.660
<v Sjors Provoost>if it's an SSD drive, it's meh.

00:07:12.900 --> 00:07:17.920
<v Aaron van Wirdum>What you mean is it's much faster to look up if it's in there. If it's in your

00:07:17.920 --> 00:07:22.000
<v Aaron van Wirdum>RAM, then your computer will be able to look it up within, well, I don't know how

00:07:22.000 --> 00:07:25.460
<v Aaron van Wirdum>fast, but faster than if it's on your drive. It's

00:07:25.460 --> 00:07:29.240
<v Sjors Provoost>probably at least 10 times faster than if it's on your SSD drive. And if you're

00:07:29.240 --> 00:07:33.960
<v Sjors Provoost>using a magnetic drive, it's even worse. And then the other side of it is... once

00:07:33.960 --> 00:07:38.280
<v Sjors Provoost>you create this new coin, which the transaction does on the output side, it has

00:07:38.280 --> 00:07:42.300
<v Sjors Provoost>to store that. So it has to write it somewhere on the disk, which is also slow.

00:07:42.380 --> 00:07:47.080
<v Sjors Provoost>And if you have a magnetic spin disk, then it has to move to read somewhere and

00:07:47.080 --> 00:07:51.460
<v Sjors Provoost>it has to move somewhere else to write again. These are gigabytes apart. So

00:07:51.460 --> 00:07:52.220
<v Sjors Provoost>that's horrible.

00:07:52.460 --> 00:07:56.680
<v Aaron van Wirdum>So to make it very concrete, I guess the biggest difference you would notice when

00:07:56.680 --> 00:08:02.040
<v Aaron van Wirdum>you're syncing a new node and if you would somehow be able to keep the UTXO set

00:08:02.040 --> 00:08:05.410
<v Aaron van Wirdum>in RAM, It will only take, I don't know, a couple hours.

00:08:05.650 --> 00:08:08.790
<v Sjors Provoost>But it depends on your computer. I have a somewhat recent MacBook Pro, and I

00:08:08.790 --> 00:08:11.070
<v Sjors Provoost>think I can sync the whole chain in five hours.

00:08:11.270 --> 00:08:12.390
<v Aaron van Wirdum>If you keep it in RAM.

00:08:12.750 --> 00:08:18.060
<v Sjors Provoost>But that takes about 11 gigabytes of RAM. But if you do it on, say, a typical

00:08:18.060 --> 00:08:22.360
<v Sjors Provoost>Raspberry Pi, you might have, I don't know, two gigabytes these days, maybe four.

00:08:22.880 --> 00:08:26.340
<v Sjors Provoost>So that means you're going to sync the chain and you're going to keep as much as

00:08:26.340 --> 00:08:30.720
<v Sjors Provoost>possible in RAM. But at some point it overflows, the UTXO set. And then usually

00:08:30.720 --> 00:08:34.910
<v Sjors Provoost>what it does is it writes everything to disk. clears everything, and then it

00:08:34.910 --> 00:08:40.270
<v Sjors Provoost>starts caching again. And this takes a long time. It can take days on these machines.

00:08:40.470 --> 00:08:45.230
<v Aaron van Wirdum>Right. So the point being, as you can keep more of the UTXO set in RAM, you'll

00:08:45.230 --> 00:08:51.130
<v Aaron van Wirdum>sync faster, or your node will just work faster, operate faster in general. So it

00:08:51.130 --> 00:08:55.430
<v Aaron van Wirdum>would be good if we could somehow decrease the size of the UTXO set.

00:08:55.630 --> 00:08:59.030
<v Sjors Provoost>Well, we can't decrease the size of the UTXO set. That's kind of the problem.

00:08:59.110 --> 00:08:59.530
<v Aaron van Wirdum>That's a bummer.

00:08:59.690 --> 00:09:01.590
<v Sjors Provoost>There is a limit on the size of blocks.

00:09:02.510 --> 00:09:03.690
<v Aaron van Wirdum>Well, it can decrease.

00:09:04.110 --> 00:09:08.390
<v Sjors Provoost>Four megabytes. It can decrease. It's just not something we can do. Yeah, it

00:09:08.390 --> 00:09:09.730
<v Sjors Provoost>decreases when people spend...

00:09:09.730 --> 00:09:14.210
<v Aaron van Wirdum>I don't know how many UTXOs you own. I bet a lot. So maybe you could play a part

00:09:14.210 --> 00:09:15.450
<v Aaron van Wirdum>in decreasing the UTXO.

00:09:15.770 --> 00:09:21.170
<v Sjors Provoost>Millions of UTXOs on testnet. No. So the idea is that if you're spending more

00:09:21.170 --> 00:09:24.890
<v Sjors Provoost>coins than you're creating, then obviously the number of UTXOs goes down and the

00:09:24.890 --> 00:09:30.100
<v Sjors Provoost>RAM usage goes down. But there's a lot of junk in the UTXO set. Because there

00:09:30.100 --> 00:09:34.520
<v Sjors Provoost>were people in the old days that created transactions to multi-sig addresses that

00:09:34.520 --> 00:09:38.920
<v Sjors Provoost>were fake just in order to put pictures of Obama in the blockchain. And those are

00:09:38.920 --> 00:09:43.280
<v Sjors Provoost>all sitting in your RAM because your node has no idea that they're nonsense. But

00:09:43.280 --> 00:09:46.800
<v Sjors Provoost>the other thing is if we expect everybody in the world eventually to use Bitcoin

00:09:46.800 --> 00:09:52.560
<v Sjors Provoost>and everybody to have at least one or two UTXOs, then, well, that's a lot of

00:09:52.560 --> 00:09:56.940
<v Sjors Provoost>RAM. That's like 7 billion people. And there's really no limit to how big that

00:09:56.940 --> 00:10:00.440
<v Sjors Provoost>can get. There's no constraint. It might take a while because it takes a lot of

00:10:00.440 --> 00:10:04.720
<v Sjors Provoost>fees to create all these transactions, but eventually it could take as much RAM

00:10:04.720 --> 00:10:08.360
<v Sjors Provoost>as, you know, there's no limit. And we don't like things that don't have a limit.

00:10:08.840 --> 00:10:10.320
<v Sjors Provoost>Unbounded stuff, it's a bit bad.

00:10:11.180 --> 00:10:15.640
<v Aaron van Wirdum>Yeah, you mean the UTXO set can get as big as it will get until the point where

00:10:15.640 --> 00:10:18.380
<v Aaron van Wirdum>not everyone can use it, can sync it from RAM.

00:10:18.420 --> 00:10:22.540
<v Sjors Provoost>Fewer and fewer people will have enough RAM to sync it quickly, and that could

00:10:22.540 --> 00:10:23.740
<v Sjors Provoost>become a problem, right?

00:10:24.400 --> 00:10:29.520
<v Aaron van Wirdum>Okay, so you agree it's a problem, not just a challenge, it's a problem, Sjors.

00:10:29.760 --> 00:10:30.820
<v Aaron van Wirdum>Now, how do we solve it?

00:10:30.920 --> 00:10:36.550
<v Sjors Provoost>Yeah, it's a challenge, obviously. Well, one way to solve it is Tadge Dryja's

00:10:36.810 --> 00:10:41.910
<v Sjors Provoost>proposal, the Utreexo. And the idea there, I guess that's what we'll need to

00:10:41.910 --> 00:10:43.150
<v Sjors Provoost>explain, right? How that works.

00:10:43.390 --> 00:10:45.970
<v Aaron van Wirdum>Well, Ruben wanted to explain it to us. So let's hear it.

00:10:46.110 --> 00:10:50.810
<v Ruben Somsen>I first wanted to say that I thought, Aaron, your analogy with basically saying

00:10:50.810 --> 00:10:55.450
<v Ruben Somsen>that it's pruning for the UTXO set. I thought that was a very good analogy where

00:10:55.450 --> 00:10:57.290
<v Ruben Somsen>currently we have pruning in Bitcoin.

00:10:57.510 --> 00:10:58.710
<v Aaron van Wirdum>This was an off-record analogy.

00:10:59.010 --> 00:11:03.520
<v Ruben Somsen>Yeah. Now it's on record. Now it's on record. Yes, I'm repeating something that

00:11:03.520 --> 00:11:07.600
<v Ruben Somsen>you told me before the show. So with Bitcoin, currently you have pruning in the

00:11:07.600 --> 00:11:12.560
<v Ruben Somsen>sense that you take a block, you process it, you extract the UTXO set out

00:11:12.560 --> 00:11:15.980
<v Ruben Somsen>basically from all the blocks. And then that's all that you keep. You only keep

00:11:15.980 --> 00:11:19.440
<v Ruben Somsen>the UTXO set. And then you can throw everything else away. And that's called

00:11:19.440 --> 00:11:24.560
<v Ruben Somsen>pruning. There is a downside, which is that then you don't have the blocks. So if

00:11:24.560 --> 00:11:28.600
<v Ruben Somsen>you want to prove to another person that the UTXO set is valid, you don't

00:11:28.600 --> 00:11:31.480
<v Ruben Somsen>actually. You can't actually give them the blocks, but the assumption is that

00:11:31.480 --> 00:11:34.420
<v Ruben Somsen>somebody else will have the blocks, so it's fine. And here, what you're pruning

00:11:34.420 --> 00:11:39.040
<v Ruben Somsen>is something else. You're pruning UTXO sets, and you're essentially taking out

00:11:39.040 --> 00:11:43.040
<v Ruben Somsen>all the, you're throwing away all the transactions, and you're just keeping a

00:11:43.040 --> 00:11:47.320
<v Ruben Somsen>Merkle root. And inside of that Merkle root is basically a commitment. Every

00:11:47.320 --> 00:11:53.120
<v Ruben Somsen>single UTXO is committed in there, and you only keep the Merkle proofs of the

00:11:53.120 --> 00:11:55.360
<v Ruben Somsen>UTXOs that you care about, that you own.

00:11:55.760 --> 00:11:57.100
<v Aaron van Wirdum>What is a Merkle root?

00:11:57.220 --> 00:12:00.620
<v Sjors Provoost>Yeah. Or maybe to put it in another way, normally when somebody sends you a

00:12:00.620 --> 00:12:06.240
<v Sjors Provoost>transaction, the transaction says, I'm spending this input. And you, as the

00:12:06.240 --> 00:12:10.600
<v Sjors Provoost>person running a node, has the responsibility to check whether that input exists

00:12:10.600 --> 00:12:13.680
<v Sjors Provoost>in your own database. And you're flipping this around and you're telling the

00:12:13.680 --> 00:12:17.540
<v Sjors Provoost>other node, I have no idea which coins exist because, you know, I don't have RAM.

00:12:17.820 --> 00:12:22.060
<v Sjors Provoost>You proved to me that this coin actually existed. Yeah. And that's what you used

00:12:22.060 --> 00:12:26.460
<v Sjors Provoost>this Merkle proof for. So the burden of evidence is reversed here. You need to

00:12:26.460 --> 00:12:30.080
<v Sjors Provoost>prove that a transaction exists. And then the question is, how are we going to do that?

00:12:30.300 --> 00:12:33.720
<v Aaron van Wirdum>Okay, so we're reversing the burden of proof. Usually when you're sending a

00:12:33.720 --> 00:12:39.530
<v Aaron van Wirdum>transaction, when I send a transaction to you, Sjors, then you check inside your

00:12:39.530 --> 00:12:43.970
<v Aaron van Wirdum>node in the database with your UTXO set whether the transaction is spending valid

00:12:43.970 --> 00:12:49.400
<v Aaron van Wirdum>UTXOs. Yes. Now... I'm actually going to have to provide you with the proof that

00:12:49.400 --> 00:12:55.080
<v Aaron van Wirdum>my transaction is spending existing UTXOs. However, you still need something in

00:12:55.080 --> 00:13:00.680
<v Aaron van Wirdum>order to make sure that my proof is valid. And that's this Utreexo,

00:13:00.800 --> 00:13:02.300
<v Aaron van Wirdum>which is a hash tree.

00:13:02.460 --> 00:13:03.760
<v Sjors Provoost>Yes, a Merkle tree.

00:13:04.040 --> 00:13:06.140
<v Aaron van Wirdum>Right. So what is this and how does it work?

00:13:06.240 --> 00:13:10.320
<v Sjors Provoost>So it's kind of nice. All the UTXOs that are in existence would be put into this

00:13:10.320 --> 00:13:14.300
<v Sjors Provoost>tree. And everybody can construct this tree if you replay the whole blockchain.

00:13:14.920 --> 00:13:16.880
<v Sjors Provoost>But the question is...

00:13:16.880 --> 00:13:21.160
<v Aaron van Wirdum>It's not an actual tree, though, is it? It's not an actual tree. Do you give it

00:13:21.160 --> 00:13:22.260
<v Aaron van Wirdum>water? No.

00:13:22.700 --> 00:13:27.400
<v Sjors Provoost>Basically, what the tree would look like is you have the first UTXO, and then the

00:13:27.400 --> 00:13:31.100
<v Sjors Provoost>second UTXO right next to each other. And then you take the hash of those two,

00:13:31.220 --> 00:13:34.960
<v Sjors Provoost>basically combined. And that is one new hash. So you see this little pyramid

00:13:34.960 --> 00:13:40.130
<v Sjors Provoost>shape. And you can do that again for another two. UTXOs that exist.

00:13:40.850 --> 00:13:45.470
<v Sjors Provoost>They're their own little mini tree. But now you see, oh, there's two trees. Let

00:13:45.470 --> 00:13:46.690
<v Sjors Provoost>me just combine those two trees.

00:13:47.170 --> 00:13:49.790
<v Aaron van Wirdum>Two hashes, and you're combining these two hashes. So

00:13:49.790 --> 00:13:54.770
<v Sjors Provoost>now you have four UTXOs, and two of them are shared, and then those two are

00:13:54.770 --> 00:13:55.270
<v Sjors Provoost>shared again.

00:13:55.470 --> 00:13:56.970
<v Aaron van Wirdum>Yeah, so you end up with one hash.

00:13:57.130 --> 00:14:02.050
<v Sjors Provoost>You end up with one hash. Now the key here is that these things are so-called, I

00:14:02.050 --> 00:14:07.870
<v Sjors Provoost>believe, perfect trees, which means that they are always a multiple of two.

00:14:08.400 --> 00:14:14.160
<v Aaron van Wirdum>Right, yeah. So now the challenge is that for every new block, this tree needs to

00:14:14.160 --> 00:14:20.140
<v Aaron van Wirdum>be updated, right? Because we have one big tree for all of the UTXOs. Now a

00:14:20.140 --> 00:14:24.980
<v Aaron van Wirdum>new block is found. It includes all sorts of new transactions. So new UTXOs exist

00:14:24.980 --> 00:14:29.080
<v Aaron van Wirdum>and old UTXOs are destroyed. So now we need a new tree.

00:14:29.580 --> 00:14:34.440
<v Sjors Provoost>Yeah, well, it's even more than one tree, right? It is a forest. Because every

00:14:34.440 --> 00:14:38.880
<v Sjors Provoost>tree has to be a multiple of two, So there can be four things at the bottom or

00:14:38.880 --> 00:14:42.960
<v Sjors Provoost>eight things at the bottom or 16 things at the bottom. When you have a number of

00:14:42.960 --> 00:14:46.420
<v Sjors Provoost>transactions that doesn't fit that way, you'll have multiple trees that look like

00:14:46.420 --> 00:14:50.570
<v Sjors Provoost>that. So you have a collection of trees. for which you really only need to

00:14:50.570 --> 00:14:55.690
<v Sjors Provoost>remember the top hashes. And now the question is, how do you add something to that tree?

00:14:55.830 --> 00:15:00.050
<v Aaron van Wirdum>So you might have one tree with 16 at the bottom, one tree with 8 at the bottom,

00:15:00.670 --> 00:15:05.670
<v Aaron van Wirdum>one tree with 2 UTXOs at the bottom. Yeah, exactly. So you have multiple trees.

00:15:06.390 --> 00:15:12.100
<v Sjors Provoost>And now, in order to prove that something is in this tree... And also to

00:15:12.100 --> 00:15:16.640
<v Sjors Provoost>replace it with, say, the output, because basically you destroy one UTXO that

00:15:16.640 --> 00:15:20.060
<v Sjors Provoost>you're spending and you create a new UTXO that you're creating. So you can

00:15:20.060 --> 00:15:25.600
<v Sjors Provoost>actually take the UTXO that you're spending out of the tree. and then put the new

00:15:25.600 --> 00:15:31.000
<v Sjors Provoost>one into the tree. And in order to do that, you need to provide, you need to

00:15:31.000 --> 00:15:34.740
<v Sjors Provoost>recalculate the tree, and you do that by knowing its neighbors. So the way you

00:15:34.740 --> 00:15:39.880
<v Sjors Provoost>prove that something is inside a Merkle tree is to say, well, at the bottom of

00:15:39.880 --> 00:15:44.300
<v Sjors Provoost>the tree, there's these two pairs, and I'm going to give you the other side. And

00:15:44.300 --> 00:15:47.240
<v Sjors Provoost>then at the next level, again, there's a pair, and I'm going to give you the

00:15:47.240 --> 00:15:51.930
<v Sjors Provoost>other side, and again, and again, and again. And that proves that something is

00:15:51.930 --> 00:15:55.550
<v Sjors Provoost>actually in the tree. And that's exactly the same information that you need to

00:15:55.550 --> 00:15:57.390
<v Sjors Provoost>put something else at the bottom of the tree.

00:15:57.590 --> 00:16:03.070
<v Aaron van Wirdum>Right. So by putting something else at the bottom of the tree, to be clear, the

00:16:03.070 --> 00:16:07.390
<v Aaron van Wirdum>entire tree changes, or at least the one hash you end up with changes. Like

00:16:07.390 --> 00:16:10.670
<v Aaron van Wirdum>you're just computing a whole new tree. But you're able to do that because you

00:16:10.670 --> 00:16:14.910
<v Aaron van Wirdum>have all the data you need. Yes. So you can add things to the forest and you can

00:16:14.910 --> 00:16:17.890
<v Aaron van Wirdum>remove things from the forest. It's actually possible. It's actually easier

00:16:17.890 --> 00:16:21.820
<v Aaron van Wirdum>than... I thought it would be when I saw Tadge explain it. I don't know if it's

00:16:21.820 --> 00:16:24.160
<v Aaron van Wirdum>going to be easy when people hear us explain it. I would

00:16:24.160 --> 00:16:29.080
<v Sjors Provoost>recommend looking at Tadge explain it after you hear us explain it. Because you

00:16:29.080 --> 00:16:33.060
<v Sjors Provoost>need to see it. Yeah, visuals. Visuals really help. Exactly. I think

00:16:33.060 --> 00:16:36.620
<v Ruben Somsen>his presentations are great. He's very good at explaining it. And yeah, he has

00:16:36.620 --> 00:16:39.700
<v Ruben Somsen>slides. So that's a lot easier than what we're doing. We're trying to explain it

00:16:39.700 --> 00:16:43.340
<v Ruben Somsen>in words, especially in Merkle Trees. I think it's great if you have an actual

00:16:43.340 --> 00:16:43.820
<v Ruben Somsen>picture there.

00:16:44.100 --> 00:16:47.550
<v Sjors Provoost>But now the idea is that you're not tracking everything, right? Yeah. So you

00:16:47.550 --> 00:16:50.830
<v Sjors Provoost>could, when you're syncing the blockchain, keep track of the entire tree, but

00:16:50.830 --> 00:16:54.710
<v Sjors Provoost>then you need a lot of RAM, just like in the original scenario. But what you'll

00:16:54.710 --> 00:16:58.010
<v Sjors Provoost>actually do is you're going to remember the top of every tree, and there might be

00:16:58.010 --> 00:17:01.930
<v Sjors Provoost>10 or 20 or whatever trees. And that's all you're going to remember. And when

00:17:01.930 --> 00:17:05.890
<v Sjors Provoost>somebody has a new transaction that you want to verify, they need to give you the

00:17:05.890 --> 00:17:09.870
<v Sjors Provoost>Merkle proofs for all the inputs that they're spending. So they prove that they

00:17:09.870 --> 00:17:14.800
<v Sjors Provoost>exist. And then they also tell you which outputs are there. which are going to be

00:17:14.800 --> 00:17:19.240
<v Sjors Provoost>swapped in at the same places where those inputs were, plus new trees if it's

00:17:19.240 --> 00:17:19.700
<v Sjors Provoost>making more.

00:17:19.840 --> 00:17:23.660
<v Ruben Somsen>Yeah, but in the blocks, right? Yeah. Yeah, so that's really, I think, the very

00:17:23.660 --> 00:17:29.400
<v Ruben Somsen>elegant side of Utreexo, where the same proofs that are proving that

00:17:29.400 --> 00:17:35.280
<v Ruben Somsen>these UTXOs are in the UTXO set are also exactly what you need to remove them

00:17:35.280 --> 00:17:41.260
<v Ruben Somsen>from the set, update your root hash, and add the new UTXOs

00:17:41.260 --> 00:17:44.620
<v Ruben Somsen>from the latest block. So that works out quite elegantly.

00:17:44.840 --> 00:17:50.440
<v Aaron van Wirdum>Okay, so in an ideal scenario, let's say what we've been explaining so far is

00:17:50.440 --> 00:17:54.920
<v Aaron van Wirdum>sort of the ultimate version of Utreexo, so let's stick with that for a minute.

00:17:55.120 --> 00:18:00.040
<v Aaron van Wirdum>So I wanted to send a transaction to the network and you, Sjors, you had a node

00:18:00.040 --> 00:18:04.950
<v Aaron van Wirdum>and you wanted to validate the transaction. You have this tree in your own... in

00:18:04.950 --> 00:18:07.530
<v Aaron van Wirdum>your RAM, apparently. That's what's nice about it.

00:18:07.570 --> 00:18:09.210
<v Sjors Provoost>I have the top of the trees in my RAM.

00:18:09.450 --> 00:18:09.590
<v Aaron van Wirdum>Yeah,

00:18:10.910 --> 00:18:15.130
<v Aaron van Wirdum>exactly. So now I want to send this transaction. So now it's my responsibility to

00:18:15.130 --> 00:18:19.940
<v Aaron van Wirdum>send to you the transaction as well as...

00:18:20.790 --> 00:18:25.410
<v Aaron van Wirdum>the proof that the transaction is valid, which also includes information for you

00:18:25.410 --> 00:18:28.210
<v Aaron van Wirdum>so you know where to find it in the forest, right?

00:18:28.390 --> 00:18:31.790
<v Sjors Provoost>Exactly. You need to prove to me that the things you are spending are in the

00:18:31.790 --> 00:18:34.210
<v Sjors Provoost>forest because I forgot what the forest looked like.

00:18:34.490 --> 00:18:38.310
<v Aaron van Wirdum>Right. All right. So that's me sending the transaction with the proof. Now, the

00:18:38.310 --> 00:18:42.410
<v Aaron van Wirdum>other way you could get the transaction is if it's already in the block. So if a

00:18:42.410 --> 00:18:47.940
<v Aaron van Wirdum>miner mines a block and the transaction is in there, you still have your Utreexo

00:18:47.940 --> 00:18:50.890
<v Aaron van Wirdum>thing or your nodes. But how do you now get the proof?

00:18:51.170 --> 00:18:54.770
<v Sjors Provoost>Right, because if you spend the transaction, you're not going to talk to every

00:18:54.770 --> 00:18:58.250
<v Sjors Provoost>node that ever downloaded the block to send that proof around. So how does that

00:18:58.250 --> 00:18:58.950
<v Sjors Provoost>proof get to the node?

00:18:58.990 --> 00:19:00.930
<v Aaron van Wirdum>That wouldn't scale very well, at least.

00:19:01.170 --> 00:19:05.870
<v Sjors Provoost>No. Well, what you would probably want to have is something called a bridge node.

00:19:06.500 --> 00:19:07.420
<v Aaron van Wirdum>A bridge node.

00:19:07.620 --> 00:19:12.540
<v Sjors Provoost>A bridge node would be a node that has the actual UTXO set, the old-fashioned

00:19:12.540 --> 00:19:18.300
<v Sjors Provoost>way, so it has lots of RAM, or it's just slow, and it produces all these proofs,

00:19:18.360 --> 00:19:20.120
<v Sjors Provoost>and it sends them around to whoever wants them.

00:19:21.370 --> 00:19:26.110
<v Ruben Somsen>Yeah, so what essentially happens is that when this bridge node receives a

00:19:26.110 --> 00:19:30.750
<v Ruben Somsen>transaction, and this transaction does not have a Merkle proof proving the

00:19:30.750 --> 00:19:36.330
<v Ruben Somsen>inclusion in the Utreexo root, This bridge node basically just takes the proof

00:19:36.330 --> 00:19:41.070
<v Ruben Somsen>that they have and they attach it to the transaction. And now they send it on to

00:19:41.070 --> 00:19:45.910
<v Ruben Somsen>other Utreexo nodes. It's a bridge between Utreexo nodes and non-Utreexo nodes.

00:19:46.050 --> 00:19:51.050
<v Aaron van Wirdum>Yeah, but they could also construct the proof themselves, right? If they see a

00:19:51.050 --> 00:19:53.910
<v Aaron van Wirdum>certain transaction is included in a block, they can just figure it out.

00:19:53.910 --> 00:19:56.710
<v Sjors Provoost>That's right. Every node, there's nothing secret here. So if you have the

00:19:56.710 --> 00:20:01.390
<v Sjors Provoost>original UTXO set in memory somewhere, you can construct the proof for any

00:20:01.390 --> 00:20:01.810
<v Sjors Provoost>transaction.

00:20:02.090 --> 00:20:06.190
<v Ruben Somsen>And they have the entire tree, essentially. So the entire UTXO tree that you

00:20:06.190 --> 00:20:09.350
<v Ruben Somsen>create and then prune, they just don't prune it, essentially. So they just have

00:20:09.350 --> 00:20:14.910
<v Ruben Somsen>the full UTXO set, basically the UTXO set with all the Merkle proofs connecting

00:20:14.910 --> 00:20:19.430
<v Ruben Somsen>to it. So then they can just take any UTXO in there. and create a proof from it

00:20:19.430 --> 00:20:22.450
<v Ruben Somsen>and just send it on or for an entire block or whatever. Right.

00:20:22.710 --> 00:20:27.390
<v Aaron van Wirdum>So what would happen in practice is your node would see a transaction in a block

00:20:27.390 --> 00:20:30.270
<v Aaron van Wirdum>and it would wonder, hmm, is there actually proof for that? I never saw the

00:20:30.270 --> 00:20:33.610
<v Aaron van Wirdum>transaction before. And you would request it from a bridge node.

00:20:33.910 --> 00:20:37.790
<v Sjors Provoost>Yeah, my guess is when you get the whole block, you're going to call a bridge

00:20:37.790 --> 00:20:39.950
<v Sjors Provoost>node and say, give me the proof for that entire block.

00:20:40.540 --> 00:20:44.980
<v Aaron van Wirdum>Or just all of them? Yeah. Why not just the ones you need, the ones you haven't

00:20:44.980 --> 00:20:45.440
<v Aaron van Wirdum>seen before?

00:20:45.580 --> 00:20:49.280
<v Sjors Provoost>My guess is that's too much back and forth, because if you have to call a node

00:20:49.280 --> 00:20:53.280
<v Sjors Provoost>for every single individual transaction, then that's a lot of overhead, whereas

00:20:53.280 --> 00:20:56.840
<v Sjors Provoost>just downloading a couple hundred kilobytes is easier.

00:20:57.000 --> 00:20:58.520
<v Aaron van Wirdum>Anyways, that's an implementation detail.

00:20:58.780 --> 00:21:02.580
<v Ruben Somsen>Yeah, but I think this is just an automated process, right, where you just

00:21:02.580 --> 00:21:07.230
<v Ruben Somsen>connect. to the network but like the problem is like when you're the first

00:21:07.230 --> 00:21:11.290
<v Ruben Somsen>Utreexo node right and you're pruning all the data and then everybody else on the

00:21:11.290 --> 00:21:15.790
<v Ruben Somsen>network is an old-fashioned node like the way we run it today nobody's going to

00:21:15.790 --> 00:21:20.390
<v Ruben Somsen>give you the proofs right so what you need is at least a single bridge node so at

00:21:20.390 --> 00:21:24.030
<v Ruben Somsen>least you can connect to that one and then other people are connecting to the

00:21:24.030 --> 00:21:27.370
<v Ruben Somsen>bridge node because the bridge node basically speaks both languages right they

00:21:27.370 --> 00:21:31.750
<v Ruben Somsen>speak the Utreexo language and they they speak the old-fashioned language yeah so

00:21:31.750 --> 00:21:35.750
<v Ruben Somsen>they translate for you and as long as one bridge node exists it kind of can

00:21:35.750 --> 00:21:39.030
<v Ruben Somsen>bootstrap the network essentially but they don't they don't have to have like

00:21:39.030 --> 00:21:43.330
<v Ruben Somsen>special rules it's like from the perspective of the Utreexo node the bridge node

00:21:43.330 --> 00:21:47.050
<v Ruben Somsen>is just also Utreexo node and from the perspective of the old-fashioned nodes

00:21:47.050 --> 00:21:48.690
<v Ruben Somsen>it's just an old-fashioned node

00:21:48.690 --> 00:21:52.250
<v Sjors Provoost>right that's another point so yeah you don't need everybody to do this

00:21:52.250 --> 00:21:56.560
<v Sjors Provoost>translation yeah Only one person needs to do it or a couple. The other nodes know

00:21:56.560 --> 00:22:01.380
<v Sjors Provoost>how to relay that information even if they can't produce it. So that's good news.

00:22:01.660 --> 00:22:05.260
<v Aaron van Wirdum>Can we have a future without bridge nodes?

00:22:05.560 --> 00:22:09.260
<v Sjors Provoost>Well, we should point out what the problem is with these bridge nodes because

00:22:09.260 --> 00:22:14.800
<v Sjors Provoost>they are nice people. We don't want to rely on nice people. That's not how we roll.

00:22:16.020 --> 00:22:18.340
<v Sjors Provoost>So because nice people can stop being nice.

00:22:18.560 --> 00:22:20.440
<v Aaron van Wirdum>Or they can be forced to stop being nice.

00:22:20.560 --> 00:22:25.080
<v Sjors Provoost>Or they can just disappear or run out of battery. Yeah. So yeah, then you can

00:22:25.080 --> 00:22:28.660
<v Sjors Provoost>look at the longer term picture. Like could this, you know, if people like this,

00:22:28.780 --> 00:22:33.640
<v Sjors Provoost>give any advantages or even if they don't like it, if the UTXO set just becomes

00:22:33.640 --> 00:22:38.660
<v Sjors Provoost>insane and it just takes too long to sync on any normal computer, then you could

00:22:38.660 --> 00:22:44.350
<v Sjors Provoost>basically make a soft fork which contains the proofs. So the proofs. become part

00:22:44.350 --> 00:22:47.770
<v Sjors Provoost>of the blockchain. Just like SegWit added a whole bunch of data to blocks, you

00:22:47.770 --> 00:22:52.850
<v Sjors Provoost>could then add these proofs to the blocks, making the blocks even bigger. But the

00:22:52.850 --> 00:22:57.510
<v Sjors Provoost>trade-off there is you have more bandwidth, but you have less RAM need.

00:22:58.210 --> 00:23:01.950
<v Aaron van Wirdum>Yeah, the reason this could be done as a soft fork, same with SegWit, is because

00:23:01.950 --> 00:23:07.890
<v Aaron van Wirdum>you'd include the hash of... the proofs somewhere in like

00:23:07.890 --> 00:23:12.030
<v Aaron van Wirdum>the Coinbase transaction or something like that. Old nodes just won't notice

00:23:12.030 --> 00:23:16.850
<v Aaron van Wirdum>anything interesting, but upgraded nodes will see like a whole tree which they

00:23:16.850 --> 00:23:19.850
<v Aaron van Wirdum>share with each other, which does make the blocks a bit bigger for them.

00:23:20.210 --> 00:23:23.090
<v Sjors Provoost>Yeah, so old nodes keep doing what they're doing. They get blocks, they can

00:23:23.090 --> 00:23:25.970
<v Sjors Provoost>verify those blocks because nothing changes about the transactions in the blocks.

00:23:26.270 --> 00:23:30.350
<v Sjors Provoost>New nodes will save some RAM memory. They'll use that extra data. They'll

00:23:30.350 --> 00:23:34.020
<v Sjors Provoost>download that extra data. and they'll use it. That's generally the idea.

00:23:34.440 --> 00:23:40.300
<v Ruben Somsen>Yeah. So personally, at least, I think this is not likely to happen until we

00:23:40.300 --> 00:23:44.920
<v Ruben Somsen>really get a UTXO set bloating issue where the UTXO set becomes so big that

00:23:44.920 --> 00:23:48.960
<v Ruben Somsen>people start liking this trade-off to the point where it's preferable. I think as

00:23:48.960 --> 00:23:52.760
<v Ruben Somsen>long as we're not at that point, I don't think we'll see this as a soft fork, but

00:23:52.760 --> 00:23:54.200
<v Ruben Somsen>that's my personal view.

00:23:54.340 --> 00:23:56.160
<v Sjors Provoost>I do want to point out some cool things you can do with it.

00:23:56.500 --> 00:23:58.100
<v Aaron van Wirdum>Yes. Tell us the bullish.

00:23:58.490 --> 00:24:02.730
<v Sjors Provoost>The bullish part. You know, I'm all just copy pasting from what Tadge said. We

00:24:02.730 --> 00:24:07.830
<v Sjors Provoost>like to do that. Basically, because you don't need a lot of RAM, you can start

00:24:07.830 --> 00:24:12.410
<v Sjors Provoost>doing things in specialized hardware like an ASIC. Because one of the things

00:24:12.410 --> 00:24:16.190
<v Sjors Provoost>that's kind of hard to do in an ASIC is lots of memory. And having specialized

00:24:16.190 --> 00:24:20.310
<v Sjors Provoost>hardware, maybe it's a part of your chip. So maybe, you know, Bitcoin becomes the

00:24:20.310 --> 00:24:26.270
<v Sjors Provoost>standard and every phone that you buy has a CPU and, you know, has

00:24:26.270 --> 00:24:29.810
<v Sjors Provoost>a... little mini processor right next to it that just checks all the bitcoin

00:24:29.810 --> 00:24:34.930
<v Sjors Provoost>validation rules and because it's custom silicon it might be able to validate the

00:24:34.930 --> 00:24:37.830
<v Sjors Provoost>entire blockchain at the speed that it can download it which is pretty

00:24:37.830 --> 00:24:41.070
<v Aaron van Wirdum>an asic for regular nodes exactly right

00:24:41.560 --> 00:24:45.460
<v Sjors Provoost>So not to mine coins, but to verify coins, which would be cool. And then, you

00:24:45.460 --> 00:24:48.880
<v Sjors Provoost>know, you have the protocol literally set in stone or at least set in silicon.

00:24:49.280 --> 00:24:53.020
<v Sjors Provoost>And of course, soft forks can still happen under that circumstance. But if

00:24:53.020 --> 00:24:56.400
<v Sjors Provoost>somebody wants to do a hard fork, you'd have to break all the node hardware, not

00:24:56.400 --> 00:25:00.320
<v Sjors Provoost>just all the mining hardware. So that's a nice extra barrier to not do hard

00:25:00.320 --> 00:25:02.300
<v Sjors Provoost>forks. It's an ossification of network.

00:25:02.740 --> 00:25:05.620
<v Aaron van Wirdum>It's also not perfect for soft forks. Is that what you just said, Ruben?

00:25:05.800 --> 00:25:07.040
<v Ruben Somsen>No, I mean, that's what...

00:25:07.040 --> 00:25:11.040
<v Sjors Provoost>No, no. It makes it harder to verify soft forks because if you didn't... if you

00:25:11.040 --> 00:25:15.120
<v Sjors Provoost>don't have to verify the soft fork but you soft fork but you can't verify the

00:25:15.120 --> 00:25:18.880
<v Sjors Provoost>soft fork at least not with the accelerated hardware yeah so your computer would

00:25:18.880 --> 00:25:22.420
<v Sjors Provoost>have to slow down to check all the new rules whenever it encounters it.

00:25:22.840 --> 00:25:25.880
<v Aaron van Wirdum>Yeah, or you have to buy a new phone because the soft fork happens.

00:25:26.420 --> 00:25:26.860
<v Sjors Provoost>Exactly.

00:25:27.740 --> 00:25:31.160
<v Ruben Somsen>If your phone is too old, maybe it's possible, right? That's what happens now.

00:25:31.260 --> 00:25:34.380
<v Ruben Somsen>People buy new phones every couple of years, so maybe it's not too much to ask.

00:25:34.580 --> 00:25:39.980
<v Sjors Provoost>The other thing is, we talked last week about this assume UTXO thing, where one

00:25:39.980 --> 00:25:44.480
<v Sjors Provoost>of the problems is, now when you start, you still need to get that three gigabyte

00:25:44.480 --> 00:25:49.170
<v Sjors Provoost>thing from somewhere. And if this thing becomes 100 gigabytes, you have to get

00:25:49.170 --> 00:25:55.110
<v Sjors Provoost>that from somewhere. But now we have, with this proposal, we just have a

00:25:55.110 --> 00:26:01.030
<v Sjors Provoost>kilobyte. So you can put the entire UTXO set, you can represent it in

00:26:01.030 --> 00:26:06.450
<v Sjors Provoost>a kilobyte, which can just be inside the source code. So you don't need a hash

00:26:06.450 --> 00:26:10.090
<v Sjors Provoost>and then go and fetch something, you just put the thing itself in there. And

00:26:10.090 --> 00:26:14.190
<v Sjors Provoost>nodes can start instantly at that height and then do the same thing that we

00:26:14.190 --> 00:26:18.240
<v Sjors Provoost>described. Yeah, last week, right? So sync all the way to the type tip and then

00:26:18.240 --> 00:26:20.820
<v Sjors Provoost>start the genesis and make sure everything is what it should be.

00:26:21.140 --> 00:26:25.260
<v Ruben Somsen>Yeah, that's a really nice kind of feature that you have the entire UTXO set in

00:26:25.260 --> 00:26:28.600
<v Ruben Somsen>essentially a single hash or a forest.

00:26:28.960 --> 00:26:31.260
<v Sjors Provoost>Yeah, a small little forest. One kilobyte.

00:26:31.800 --> 00:26:34.460
<v Aaron van Wirdum>What's not to... Are there more benefits?

00:26:34.840 --> 00:26:38.810
<v Sjors Provoost>Yeah, so the last one would be you could sync with a phone node. So right now, if

00:26:38.810 --> 00:26:42.870
<v Sjors Provoost>you have a node on your phone, it might be very slow. Maybe with this proposal,

00:26:42.910 --> 00:26:46.530
<v Sjors Provoost>it wouldn't be slow, but let's say it's still slow. What you would do is you sync

00:26:46.530 --> 00:26:52.380
<v Sjors Provoost>your node on your desktop or whatever it is. You scan a QR code, which can be

00:26:52.380 --> 00:26:57.320
<v Sjors Provoost>pretty long. And now your little phone has the recent UTXO set. And that doesn't

00:26:57.320 --> 00:27:02.020
<v Sjors Provoost>even require any kind of commitments, right? Because your phone trusts your

00:27:02.020 --> 00:27:05.970
<v Sjors Provoost>laptop. So that's a feature you could use right now.

00:27:06.150 --> 00:27:10.760
<v Aaron van Wirdum>Yep. Are there any downsides or risks? Ruben, you thought about this?

00:27:10.920 --> 00:27:14.940
<v Ruben Somsen>Sure, but I want to add one more interesting feature that we haven't discussed yet.

00:27:15.000 --> 00:27:16.120
<v Aaron van Wirdum>Before we burn it all down.

00:27:16.920 --> 00:27:20.200
<v Ruben Somsen>Before we burn it down, yeah. It's a good question, though. And that's parallel

00:27:20.200 --> 00:27:25.200
<v Ruben Somsen>validation. So what you can do is you can theoretically take two computers.

00:27:25.680 --> 00:27:31.660
<v Ruben Somsen>and just take a Utreexo hash off the middle state of the blockchain so you

00:27:31.660 --> 00:27:36.680
<v Ruben Somsen>know if at block 2000, you just take block 1000 and you take the Utreexo hash

00:27:36.680 --> 00:27:42.480
<v Ruben Somsen>from that moment in time and then you start validating 1000 to 2000 and on the

00:27:42.480 --> 00:27:48.390
<v Ruben Somsen>other computer you start validating 0 to 1000 and if they match up after you

00:27:48.390 --> 00:27:52.550
<v Ruben Somsen>validated both, then you validate the entire blockchain while splitting up the

00:27:52.550 --> 00:27:56.570
<v Ruben Somsen>work. And that's interesting and can be very useful, I think, maybe in the future

00:27:56.570 --> 00:28:00.570
<v Ruben Somsen>also when you have more and more CPUs on a single chip.

00:28:00.790 --> 00:28:03.490
<v Sjors Provoost>Right, so it wouldn't be necessarily multiple computers doing this, but just

00:28:03.490 --> 00:28:07.930
<v Sjors Provoost>multiple chips doing it because we see that clock speed is not going up much. But

00:28:07.930 --> 00:28:11.190
<v Sjors Provoost>you get more and more parallel stuff. And the problem with the Bitcoin chain is

00:28:11.190 --> 00:28:16.160
<v Sjors Provoost>you can verify... You can verify signatures in parallel, and a Bitcoin node does

00:28:16.160 --> 00:28:20.860
<v Sjors Provoost>that. But some things are intrinsically serial, so you cannot verify block 10

00:28:20.860 --> 00:28:24.200
<v Sjors Provoost>before you verify block 9. And it's nice if you can get rid of that.

00:28:24.320 --> 00:28:25.620
<v Ruben Somsen>Yeah, so now you can, essentially.

00:28:25.880 --> 00:28:30.300
<v Sjors Provoost>You can too, if you assume UTXO, but you need multiple very large snapshots.

00:28:30.380 --> 00:28:34.780
<v Sjors Provoost>Yeah, exactly. So, yeah, very cool stuff. So, let's burn it down. Right.

00:28:35.060 --> 00:28:35.940
<v Aaron van Wirdum>Go for the kill, Ruben.

00:28:36.080 --> 00:28:39.220
<v Ruben Somsen>Yeah, one more thing to add is apparently you can also do backwards validation.

00:28:39.700 --> 00:28:43.200
<v Ruben Somsen>I'm not sure exactly how it works, but apparently you can go from block 1000 to

00:28:43.200 --> 00:28:45.660
<v Ruben Somsen>999. So yeah, so that's possible too.

00:28:45.920 --> 00:28:47.720
<v Sjors Provoost>Well, you need to because you need to be able to roll back.

00:28:47.900 --> 00:28:52.640
<v Ruben Somsen>That too, yeah. So I just haven't looked into that sufficiently to fully grasp it.

00:28:52.760 --> 00:28:57.720
<v Sjors Provoost>Well, we just explained that in order to prove that something is in a Merkle

00:28:57.720 --> 00:29:02.480
<v Sjors Provoost>tree, that's the same thing you can do to change something in a Merkle tree. So

00:29:02.480 --> 00:29:06.920
<v Sjors Provoost>you can change the old thing with the new thing that way, or you can change the

00:29:06.920 --> 00:29:08.020
<v Sjors Provoost>new thing with the old thing.

00:29:08.200 --> 00:29:11.360
<v Ruben Somsen>Right. Yeah. Yeah. So it makes sense. I agree with that. I just haven't like sat

00:29:11.360 --> 00:29:12.620
<v Ruben Somsen>down and just gone through it.

00:29:13.020 --> 00:29:17.440
<v Sjors Provoost>One other thing we can also mention is that this tree that we just described is

00:29:17.440 --> 00:29:22.000
<v Sjors Provoost>the general name for it is an accumulator. It's something that you can use to.

00:29:22.610 --> 00:29:27.830
<v Sjors Provoost>add stuff to, and in this case also remove stuff from. But there are all sorts of

00:29:27.830 --> 00:29:32.030
<v Sjors Provoost>mathematical tricks you can deploy to do this. This is something that's

00:29:32.030 --> 00:29:35.930
<v Sjors Provoost>conceptually simple. I mean, if other people than us explain it and you see it in

00:29:35.930 --> 00:29:39.150
<v Sjors Provoost>front of you, it's very simple with the Merkle trees. But there's been other

00:29:39.150 --> 00:29:43.890
<v Sjors Provoost>proposals, like an RSA accumulator. There's all sorts of cool cryptographic math

00:29:43.890 --> 00:29:47.670
<v Sjors Provoost>you can do to just add things to a set and remove them from a set, essentially.

00:29:48.650 --> 00:29:50.890
<v Sjors Provoost>Perhaps another mechanism would be used eventually.

00:29:51.690 --> 00:29:55.390
<v Ruben Somsen>And that's maybe also one of the downsides that we can talk about now, where if

00:29:55.390 --> 00:29:59.430
<v Ruben Somsen>you start using this and then later somebody finds a better accumulator, then you

00:29:59.430 --> 00:30:04.230
<v Ruben Somsen>have to yet again switch to that next proposal, which is OK as long as you don't

00:30:04.230 --> 00:30:08.890
<v Ruben Somsen>commit it into a block. But once you make this an actual soft fork and then you

00:30:08.890 --> 00:30:11.990
<v Ruben Somsen>find, oh, there's this even better accumulator that we should have been using.

00:30:12.210 --> 00:30:15.710
<v Ruben Somsen>Now you're kind of stuck because you can't undo a soft fork, at least not unless

00:30:15.710 --> 00:30:19.510
<v Ruben Somsen>you put in some kind of sunset date or something. But that's generally not really.

00:30:20.810 --> 00:30:22.610
<v Ruben Somsen>done, at least hasn't been done so far.

00:30:22.910 --> 00:30:25.850
<v Sjors Provoost>No. So that's another reason why you wouldn't expect this to be a soft fork

00:30:25.850 --> 00:30:30.030
<v Sjors Provoost>unless like the world is burning or it's been used for so and so long that people

00:30:30.030 --> 00:30:34.350
<v Sjors Provoost>think, okay, this is mature. We're nowhere near that. It's pretty experimental as

00:30:34.350 --> 00:30:35.570
<v Sjors Provoost>many of the things we discuss here.

00:30:36.250 --> 00:30:40.610
<v Ruben Somsen>And I guess the second thing that I consider a downside is that bandwidth seems

00:30:40.610 --> 00:30:44.990
<v Ruben Somsen>to be pretty much the bottleneck right now for Bitcoin. And this is something

00:30:44.990 --> 00:30:49.850
<v Ruben Somsen>that makes that bottleneck worse. So for that reason, I personally see this as

00:30:49.850 --> 00:30:54.790
<v Ruben Somsen>kind of a more of an option that people can opt into if in their case bandwidth

00:30:54.790 --> 00:31:00.510
<v Ruben Somsen>isn't a problem, but their CPU or disk IO restricted or RAM restricted, or

00:31:00.510 --> 00:31:02.430
<v Ruben Somsen>maybe they want to use an ASIC or something like that.

00:31:04.110 --> 00:31:09.030
<v Ruben Somsen>From that perspective, I don't expect everybody to use this. But I also think

00:31:09.030 --> 00:31:13.770
<v Ruben Somsen>Sjors has pointed out correctly that if the UTXO set grows to a significant

00:31:13.770 --> 00:31:18.190
<v Ruben Somsen>degree where it does become a burden and it slows down validation, then maybe

00:31:18.190 --> 00:31:19.190
<v Ruben Somsen>this becomes more appealing.

00:31:19.790 --> 00:31:21.250
<v Sjors Provoost>Yeah, so keep an eye on it.

00:31:21.470 --> 00:31:27.150
<v Aaron van Wirdum>Yeah. And I guess the increased block size in one of the variants could be

00:31:27.150 --> 00:31:29.150
<v Aaron van Wirdum>considered a downside. Although I think

00:31:29.150 --> 00:31:30.710
<v Sjors Provoost>that's what we meant with more bandwidth.

00:31:31.050 --> 00:31:31.570
<v Ruben Somsen>Yeah, exactly.

00:31:32.660 --> 00:31:34.140
<v Sjors Provoost>That's, you know, just...

00:31:34.140 --> 00:31:36.400
<v Aaron van Wirdum>Okay, fair enough. Then I guess that's it, isn't it?

00:31:36.560 --> 00:31:41.180
<v Sjors Provoost>Let's see if I had anything else on the list. Nope. I think that's it. Thank you

00:31:41.180 --> 00:31:44.400
<v Sjors Provoost>for listening to the Van Wirdum Sjorsnado Special Somsen Edition.

00:31:44.720 --> 00:31:45.920
<v Aaron van Wirdum>There you go. There you go.

