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

00:00:20.820 --> 00:00:23.160
<v Aaron van Wirdum>Live from Prague, this is Bitcoin.

00:00:23.880 --> 00:00:24.360
<v Sjors Provoost>Explained.

00:00:24.620 --> 00:00:24.980
<v Aaron van Wirdum>Hey, Sjors.

00:00:25.280 --> 00:00:25.600
<v Sjors Provoost>Hello.

00:00:25.940 --> 00:00:27.980
<v Aaron van Wirdum>Sjors, we have a distinguished guest today.

00:00:28.220 --> 00:00:28.680
<v Sjors Provoost>We do.

00:00:29.380 --> 00:00:32.920
<v Aaron van Wirdum>Jan, welcome to the show. Jan Čapek. Is that how I pronounce it?

00:00:33.280 --> 00:00:36.420
<v Jan Čapek>We actually say Čapek, but you did a pretty good job.

00:00:37.260 --> 00:00:37.740
<v Sjors Provoost>Čapek.

00:00:37.880 --> 00:00:43.020
<v Aaron van Wirdum>I think that's exactly what I said, Jan. So you work with Braiins? and we're

00:00:43.020 --> 00:00:46.940
<v Aaron van Wirdum>gonna talk about Stratum V2 yeah we have two mics which is gonna be awkward

00:00:46.940 --> 00:00:50.400
<v Aaron van Wirdum>sometimes you maybe hear someone talking in the background I'll just give the mic

00:00:50.400 --> 00:00:53.020
<v Aaron van Wirdum>to you and then you can sort of introduce yourself how about that

00:00:53.960 --> 00:00:58.740
<v Jan Čapek>Hi guys. My name is Jan Čapek. I work for Braiins. I'm a co-founder of Braiins

00:00:58.740 --> 00:01:04.380
<v Jan Čapek>company. We started back in 2013 by basically making the first Bitcoin mining

00:01:04.380 --> 00:01:09.880
<v Jan Čapek>pool, a professional project. And since then our Bitcoin adventure started back

00:01:09.880 --> 00:01:14.600
<v Jan Čapek>in the day in 2018, we came up with the idea of extending our product line with

00:01:14.860 --> 00:01:19.240
<v Jan Čapek>mining firmware. So we implemented support for Antminers S9 and we call that

00:01:19.240 --> 00:01:23.860
<v Jan Čapek>project at that time Braiins OS. Then we had, it was like fully open sourced. By

00:01:23.860 --> 00:01:28.420
<v Jan Čapek>the time you could have all the data sheets for S9, the source code and

00:01:28.420 --> 00:01:32.710
<v Jan Čapek>everything, even from the manufacturers. So we kind of continue in that, in that

00:01:32.710 --> 00:01:37.390
<v Jan Čapek>line. Then we came up with a commercial extension called Braiins OS plus, which

00:01:37.390 --> 00:01:41.650
<v Jan Čapek>provides some additional features like optimized chip tuning of individual hash

00:01:41.650 --> 00:01:47.170
<v Jan Čapek>boards. And here we are 2023 and we're like slowly walking towards having our own

00:01:47.170 --> 00:01:52.210
<v Jan Čapek>mining hardware. We have now a control board coming in June and in Q3, we will

00:01:52.210 --> 00:01:56.330
<v Jan Čapek>have a PSU. So we're like approaching this product line from all the different

00:01:56.330 --> 00:01:59.670
<v Jan Čapek>aspects. And at some point there should be Braiins miner available.

00:02:00.100 --> 00:02:04.020
<v Sjors Provoost>Yeah, and you gave a talk during Pizza Day Prague, which will hopefully one day

00:02:04.020 --> 00:02:08.480
<v Sjors Provoost>be on YouTube. That is super interesting about this control board and all sorts

00:02:08.480 --> 00:02:09.380
<v Sjors Provoost>of problems with that.

00:02:09.740 --> 00:02:14.260
<v Jan Čapek>Right. I gave a little overview of the issues that I see in the mining industry.

00:02:14.460 --> 00:02:19.260
<v Jan Čapek>And generally, the note was about the fact that people kind of take Bitcoin

00:02:19.260 --> 00:02:23.240
<v Jan Čapek>mining for granted. Not too many people actually look into it, except for the

00:02:23.240 --> 00:02:28.050
<v Jan Čapek>miners themselves. that is a great source of revenue for them but general Bitcoin

00:02:28.050 --> 00:02:32.190
<v Jan Čapek>users think like oh we have Bitcoin miners here but when you look at the details

00:02:32.190 --> 00:02:36.110
<v Jan Čapek>there are some centralization issues coming mostly from the fact that there's

00:02:36.110 --> 00:02:42.060
<v Jan Čapek>just a few players in the game mostly from China that basically keep the whole

00:02:42.060 --> 00:02:47.560
<v Jan Čapek>market for themselves. And it's a very motivating and incentivizing fact for us

00:02:47.560 --> 00:02:49.160
<v Jan Čapek>to actually enter the business as Braiins.

00:02:49.740 --> 00:02:53.820
<v Sjors Provoost>Yeah. But I think today we'll be mostly focused on the software side of this

00:02:53.820 --> 00:02:55.700
<v Sjors Provoost>story and not so much in the hardware side.

00:02:56.530 --> 00:02:58.850
<v Aaron van Wirdum>First though, Jan, do you ever listen to our podcast?

00:02:59.290 --> 00:03:00.530
<v Jan Čapek>I think I did once.

00:03:00.870 --> 00:03:03.530
<v Aaron van Wirdum>So you know what everyone's favorite part of the podcast is, yeah?

00:03:04.800 --> 00:03:06.020
<v Jan Čapek>Which one is that? Tell me.

00:03:07.200 --> 00:03:09.120
<v Aaron van Wirdum>Sjors, do we have the boostagrams on the road?

00:03:09.930 --> 00:03:11.590
<v Sjors Provoost>Yeah yeah we have them yeah

00:03:11.590 --> 00:03:12.370
<v Aaron van Wirdum>Do you know the jingle?

00:03:12.370 --> 00:03:14.260
<v Jan Čapek>I don't sorry.

00:03:14.800 --> 00:03:20.780
<v Aaron van Wirdum>I'll I'll do the jingle then Sjors stacks sats. Sjors stacks sats. Sjors

00:03:20.780 --> 00:03:22.060
<v Aaron van Wirdum>stacks sats.

00:03:22.060 --> 00:03:27.360
<v Sjors Provoost>Well, well, well. So we got a couple this time on the last episode about the

00:03:27.360 --> 00:03:32.580
<v Sjors Provoost>witness discount. One is from fake for 10,000 sats, he says Sjors stacks sats and

00:03:32.580 --> 00:03:36.430
<v Sjors Provoost>stays humble. Apparently. Then we have one from

00:03:36.430 --> 00:03:41.810
<v Sjors Provoost>shadowycodermark, 9,400 sats saying, Van Wirdum, Sjorsnado. So he likes the old

00:03:41.810 --> 00:03:42.630
<v Sjors Provoost>name of the podcast.

00:03:43.950 --> 00:03:46.930
<v Sjors Provoost>Then somebody said that he thought I was an opera singer.

00:03:47.370 --> 00:03:48.670
<v Aaron van Wirdum>No, that must be me, Sjors.

00:03:49.630 --> 00:03:50.610
<v Sjors Provoost>That's possible.

00:03:50.610 --> 00:03:51.110
<v Aaron van Wirdum>For sure.

00:03:51.530 --> 00:03:55.250
<v Sjors Provoost>Somebody even asked a question, which I answered. So I won't repeat the question

00:03:55.250 --> 00:03:59.220
<v Sjors Provoost>here. But sometimes I will answer boosts. Well, that's about it.

00:03:59.900 --> 00:04:05.610
<v Aaron van Wirdum>Sjors stacks sats. Back to the episode. Okay, Stratum V2. Jan,

00:04:08.050 --> 00:04:12.650
<v Aaron van Wirdum>first of all, okay, first, what is actually Stratum? What is Stratum V1? Let's start there.

00:04:13.810 --> 00:04:19.290
<v Jan Čapek>Stratum V1 didn't have the attribute of being V1 until we invented the V2

00:04:19.290 --> 00:04:24.870
<v Jan Čapek>so it's been known publicly until V2 as Stratum mining protocol so

00:04:24.870 --> 00:04:29.150
<v Jan Čapek>essentially it's a protocol between the Bitcoin mining machines and the pools so

00:04:29.150 --> 00:04:34.290
<v Jan Čapek>that pools can distribute jobs to the miners in a scalable way so it has some

00:04:34.290 --> 00:04:38.850
<v Jan Čapek>mechanisms to adjust difficulty of these mining jobs for the machines in case of

00:04:38.850 --> 00:04:43.890
<v Jan Čapek>huge farms connecting to the pools so that these pools can handle such loads so

00:04:43.890 --> 00:04:48.930
<v Jan Čapek>this was the the biggest added value compared to getblocktemplate back in the day

00:04:48.930 --> 00:04:53.610
<v Jan Čapek>where this was the old way of mining basically directly against the Bitcoin node

00:04:53.610 --> 00:04:59.090
<v Jan Čapek>to allow like scalable approach and even more than that you could have

00:04:59.090 --> 00:05:03.510
<v Jan Čapek>aggregate you could have aggregated the full hash rate on the mining farm through

00:05:03.510 --> 00:05:07.510
<v Jan Čapek>proxy and there would be then just a few connections going to the pool acting as

00:05:07.510 --> 00:05:11.980
<v Jan Čapek>if it was one gigantic miner Unfortunately the protocol so so fortunately we had

00:05:11.980 --> 00:05:12.500
<v Jan Čapek>the protocol

00:05:12.500 --> 00:05:17.480
<v Sjors Provoost>I wanted to interrupt you a little bit to maybe zoom in a little bit or recap how

00:05:17.480 --> 00:05:22.480
<v Sjors Provoost>mining works period because not all the listeners will know that so well the

00:05:22.480 --> 00:05:26.160
<v Sjors Provoost>short story is in order to create a new block you need to find a nonce which is a

00:05:26.160 --> 00:05:29.840
<v Sjors Provoost>random number or pseudo doesn't matter it doesn't have to be random but you have

00:05:29.840 --> 00:05:34.680
<v Sjors Provoost>to find a number such that if you add it to the header of the of the Bitcoin of a

00:05:34.680 --> 00:05:40.220
<v Sjors Provoost>block, if you then hash the header, you get a bunch of zeros at the start.

00:05:40.440 --> 00:05:44.360
<v Sjors Provoost>That is the challenge you're trying to find. And then the difficulty adjustment

00:05:44.360 --> 00:05:49.160
<v Sjors Provoost>based, to put it simply, the difficulty adjustment means that if blocks are found

00:05:49.160 --> 00:05:53.240
<v Sjors Provoost>too quickly, then you have to add another zero or not really another zero, but

00:05:53.240 --> 00:05:57.360
<v Sjors Provoost>basically it just becomes more difficult because in order to have more zeros at

00:05:57.360 --> 00:06:00.780
<v Sjors Provoost>the start of a number, you have to do more random guesses. So you have to try

00:06:00.780 --> 00:06:06.590
<v Sjors Provoost>more nonces. And then initially miners would just be the CPU of a computer, the

00:06:06.590 --> 00:06:12.470
<v Sjors Provoost>one CPU, one vote idea. And as more CPUs started mining,

00:06:12.830 --> 00:06:16.570
<v Sjors Provoost>they would have to add more zeros. But then somebody figured out how to do it on

00:06:16.570 --> 00:06:22.240
<v Sjors Provoost>a GPU, a graphical computer, graphical processing card. And then I think a little

00:06:22.240 --> 00:06:27.760
<v Sjors Provoost>bit later, well, and then later on, you got these dedicated chips basically. But,

00:06:27.940 --> 00:06:33.610
<v Sjors Provoost>and that brings, I think it brings us to the problem of pooling, where you have

00:06:33.610 --> 00:06:37.830
<v Sjors Provoost>multiple, where it's no longer a good idea to try and mine yourself because

00:06:37.830 --> 00:06:41.430
<v Sjors Provoost>you'll find a block once every 2,000 years or something.

00:06:41.570 --> 00:06:42.430
<v Jan Čapek>Depends on your hash rate.

00:06:42.710 --> 00:06:46.510
<v Sjors Provoost>Right. And so then you want to join with other people and distribute the work.

00:06:47.430 --> 00:06:53.310
<v Sjors Provoost>And the reward. And the reward. and then well this is where we get into

00:06:53.310 --> 00:06:58.150
<v Sjors Provoost>what getblocktemplate is maybe and what what problems started to be caused when

00:06:58.150 --> 00:06:59.030
<v Sjors Provoost>you're trying to share the work.

00:06:59.030 --> 00:07:04.130
<v Aaron van Wirdum>Well it was invented here in Prague pooled mining is that right? yeah don't hear

00:07:04.130 --> 00:07:06.130
<v Aaron van Wirdum>me in the background Sjors, it's just a quick question.

00:07:06.130 --> 00:07:06.670
<v Sjors Provoost>It's fine.

00:07:06.670 --> 00:07:07.870
<v Aaron van Wirdum>Sorry, listeners.

00:07:07.870 --> 00:07:13.070
<v Jan Čapek>Yes it has been invented here in Prague the the concept of pooled mining we're

00:07:13.070 --> 00:07:16.910
<v Jan Čapek>basically the first Bitcoin mining pool in the world the concept has been

00:07:16.910 --> 00:07:20.720
<v Jan Čapek>discussed for a long time on BitcoinTalk so There have been more people

00:07:20.720 --> 00:07:26.380
<v Jan Čapek>interested in these things, but I would say the quality changer or the shift, the

00:07:26.380 --> 00:07:31.020
<v Jan Čapek>major shift was actually with introducing the Stratum protocol by Slush back in the day.

00:07:31.180 --> 00:07:33.980
<v Sjors Provoost>So initially pools did not use Stratum at all?

00:07:34.200 --> 00:07:38.320
<v Jan Čapek>They were using the getblocktemplate and there were, I think there was one more

00:07:38.320 --> 00:07:38.820
<v Jan Čapek>mechanism.

00:07:39.140 --> 00:07:43.950
<v Sjors Provoost>But getblocktemplate just... Well, it's an RPC call to Bitcoin Core and it gives

00:07:43.950 --> 00:07:48.110
<v Sjors Provoost>you a block and then you can add, it basically puts all the transactions in there

00:07:48.110 --> 00:07:51.730
<v Sjors Provoost>and you can add your own coinbase transaction that sends it to yourself. Right?

00:07:51.890 --> 00:07:54.750
<v Sjors Provoost>That's what the thing does. But then how do you use that in a pool?

00:07:55.210 --> 00:08:00.170
<v Jan Čapek>Well, the pool was providing a little bit of abstraction about this, but it was

00:08:00.170 --> 00:08:05.530
<v Jan Čapek>not meant for thousands of machines connecting to it because there was no way to

00:08:05.530 --> 00:08:09.830
<v Jan Čapek>adjust the difficulty for it. You would be either getting spammed by all the

00:08:09.830 --> 00:08:15.350
<v Jan Čapek>shares from the machines or you would never see a share. And then the problem was

00:08:15.350 --> 00:08:19.150
<v Jan Čapek>that it was difficult to measure it. And then when you had to distribute the...

00:08:19.500 --> 00:08:24.580
<v Jan Čapek>the reward and there were issues associated with that. So conceptually, it was

00:08:24.580 --> 00:08:26.840
<v Jan Čapek>something that just did not scale at all.

00:08:27.020 --> 00:08:30.500
<v Sjors Provoost>So the concept of shares was invented first, right? Because the idea of a share

00:08:30.500 --> 00:08:34.960
<v Sjors Provoost>is that you try to produce a block, but instead of the actual difficulty, you

00:08:34.960 --> 00:08:39.060
<v Sjors Provoost>take an easier difficulty. So you say like, okay, the block has difficulty 1000,

00:08:39.060 --> 00:08:43.300
<v Sjors Provoost>I'm just picking a number. If you can produce a block with difficulty 10, we

00:08:43.300 --> 00:08:48.350
<v Sjors Provoost>count that as 1% of effort. And somehow we track. And that's how you prove that

00:08:48.350 --> 00:08:51.310
<v Sjors Provoost>you're actually putting in the effort. So you're sending all these blocks at 1%

00:08:51.310 --> 00:08:53.270
<v Sjors Provoost>of the actual difficulty.

00:08:53.410 --> 00:08:58.130
<v Jan Čapek>And it's even more advanced in a way that, for example, pools specifically choose

00:08:58.130 --> 00:09:02.490
<v Jan Čapek>how often they want to see a share, like just statistically. So, for example, our

00:09:02.490 --> 00:09:07.530
<v Jan Čapek>pool is configured so that it gives difficult enough jobs to its miners so that

00:09:07.530 --> 00:09:10.430
<v Jan Čapek>they produce a result, let's say, every five seconds.

00:09:10.840 --> 00:09:15.100
<v Sjors Provoost>So instead of saying, I want a certain percentage, you're saying, I want to see a

00:09:15.100 --> 00:09:18.180
<v Sjors Provoost>share every five seconds and I'll make it easier for you if you can.

00:09:18.400 --> 00:09:22.620
<v Jan Čapek>This is correct. And this share that you submit has the value of the difficulty

00:09:22.620 --> 00:09:27.220
<v Jan Čapek>that I give you. So for example, if it's a weak miner given a difficulty one,

00:09:27.240 --> 00:09:32.660
<v Jan Čapek>because it's some USB stick, for example, those old Block Erupters, they were

00:09:32.660 --> 00:09:38.600
<v Jan Čapek>able to mine like difficulty one share in like 20 seconds, right? Which is far

00:09:38.600 --> 00:09:42.700
<v Jan Čapek>behind the expected performance. So you would see big variations in the hashrate.

00:09:42.800 --> 00:09:46.840
<v Jan Čapek>But these devices are no longer relevant. But to compare it, so these devices

00:09:46.840 --> 00:09:50.340
<v Jan Čapek>would be given, for example, difficulty one, and they would barely produce a

00:09:50.340 --> 00:09:54.060
<v Jan Čapek>share every 20 seconds. So they would get this one point in our accounting,

00:09:54.340 --> 00:09:59.960
<v Jan Čapek>whereas some ASIC has difficulty 8,000. So every share that they generate is

00:09:59.960 --> 00:10:04.740
<v Jan Čapek>8,000 points for them. So once the block is found, then you see the ratio of

00:10:04.740 --> 00:10:06.300
<v Jan Čapek>contribution to finding the block.

00:10:08.200 --> 00:10:11.740
<v Sjors Provoost>So that was the problem that Stratum solved, is that you could not give every

00:10:11.740 --> 00:10:15.120
<v Sjors Provoost>device its own target, essentially, its own difficulty target.

00:10:15.280 --> 00:10:20.140
<v Jan Čapek>Yes, this is exactly the added value that now it actually scales because the pool

00:10:20.140 --> 00:10:25.020
<v Jan Čapek>can protect itself from being basically DDoSed by the machines.

00:10:25.400 --> 00:10:29.020
<v Sjors Provoost>And the DDoS risk is, I guess, but I mean, the pool could have just set the

00:10:29.020 --> 00:10:33.640
<v Sjors Provoost>difficulty more high, but then the problem would be that the smaller miners can't

00:10:33.640 --> 00:10:37.310
<v Sjors Provoost>participate anymore, right? So it's a trade-off between... making it accessible

00:10:37.310 --> 00:10:43.270
<v Sjors Provoost>for anybody with a reasonable machine, but also not getting so many shares that

00:10:43.270 --> 00:10:46.860
<v Sjors Provoost>the server gets overloaded. from the from the very fast machines right.

00:10:46.860 --> 00:10:51.860
<v Jan Čapek>And there was another aspect as well because it was essentially like request

00:10:51.860 --> 00:10:57.480
<v Jan Čapek>response based like HTTP kind of protocol originally so it was not that the

00:10:57.480 --> 00:11:01.240
<v Jan Čapek>miners were keeping a permanent TCP connections but the servers were also

00:11:01.240 --> 00:11:06.120
<v Jan Čapek>harassed by by by the miners like connecting disconnecting all the time just to

00:11:06.120 --> 00:11:10.320
<v Jan Čapek>get the job and to some of the result so so the the protocol itself the

00:11:10.320 --> 00:11:15.600
<v Jan Čapek>getblocktemplate stuff was not really meant for like scale mining it was just

00:11:15.600 --> 00:11:20.340
<v Jan Čapek>suitable for like your home own home setup let's say when back in the day when

00:11:20.340 --> 00:11:24.700
<v Jan Čapek>you didn't mind using pools but you were basically solo mining everybody at the

00:11:24.700 --> 00:11:30.000
<v Jan Čapek>beginning of Bitcoin history was pretty much solo mining on their CPUs then maybe

00:11:30.000 --> 00:11:35.560
<v Jan Čapek>GPUs and then at some point it became infeasible to to mine on your own and the

00:11:35.560 --> 00:11:38.840
<v Jan Čapek>reason being the probability of finding the block is still the same but what is

00:11:38.840 --> 00:11:44.440
<v Jan Čapek>stepping in is the variance because what some people don't know, it's good to

00:11:44.440 --> 00:11:49.560
<v Jan Čapek>repeat it, is that you mine… Bitcoin in blocks and they have the fixed value. You

00:11:49.560 --> 00:11:53.720
<v Jan Čapek>cannot mine one Bitcoin. The subsidy in the block is given by the protocol plus

00:11:53.720 --> 00:11:57.160
<v Jan Čapek>the transaction fees. Technically, I don't even know if you can set it to like

00:11:57.160 --> 00:12:01.980
<v Jan Čapek>one and see what would happen because it's below. So I don't want to refer to the source code.

00:12:02.020 --> 00:12:05.120
<v Sjors Provoost>It would be possible, but it would be stupid.

00:12:05.300 --> 00:12:10.060
<v Jan Čapek>But generally, you mine it in blocks and that means that I cannot with a mining

00:12:10.060 --> 00:12:13.680
<v Jan Čapek>machine that's less performant, mine just a fraction and be happy with it. The

00:12:13.680 --> 00:12:17.960
<v Jan Čapek>only way to mine the fraction is to join the pool. with with all the computing

00:12:17.960 --> 00:12:22.160
<v Jan Čapek>resources and proportionally receive the reward based on the on the mined blocks

00:12:22.160 --> 00:12:28.160
<v Jan Čapek>of such a huge computing cluster and typically back in the day the the

00:12:28.160 --> 00:12:33.560
<v Jan Čapek>hashing power was rising really steeply every month and it became

00:12:33.560 --> 00:12:37.380
<v Jan Čapek>unfeasible for these solo miners so they were gathering in the pools and we were

00:12:37.380 --> 00:12:40.060
<v Jan Čapek>so we were one of the first we were the first Bitcoin mining pool

00:12:40.100 --> 00:12:44.580
<v Sjors Provoost>and so let me see what did the name Stratum come from?

00:12:46.650 --> 00:12:52.450
<v Jan Čapek>Honestly, I don't know. I know the history that Electrum Wallet actually has some

00:12:52.450 --> 00:12:57.750
<v Jan Čapek>protocol, and I think the name was coming from there. But I'm not the original

00:12:57.750 --> 00:13:00.170
<v Jan Čapek>author of the Stratum V1 protocol.

00:13:01.320 --> 00:13:06.200
<v Aaron van Wirdum>Okay, I think so far we discussed the concept of mining and how it works with

00:13:06.200 --> 00:13:09.660
<v Aaron van Wirdum>shares and how Stratum sort of plays into that, but that doesn't cover all of

00:13:09.660 --> 00:13:14.700
<v Aaron van Wirdum>Stratum, right? We haven't broken down everything that Stratum is or does, I think.

00:13:15.270 --> 00:13:19.310
<v Sjors Provoost>I think the two things you mentioned so far is that it's able to give different

00:13:19.310 --> 00:13:23.190
<v Sjors Provoost>difficulties to different machines and that it communicates with something a

00:13:23.190 --> 00:13:25.410
<v Sjors Provoost>little bit more efficient than HTTP requests.

00:13:25.830 --> 00:13:29.970
<v Jan Čapek>Right. So this was the quality shift, but still there were some deficiencies in

00:13:29.970 --> 00:13:34.450
<v Jan Čapek>this protocol. So we have to realize that we're dealing here with like money

00:13:34.450 --> 00:13:39.750
<v Jan Čapek>printing or money generating machines. So even back in 2013, it was quite

00:13:39.750 --> 00:13:43.790
<v Jan Čapek>valuable not to make too many programming errors and lose the Bitcoin. For

00:13:43.790 --> 00:13:48.690
<v Jan Čapek>example, by mining to an invalid coinbase address or generating invalid shares

00:13:48.690 --> 00:13:54.410
<v Jan Čapek>because of one bit being flipped or reverse byte ordering or anything. So

00:13:54.410 --> 00:13:59.810
<v Jan Čapek>back in the day, it was actually a wise approach by Slush to

00:13:59.810 --> 00:14:05.650
<v Jan Čapek>come up with a protocol that would be easy to use and easy to debug. But

00:14:05.650 --> 00:14:11.630
<v Jan Čapek>here we are back in 21st century, where 2023, where the protocol

00:14:11.630 --> 00:14:17.410
<v Jan Čapek>still exists, but has like these tiny flaws in a way that it's not efficient

00:14:17.410 --> 00:14:21.490
<v Jan Čapek>because it's text-based. It was easy to develop with such protocol. You could

00:14:21.490 --> 00:14:26.050
<v Jan Čapek>technically telnet to your mining server and just talk to it and pretending

00:14:26.050 --> 00:14:30.170
<v Jan Čapek>you're a miner and you can easily verify that it's generating the proper jobs.

00:14:30.650 --> 00:14:34.950
<v Jan Čapek>Second part is that there have never been like an official central go-to place

00:14:34.950 --> 00:14:40.550
<v Jan Čapek>with a specification. Bits and pieces are on the Bitcoin Wiki. Some version of

00:14:40.550 --> 00:14:44.530
<v Jan Čapek>the protocol is published on our website, for example. And there are other

00:14:44.530 --> 00:14:50.120
<v Jan Čapek>sources of truth, let's say. That would be the least important problem.

00:14:50.300 --> 00:14:54.640
<v Jan Čapek>The major problem is that throughout the time, there were different flavors and

00:14:54.640 --> 00:15:00.100
<v Jan Čapek>dialects actually implemented, sourcing from the fact that even the manufacturers

00:15:00.100 --> 00:15:05.520
<v Jan Čapek>of the mining machines, eventually with the rise of ASICs, they were not able to

00:15:05.520 --> 00:15:11.110
<v Jan Čapek>go to one single place and implement the protocol correctly. Back in the day, I

00:15:11.110 --> 00:15:16.350
<v Jan Čapek>remember like regularly on regular basis in 2013, 2014, really tweaking the

00:15:16.350 --> 00:15:21.950
<v Jan Čapek>mining servers so that they're able to talk to these Stratum compatible ASICs

00:15:21.950 --> 00:15:25.650
<v Jan Čapek>because this was the time when new ASICs were being introduced to the market. And

00:15:25.650 --> 00:15:29.690
<v Jan Čapek>every now and then you would have some exotic version of the firmware that would

00:15:29.690 --> 00:15:33.530
<v Jan Čapek>not comply. And that's actually also the time when I was thinking like we should

00:15:33.530 --> 00:15:39.290
<v Jan Čapek>be providing also the firmware to eliminate this degree of freedom and potential

00:15:39.290 --> 00:15:43.690
<v Jan Čapek>issues. Because bad things could have been happening. Like if the machine is not,

00:15:43.890 --> 00:15:49.450
<v Jan Čapek>for example, rolling the timestamp properly, or if it's not doing something else,

00:15:49.530 --> 00:15:53.450
<v Jan Čapek>or if it's producing invalid shares, then somebody was actually wasting energy,

00:15:53.550 --> 00:15:57.890
<v Jan Čapek>right? Because these jobs cannot be acknowledged as valid or these shares. So

00:15:57.890 --> 00:16:02.170
<v Jan Čapek>this was one deficiency, not having like a central standard for it.

00:16:03.560 --> 00:16:08.740
<v Jan Čapek>The fact being text-based means quite a bit of inefficiency. A lot of text

00:16:08.740 --> 00:16:13.340
<v Jan Čapek>strings that represent different messages like mining.submit or mining.subscribe.

00:16:13.640 --> 00:16:18.510
<v Jan Čapek>mining.submit is probably the most... frequently cited piece of text on the

00:16:18.510 --> 00:16:23.110
<v Jan Čapek>internet in my view because it's like terabytes and terabytes of these strings

00:16:23.110 --> 00:16:24.910
<v Jan Čapek>being sent like every second.

00:16:25.090 --> 00:16:28.410
<v Sjors Provoost>So mining.submit means like I'm here by sending a share.

00:16:28.650 --> 00:16:32.350
<v Jan Čapek>Yeah, it's me and mining.submit a bunch of stuff. That's not necessary. You can

00:16:32.350 --> 00:16:35.110
<v Jan Čapek>have one constant or use of standard protocol for this.

00:16:35.290 --> 00:16:36.890
<v Aaron van Wirdum>Why is this a problem specifically?

00:16:37.270 --> 00:16:37.950
<v Jan Čapek>Wasting bandwidth.

00:16:40.270 --> 00:16:45.190
<v Jan Čapek>So there are use cases where you want to be a bit bandwidth savvy. And it's not

00:16:45.190 --> 00:16:50.030
<v Jan Čapek>just about the bandwidth, but it takes additional time that eventually at the end

00:16:50.030 --> 00:16:53.490
<v Jan Čapek>of the day, what that can mean is that your share is going to be considered

00:16:53.490 --> 00:16:57.990
<v Jan Čapek>invalid just in case you'll be racing against a block that has been just found in

00:16:57.990 --> 00:17:03.190
<v Jan Čapek>the network. So every little piece of inefficiency counts towards

00:17:03.190 --> 00:17:06.430
<v Jan Čapek>you not mining as efficiently as you could.

00:17:06.550 --> 00:17:11.230
<v Sjors Provoost>Yeah, there's 600 seconds per block on average. yeah if you're wasting one second

00:17:11.230 --> 00:17:16.550
<v Sjors Provoost>you're wasting one six hundredth of your revenue pretty much so seconds matter

00:17:16.550 --> 00:17:18.030
<v Sjors Provoost>milliseconds matter

00:17:18.030 --> 00:17:21.290
<v Aaron van Wirdum>yeah and one thing you haven't mentioned oh by the way just to make this clear

00:17:21.290 --> 00:17:26.000
<v Aaron van Wirdum>it's always good to sort of break it down to the basics Stratum the people

00:17:26.000 --> 00:17:30.080
<v Aaron van Wirdum>running Stratum so it's the mining pool it has a server and then you mentioned

00:17:30.080 --> 00:17:34.120
<v Aaron van Wirdum>the actual miners or sometimes called hashers they have it on their machines and

00:17:34.120 --> 00:17:37.700
<v Aaron van Wirdum>these machines talk with the servers so they are using Stratum and what you

00:17:37.700 --> 00:17:41.940
<v Aaron van Wirdum>mentioned is that because it's not even strictly standardized sometimes they

00:17:41.940 --> 00:17:44.760
<v Aaron van Wirdum>don't really communicate well that's what you're saying right that's one of the

00:17:44.760 --> 00:17:45.500
<v Aaron van Wirdum>problems that

00:17:45.500 --> 00:17:49.480
<v Jan Čapek>that's that was that was one of the problems back in the day nowadays I don't

00:17:49.480 --> 00:17:54.580
<v Jan Čapek>remember a single issue because I mean Once the protocols got stabilized,

00:17:55.060 --> 00:17:59.400
<v Jan Čapek>I would say like everybody's kind of scared of touching it. So the manufacturers

00:17:59.400 --> 00:18:04.520
<v Jan Čapek>don't make any changes in the CGMiner code base for this. And the pools already

00:18:04.520 --> 00:18:08.600
<v Jan Čapek>have implemented all these hacks for all the different flavors of the firmware.

00:18:08.820 --> 00:18:13.240
<v Jan Čapek>So not too many issues arise now, but really back in the day, it wasn't a month

00:18:13.240 --> 00:18:16.540
<v Jan Čapek>where we would have to deal with some farm, like not being able to submit shares

00:18:16.540 --> 00:18:19.020
<v Jan Čapek>or something like this to accommodate for this.

00:18:19.160 --> 00:18:24.120
<v Sjors Provoost>You mentioned CGMiner. from what I remember that's the mining software that was

00:18:24.120 --> 00:18:29.840
<v Sjors Provoost>used on GPUs or even on CPUs and it was just shoved into ASICs and adjusted to

00:18:29.840 --> 00:18:31.400
<v Sjors Provoost>live inside an ASIC right

00:18:31.400 --> 00:18:36.620
<v Jan Čapek>maybe a description of like that residing in an ASIC is not very precise but yes

00:18:36.620 --> 00:18:42.310
<v Jan Čapek>so this was the This was and is still the mining software being used by

00:18:42.310 --> 00:18:45.910
<v Jan Čapek>most of the manufacturers. This is the software that they actually violate the

00:18:45.910 --> 00:18:46.690
<v Jan Čapek>GPL on.

00:18:46.850 --> 00:18:48.750
<v Sjors Provoost>I was going to say, because wasn't that open source?

00:18:48.970 --> 00:18:50.530
<v Jan Čapek>It is open source.

00:18:50.550 --> 00:18:56.550
<v Jan Čapek>Back in the day with Antminers S9s, Bitmain was still publishing the sources for CGMiners.

00:18:50.570 --> 00:18:51.190
<v Sjors Provoost>Or GPL even.

00:18:56.670 --> 00:19:00.750
<v Jan Čapek>So technically you could have put together your own firmware with like all the

00:19:00.750 --> 00:19:04.370
<v Jan Čapek>different bits and pieces, but it required quite a bit of skills. So it was not

00:19:04.370 --> 00:19:09.870
<v Jan Čapek>like... Git clone and just run some build. Because there are a few

00:19:09.870 --> 00:19:13.130
<v Jan Čapek>components to the firmware. It's not just the software because you have to think

00:19:13.130 --> 00:19:18.170
<v Jan Čapek>of the ASIC as a full computer. So it has a control board with a CPU that's

00:19:18.170 --> 00:19:21.850
<v Jan Čapek>driving these ASICs. There's an additional component between the ASICs, but I'm

00:19:21.850 --> 00:19:26.650
<v Jan Čapek>getting into too many details here. So it's a complex system. You can think of it

00:19:26.650 --> 00:19:30.450
<v Jan Čapek>as a full operating system image with a dedicated software for mining that is

00:19:30.450 --> 00:19:36.400
<v Jan Čapek>called CGMiner. Back in the day in 2019, we started developing our own for

00:19:36.400 --> 00:19:40.140
<v Jan Čapek>various reasons. One primary reason was that we wanted to be independent of the

00:19:40.140 --> 00:19:44.800
<v Jan Čapek>original CGMiner code base. We wanted to do in a modern programming language,

00:19:44.960 --> 00:19:49.640
<v Jan Čapek>which C is no longer considered to be the modern programming language. And last

00:19:49.640 --> 00:19:54.510
<v Jan Čapek>but not least... We wanted to have some kind of like business advantage or edge

00:19:54.510 --> 00:19:58.950
<v Jan Čapek>towards compared to our competition. So having something that has been fully

00:19:58.950 --> 00:20:04.090
<v Jan Čapek>built in-house from scratch, not violating any licenses, that's sort of where we

00:20:04.090 --> 00:20:04.730
<v Jan Čapek>were headed with that.

00:20:05.920 --> 00:20:10.520
<v Aaron van Wirdum>Okay. And also, so to take a small step back again, we just mentioned that the

00:20:10.520 --> 00:20:13.720
<v Aaron van Wirdum>mining pool is running Stratum and then the machines are running Stratum and

00:20:13.720 --> 00:20:14.760
<v Aaron van Wirdum>they're talking with each other.

00:20:16.320 --> 00:20:20.460
<v Aaron van Wirdum>Before we get lost in the details, so who does what exactly? I think Sjors kind

00:20:20.460 --> 00:20:24.040
<v Aaron van Wirdum>of explained this. Basically, the server does everything. The server constructs

00:20:24.040 --> 00:20:28.420
<v Aaron van Wirdum>the entire block, includes all the transactions, creates everything, except for

00:20:28.420 --> 00:20:32.980
<v Aaron van Wirdum>the nonce. So the whole thing is then sent to the machine, and the machine is

00:20:32.980 --> 00:20:35.700
<v Aaron van Wirdum>just trying different nonces until it finds a [unclear] block. Is that right?

00:20:35.940 --> 00:20:40.920
<v Jan Čapek>This is exactly how it works. A little bit more complicated fact is that there's

00:20:40.920 --> 00:20:43.900
<v Jan Čapek>not just the nonce, but there are additional fields in the block header that

00:20:43.900 --> 00:20:48.980
<v Jan Čapek>nowadays... Thanks to Stratum V1 extension to support ASICBoost. We don't want to

00:20:48.980 --> 00:20:52.840
<v Jan Čapek>get into the ASICBoost topic here. But it's an additional feature to make the

00:20:52.840 --> 00:20:57.180
<v Jan Čapek>machines run more efficiently. So they're iterating more fields in the block

00:20:57.180 --> 00:20:58.160
<v Jan Čapek>header than just the nonce.

00:20:58.200 --> 00:21:02.500
<v Sjors Provoost>Yeah, to just quickly explain what the problem is here. If you have a CPU and the

00:21:02.500 --> 00:21:05.060
<v Sjors Provoost>nonce field is, I think it was eight bytes or something.

00:21:05.300 --> 00:21:06.020
<v Jan Čapek>It's four bytes.

00:21:06.180 --> 00:21:10.300
<v Sjors Provoost>It's four bytes. So four bytes is not a lot of combinations. And so if you're

00:21:10.300 --> 00:21:14.160
<v Sjors Provoost>really fast, you can make more combinations. And then there's no point in trying

00:21:14.160 --> 00:21:17.400
<v Sjors Provoost>the same combinations again because you've already tried those. So you have to

00:21:17.400 --> 00:21:20.570
<v Sjors Provoost>change something else about the block. And one thing that changes every second is

00:21:20.570 --> 00:21:24.510
<v Sjors Provoost>the timestamp but you're still going to be too fast and so you want to change

00:21:24.510 --> 00:21:29.310
<v Sjors Provoost>some other fields in the header and even in the coinbase transaction in order to

00:21:29.310 --> 00:21:31.950
<v Sjors Provoost>keep up in order to try enough variation essentially.

00:21:31.950 --> 00:21:37.290
<v Aaron van Wirdum>Okay I'm gonna pull us back from the weeds again So one of the problems that we

00:21:37.290 --> 00:21:41.630
<v Aaron van Wirdum>haven't mentioned yet, you mentioned a couple of problems in efficiency and

00:21:41.630 --> 00:21:45.910
<v Aaron van Wirdum>non-standard protocol. One of the big problems, one of the ones that people are

00:21:45.910 --> 00:21:51.450
<v Aaron van Wirdum>talking about a lot, is potential censorship. So because the mining pool is doing

00:21:51.450 --> 00:21:55.590
<v Aaron van Wirdum>all the transaction selection, that means that the mining pool can potentially

00:21:55.590 --> 00:21:59.990
<v Aaron van Wirdum>make sure that some transactions don't make it into the block, right?

00:22:01.160 --> 00:22:05.680
<v Jan Čapek>That is correct. So if you want to talk about the new protocol, we tried

00:22:05.680 --> 00:22:11.000
<v Jan Čapek>addressing it by protocol or sub-protocol extension that we call job negotiation.

00:22:11.300 --> 00:22:17.000
<v Jan Čapek>And essentially what that means is that the miner is able to generate his own

00:22:17.000 --> 00:22:21.920
<v Jan Čapek>block template and he only negotiates in an asynchronous way. So essentially he

00:22:21.920 --> 00:22:25.740
<v Jan Čapek>generates a template and starts mining on it right away. And in the meantime, he

00:22:25.740 --> 00:22:29.540
<v Jan Čapek>can negotiate with the pool if the pool considers this template valid. Because

00:22:29.540 --> 00:22:35.450
<v Jan Čapek>let's say... a rogue miner who would try to attack the pool would generate

00:22:35.450 --> 00:22:40.490
<v Jan Čapek>a block template that would mine the coinbase into his own pocket. But obviously

00:22:40.490 --> 00:22:44.550
<v Jan Čapek>from the pool perspective, this is not a fair game. So even though he would be

00:22:44.550 --> 00:22:47.950
<v Jan Čapek>submitting the shares, eventually it would be reflected in the pool accounting as

00:22:47.950 --> 00:22:53.870
<v Jan Čapek>invalid by the time such template is created. But there is another reason, not

00:22:53.870 --> 00:22:58.010
<v Jan Čapek>just because of pool censorship. If we find out that some pools are doing

00:22:58.010 --> 00:23:01.990
<v Jan Čapek>censorship, you always have the option because there's more than just one or two

00:23:01.990 --> 00:23:06.130
<v Jan Čapek>pools in the world. You can switch over to another pool that would not be doing

00:23:06.130 --> 00:23:11.710
<v Jan Čapek>these. immoral things let's say but the protocol is trying to get ready for

00:23:11.710 --> 00:23:16.830
<v Jan Čapek>future in case we would have some kinds of regulations stepping in basically

00:23:16.830 --> 00:23:22.710
<v Jan Čapek>forcing the legal entities behind the pools who are running the pool services to

00:23:22.710 --> 00:23:27.770
<v Jan Čapek>not select the transactions like let's say it would become illegal it would be it

00:23:27.770 --> 00:23:32.810
<v Jan Čapek>would require like additional certification or whatever regulations knowing the

00:23:32.810 --> 00:23:37.470
<v Jan Čapek>customers whatever And in that case, the pool would say we're just providing a

00:23:37.470 --> 00:23:42.110
<v Jan Čapek>data service and leaving the responsibility, even like the legal responsibility,

00:23:42.330 --> 00:23:45.830
<v Jan Čapek>up to the miners. It would be their choice. If they want to mine with this

00:23:45.830 --> 00:23:49.850
<v Jan Čapek>particular pool, they have to choose their own transactions. And we would just do

00:23:49.850 --> 00:23:55.830
<v Jan Čapek>the validation that the block itself is valid, but not giving them the full

00:23:55.830 --> 00:23:58.510
<v Jan Čapek>templates. So this is sort of like getting ready for the future.

00:23:59.450 --> 00:24:01.730
<v Sjors Provoost>So I hear there are some tokens involved here.

00:24:03.450 --> 00:24:07.270
<v Sjors Provoost>But I'll explain it, I guess. So the idea is that when you propose a template to

00:24:07.270 --> 00:24:12.350
<v Sjors Provoost>the pool and they approve it, then you get a token that basically proves that

00:24:12.350 --> 00:24:15.350
<v Sjors Provoost>they approved your template. And my understanding is the point there is that

00:24:15.350 --> 00:24:19.240
<v Sjors Provoost>eventually you're going to get paid for the shares you submitted. And so the only

00:24:19.240 --> 00:24:23.480
<v Sjors Provoost>way the pool can enforce that you don't create a block that they don't like is by

00:24:23.480 --> 00:24:28.960
<v Sjors Provoost>not paying your shares and vice versa. If your thing was approved, then you

00:24:28.960 --> 00:24:32.740
<v Sjors Provoost>should be getting paid for that. So then if they're somehow not paying you out,

00:24:32.880 --> 00:24:35.560
<v Sjors Provoost>even though they approved your share, you have a little signed message saying,

00:24:35.620 --> 00:24:40.120
<v Sjors Provoost>hey, the pool approved this template and they didn't pay me. So you can make some

00:24:40.120 --> 00:24:40.820
<v Sjors Provoost>noise about it.

00:24:41.580 --> 00:24:44.360
<v Aaron van Wirdum>So you can prove it to other miners and they will leave the pool. That's the idea?

00:24:45.650 --> 00:24:51.410
<v Jan Čapek>That's also the case. I mean, like the actual business scenario or the

00:24:51.410 --> 00:24:57.410
<v Jan Čapek>full process is not prescribed by the protocol. The actual policy is to

00:24:57.410 --> 00:25:00.910
<v Jan Čapek>be set between the miner or terms and conditions or business terms and conditions

00:25:00.910 --> 00:25:04.130
<v Jan Čapek>are to be specified between the miner and the pool.

00:25:04.720 --> 00:25:05.160
<v Aaron van Wirdum>Right.

00:25:05.300 --> 00:25:08.860
<v Sjors Provoost>So this is one way you could use it, but the protocol doesn't care how you use it.

00:25:08.860 --> 00:25:13.260
<v Jan Čapek>No, not really. There's more complicated stuff associated with that. And that

00:25:13.260 --> 00:25:17.220
<v Jan Čapek>relates to the fact like how you want to do the accounting. Because let's say you

00:25:17.220 --> 00:25:22.200
<v Jan Čapek>would be a miner who would be in favor of empty blocks as an extreme example. But

00:25:22.200 --> 00:25:27.170
<v Jan Čapek>that's probably the one that's really on the left side. But this can happen. Such

00:25:27.170 --> 00:25:32.990
<v Jan Čapek>a miner, if it's a major player on the pool, is essentially lowering the rewards

00:25:32.990 --> 00:25:38.470
<v Jan Čapek>for everybody else because the rewards are split in a proportional way.

00:25:38.650 --> 00:25:44.210
<v Jan Čapek>So there is no reason for somebody in the game to systematically

00:25:44.210 --> 00:25:48.690
<v Jan Čapek>lower the rewards for anybody else unless he has some special incentives. So that

00:25:48.690 --> 00:25:52.650
<v Jan Čapek>means the pool has to reflect this in their accounting and also depreciate the

00:25:52.650 --> 00:25:56.670
<v Jan Čapek>value of the shares that you're submitting because you're... for whatever reason

00:25:56.670 --> 00:26:00.530
<v Jan Čapek>you have a motivation you have you're submitting something that eventually ends

00:26:00.530 --> 00:26:05.510
<v Jan Čapek>to or leads to a block that would be less valuable than your your neighboring

00:26:05.510 --> 00:26:07.070
<v Jan Čapek>miners with uh...

00:26:07.070 --> 00:26:10.390
<v Sjors Provoost>so if somebody submits a template that has very few transactions in this…

00:26:10.390 --> 00:26:12.650
<v Jan Čapek>[unclear] zero as as a good example.

00:26:12.650 --> 00:26:16.050
<v Sjors Provoost>Yeah so you don't necessarily have to reject it you just say well okay, that's

00:26:16.050 --> 00:26:17.530
<v Sjors Provoost>fine but your shares are gonna be worth less.

00:26:17.530 --> 00:26:21.730
<v Jan Čapek>Now, not worth less but less. that's gonna be worth less yeah

00:26:23.400 --> 00:26:27.800
<v Aaron van Wirdum>Okay, so we've been jumping a little bit between V1 and V2, which is fine, but I

00:26:27.800 --> 00:26:32.420
<v Aaron van Wirdum>do want to clarify. So yeah, the difference was that miners used to construct the

00:26:32.420 --> 00:26:36.940
<v Aaron van Wirdum>whole block with all transactions. No, sorry, the pools did. And then the miners,

00:26:37.120 --> 00:26:41.720
<v Aaron van Wirdum>the hashers, the machines just made an answer. And then with V2, now the machines

00:26:41.720 --> 00:26:43.860
<v Aaron van Wirdum>can do that. But it's optional, right?

00:26:43.860 --> 00:26:49.300
<v Jan Čapek>It's an optional feature of the protocol to be implemented by the pools. And on

00:26:49.300 --> 00:26:52.500
<v Jan Čapek>the miner side, it requires running additional piece of infrastructure as well.

00:26:52.850 --> 00:26:56.790
<v Aaron van Wirdum>Right. Was this the main motivation for creating V2?

00:26:57.390 --> 00:27:02.310
<v Jan Čapek>The main motivation for creating V2, from my perspective or from our perspective

00:27:02.310 --> 00:27:06.390
<v Jan Čapek>as Braiins, was that we want to solve our own problem. And the problem was that

00:27:06.390 --> 00:27:11.150
<v Jan Čapek>we developed the mining firmware back in the day. And when we wanted to have the

00:27:11.150 --> 00:27:16.110
<v Jan Čapek>commercial extension, our business model was that we were collecting part of the

00:27:16.110 --> 00:27:21.920
<v Jan Čapek>hash rate in form of a fee, right? Like 2.5% was the fee. But there was no secure

00:27:21.920 --> 00:27:26.920
<v Jan Čapek>way how to ship this hashrate to our endpoints. So we looked at the current

00:27:26.920 --> 00:27:30.840
<v Jan Čapek>protocol and we're like, this is not usable. Even if you build TLS on top of it

00:27:30.840 --> 00:27:34.220
<v Jan Čapek>or whatever, it just doesn't make sense. It doesn't have standard and anything.

00:27:34.380 --> 00:27:39.240
<v Jan Čapek>So we just sat down and came up with a draft of a protocol that would address

00:27:39.240 --> 00:27:43.720
<v Jan Čapek>these three aspects, not speaking of the job negotiation, because that was not

00:27:43.720 --> 00:27:46.380
<v Jan Čapek>the use case that we really shoot it for primarily.

00:27:46.820 --> 00:27:49.520
<v Aaron van Wirdum>So job negotiations is what we just discussed?

00:27:49.710 --> 00:27:54.190
<v Jan Čapek>Yes, this is what we just discussed. But we wanted to address the security of the

00:27:54.190 --> 00:27:58.570
<v Jan Čapek>protocol. So no more plain text. Everything has to be encrypted and signed.

00:27:58.790 --> 00:28:02.370
<v Sjors Provoost>So there's two aspects to being plain text, right? Writing everything out loud

00:28:02.370 --> 00:28:06.570
<v Sjors Provoost>like a JSON file rather than binary. One is that it is just inefficient. And the

00:28:06.570 --> 00:28:11.350
<v Sjors Provoost>other is that it is incredibly insecure because anybody who is in the middle of

00:28:11.350 --> 00:28:13.630
<v Sjors Provoost>that connection can just completely change it.

00:28:13.790 --> 00:28:15.950
<v Jan Čapek>steal a little bit of the hash rate without you noticing.

00:28:16.230 --> 00:28:20.950
<v Sjors Provoost>And one of the things you explained in your Prague Pizza Day talk was that there

00:28:20.950 --> 00:28:26.670
<v Sjors Provoost>is, or maybe, really are, I think, viruses that run on routers. And

00:28:26.670 --> 00:28:27.330
<v Sjors Provoost>they will...

00:28:27.330 --> 00:28:28.050
<v Jan Čapek>They detect the [unclear].

00:28:28.070 --> 00:28:30.950
<v Sjors Provoost>They detect that it's because they hear the word, you know, Bitcoin share, the

00:28:30.950 --> 00:28:31.730
<v Sjors Provoost>most frequent...

00:28:31.730 --> 00:28:32.510
<v Jan Čapek>What was it? mining.submit.

00:28:33.050 --> 00:28:36.550
<v Sjors Provoost>mining.submit, the most common word on the internet. As soon as the router hears

00:28:36.550 --> 00:28:41.100
<v Sjors Provoost>that word, it's like, oh, you know what? I'm going to take 1% of... of when I see

00:28:41.100 --> 00:28:44.120
<v Sjors Provoost>the submissions I'm going to change the pool or I'm going to change the username

00:28:44.120 --> 00:28:48.960
<v Sjors Provoost>for the pool to me to the attacker basically and not all of it because that will

00:28:48.960 --> 00:28:52.480
<v Sjors Provoost>be obvious but just just one percent and then you would just infect a bunch of

00:28:52.480 --> 00:28:55.840
<v Sjors Provoost>routers near mining farms and you will be sucking up one percent of the hash

00:28:55.840 --> 00:28:59.340
<v Sjors Provoost>power and people might not even notice it because there is a lot of variation

00:28:59.340 --> 00:29:00.680
<v Sjors Provoost>between efficiency

00:29:00.680 --> 00:29:03.380
<v Aaron van Wirdum>So but isn't the coinbase embedded in the block?

00:29:03.380 --> 00:29:07.660
<v Sjors Provoost>Not the coinbase. so when you submit a share you have to send it to some place on

00:29:07.660 --> 00:29:11.030
<v Sjors Provoost>the internet namely the pool, the IP address of the pool, and you have to tell

00:29:11.030 --> 00:29:15.390
<v Sjors Provoost>the pool which user it goes to. So if you put your own username there, it gets

00:29:15.390 --> 00:29:19.370
<v Sjors Provoost>accredited to you. But if you put Dimitri the attacker as a username, then it

00:29:19.370 --> 00:29:20.310
<v Sjors Provoost>goes to the attacker.

00:29:20.510 --> 00:29:20.910
<v Aaron van Wirdum>Got it.

00:29:21.450 --> 00:29:27.410
<v Jan Čapek>and it I mean even even more sophisticated than that the the the virus can create

00:29:27.410 --> 00:29:30.810
<v Jan Čapek>connection to a different pool and just sort of like load balance between the

00:29:30.810 --> 00:29:35.330
<v Jan Čapek>connections like giving you 90 99 percent of the jobs coming from your primary

00:29:35.330 --> 00:29:40.410
<v Jan Čapek>pool and then the rest of the jobs from from his pool he doesn't even have to

00:29:40.410 --> 00:29:43.350
<v Sjors Provoost>he doesn't have to use the same pool right okay

00:29:44.280 --> 00:29:49.980
<v Aaron van Wirdum>so that's Let me get the mic. Okay, so we mentioned what we call job selection,

00:29:50.120 --> 00:29:53.940
<v Aaron van Wirdum>apparently, with transaction selection. And now you mentioned security. And is

00:29:53.940 --> 00:29:55.120
<v Aaron van Wirdum>there another benefit to V2?

00:29:55.930 --> 00:30:00.270
<v Jan Čapek>Last bit that we wanted to address was the efficiency of the protocol. So going

00:30:00.270 --> 00:30:05.990
<v Jan Čapek>away from the text-based protocol to a binary format reduced the bandwidth. And

00:30:05.990 --> 00:30:11.310
<v Jan Čapek>there was another two points to improve the efficiency. One of them being... The

00:30:11.310 --> 00:30:14.710
<v Jan Čapek>original protocol, when you get a new job, you don't get like the full block

00:30:14.710 --> 00:30:18.370
<v Jan Čapek>template, but you get, let's say the block header and what we call a Merkle

00:30:18.370 --> 00:30:24.290
<v Jan Čapek>branch. So essentially, let's say a chain of hashes of transactions, if you

00:30:24.290 --> 00:30:29.350
<v Jan Čapek>think of a list of transactions, if you organize it in a tree, and then the miner

00:30:29.350 --> 00:30:34.510
<v Jan Čapek>has to generate the actual Merkle root and the full block template and then start

00:30:34.510 --> 00:30:40.200
<v Jan Čapek>iterating the nonce. But whenever the miner submits this result, pool has to redo

00:30:40.200 --> 00:30:45.600
<v Jan Čapek>exactly the same thing because it doesn't know what additional data the miner

00:30:45.600 --> 00:30:47.620
<v Jan Čapek>actually injected into the block.

00:30:47.820 --> 00:30:50.500
<v Sjors Provoost>I guess we need to explain a little bit what a block looks like. So you have the

00:30:50.500 --> 00:30:54.160
<v Sjors Provoost>header and then you have, I think it's something called the Merkle root. That's a

00:30:54.160 --> 00:30:58.600
<v Sjors Provoost>field. And that says like, this is the Merkle tree of all the transactions that

00:30:58.600 --> 00:30:59.200
<v Sjors Provoost>are in the block.

00:30:59.420 --> 00:30:59.680
<v Jan Čapek>Right.

00:30:59.840 --> 00:31:02.340
<v Sjors Provoost>And then part of that Merkle tree is the coinbase transaction.

00:31:02.740 --> 00:31:02.880
<v Jan Čapek>Yep.

00:31:03.000 --> 00:31:06.870
<v Sjors Provoost>And that's the thing that miners tend to vary a bit to. you know, to get some

00:31:06.870 --> 00:31:11.730
<v Sjors Provoost>extra search space. But once you added the coinbase transaction, you then have to

00:31:11.730 --> 00:31:16.590
<v Sjors Provoost>calculate the new Merkle root. And that means if it's like, if the tree is 10

00:31:16.590 --> 00:31:21.570
<v Sjors Provoost>levels high, then you have to do like 10 hashes. in order to update the Merkle

00:31:21.570 --> 00:31:22.050
<v Sjors Provoost>tree again.

00:31:22.290 --> 00:31:26.830
<v Jan Čapek>Yeah, pretty much that is the case. And this is additional computing power on the

00:31:26.830 --> 00:31:31.070
<v Jan Čapek>server and of the pool to verify that the job is valid because he has to redo

00:31:31.070 --> 00:31:36.630
<v Jan Čapek>this Merkle calculation completely. So we have added a variant for mining,

00:31:36.930 --> 00:31:42.340
<v Jan Čapek>which is... let's say the default it scales up to something like 280

00:31:42.340 --> 00:31:44.800
<v Jan Čapek>terahash machines where you're given…

00:31:44.800 --> 00:31:48.620
<v Sjors Provoost>which is about two times the speed of the current the current best.

00:31:48.620 --> 00:31:51.660
<v Jan Čapek>I think the hydros are now at like 250 but

00:31:51.660 --> 00:31:53.900
<v Sjors Provoost>okay, so they're now apparently we're getting close.

00:31:53.900 --> 00:31:58.080
<v Jan Čapek>Yeah but like I said it's it's an optional but very preferable way for for the

00:31:58.080 --> 00:32:01.920
<v Jan Čapek>machines it's important to realize that by the time we have been preparing this

00:32:01.920 --> 00:32:07.740
<v Jan Čapek>spec the hash rate was nowhere near this it was still like S9s you know something

00:32:07.740 --> 00:32:13.280
<v Jan Čapek>like 20 terahash 30 terahash coming so this was the inefficiency that that we

00:32:13.280 --> 00:32:18.860
<v Jan Čapek>wanted to address and last one kind of quite often cited in the public is the the

00:32:18.860 --> 00:32:22.760
<v Jan Čapek>issue with the with the empty blocks I personally don't don't consider empty

00:32:22.760 --> 00:32:26.760
<v Jan Čapek>blocks as a problem but there is still a way to make it a little bit more

00:32:26.760 --> 00:32:32.340
<v Jan Čapek>efficient and that is the new protocol is actually able to send the miner a

00:32:32.340 --> 00:32:33.940
<v Jan Čapek>speculative block template that...

00:32:33.940 --> 00:32:35.720
<v Aaron van Wirdum>Wait, wait. Why are there empty blocks?

00:32:36.000 --> 00:32:40.160
<v Jan Čapek>Why are there empty blocks? Okay, that's a good question. When a miner is

00:32:40.160 --> 00:32:45.520
<v Jan Čapek>submitting a job and a new block is found in the meantime in the network,

00:32:45.820 --> 00:32:51.660
<v Jan Čapek>this share is considered invalid and the pool has to immediately serve him a new

00:32:51.660 --> 00:32:56.040
<v Jan Čapek>job. But the problem is that it takes seconds to generate a full block template

00:32:56.040 --> 00:33:00.800
<v Jan Čapek>by the pool. That's just given by the fact that the new block basically

00:33:00.800 --> 00:33:04.580
<v Jan Čapek>determines this is what the transaction history looks like now. You have to

00:33:04.580 --> 00:33:09.580
<v Jan Čapek>adjust your mempool, you have to dig out all the important transactions from the

00:33:09.580 --> 00:33:13.460
<v Jan Čapek>pool. That's what the Bitcoin Core is doing. And then eventually you end up with

00:33:13.460 --> 00:33:18.420
<v Jan Čapek>a Bitcoin block template. And this takes literally like seconds. And you cannot

00:33:18.420 --> 00:33:22.300
<v Jan Čapek>stop the mining machines for seconds and tell them like, oh, wait, I'm going to

00:33:22.300 --> 00:33:26.060
<v Jan Čapek>give you block, but just wait a second. Because there are machines that are

00:33:26.060 --> 00:33:29.520
<v Jan Čapek>running and rolling the nonces and they have to, sort of like a racing engine,

00:33:29.700 --> 00:33:32.120
<v Jan Čapek>you have to keep it busy all the time. You cannot stop it.

00:33:32.300 --> 00:33:36.480
<v Sjors Provoost>Also, you just don't want to waste those seconds, right? Because it's revenue.

00:33:36.940 --> 00:33:41.880
<v Jan Čapek>Right. First, it's the revenue. Second, if you wasted them putting aside revenue,

00:33:41.880 --> 00:33:44.960
<v Jan Čapek>it actually costs you money because you're burning the electricity for nothing.

00:33:45.220 --> 00:33:50.980
<v Jan Čapek>So it's important for the machines to have a valid job as much as

00:33:50.980 --> 00:33:56.400
<v Jan Čapek>biggest part of the time as possible. And this is exactly the point where when

00:33:56.400 --> 00:34:00.200
<v Jan Čapek>the pool notices that there's a new block in the network found, it immediately

00:34:00.200 --> 00:34:05.380
<v Jan Čapek>serves empty block templates to all its miners. as an immediate update to flush

00:34:05.380 --> 00:34:09.860
<v Jan Čapek>all their jobs from from their pipelines and start hashing on this because it is

00:34:09.860 --> 00:34:14.420
<v Jan Čapek>[unclear] from from miner revenue perspective you or from from like the global

00:34:14.420 --> 00:34:17.860
<v Jan Čapek>Bitcoin network perspective because we're not wasting this electricity we're

00:34:17.860 --> 00:34:23.680
<v Jan Čapek>creating some value even though somebody can speak up to this saying oh but what

00:34:23.680 --> 00:34:27.400
<v Jan Čapek>is the value when when the block is empty you didn't create any transactions or

00:34:27.400 --> 00:34:31.410
<v Jan Čapek>you didn't put any transactions into it but that's not that's not That's not the

00:34:31.410 --> 00:34:36.090
<v Jan Čapek>problem because you simply don't want to have this electricity going down the

00:34:36.090 --> 00:34:39.750
<v Jan Čapek>drain just because you're not able to provide them a meaningful work. So this is

00:34:39.750 --> 00:34:42.430
<v Jan Čapek>what's happening now. And in the meantime...

00:34:42.590 --> 00:34:46.610
<v Aaron van Wirdum>Yeah, to clarify, so the only way to make sure that you're not creating an

00:34:46.610 --> 00:34:50.170
<v Aaron van Wirdum>invalid block is creating an empty block. That's the only way you're sure you're

00:34:50.170 --> 00:34:54.030
<v Aaron van Wirdum>not creating a block that includes a double spend, right? That's the idea, essentially.

00:34:54.870 --> 00:35:00.630
<v Jan Čapek>Yeah, that is correct. But with the new protocol, what we try to address is

00:35:00.630 --> 00:35:05.070
<v Jan Čapek>that if you look at the mempool and the set of transactions, you can say there

00:35:05.070 --> 00:35:09.410
<v Jan Čapek>could be a set of transactions somewhere in the second half of the mempool that

00:35:09.410 --> 00:35:13.290
<v Jan Čapek>are not going to make it into the present block. But you can still speculatively

00:35:13.290 --> 00:35:16.610
<v Jan Čapek>prepare a template because you have plenty of time for this. And this is

00:35:16.610 --> 00:35:19.870
<v Jan Čapek>something that you can distribute to the miners. And the moment a new block is

00:35:19.870 --> 00:35:24.630
<v Jan Čapek>found in the network, you are in parallel producing a new template, that's for

00:35:24.630 --> 00:35:28.490
<v Jan Čapek>sure. That's the number one activity that the pool is doing. But in the meantime,

00:35:28.990 --> 00:35:33.330
<v Jan Čapek>instead of serving the empty block, the pool can very quickly verify that the

00:35:33.330 --> 00:35:38.670
<v Jan Čapek>template that it has distributed to the miners some time ago is still valid. And

00:35:38.670 --> 00:35:44.530
<v Jan Čapek>the pool will just tell the miners, please use the template that I sent you

00:35:44.530 --> 00:35:49.250
<v Jan Čapek>five seconds ago with some ID, whatever. And then that's the moment where it

00:35:49.250 --> 00:35:53.350
<v Jan Čapek>becomes more efficient and we are lowering the probability of empty block being

00:35:53.350 --> 00:35:58.370
<v Jan Čapek>found. What hasn't been said yet is that the fact that the miners are given empty

00:35:58.370 --> 00:36:01.570
<v Jan Čapek>block template doesn't mean that we're going to have immediately an empty block.

00:36:01.730 --> 00:36:05.990
<v Jan Čapek>There's some certain probability to find the block given by the Poisson

00:36:05.990 --> 00:36:11.910
<v Jan Čapek>distribution. That's like the statistics behind Bitcoin mining, because finding

00:36:11.910 --> 00:36:15.830
<v Jan Čapek>the blocks sort of follows the Poisson distribution. So in the meantime, most

00:36:15.830 --> 00:36:19.930
<v Jan Čapek>probably the pool will still generate the new template and will distribute it to

00:36:19.930 --> 00:36:25.810
<v Jan Čapek>the miners the moment it has it. But this is as another mechanism to make, let's

00:36:25.810 --> 00:36:27.550
<v Jan Čapek>say, this situation better.

00:36:27.730 --> 00:36:31.390
<v Sjors Provoost>So I guess then if you look at it as a time lapse, so before a new block is

00:36:31.390 --> 00:36:36.730
<v Sjors Provoost>found, the pool is already constructing some potential speculative future blocks,

00:36:36.730 --> 00:36:40.640
<v Sjors Provoost>saying, well, probably this will be the next block. And it will give it to the

00:36:40.640 --> 00:36:44.260
<v Sjors Provoost>miner saying, hey, hold on to this thing somewhere in your memory. And then

00:36:44.260 --> 00:36:47.420
<v Sjors Provoost>presumably it will also give an empty block to the miner saying, hold this

00:36:47.420 --> 00:36:50.800
<v Sjors Provoost>somewhere else in your memory. And then when the new block is found, I guess the

00:36:50.800 --> 00:36:54.360
<v Sjors Provoost>first thing it will tell the miners is, hey, start mining the empty block because

00:36:54.360 --> 00:36:58.780
<v Sjors Provoost>I still need to do some checks. Because some evil other pool could say, hey, I

00:36:58.780 --> 00:37:01.620
<v Sjors Provoost>know these guys are using the second half of the mempool, so I'm going to

00:37:01.620 --> 00:37:05.700
<v Sjors Provoost>deliberately put unexpected transactions in my block so that their speculative

00:37:05.700 --> 00:37:10.510
<v Sjors Provoost>block is invalid. And then once the pool has checked that there was no

00:37:10.510 --> 00:37:14.330
<v Sjors Provoost>shenanigans so that the template is valid, it says, okay, now please use this

00:37:14.330 --> 00:37:17.970
<v Sjors Provoost>other template I sent you. And this way the miners can always be busy because

00:37:17.970 --> 00:37:22.190
<v Sjors Provoost>they don't like doing nothing and it'd be wasteful to do nothing. So I guess,

00:37:22.370 --> 00:37:26.570
<v Sjors Provoost>yeah, I guess first they will just be mining the original block. Because there is

00:37:26.570 --> 00:37:29.670
<v Sjors Provoost>some time that you don't even know there's a new block. Then they mine an empty

00:37:29.670 --> 00:37:33.910
<v Sjors Provoost>block. And then very quickly afterwards, they mine the speculative template. And

00:37:33.910 --> 00:37:38.330
<v Sjors Provoost>then when Bitcoin Core is doing its three-second slow job, it says, here's an

00:37:38.330 --> 00:37:42.230
<v Sjors Provoost>actual block that you should be working on. That's the adventure in the space of

00:37:42.230 --> 00:37:42.730
<v Sjors Provoost>a few seconds.

00:37:42.970 --> 00:37:48.110
<v Aaron van Wirdum>Can I simplify this and then you correct me if I'm saying it wrong? So let's say

00:37:48.110 --> 00:37:53.030
<v Aaron van Wirdum>there's 5,000 transactions in a mempool. I'm obviously picking a dumb number.

00:37:54.890 --> 00:37:58.890
<v Aaron van Wirdum>there's, let's say, 1,000 transactions per block. Then what this protocol would

00:37:58.890 --> 00:38:02.870
<v Aaron van Wirdum>do, you're first mining the first 1,000, but then the speculative one would be

00:38:02.870 --> 00:38:07.350
<v Aaron van Wirdum>transactions 2,000 to 3,000, or maybe 3,000 to 4,000 to be sure. And that would

00:38:07.350 --> 00:38:13.190
<v Aaron van Wirdum>be, so usually another rational miner would pick the first 1,000. So therefore,

00:38:13.490 --> 00:38:18.650
<v Aaron van Wirdum>if you're going for 2,000 to 3,000 afterwards, then that should be fine. That's

00:38:18.650 --> 00:38:20.910
<v Aaron van Wirdum>the idea in a very simplified version.

00:38:21.510 --> 00:38:23.590
<v Jan Čapek>Yeah, I think you summarized it really well.

00:38:23.810 --> 00:38:24.150
<v Aaron van Wirdum>Okay.

00:38:26.750 --> 00:38:32.290
<v Aaron van Wirdum>What are the problems? Are we done now? Has mining now been solved, Jan?

00:38:32.690 --> 00:38:37.510
<v Aaron van Wirdum>First, before I ask this, did we cover Stratum V2 sufficiently? Is there anything

00:38:37.510 --> 00:38:39.090
<v Aaron van Wirdum>else you think we should add?

00:38:40.230 --> 00:38:42.030
<v Sjors Provoost>I think we've got everything, but you have the summary.

00:38:42.250 --> 00:38:45.830
<v Aaron van Wirdum>I mean, I have a summary. So yeah, what we mentioned is the transaction selection

00:38:45.830 --> 00:38:51.270
<v Aaron van Wirdum>is moved to miners, or at least optionally. It's more secure, it's encrypted,

00:38:51.710 --> 00:38:56.610
<v Aaron van Wirdum>it's authenticated. And then what we just discussed is the efficiency, which has

00:38:56.610 --> 00:39:01.170
<v Aaron van Wirdum>different aspects to it. And that would cover it, right?

00:39:01.490 --> 00:39:02.230
<v Jan Čapek>I would say so.

00:39:02.310 --> 00:39:03.310
<v Aaron van Wirdum>Okay, so is mining solved?

00:39:05.030 --> 00:39:09.630
<v Jan Čapek>I would say for the time being with the protocol, it's solved. We're still kind

00:39:09.630 --> 00:39:15.090
<v Jan Čapek>of waiting when it would be the moment when manufacturers will adapt it. But at

00:39:15.090 --> 00:39:19.590
<v Jan Čapek>the same time for us, it's a business advantage that we support the Stratum V2

00:39:19.590 --> 00:39:24.330
<v Jan Čapek>protocol natively in the firmware. And no other firmwares as of now support it.

00:39:24.410 --> 00:39:28.630
<v Jan Čapek>It looks like some aftermarket firmwares are going to adapt it eventually. And

00:39:28.630 --> 00:39:32.510
<v Jan Čapek>then the same thing is going to happen on the pool end. Especially thanks to the

00:39:32.510 --> 00:39:38.070
<v Jan Čapek>open source initiative that's now really agile and active behind the Stratum V2

00:39:38.070 --> 00:39:42.450
<v Jan Čapek>protocol that we originally provided. The draft of the specification there are

00:39:42.450 --> 00:39:47.720
<v Jan Čapek>actively discussing with the guys like what should be the final form. And in the

00:39:47.720 --> 00:39:51.800
<v Jan Čapek>meantime, we've been like actively using the protocol for, for, for years without

00:39:51.800 --> 00:39:54.000
<v Jan Čapek>too many changes, let's say.

00:39:54.260 --> 00:39:57.520
<v Sjors Provoost>And there's some other good news because this, you know, switching to a new

00:39:57.520 --> 00:40:01.280
<v Sjors Provoost>protocol brings us a bit of a chicken egg problem. Like you want all the

00:40:01.280 --> 00:40:04.820
<v Sjors Provoost>firmware, you want all the nodes of all the pools to start supporting it. You

00:40:04.820 --> 00:40:07.980
<v Sjors Provoost>want all the miners to start using it in their firmware, but maybe they don't

00:40:07.980 --> 00:40:11.300
<v Sjors Provoost>want to do that unless everybody else is doing it. So there's something called

00:40:11.300 --> 00:40:16.840
<v Sjors Provoost>the proxy or translator. I mean, which will take a V1 old school

00:40:16.840 --> 00:40:22.020
<v Sjors Provoost>Stratum miner and we'll just translate we'll just pretend to be a V1 pool and

00:40:22.020 --> 00:40:25.880
<v Sjors Provoost>then it will translate to the V2 pool so you do not have to update firmware for the miner.

00:40:26.380 --> 00:40:31.520
<v Jan Čapek>That's correct. And if you assume basic network level security in your facility,

00:40:31.540 --> 00:40:37.180
<v Jan Čapek>so let's say nobody tapped into your local network and when you're running all

00:40:37.180 --> 00:40:42.700
<v Jan Čapek>the hashrate through your proxy that eventually is able to aggregate this

00:40:42.700 --> 00:40:47.620
<v Jan Čapek>hashrate into a couple of Stratum V2 connections, you're pretty much safe because

00:40:47.620 --> 00:40:52.420
<v Jan Čapek>there's no easy way on the way up to the pool that somebody could tamper with the

00:40:52.420 --> 00:40:58.270
<v Jan Čapek>hashrate. Which even like... I can think of like conspiratory scenarios where

00:40:58.270 --> 00:41:04.090
<v Jan Čapek>with Stratum V1, somebody could be attacking even the BGP routers. So

00:41:04.090 --> 00:41:09.030
<v Jan Čapek>it's not even in your network or like your end router, but it could happen on the

00:41:09.030 --> 00:41:13.810
<v Jan Čapek>way. I'm not saying it's happening, but like technically anybody like these three

00:41:13.810 --> 00:41:19.430
<v Jan Čapek>letter agencies, that's an interesting data because from the hashrate, you can

00:41:19.430 --> 00:41:25.150
<v Jan Čapek>actually extrapolate quite a few things. Like you can estimate what what the

00:41:25.150 --> 00:41:29.710
<v Jan Čapek>size of the facility that's mining actually is, and all these kind of interesting

00:41:29.710 --> 00:41:34.650
<v Jan Čapek>things that could be found on the way just because of the fact that the traffic

00:41:34.650 --> 00:41:36.050
<v Jan Čapek>is plaintext, unencrypted.

00:41:36.090 --> 00:41:40.790
<v Sjors Provoost>So that's a privacy aspect there. So by encrypting the traffic, you also hide how

00:41:40.790 --> 00:41:41.570
<v Sjors Provoost>many shares there are.

00:41:41.830 --> 00:41:45.390
<v Jan Čapek>Exactly, you're hiding your hash rate. It's only the pool knowing who's

00:41:45.390 --> 00:41:45.850
<v Jan Čapek>connecting.

00:41:46.070 --> 00:41:49.730
<v Sjors Provoost>And I guess one reason why you're really hiding it is because the hash rate is

00:41:49.730 --> 00:41:53.500
<v Sjors Provoost>adjusted based on getting a certain number of shares per second. So because

00:41:53.500 --> 00:41:58.980
<v Sjors Provoost>otherwise, if you're sending a share every so many

00:41:58.980 --> 00:42:03.140
<v Sjors Provoost>difficulty units, then you can still see how much traffic there is and you can

00:42:03.140 --> 00:42:06.080
<v Sjors Provoost>still figure out how big the pool is. But that's not actually interesting now

00:42:06.080 --> 00:42:10.800
<v Sjors Provoost>because the difficulty is adjusted for each miner. So a giant pool will send one

00:42:10.800 --> 00:42:15.620
<v Sjors Provoost>share every second and one little CPU will also send one share every second. So

00:42:15.620 --> 00:42:18.460
<v Sjors Provoost>then the NSA cannot tell based on…

00:42:18.460 --> 00:42:22.480
<v Jan Čapek>Exactly, you can you can because the pace is given by the pool not by the miner

00:42:22.480 --> 00:42:27.680
<v Jan Čapek>and you cannot draw any conclusion from just seeing I mean you can statistically

00:42:27.680 --> 00:42:32.890
<v Jan Čapek>say like which encrypted messages are most probably the shares but you don't know

00:42:32.890 --> 00:42:37.230
<v Jan Čapek>what's inside. So you're missing the fundamental piece of information, which is

00:42:37.230 --> 00:42:40.870
<v Jan Čapek>the difficulty. So that's the value of the share. And then you cannot extrapolate

00:42:40.870 --> 00:42:42.010
<v Jan Čapek>how big the operation is.

00:42:42.010 --> 00:42:45.510
<v Sjors Provoost>So now the spy agencies have to hire a little bit more staff so that they can

00:42:45.510 --> 00:42:49.770
<v Sjors Provoost>look at the electricity use near those IP addresses where the pools are from, and

00:42:49.770 --> 00:42:50.630
<v Sjors Provoost>they can still figure it out.

00:42:51.070 --> 00:42:53.370
<v Jan Čapek>Sure. Well, that's an extra effort.

00:42:53.610 --> 00:42:53.990
<v Sjors Provoost>Exactly.

00:42:55.520 --> 00:42:59.720
<v Aaron van Wirdum>Okay. I do want to mention two things that Pavlenex mentioned in his presentation

00:42:59.720 --> 00:43:01.900
<v Aaron van Wirdum>yesterday. So two problems that are not…

00:43:02.180 --> 00:43:03.800
<v Sjors Provoost>At BTC Prague, the conference.

00:43:04.060 --> 00:43:04.440
<v Aaron van Wirdum>That's right.

00:43:05.920 --> 00:43:11.700
<v Aaron van Wirdum>Where we are. So one of them is pools can still opt to not pay out

00:43:11.700 --> 00:43:15.740
<v Aaron van Wirdum>at all. So for example, if you're a miner and you're going to include

00:43:16.440 --> 00:43:21.640
<v Aaron van Wirdum>transactions that the SEC doesn't like, then the pool can just say, well, we're

00:43:21.640 --> 00:43:26.020
<v Aaron van Wirdum>not going to pay you out at all then. So that's still one risk, I guess.

00:43:26.580 --> 00:43:32.140
<v Sjors Provoost>Well, they'll reject your share. And once the share is rejected, the idea would

00:43:32.140 --> 00:43:36.610
<v Sjors Provoost>be that you try another pool. And if you can't find any other pool that will have

00:43:36.610 --> 00:43:40.970
<v Sjors Provoost>your share, I think the idea is to fall back to solo mining. So if pools start

00:43:40.970 --> 00:43:45.550
<v Sjors Provoost>doing that, you'd see lots and lots of people solo mining briefly. Of course,

00:43:45.590 --> 00:43:47.390
<v Sjors Provoost>that's not economical, but still.

00:43:47.930 --> 00:43:53.340
<v Jan Čapek>Well, these people will eventually form another pool, right? I mean, this is all

00:43:53.340 --> 00:43:58.140
<v Jan Čapek>about these consortiums or groups of miners that voluntarily get into this

00:43:58.140 --> 00:44:02.720
<v Jan Čapek>relation because they want to fight the variance when finding blocks. So I

00:44:02.720 --> 00:44:06.760
<v Jan Čapek>personally still don't see it as an issue because like anytime a pool tries to

00:44:06.760 --> 00:44:11.280
<v Jan Čapek>attack the miners in this way, you have the option to switch over to another one

00:44:11.280 --> 00:44:15.780
<v Jan Čapek>or exactly as you explained, eventually you can resort to solo mining or actually

00:44:15.780 --> 00:44:21.220
<v Jan Čapek>gathering with some like volunteer miners. who have enough moral integrity that

00:44:21.220 --> 00:44:25.240
<v Jan Čapek>they're not going to steal from each other, and you will sort of socialize the

00:44:25.240 --> 00:44:26.220
<v Jan Čapek>pool for yourself.

00:44:26.260 --> 00:44:30.940
<v Sjors Provoost>Yeah, so it's important because some people forget that pools are not in charge.

00:44:31.420 --> 00:44:34.520
<v Sjors Provoost>Even in the current system where the pool decides what's in the block, you can

00:44:34.520 --> 00:44:38.900
<v Sjors Provoost>just choose another pool if the pool is doing something weird. That's just made

00:44:38.900 --> 00:44:42.840
<v Sjors Provoost>it slightly easier, I guess. And anybody can start a new pool if the current pool

00:44:42.840 --> 00:44:45.600
<v Sjors Provoost>starts misbehaving, and then anybody in the world can just use that pool.

00:44:46.660 --> 00:44:47.980
<v Jan Čapek>Exactly, that's the case.

00:44:49.240 --> 00:44:52.320
<v Aaron van Wirdum>The other thing I want to mention and I don't actually know what this means

00:44:52.320 --> 00:44:57.150
<v Aaron van Wirdum>exactly I just wrote down the words So one of the problems is share accounting.

00:44:57.510 --> 00:45:00.330
<v Aaron van Wirdum>Does this ring a bell for you? Do you know what he would have been talking about?

00:45:01.350 --> 00:45:06.710
<v Jan Čapek>I think it refers to the job negotiation protocol when you're selecting your own

00:45:06.710 --> 00:45:12.430
<v Jan Čapek>transactions and creating your own mining jobs. Then it is an

00:45:12.430 --> 00:45:17.130
<v Jan Čapek>untrivial task for the pool to have a reasonable share accounting for the reasons

00:45:17.130 --> 00:45:21.430
<v Jan Čapek>that I describe. Let's say you would be a miner in favor of empty blocks. So

00:45:21.430 --> 00:45:26.310
<v Jan Čapek>you're basically penalizing your colleagues in the pool because you're pushing

00:45:26.310 --> 00:45:31.180
<v Jan Čapek>their rewards to lower values. You know, you have seen what's been happening with

00:45:31.180 --> 00:45:36.740
<v Jan Čapek>BRC-20, where the block rewards were, or the transaction fees in block were much

00:45:36.740 --> 00:45:41.840
<v Jan Čapek>higher. And these are all the BTC that also go to the miner or to the miners

00:45:41.840 --> 00:45:47.840
<v Jan Čapek>aside of the standard block subsidy. So these guys would have to be penalized and

00:45:47.840 --> 00:45:52.240
<v Jan Čapek>you have to have some smart system how to do the share accounting on your end. I

00:45:52.240 --> 00:45:55.060
<v Jan Čapek>think this is what was meant by the share accounting.

00:45:55.460 --> 00:46:00.020
<v Sjors Provoost>And there was also a presentation during the hackathon day or basically the

00:46:00.020 --> 00:46:04.680
<v Sjors Provoost>developer day two days ago at BTC Prague by some of the Stratum V2 developers.

00:46:04.680 --> 00:46:08.760
<v Sjors Provoost>And they were proposing a coin pool, which we did an episode on, on coin pools in

00:46:08.760 --> 00:46:13.480
<v Sjors Provoost>general. And they proposed a way to use a coin pool to put the rewards in there.

00:46:13.930 --> 00:46:18.350
<v Sjors Provoost>so that the pool is not even holding on to your coins, because that's still a

00:46:18.350 --> 00:46:23.130
<v Sjors Provoost>little bit of a risk. And that was a pretty elegant design, except that you have

00:46:23.130 --> 00:46:28.510
<v Sjors Provoost>to know before the block is mined how much you're going to put in the pool. But

00:46:28.510 --> 00:46:31.670
<v Sjors Provoost>if people can select their own blocks, then you don't know how much is going to

00:46:31.670 --> 00:46:35.810
<v Sjors Provoost>be mined, because it depends on which miner actually finds the block. So then you

00:46:35.810 --> 00:46:39.650
<v Sjors Provoost>probably still need to agree on some sort of minimum fees that should be in a block.

00:46:41.180 --> 00:46:46.690
<v Sjors Provoost>Otherwise, you run into some problems. So it's not entirely solved, but it's

00:46:46.690 --> 00:46:48.190
<v Sjors Provoost>most certainly much better.

00:46:48.990 --> 00:46:53.050
<v Aaron van Wirdum>Last question. What's the call to action? Who needs to do what for this to become

00:46:53.050 --> 00:46:54.130
<v Aaron van Wirdum>a success at this point?

00:46:55.020 --> 00:46:59.040
<v Jan Čapek>I think it's already becoming a success considering the size of the movement

00:46:59.040 --> 00:47:03.660
<v Jan Čapek>behind it. There are companies, not just us, but there are other companies that

00:47:03.660 --> 00:47:07.680
<v Jan Čapek>are officially listed on the website that subscribe the sponsors of the project

00:47:07.680 --> 00:47:13.480
<v Jan Čapek>and that have an interest in having this finalized and implemented on their

00:47:13.480 --> 00:47:19.060
<v Jan Čapek>pool. potentially in their firmware. So I think this is actually

00:47:19.060 --> 00:47:24.460
<v Jan Čapek>becoming a reality. Now, call to action, just check out the Stratum V2 protocol

00:47:24.460 --> 00:47:29.320
<v Jan Čapek>website. And if you have any of the skills required, ranging from, I think

00:47:29.320 --> 00:47:33.820
<v Jan Čapek>Pavlenex did a pretty good advertisement on this. If you have skills for website

00:47:33.820 --> 00:47:37.660
<v Jan Čapek>design, if you're a coder or whatever, just join the community and you can

00:47:37.660 --> 00:47:43.060
<v Jan Čapek>contribute to this. If you're a vendor of firmware, just talk to the guys.

00:47:43.890 --> 00:47:45.750
<v Jan Čapek>see what can be done on the firmware side.

00:47:46.450 --> 00:47:50.850
<v Aaron van Wirdum>Yeah it's an open source project anyone can contribute anyone can use. yes

00:47:50.850 --> 00:47:52.010
<v Aaron van Wirdum>essentially right. okay.

00:47:52.010 --> 00:47:55.890
<v Sjors Provoost>All right, well, in that case dear listeners, thank you for listening to Bitcoin

00:47:55.890 --> 00:47:56.610
<v Aaron van Wirdum>Explained.

