WBD641 Audio Transcription

The Decentralisation of Bitcoin Mining with Braiins

Release date: Wednesday 5th April

Note: the following is a transcription of my interview with Braiins. I have reviewed the transcription but if you find any mistakes, please feel free to email me. You can listen to the original recording here.

Jan Čapek and Pavel Moravec are the co-founders of Braiins, a Bitcoin Mining company. In this interview, we discuss Braiins update to their updated Stratum V2 protocol software for pooled mining, how it helps solve Bitcoin mining’s centralisation problem, and why Braiins has given the Stratum software away to the community as open source.


“What is the end goal for V2? Is allowing miners to build the block themselves, but at the same time use the money aspect of pool mining…the money would be still the same, but the transaction selection would be distributed, therefore, more secure for the whole network.”

— Pavel Moravec


Interview Transcription

Peter McCormack: Morning.  How are you?  

Jan Čapek: Pretty good.

Pavel Moravec: Hi.

Peter McCormack: Welcome to Bedford.

Pavel Moravec: Thanks.  It's a surprisingly nice neighbourhood or place.

Peter McCormack: What do you mean "surprisingly nice"?

Pavel Moravec: It means that I didn't expect that, which is obviously my fault because it was clear that it would be a nice place to stay but --

Peter McCormack: You thought Bedford would be a shithole?

Pavel Moravec: I didn't expect anything; it was much better than the neutral position.

Peter McCormack: It's the home of Bitcoin in England.

Pavel Moravec: Congratulations!

Peter McCormack: The El Zonte of England.  Okay, so listen, let's clear something up; British cuisine…

Jan Čapek: Oh, we had a wonderful roast; I knew you were going to ask about it.

Peter McCormack: You had two roasts.

Jan Čapek: No, I had only one, I had a burger; I was the wise man yesterday.

Peter McCormack: You had the burger?

Jan Čapek: Yes.

Pavel Moravec: All the rest, we tried the roast and it was terrible.  I think was thinking about taking burger as well and it was the first mistake I did yesterday.

Peter McCormack: Well, you had two hosts; you had one for the morning, or the lunchtime, and one for the evening, so you've got to blame the hosts because the first host made the fateful mistake of taking you to a Greene King pub which are notoriously shit.

Pavel Moravec: Yeah, we know now!

Peter McCormack: You know now.  You want to go to the local non-chain pub with a reputation for good --

Jan Čapek: Well, I would say that are you sure it's cultural thing because I think he's half Spanish so he doesn't know his way around the UK.

Peter McCormack: He knows his way around the UK, I'm not having that.

Jan Čapek: Okay.

Peter McCormack: I'm not having that.  So, anyway, how have you guys been?

Jan Čapek: We're good.

Pavel Moravec: Great, thanks.

Peter McCormack: So, I wanted to talk to you about hashrate first because it's going a bit crazy, but just for anyone listening who doesn't know who Braiins are, what it is you do, introduce yourself; start with you, Jan, and then we'll move over to Pavel.

Jan Čapek: Okay, my name's Jan Čapek, I am one of the cofounders of Braiins and we've been mining Bitcoin since 2010 through Braiins Pool, or formally Slush Pool, and until now we mined something like 1.3 million BTC which is most probably going to be unmatched. 

Peter McCormack: Did you hodl it all?

Jan Čapek: It's our users' money which has been distributed, so we don't hodl really this amount.

Peter McCormack: That's an incredible amount.

Jan Čapek: Yeah.  Well, that was easier at the beginning with the subsidy of 50 BTC, and now we're approaching next halving, next 2024, so it's probably going to be unmatched.

Peter McCormack: We've met a few times as well, haven't we?

Jan Čapek: Yeah, we did; I think Riga?

Peter McCormack: Yeah, Riga; was that the first time?

Jan Čapek: I think so.

Peter McCormack: Yeah, I couldn't go last year, I'm going to go this year though, I'm going to try and get Danny there.

Jan Čapek: I'll be there.

Peter McCormack: It's a great conference.

Jan Čapek: Yeah, I like it.

Peter McCormack: Yeah.  Also, yourself, Pavel, introduce yourself.

Pavel Moravec: Yeah.  My name is Pavel Moravec, I'm the second cofounder of Braiins.  We both have different software engineering/hardware engineering experience before we created the company.  But since 2013, we are full-on on Bitcoin and Bitcoin mining specifically, all different aspects, trying to utilise all the experience from before in the space, and so far I could not imagine having a career more exciting than what we have; it's a cool ride.

Peter McCormack: So, did you know each other before Bitcoin or was it Bitcoin that caused you to --

Jan Čapek: I think we met in our first job after university, like 2005.

Peter McCormack: Oh, wow!

Jan Čapek: And then we kind of parted careers; I went for the Linux embedded systems and Pavel will say what he did in the meantime, and I think we got together back in 2009 and we founded Braiins 2011, but by that time we were actually writing firmware for gensets.

Peter McCormack: Already?

Jan Čapek: Oh yeah.

Peter McCormack: Psychos!

Jan Čapek: So, that actually came to fruition -- is that a word in English?

Peter McCormack: Yeah, fruition.

Jan Čapek: Yeah, in Braiins OS because we used all that experience in writing firmware for the mining machines.

Peter McCormack: Wow!

Pavel Moravec: I think we spent some time on the Salsa parties because I introduced him to dancing when we were in the first job and then we kept seeing each other in Salsa parties basically.

Peter McCormack: Did you ever partner each other?

Pavel Moravec: Like dancing together?

Peter McCormack: Yeah.

Pavel Moravec: Maybe, I think so, yeah.  It's quite interesting to be a --

Danny Knowles: Now we've found the Patreon bonus content!

Peter McCormack: Yeah, we've got our Patreon bonus content!

Pavel Moravec: I don't think so! 

Peter McCormack: We're going to see you dance.

Pavel Moravec: It's a lot of years ago.

Peter McCormack: You've still got it, come on, man; you don't forget this stuff.

Pavel Moravec: Yeah, I think you should be able to do a lot.

Peter McCormack: Okay.  So, who brought Bitcoin to who?

Pavel Moravec: I think it was me, I was approached by Marek "Slush" Palatinus, which is an old friend from childhood of mine, and he introduced me to Bitcoin, and when I thought about jumping in, I didn't want to do it alone, to do the same mistake what Marek did basically doing a single-person enterprise.  In that time, we already had a company with Jan, and I just wanted to have a second person to cover my back and be more like a professional in doing what was needed, because in that time, all was just a garage thing.  So, I was not in Bitcoin much longer because it was immediately obvious that I just don't want to be alone in this space, and it was a super-wise decision to go to Jan immediately.

Peter McCormack: And, Jan, so what, he called you up and he said, "Listen, I've discovered this new magic internet money; I think we need to get into this?"

Jan Čapek: Actually, the story is slightly different in a way that the first time I discussed Bitcoin was 2011 and we went on a sailing trip, and it was me, Pavel, Slush and some more people in Croatia, and that's the first time I actually met Slush.

Peter McCormack: On a boating trip, hey?

Jan Čapek: Yeah.

Pavel Moravec: Yeah.

Peter McCormack: Did you lose your Bitcoin?!

Jan Čapek: No, hold on, he was actually explaining about this GPU mining and he has these crates with GPUs and stuff like that, and at that time I considered it a kind of weird scheme like, "What's the point?"  He explained the pool and everything, and it took like two years until we got the pool into the company, and at that time, I actually was sure that we were actually late to the party, and years later here we are.  So, from that perspective, it doesn't look being late to the party, but at 2013 when I realised the impact of what we were dealing with, that was just like, "Well, this is too late, everything is lost on a business level but you can actually still build business on that", so yeah.

Pavel Moravec: It's a learning experience for everybody.

Jan Čapek: As you can imagine.

Pavel Moravec: You can feel being too late but it's just a feeling.

Jan Čapek: And with every cycle, you see new people coming in and they will think, "Well, am I late?"  "Well, I don't know; it's good that you're here at least at this time".

Peter McCormack: Yeah.  I've had it a few times in the last couple of weeks because the Bitcoin price is recovering and you get those DMs or texts and it's like, "Am I too late for Bitcoin?"  We say, "If I thought you were too late, I would have sold all my Bitcoin".

Pavel Moravec: Yeah.

Peter McCormack: So, we got a few of them.

Pavel Moravec: Did you?

Peter McCormack: Yeah, I did; sold all my Bitcoin!  No, I wish I had at $69,000, but anyway, that's for another day.  Okay, because I wasn't around in 2011, well I was around, I just wasn't in Bitcoin, I was being a moron somewhere, there was a requirement for pools back then, but were there ASICs then or was it still GPUs?

Pavel Moravec: No ASICs at that time.  I think there were first thoughts about GPU, about ASICs, if I remember correctly, it's a lot of years.

Peter McCormack: So, it was still CPU?

Pavel Moravec: Partially, and then 2012, 2013 if I'm not mistaken, ASICs took over basically.

Peter McCormack: And you were the first pool?

Pavel Moravec: It is so, yeah.  It is very difficult to say exactly because you cannot go around and nick all the projects people made in 2010, but by all reasonable standards, yes.

Peter McCormack: Claim it, own it.

Pavel Moravec: You want to be precise in saying such a statement.

Jan Čapek: Maybe we can say we were the first pool also with the Stratum v1 protocol, because before that, before the pooled mining, when the pooled mining started, the protocol being used was something in line with how Bitcoin Core, how Bitcoin Node communicates with the miners; that doesn't scale.  This needed some thought, and that actually, that thought, is called Stratum v1.  We had to give it this attribute, V1, later on because of the V2.

Pavel Moravec: Surprisingly!

Jan Čapek: Surprisingly, but at that time it was just called Stratum protocol.

Peter McCormack: You were so confident that you only needed one version to begin with?

Pavel Moravec: It was working ten years; I think it's an awesome achievement.  All the Bitcoins, basically all the Bitcoins in the world ever would be generated by V1 protocol, like the rest of the coins which are not yet mined, it's a fraction.  So, most of the Bitcoins were mined through Stratum v1, so I think it's decent.

Peter McCormack: Yeah, that's pretty cool, man.  So, you should probably explain what Stratum v1 is because there are going to be people listening who are going to be like, "What the fuck are these guys on about?"

Pavel Moravec: In simple terms?

Peter McCormack: Yes.

Pavel Moravec: It's just a protocol, a set of rules how miners, physical devices, are communicating with a pool who distributes the work and basically organises the mining; and the communication involves some obvious details about what block is being mined and so on and so on, but the scale of mining globally is super large, it's a lot of different devices, and for mining to be efficient there is a lot of communication needed.  So, the protocol is designed for allowing all this communication to happen in a reasonably efficient way.

Peter McCormack: So, are other mining pools using Stratum v1?

Jan Čapek: Everyone.

Peter McCormack: Everyone's using it?

Jan Čapek: Yeah.

Peter McCormack: And you're cool with that?

Pavel Moravec: Of course.

Peter McCormack: Do you get the benefit from that?

Pavel Moravec: The main benefit of everybody using the same protocol is basically you, as a miner, like entity trying to mine, you're not locked for using one single pool.

Peter McCormack: You can switch pools easy?

Pavel Moravec: Yeah, the interoperability is key because it allows you to make a decision about who is your pool provider, and this feature is quite important, otherwise you would be forced to buy the protocol or some incompatibility would be forced for using something specific, and it's not in anybody's interest.

Peter McCormack: Yeah.

Jan Čapek: It enhances the security in a way that you can switch over the miners between the pools, and there have been cases like this back in 2013, 2014, 2015 when some pools started growing too much and then the miners intentionally decided to switch over because of their incentives, like you want to prevent a certain pool to reach 51%.

Peter McCormack: Yeah.  Has anyone tried to build a pool not using Stratum v1 and then realised it's not possible?

Pavel Moravec: I'm not aware of anybody; it doesn't make sense.  It's pretty simple to implement Stratum v1 and the devices are able to communicate by this protocol.  You can implement any protocol you like on the service side, but then all the machines you would like to get to your pool would have to get a software update for talking to you, which you have no reason to do so; it's expense for nothing.

Yeah, the coordination for switching a protocol for mining globally, it's a big task which is something which we are trying to do with Stratum v2, but it takes a long time and a lot of effort on different places to synchronise the rollout of something like communication protocol change, because you want to have both sides be ready and then you can start using the protocol; one side is not enough.

Peter McCormack: Well, listen, we need to get into Stratum v2 because it's super important what you're working on here.  Just before we get into that, like a super simple primer, anyone listening who doesn't know what a pool is or what you do and why they're important, just give the quickest TL;DR on that.

Jan Čapek: Well, I'll try.  So, mining Bitcoin, it's sort of like rolling a dice, right, you have a certain task, you want to roll a number that's smaller than something.  If you manage to do it and if you think of your dice having thousands and thousands of sides, then it becomes a little bit more computationally intensive in terms of how many tries you have to do. 

With the pool, what turns out to be convenient is that your dice-rolling, the more players are rolling the dice with you, so trying to mine the Bitcoin, you still have the same chance, but you're experiencing what we call a variance; it can take you one week, it can take you one year depending on how much performance, how much computing power you have, so how often you're able to roll the dice.

With the pools, the concept is that you aggregate this dice-rolling capability, the computation power, we call the hashrate, into a couple of players, and that means we will use the variance.  Then the rewards, when the pool actually finds the block, or actually the miner who finds the block is sharing this result with all the other miners and they get the proportional rewards to how they participated in the round.  It gets a little bit more complicated than that because there are also other schemes where miners are actually being paid directly by each hash that they provide or each result that they submit, but this is roughly it.

Peter McCormack: Okay, so what you're basically saying is the miners are sharing the risk.

Jan Čapek: Yes.

Peter McCormack: If you're mining on your own, the chance of you finding a block is very low, yet you've got to spend a lot of money on operating your miners and maybe even your datacentre, but if you mine within a pool, you're essentially sharing the risk and reward between all other the other miners in the pool?

Pavel Moravec: Right, yeah.  All bitcoiners know that a block is found each ten minutes, but it's a single block for everybody trying to find the block.  So, if 1,000 people are trying to find a block of the same computational strength, then you get it in 10,000 minutes, and the more miners in the world there are, the longer expected time for finding a block yourself is.

So, after some time, more and more computational power, it stops to be smart because it can happen that you can find a block in ten minutes really, but it can take weeks and weeks.  So, by joining the performance, you just decrease the expected time to find a block, smoothing out the income you get from the mining process, and this is the core concept of a pool.

Peter McCormack: So miners are basically socialists?

Pavel Moravec: Yeah.

Jan Čapek: No, they're aggressive capitalists; they're all after money!

Peter McCormack: Okay, but you were hinting that there are almost two models; there's the model whereby, if the pool finds a block, it shares out the rewards proportionally to how much hashing, but you hinted that also there are maybe services now that are just paying you for the hash. 

Jan Čapek: Right.

Peter McCormack: So, the ones that are paying for the hash, are they taking the risk their end?

Jan Čapek: Yes, they're taking the risk on their end.  Maybe a tiny detail in the pool mining concept, or in the world of Bitcoin mining concepts, it's important to emphasise that you cannot mine fractions of Bitcoin; you're mining the whole block of transactions and that reward is given by the protocol, so currently, like 6.25 plus all the fees from the transactions.  That actually determines how long, with your computation power, let's say if you take your S9 that you have somewhere here probably, you can really make a pretty precise calculation of how long it would take you to find a block, and you would not be happy about that number. 

At the same time, you cannot mine on your own, like that little fraction of Bitcoin that you would say, "Okay, I'm going to mine for one day", but if you pool that resource with the pool, you put that computing power into the pool, that's the moment where you actually make it possible to mine fractions of Bitcoin; because it's an analogy of splitting out the rewards based proportionally on your result.

From that end, you can also say, "Okay, how much does a single hash cost that I submit?"  You're not submitting the hashes but you're submitting the results that eventually hash to a certain target.  So, then there's a certain price to this given by the current subsidy of the block, and then you can be actually paid by just providing the results and the pool doesn't have to find the blocks.  Obviously, at some point, the pool has to find a block or you have to find some blocks so that the pool is not net negative, but it's on the pool side who takes the risk.

Peter McCormack: Do pools have any wider benefit to Bitcoin or is it really just a service for miners and it's completely irrelevant to Bitcoin itself?

Pavel Moravec: Interesting question.  I don't think it has any value other than for miners.

Peter McCormack: But I guess what I'm getting at is, does the existence of pools increase the security of Bitcoin because we will have more Bitcoin miners because they've got less risk; or do you think, if there were no pools, then they would just all be competing and the taking the risk?

Pavel Moravec: If miners are forced to not use pools, I think it would be net negative.

Peter McCormack: Yeah.

Pavel Moravec: But at the same time, pools are not bringing any security I would say. 

Peter McCormack: No, I don't think directly, but indirectly they lead to more security.

Pavel Moravec: Indirectly, yes, because otherwise most of the miners would be unable to operate the mining farms longer term because it would be just a casino, somebody would get lucky and a lot of people would get busted.

Jan Čapek: Especially in the early days when the difficulty was rising up very crazy basically.  After 2013, there was the ASIC era, after CPUs, GPUs, FPGAs, then there was the ASICs, and the ASICs were not using the cutting-edge chip technology, so the chips produced for hashing were being obsoleted within a couple of months.  So, with your investment into the equipment, doing it in a solo way, there would be no way to sustain that operation, so you would have to naturally pool your computational resources with a pool.  But at the same time, I see it as another service, that's a business opportunity, right; that time, that was also a good business opportunity where naturally miners don't want to run the mining infrastructure because the pool is basically something between the Bitcoin nodes and the miners themselves. 

It has its own challenges, it's basically a high-availability system, otherwise you could lose money because we're talking about now a significant amount of money that is in each block as a subsidy and you want to make sure that your software is correct.  This is something that miners were willing to pay for in terms of the mining fee or the pool fee, and put this responsibility onto somebody else who sees it as a good business opportunity.  Nowadays, the pool itself, as a business, is not such a profitable vehicle any more, but some companies probably tie it with other businesses, financing and ties with manufacturers and stuff like that.

Peter McCormack: Yeah.  Harry Sudock talked to us about this, well it was a couple of years ago now, wasn't it?

Danny Knowles: Yeah, a while ago.

Peter McCormack: Yeah.  He said the pools will eventually trend to zero in terms of their revenue model and then maybe even invert and actually start paying for people to mine with them.  Is there anything that pools can offer on their own that make them more competitive than other pools, or are there no distinguishable features?

Pavel Moravec: It's really commoditised.

Peter McCormack: Yeah.

Pavel Moravec: The main service is really indistinguishable from each other, there is not a differentiating factor between pools.  If we are talking about the pool service itself, the fee structure is one of the important ones if you can check the mark for trusting the party.  It was not always the case that you could trust the pool you were using, but if you can make this thing sure, then yeah, it's pretty much the same service everywhere.

Peter McCormack: Did any pools rug?

Pavel Moravec: Like bankrupt?

Peter McCormack: No, rug-pull their users; you were saying they couldn't trust them.

Pavel Moravec: Yeah, there are different options how you can steal money as a pool and different schemes, but yeah, sometimes it is very difficult obviously to prove it; you have only some statistical evidence typically, so yeah, there are ways, and historically it was the case.  I am not aware of anybody doing it nowadays any more.

Peter McCormack: What were they doing, like obfuscating some of the blocks they mined and just keeping the whole reward?

Pavel Moravec: Yeah, you can play with a lock, you can, for example, report more hashrate under management than you actually have.

Peter McCormack: Okay.

Pavel Moravec: You can not include all the money which you should include into the price.  You can not count all the shares properly, so you say, for example, "I pay you X amount satoshis for X amount of volume of hashrate", but then counting the hashrate you provide to me is difficult to check it from the miner's perspective; you have to have the infrastructure for accounting all the volume you provided.  So, it's pretty simple for the pool to skim just 0.5% of something and claim that, for example, I have 0% fee.  But if I don't count all the hashrate you're giving to me, then I'm not paying you for everything, basically making the fee however big I want. 

Peter McCormack: Yeah, but that should be pretty hard to hide really now because it's pretty transparent on what you should be earning.

Pavel Moravec: Yeah.  If you have the infrastructure for doing all the accounting yourself as a miner then you would find out this on a particular pool, but it's not always the case that you have the infrastructure and it was not the case throughout all the years.

Peter McCormack: Right.

Pavel Moravec: You just don't expect that there can be an issue like this on a pool.

Peter McCormack: You don't expect there to be scammers?

Pavel Moravec: Yeah, until somebody says to you that, "Hey, please doublecheck this because this can be trouble", you never know.  If you look at miners, not everybody is a highly professional miner, I don't know, specialists in software writing these checking tools; it is not a common thing.  Lately, obviously, the more industrialised the mining space gets, I guess this is not happening any more because the miners are big public companies and it would be difficult to break this trust.

Peter McCormack: Yeah.  It also then sounds to me like, if the mining rewards, like the commission that the pool takes, is trending to zero, those that are now paying for hashes, it feels like they may be slightly ahead of the curve in that they're preparing for the scenario where there isn't any kind of commission, any cut to take, and therefore they're preparing for it becoming a service they pay for.

Pavel Moravec: Yeah.  There can be different motivations; we know that there are companies operating pools as a loss leader nowadays.

Peter McCormack: Wow.

Pavel Moravec: It's something that you can do if you can benefit from it different ways.  From a mining perspective specifically, it doesn't make sense, obviously, but in a more general sense, yes; we obviously don't do that.

Peter McCormack: Yeah.  So, why would why they do it as a loss leader; what's the benefit?

Jan Čapek: You have some additional businesses or products that you want to associate with the customers that you have on the pool side, so you onboard the customers to the pool, but at the same time they could be tied to different hardware deals.  So, the miners want to update their hardware, they want to build a new farm, so they get this pretty good deal of financing or whatever to make this happen, but the condition is that they stay on the pool.  So, you have an alternative revenue stream, that's how we see it.

Peter McCormack: Have any of the ASIC miners launched their own pools then because of that?

Pavel Moravec: Not necessarily because of that, but historically, yes.  For example, Bitmain's running pools already and we did see some strings attached to the hardware historically.  Again, the landscape is changing every few years, it is different, especially as larger and larger companies are dominating the space.  Naturally, the landscape shifts to more standard business relationships let's say, but yeah, we know about a lot of miners historically who could not switch the pool because of some agreements with hardware manufacturers.

Peter McCormack: Yeah, it just sounds like a hyper-efficient free market which trends everything towards zero when something is commoditised, which is I think something Jeff Booth would be a huge fan of!

Pavel Moravec: This is the case, it takes years and years, but there are not a lot of ways how to prevent this.

Peter McCormack: Okay, so let's talk about Stratum v2.  I've heard about this for years; I feel like I first talked to Matt Corallo about it about three or four years ago; does that sound about right?

Pavel Moravec: That's about correct, yeah.

Peter McCormack: Yeah, about three or four years ago, and we were having a conversation about pools and trying to make them become a little bit more decentralised.  So, I'm going to walk us through a few steps, again just to help people who are listening.  So, people often talk about one of the biggest risks with Bitcoin is a 51% attack.  Now, a lot of people know what that is, but can you just explain what a 51% attack is, how real is the risk and then I've got some more follow-on questions?

Jan Čapek: Well, the attack is about somebody aggregating enough hashrate, and statistically if he's this 1% above the half, he is able to perform different kinds of attacks, like double-spends and stuff like that.  But aggregating this amount of hashrate in a single place, there's a strong incentive from the miners to disconnect from such a pool in case --

Peter McCormack: Forget pool aside, just a 51% attack on its own.

Jan Čapek: Yeah, this is what the attack is about; statistically, if you own more than half of the hashrate, and it's just by 1%, you're able to do bad things on the blockchain.

Pavel Moravec: You can force your will to everybody.  New blocks, it's a competition; once you have more than 50% of hashrate, you're in the long term, you're winning, you're making the blocks as you like it, and you can make a different chain of blocks obsolete by building a different branch and making it longer than the previous branch so that you can even invalidate blocks which were already mined.  It could cause a lot of trouble to a lot of businesses or users of Bitcoin.  So, the problem is like orphaning already mined blocks and basically forcing the will, picking transactions, whatever you want, or prohibiting some transactions, censoring transactions, for example.

Peter McCormack: And is 51% enough to be able to cause some serious damage or is it just like, with 51%, you're just over 50% so you can cause some incremental problems but most of your --

Pavel Moravec: It is a number which is just bigger than 50%.

Peter McCormack:  Yeah.

Pavel Moravec: You can attack, you could try to attack the network with lower than 50% but it would be just rolling a dice.  For really making sure that you can attack, you would need much more than 51% because otherwise it would be just a random chance if you succeed or not, and it would be super-costly for you to implement the attack, because if you eventually don't win, you have lost 50% of computational power for nothing.

To pull the attack really, I think you would need a bit more, and there is a strong incentive for not doing so, mainly because of the disruption in the whole ecosystem which you would cause; once somebody's trying to attack, I think the most probable reason why to do so would be damaging Bitcoin, not as a personal win, because once you would attack, it would cause so much trouble you can easily expect the price of Bitcoin to go super-low, or it would hit the price.  So you, as somebody who put a lot of computational effort and therefore money into mining Bitcoin, you would harm yourself by the exchange rate dip.

Peter McCormack: So, what you're saying is the game theory is, there's no economic upside for somebody to rewrite blocks, double-spend, but there is an alternative economic benefit to someone who has a desire to destroy the network, that's the only --

Jan Čapek: If he wants to act irrationally, yes.

Pavel Moravec: Yeah, so this is an extension of what Jan said, miners who value Bitcoin, and typically miners are the first line of bitcoiners as well, they have initial incentive to protect against a 51% attack by switching to different pools to not disrupt the space, because they would be harming their income, which is a kind of nice direct incentive, right?

Peter McCormack: Yeah.  If we imagine two scenarios, there is a mining centre, just bear with me for the moment, where one miner, one public miner who manages to accumulate 51% of the hashrate versus say a pool that has 51% of the hashrate, can they cause the same damage or is the pool in a slightly different scenario?

Pavel Moravec: It's a bit different in the sense that, in the case of a pool, you as the owner of the machines connecting to the pool, you can change your mind and say, "Screw you, I'm going to connect to a different pool", and then you can prevent the pool to have 51% to make the attack happen.  Once there is a single entity deciding what to do with 51% hashrate without anybody's consent, then it's a more serious situation to be in.

Peter McCormack: Is it back in 2013, wasn't there a miner who was getting close to 50%?

Pavel Moravec: There was a pool, historically.

Peter McCormack: Was it a pool?

Jan Čapek: It was a pool; I'm trying to remember where it was.

Danny Knowles: I think they went over 50% whoever it was; let me find out.

Peter McCormack: I feel like it started with a G.

Jan Čapek: GHash.io?

Peter McCormack: Yeah.

Jan Čapek: And that was followed by miners disconnecting from it.

Peter McCormack: Yeah, okay.  Okay, so what does Stratum V2 do?

Jan Čapek: Well, maybe let's talk about what are the deficiencies of v1. 

Peter McCormack: Okay.

Jan Čapek: And that kind of comes to a conclusion why we want to have V2.  So, it is a saying that, or maybe a question, what do you think is the most frequent let's say protocol sentence of the original protocol?  It's got mining submit any time.  Any time a miner sends a result, a share, it's always prefixed, it's a textual protocol, so when you read the dump of the protocol, you see mining.submit, mining.submit, so like wasting bytes just because the protocol is textual. 

So, one thing is the inefficiency of the original protocol because of the format that has been chosen for it, it has been chosen for specific reasons because mining protocols are generally a very sensitive thing and you want to make sure that they actually work.  So, that's something we eliminated, and this inefficiency has been taken away basically by switching to what we call a binary, so the protocol is now much more efficient in this sense.

Second, what that means, we shrink the messages and allowed certain types of mining messages where the work that's being distributed to the miners is smaller than what it has been previously with Stratum v1; it's called header-only mining for the readers or listeners; it can be googled.

Then, if you look at a security aspect, Stratum v1 didn't have any official security layer, so all the protocol was completely clear text.  So, if you tap into the line or if you happen to install a virus onto a miner's router, and in these days when it all started, it's been all home mining, like mining started, the original idea was one CPU, one vote.  So, you were supposed to mine Bitcoin in your home, and since the protocol was completely plain text and unencrypted and unsecure, you could actually steal the hashrate without even noticing.  So the security aspect has been addressed also in the protocol, in the new v2. 

Then we can talk about some other inefficiencies; one of them that is being quite often addressed is this case with the empty blocks.  To explain this, a mining machine is something like a racing engine, you have to run it at full speed all the time and basically give it work all the time.  What happens when there's a block found in the Bitcoin Network, it takes seconds and seconds to actually generate a new template for the block, so it's convenient for the pools to distribute an empty block template to the miners which is available immediately, and in the meantime the pool can work on the new template and immediately distribute a full block. 

Peter McCormack: Hold on, so let's slow down on this one.

Jan Čapek: Okay.

Peter McCormack: What you're saying is that, by distributing an empty block, they've got a higher chance of them finding another block afterwards?

Jan Čapek: Yes.

Peter McCormack: Right, but it's not the case that after they found one block, it's then efficient to do another empty block afterwards, consecutive empty block?

Pavel Moravec: It is.

Peter McCormack: Oh, it is?

Pavel Moravec: It works.  The problem is a full block contains a lot of transactions; the transactions need to be validated to build a proper block with all the rules matching.  Once a new block is found, the first thing, it needs to be validated and accepted by the network and so on and so on, you know the hash of the block which is needed for construction of the new block, it's called prevHash, previous hash, you can immediately have all the information for the new block if you don't include any transactions.  If you want to put 2 MB of transactions into a new block, you need to pick which transactions in which order would be constructing a valid block; it takes some time.

Peter McCormack: How much time; is it still seconds?

Pavel Moravec: Seconds, and then you have to distribute this information to miners.  So, what is typically done is once you detect a new block, you know the prevHash, you immediately send an empty block template because the miners can work one, two seconds prior to get information about the full block.  So, what the pool does is it tries to immediately build a template for a full block with all the transactions, all the validations done and send the work after.  But there is a non-zero chance that somebody would, in the first or second second, find a block, and that's why we can find empty blocks in the network.

Peter McCormack: So, it's essentially two miners finding the same block at almost the same time; if you mine it empty and they're building the template, you're going to get that block out quicker?

Pavel Moravec: Yeah, because it's a huge statistical game.

Peter McCormack: Yeah.

Pavel Moravec: There is just a non-zero chance that, even the first hash that you're trying to make would generate a block, so spending two seconds more on a new job, it's just beneficial. 

Jan Čapek: So, it would be losing.

Pavel Moravec: It's 300 seconds in between blocks.

Peter McCormack: So, how many empty blocks are there a day, or what percentage are empty?

Pavel Moravec: Not a lot, but it should match roughly 1 in 300, because typically, if you have a one-second delay in distributing the work and the first second you would be mining empty blocks and from the second second you would mine a full block, then the expected number of empty blocks would be 1 in 300.

Peter McCormack: Okay.  So, is everyone building a template before they've actually found the block or is it they find the block and then they build the template?

Jan Čapek: On top of the new block, but maybe to complement this and the v2, it's actually in the proposal, what we were thinking, is it possible to actually construct a template even though we're currently mining on top of a different block, but this template would contain some, let's say, less expensive transactions that are in the second part of mempool?  That's the general idea, and you can distribute this template up front to the miners.  And when a new block is found, you can actually quickly validate if this template still makes sense and you either tell them, "Oh, here's an empty block template, please start mining on it", or, "Please use the template that I've given you previously with the less expensive transaction", because it's better than empty, so it was the idea.

Peter McCormack: Yeah.

Pavel Moravec: So the idea that the Stratum v2 brings is it allows you to speculate how the new block, found anywhere in the network, would look like, and you can speculate about what transactions would be in the next one, what are going to include there, because there is an incentive for putting pricier transactions into the block. 

You can discard the most efficient, the best transactions and expect that they will be found in the next block, so you pick less pricier transactions, you speculate, you can distribute it to miners.  And once a block is found, it's a simple check that your speculation was correct or not and you just pick the right one and say to miners, "Go ahead and mine with this", which decreases the delay and miners can immediately start to work on a full block, not an empty one.

Peter McCormack: You just said there, you just used the language of the proposal, and it just made me consider something.  If all pools are using Stratum v1, and hopefully subsequently, Stratum v2, is Stratum a Braiins product or is it something that's actually owned by the community now?

Jan Čapek: We gave it to a community and there is actually a big open-source movement behind it already and we're part of the discussions.  But we intentionally didn't want to be the company whose protocol it is because it's more important, and again, we can go back to the incentive game, it's in our best interest, as the participants in this Bitcoin computer game, let's call it like that, for this to be successful.  So, in our best intentions, it is to have a protocol that we think is secure but definitely not controlled by one company.

Peter McCormack: You don't really want to be in a situation where you're dictating what Stratum v2 should be, maybe suggesting and everyone works together on it.

Pavel Moravec: You cannot force people to use it then, it's not a product.

Peter McCormack: Yeah.

Pavel Moravec: It's an honest attempt to improve a very key aspect of Bitcoin.

Peter McCormack: Yeah, love it.

Pavel Moravec: One of the most frequently spelt-out features of v2, which is at the same time the most complex ones -- the protocol is complex, it's going to take some time before people would implement it because all these features, it's super-simple to do it directly but it has some consequences on the quality of the mining process.  So, once you start to eliminate these small inefficiencies, you pay for it by an increased complexity of the protocol, so it will take some time. 

The most interesting feature, but at the same time the most complex one to implement, is something that is called job negotiation or it basically reverts who is deciding what transactions are being put into a block.  So far, it is the pool's responsibility to construct the block so that the power of censoring transactions or picking transactions is centralised in pools' hands, and this feature is not really a nice one because of pools being quite centralised entities, right.

So, what is an end goal for v2 is allowing miners to build the block themselves, but at the same time use the money aspect of pool mining when you've got the decreased variance of the income, so the money would still be the same but the transaction selection would be distributed, therefore more secure for the whole network.

Danny Knowles: Distributed amongst who?

Pavel Moravec: Amongst miners, the physical owners of the machines.  It's not something that would solve the problem of a single entity owning machines having 51% phishing power, but pools are much more centralised still than the mining companies or miners, so giving the authority or capability to miners would strictly increase the security in this sense.

Danny Knowles: Very cool.

Peter McCormack: So, were you working through a list of things there for Stratum v2 with me?

Jan Čapek: That was pretty much it.

Peter McCormack: That was probably it?

Jan Čapek: So, the security, but maybe to demonstrate how the current state of things is, it's been publicly said, like the Stratum v2 is concept but it's not in operation, but the fact is that we have prototyped the protocol and drafted it probably three years ago, initially used it for our product, for the Braiins OS firmware, to prove that we can exchange or switch to a completely different mining protocol stack.

Now, when the open-source community took over, they were cool guys and they came to us, so we were like, "Okay, why did you guys choose this?"  When you look at the security part, it's encrypted and it's authenticated encryption, so that means when you look into the communication, you cannot tell what's in there, and if you touch any byte, try to tamper with it, the communication doesn't break down, it detects that it has been tampered with.  These guys came to us and we were like, "Okay".  This concept, using the Noise protocol for those who use, for example, Signal or WhatsApp, Noise is a standard for secure communication, kind of like TLS on the web, and we were like, "Let's use Noise but let's change the encryption scheme because we want to use the same algorithm when we have miners talking to the pool and when we have miners talking to the bitcoind, because they're creating some bitcoind extensions and wanting this to be consistent".

So, the prototype that we're running, they actually obsolete it, they were like, "That's good because let's make a final baseline of what is going to be the v2 when it's publicly released and adopted by the majority of the players and we're just going to switch and fix our stuff".  So, this is to demonstrate that it's a real thing, it's happening, it's being used on like hundreds, thousands of devices on our end in terms of the firmware as a proven technology, and now the community is building open-source codebase that should be the baseline for everybody to adopt eventually.

Peter McCormack: So, what is the timeline for people to be able to upgrade to v2; can they do it now?

Jan Čapek: On the firmware side, then I can say, "Okay, you have to use our firmware", then they are on v2 already.  We were in discussions with some of the manufacturers, they like it but they're still waiting on what's going to happen.  I cannot probably speak for the timelines, because technically the codebase is ready.  I think it probably waits a little bit on the final call saying like, "This is the final spec", but when anybody goes to stratumprotocol.org and reads up on the state of things, you get a pretty full picture of what's happening there.

Peter McCormack: Sorry, just to back up a step so people understand, is this the firmware that sits within the ASICs?

Jan Čapek: In the miners.

Peter McCormack: In the miners?  Okay, and does each manufacturer have their own firmware?

Jan Čapek: That is the case.

Peter McCormack: So, each manufacturer, therefore, currently uses Stratum v1?

Pavel Moravec: Yes, that's the case.  It's slightly more nuanced than this.  You can start to use Stratum v2 for connection to a pool even with devices running v1, because what you can run in your operation as a miner is a translation proxy from Stratum v1 talking to devices and Stratum v2 talking to a pool, so it is possible, and it is a probable path forward; because expecting that all the machines in the world would upgrade firmware, it's just unfeasible. 

So, there is a hope that newer versions of new machines coming to market would natively support v2, but even if it's not the case, still by using a proxy in your operation, you could as a miner, an entity, start to use the benefits of Stratum v2 for talking to pools, but it's kind of a chicken-and-egg problem; you have to have an endpoint to connect to the next protocol, so pools need to support it, but pushing pools to support it, if there are no clients having it because they cannot connect to somebody with v2 easily, it's a kind of a chicken-and-egg problem so it takes some coordination, it's difficult to say.

Peter McCormack: Yeah, but ideally, we want Stratum v2 to be the default for everyone like Stratum v1 is, right; there's no benefit to staying on v1?

Pavel Moravec: Yeah, I think the turning point will be when the open-source version is good enough for somebody running in production and somebody implementing the chip negotiation on top of that, which will make an interesting difference, at least from a marketing perspective, even if you don't believe it's a good idea; I think it's a good idea to just be there for who does it, and then it will force other competitors in the space to follow.  How long it will take, it's difficult to predict.

Peter McCormack: Is there anybody who's vocally or actively against Stratum v2?

Jan Čapek: No, not really.

Pavel Moravec: There are people saying it's not needed or it's just forever a theory, not happening anything, and so on and so on, but I didn't hear any direct complaint against the protocol itself.

Peter McCormack: And what about the pools, is there any incentive for them not to adopt it?

Jan Čapek: As far as I know, I think there is already a couple of pools that do implement it even though the spec is not stable yet.  So, it's good that they want to be ahead of this because the tiny things that are going to eventually change in the protocol are small fixes that they would have to do, but they would be ready for this.

Peter McCormack: Just to go back over the points you've already made just so I'm 100% clear, what is the part of Stratum v2 which makes the mining more decentralised and de-risks the pool being able to 51% attack?

Pavel Moravec: Job negotiation.

Peter McCormack: Just job negotiation, that's it?

Pavel Moravec: Yeah, all the rest is increasing efficiency on different levels and the security of preventing stealing hashrate, encryption is great as well, but the most interesting feature is the fact that miners could influence the content of a new block and not let the pool decide about this; that's the feature.

Peter McCormack: Do you think there'll be a Stratum v3?

Jan Čapek: We'll find out.

Pavel Moravec: Hopefully not!  If I have a machine and I can go to history, I would probably tweak v2 to a slightly different shape after having the experience from the last few years, people implementing, there are people not necessarily understanding the concepts behind it; it's quite a complex protocol.  I would probably make it slightly different but it's not such a big deal to create a new protocol, by far no.

Peter McCormack: Has it been stressful then?

Pavel Moravec: Frustrating.

Peter McCormack: What's been frustrating?

Pavel Moravec: After years of running a pool and experiencing all different issues coming from v1, you have a specific mindset, you have some insights into how it really works, what are the edge cases and how to deal with them, so you try to project the experience into a protocol.  But just reading the specification doesn't give you the insight.  So, people were not always catching the reasonings behind some design decisions on the protocol, which you can blame yourself for not explaining everything in the specification so that everybody understands, but the talks about explaining the reasoning about some of the features, it takes just a long time.

Peter McCormack: And has that therefore ended up being a distraction from running Braiins?

Pavel Moravec: No.

Jan Čapek: Not really.

Peter McCormack: Not really?

Jan Čapek: It makes you realise, especially the latest changes in terms of the security and the encryption protocols are just like, well, that you could call a distraction.  But at the same time, you realise it's important that the consensus is unified about the technology that we're going to use, and actually the less options you have, because technically you can make the protocol very flexible using different schemes, but you want to be simple for any future changes, so whatever.  So, that's what you could call a distraction, but at the same time I think it's to the benefit of the protocol itself. 

Maybe to add to this, I don't think there's going to be a v3 in a way that now, this is actually the first mining protocol that has the ambition to have an official specification, unlike Stratum v1, original, when you go to the internet, you'll find a lot of dialect and you have no good clue what the single source of truth for the protocol, so there is no single spec.  There are so many dialects implemented by different software ASICs that that's something that we had to deal with on the firmware side, on the pool side because then you have new firmware coming from the manufacturers and then it doesn't comply with your pool. 

So, this has been a big hassle throughout the years, and that's one of the reasons to have, finally, something formalised.  And this formal specification can evolve and change eventually; it's ready for making changes, even though nobody would be happy about some major changes, but it is possible, so that's why hopefully we would not have v3.

Peter McCormack: Okay, amazing.  Well, look, the third film in trilogies are always shit!

Jan Čapek: Okay, so we'll stick to the second one!

Pavel Moravec: Yeah, that's the reason!

Peter McCormack: They always peak at number two, it was like Alien 2 and Terminator 2, Superman II, The Godfather.

Pavel Moravec: Nice observation.

Peter McCormack: Every third film's shit, The Godfather III is shit.  It's true; Superman III was shit; Terminator 3 was shit; was Alien 3?  It was okay, but basically shit.

Pavel Moravec: Yeah, the trend is pretty clear.

Peter McCormack: Although the second one usually is the dark one; Superman II was pretty dark.

Pavel Moravec: What about Lord of the Rings, they made already three, it's the third one as well?

Peter McCormack: They're all shit! 

Pavel Moravec: Okay!

Peter McCormack: I hated those films! 

Pavel Moravec: Based on personal --

Peter McCormack: Are you a Lord of the Rings fan?

Pavel Moravec: Yeah.

Peter McCormack: I didn't like them.

Pavel Moravec: I did enjoy the original books a lot.

Peter McCormack: Yeah.

Pavel Moravec: I don't have troubles with the films myself.

Peter McCormack: That's probably going to be my most controversial take, telling bitcoiners that I think Lord of the Rings is shit! 

Pavel Moravec: Is there any consensus about that in the community?  I don't think so.

Peter McCormack: I don't know, man.

Pavel Moravec: You cannot say anything against meat, obviously.

Peter McCormack: No.

Pavel Moravec: This is more controversial than Lord of the Rings, I would say.

Danny Knowles: I'll back you up on Lord of the Rings though; they're really shit.

Peter McCormack: They're fucking boring!  Do you know what the worst thing was?

Pavel Moravec: So, you're not in enemy territory now!

Peter McCormack: Do you know what the worst thing about the Lord of the Rings was?  After you watched the first one, you're like, "Well, I'm going to have to watch the second one".

Danny Knowles: Sit through another five hours?

Peter McCormack: Yeah, and then the third one.  Oh my God, it was so boring; that's not my kind of film, I'm more of a, I don't know, Casino man, Godfather.  Okay, so that's a good lead up to why the fuck is hashrate going so crazy?

Jan Čapek: Well, we have the bull run before?

Peter McCormack: There was a little bull run.

Jan Čapek: And that's the time when everybody gets crazy and starts buying machines, but it takes time to manufacture them, especially with today's silicon, you have to grow it, it takes months and months.  So, now these are the machines that are eventually being shipped.

Peter McCormack: What, hold on a second, hold on, you have to grow silicon?

Jan Čapek: Yeah.

Peter McCormack: Did you know this?

Danny Knowles: I did not know that.

Peter McCormack: You have to grow silicon?

Jan Čapek: Yeah.

Peter McCormack: It's an organic substance?

Jan Čapek: No, it's an inorganic substance, but it's a good analogy, like if you grow crops, because you cannot speed up the process by having more money or whatever, it has distinct stages; you take a raw piece of silicon and then you put one layer of the chip on it and then you grow another layer and so on.  It has, let's say, 20, 30 layers, and the more advanced chip process technology it is, the longer it takes.  If you have, let's say, micro earthquakes in those regions where chips are being manufactured, you have to redo the round again, so it's a process that takes a lot of time.  You cannot speed it up too much; you can speed it up in a way you're running in parallel but you have still some limited capacity. 

So, it's an interesting thing and almost a point where you could commoditise the chips because you can place your futures for growing your silicon for the Bitcoin mining machines.

Peter McCormack: Okay, I'm going to be honest, I don't know shit about chips; what do you mean you grow; how does a chip work?

Pavel Moravec: It's just a procedure of layering layers of silicon on different layers of the chip, and it is so optimised to be so small and efficient that you cannot speed up the single steps.  There are like thousands of manufacturing steps going into every single chip.

Peter McCormack: Okay.

Pavel Moravec: Obviously you do it wafer by wafer, where there are thousands of chips, but the wafer to be from raw wafer to chips, it takes months because all the steps take a lot of time.

Peter McCormack: Are chips designed and built specifically for the device or are chips generic and the device itself is programmed?

Pavel Moravec: The process is generic but the chips for Bitcoin mining are specifically designed for Bitcoin mining, and it uses the latest and greatest silicon technology that you can get, basically.

Peter McCormack: So, these miners keep making the same mistake, there's a bull run, they raise loads of capital, they suddenly put in a massive order, and then by the time the order's ready, we're in a bear market, whereas if they raise all that money and said, "Let's just wait 12 months", they wait 12 months, and then they could just buy all the ASICs that all the broke miners have got on the cheap?

Pavel Moravec: You would have to invent some machine telling you what's going to happen in the next six months, which typically you don't have.

Peter McCormack: You do, it's called the internet, and you look at the history of Bitcoin, and every four years, it does the same thing!

Pavel Moravec: Yeah, but then, from this perspective, they are making the same mistake again, but it's quite natural; there is a bull market.

Peter McCormack: Yeah, "This time it's different".

Pavel Moravec: It's cheap to get money for mining, so you typically want to get as many orders as possible because then you can put a press release, "Hey, guys owning our stocks, or wanting to own our stocks, we are big boys, we'll have that amount of hashrate in the future", which is obviously good.  But then it's not single order, it takes time to build it, so the more money you pour into it, typically, it takes longer to deliver.  So, the deal is severe, so the current hashrate is still a product, at least in our opinions, it's still a product of the massive orders put in the moment when it was understood as a good idea.

Peter McCormack: So, you don't think there's any nation-state mining going on?

Pavel Moravec: No.

Jan Čapek: Not in large scale.

Peter McCormack: So, do you think there's some?

Jan Čapek: I would say so, probably to the east of Prague.

Pavel Moravec: Yeah, there is.

Jan Čapek: I'm sure some governments --

Pavel Moravec: I do not know nothing, but it's true.

Jan Čapek: It's just a speculation, but maybe to add to this, why the hashrate is going through the roof, it's also important to realise that the machines that we had before were built on a different technology.  So, let's say a previous generation miner was somewhere between 50 terahash and 70 terahash, or heavily, on our clock 80 terahash, and the new machines are like basically double of this hashrate, the latest XPs.  So, it's not just the amount of machines in terms of number of pieces but also the hashrate of each machine is 1.5 to 2-fold bigger than what it was before, so that amplifies it.

Pavel Moravec: Yeah, and one more amplifies it, the efficiency goes up meaning the same energy consumed for mining generates much more hashrate nowadays, if you follow the technological curve of newer machines.  So, yeah, it's quite natural that hashrate goes up, and it would be very surprising if this would stop, it would mean some quite severe issues with the whole ecosystem or Bitcoin price if all the centres look at the historical charts; it is basically an ever-growing curve, with exceptions of ban of mining in China, various black swan events, and then it just went up.  So, it's not surprising that it trended like this, especially the last bull market, a lot of public companies raised a lot of money, an unprecedented amount of money; it was not the previous bull run, the same.

Peter McCormack: Right, okay.  When I was out in America recently, so you know I made a film on mining, I was in Texas, Oklahoma, dipped into a couple of other states, I think it was Arkansas -- is Arkansas a state?

Danny Knowles: You went to Texarkana, didn't you, which is like on the border of the three, I think.

Peter McCormack: Yeah, I should know that; Arkansas is a state, isn't it?  That was Bill Clinton's?

Danny Knowles: Yeah.

Peter McCormack: Yeah, I think Mississippi as well, and I got really close to mining, the closest I've ever been before.  Rather than just like the exposure through the pod and doing some mining myself, I actually went to facilities and saw different facilities, saw home miners.

Pavel Moravec: So, what was the experience?

Peter McCormack: Well, the experience was broad because I saw everything from home mining to institutional mining; but also, I hooked up with Marshall Long at the end, went and hung out with him.  What I realised about mining that was super-interesting is there is no room for ideology in Bitcoin mining; it is cheap power plus efficient operations to ensure that you have margins that are profitable.  I met a lot of people on there who actually don't care about Bitcoin, don't even own Bitcoin, who work for mining companies, but again my experience was it was the area of Bitcoin I found that has the least time or room for ideology.

Pavel Moravec: Interesting.

Peter McCormack: Yeah, which I thought was super-interesting.

Pavel Moravec: The competition is very tough.

Peter McCormack: Yes.

Pavel Moravec: It's very tough, and the whole incentive structure drives everybody to be really as efficient as possible otherwise you lose the money you invested in.  So to survive, you're naturally forced to be as efficient as possible.  I don't think there is no space for ideology, but surely it is efficiency-driven, execution-driven in most of the cases, yeah.

Peter McCormack: Yeah.  That's not to say there was no ideology, that's not to say I didn't meet bitcoiners who have a Bitcoin ideology, but yeah, it was more focused on, "This is what I think Bitcoin is, this is why I think it's useful", not in that, "You should be this human and if you don't do that, you're not a bitcoiner", kind of thing, it wasn't kind of like oppressive ideology, it was just more kind of personal.

Jan Čapek: Do you remember the SegWit wars or Hashrate wars?

Peter McCormack: I do, yeah.

Jan Čapek: Okay.

Peter McCormack: I was very new then.

Jan Čapek: But that would seem to be ideological, but when you looked at the details, or in my view it was not just about the ideology but about specific reasons that you could lose some, let's say, advantage when mining Bitcoin.  There was the AsicBoost affair at the time where nobody knew that some of the machines already had this improvement, but there was no counterpart in the mining protocol for it, so they had to find their way around it. 

Bitmain will never confirm this or acknowledge this, I would say, but their firmware and their machines were capable of AsicBoost when only selected groups of people were able to use it, and it would seem it's ideological like, "Do we do SegWit?  We don't do SegWit, etc", but it's like you want to have the advantage to the rest of the mining world.

Peter McCormack: So, do you think this is why Jihan supported Bitcoin Cash, because he wanted to maintain the AsicBoost?

Jan Čapek: I wouldn't go this far.

Pavel Moravec: That would be a strong claim.

Jan Čapek: That would be a strong claim, but when I look at it just technically, do you remember those voting bits in the headers and it was like flipping --

Peter McCormack: Do you know who I am?!

Jan Čapek: So, you're Peter, right?

Peter McCormack: Yeah.

Pavel Moravec: Yeah, we had voting there.

Peter McCormack: Me and Danny, at the time were like, "What the fuck is this in the headers?!"  Dude, that's way out of my comfort zone. 

Jan Čapek: But anyway, you could technically use these voting bits for SegWit for the AsicBoost, and we have a theory that it was being used for that, so it was like flipping back and forth, back and forth, and so on.

Peter McCormack: What was it like for you guys during the SegWit wars; were you always small blocks or was there ever a time where you were like, "Oh, well, that kind of makes sense"?  I was, the first time, I was so new, I was like, "Yeah, it makes sense to have bigger blocks because this would be great for businesses", but then it was like, "Yeah, and it makes sense for smaller blocks because of decentralisation; I don't know which it is".

Jan Čapek: I wanted to go with the Bitcoin Core philosophy, so don't make stupid changes that might look very attractive, but if you don't understand -- because Bitcoin is about understanding the whole protocol, Bitcoin protocol, and that I don't speak about, how the nodes talk to each other, but everything that's encoded into the software, how the blockchain behaves.  So, I was on the conservative side, but at that time, I personally didn't care much because I was busy with this stuff, like I was researching technically how to do AsicBoost and what's the deal with it, so that was a very exciting time, for me at least.

Peter McCormack: How much more efficient were the machines with the AsicBoost?

Jan Čapek: The moment, like I remember that night when I enabled it in the lab and you would see like 15% drop in consumption, 15% of energy that you could use in hashing.  It's not proportional, because let's say I want to overclock the machine proportionally, you would also have to tweak the voltage a bit, so you will not get like 15% of more hash, but you're either instantly saving that energy or you can you overclock and use that extra budget.  So, that's a comparative advantage that somebody, for sure, had and was using it, even though he or she was claiming --

Peter McCormack: So is this something someone figured out to get the advantage or do you think there's a possibility the disadvantage was programmed into it?

Jan Čapek: No, the way I think about it is that, let's say you were to design a new mining chip and you would know that there is this possibility to have this optimisation, so you would have both features in the chip saying like the straightforward way of mining and the AsicBoosted way of mining.  And you would sell machines with the straightforward way of mining to your retail customers, and the selected customers would get the boosted machines, or you just would keep them for yourself to have this advantage, because at that time the S9s were like the top of the notch, like the best machine ever.

Peter McCormack: And we don't know who was using it; it was definitely Bitmain but we don't know who, but definitely it was Bitmain?

Jan Čapek: Sure, but they will never say it loud.

Pavel Moravec: Yeah, and the efficiency difference is extreme.  You can compare it to, imagine you're mining on a pool and it takes 15% fee, you would get the same result as was the difference enabling or not enabling this feature.  So, they basically made everybody throw away 15% of revenue.

Peter McCormack: Yeah, throw away, yeah.  So, the software you've written that miners can include, is that your own kind of AsicBoost?

Jan Čapek: It's our own invention; we just started the whole firmware project.  At this time, when we discovered this feature, we were like, "We have to do something about it", and that somehow overlaps with the history where we were coincidently working on a firmware for a machine that was like AsicBoost only, and we were like, "We have to do something on the mining protocol end". 

So, Stratum v1 at that time, I think it was like 2017, 2018, something like this, got an extension to actually allow other covered -- what is the other one?  Like the open, basically you're saying, "I am doing the other AsicBoost".  So, we made the change in the protocol to allow this and then implemented the support in our firmware at that time for the S9s as well, and then basically everybody adopted it, and it was just natively supported in v2.

Peter McCormack: So, everyone has your software on their miner now?

Jan Čapek: I wish!

Pavel Moravec: It would be great.

Jan Čapek: It would be great, yes.

Pavel Moravec: It's not the case.

Peter McCormack: Really?  Why not though; how many people are we talking about; what percentage of the market do you think you've got?

Pavel Moravec: Single percent.

Peter McCormack: What?!  Like digits?

Jan Čapek: Something like this.

Peter McCormack: But there's literally no downside to them using your software, it's all upside?

Pavel Moravec: Yes.

Danny Knowles: Is one of the issues that it can void the warranty on the ASIC?

Pavel Moravec: It can be trouble, but at the same time a lot of machines, most of the machines are much older than what the warranty period is because it's typically six months or something.  If you are a strong player, you can maybe make better conditions, but I don't that's the main trouble.  It's quite a technical topic and the decision-makers are not always understanding the big enough picture to make a choice, and we can see a disconnect between people doing decisions and people running the operations and understanding the lower level aspect.  There can a lot of other business-related reasons which we possibly don't understand, but from a simple perspective it gets you more hashrate.

Peter McCormack: What's the percentage, the efficiency?

Pavel Moravec: Based on the device, older devices could get 15%, 20% more hashrate.

Peter McCormack: So, you can increase their Bitcoin income by 20%?

Pavel Moravec: Yeah, for some models, yes, or you can save 10% of energy on different machines.

Peter McCormack: Either way, it's a no-brainer.

Pavel Moravec: Yeah.  So, it seems like a no-brainer.  It's not all so easy, the support for machines is not always created, say, at the same time.  So, depending on the models you have, some models can be supported a bit later.  You have to deal with a different firmware as well, so if you're used to talking to the machines running some firmware, there can be slight technical differences.

Peter McCormack: Stop making excuses for people, they should be doing this.

Pavel Moravec: I don't get it, myself; I'm just trying to find reasons, because from a bigger picture it's a nonsense to not use the capabilities of the hardware, and currently vendors are not using the hardware as efficiently as they could, their firmware, we tried to fix it, so it's everybody's decision if it makes sense or not.

Peter McCormack: And then if everyone did it, there's no advantage; it's basically racketeering!

Jan Čapek: You should be running your machines at the most efficient level.

Peter McCormack: Of course, yeah.  Why spend all that time trying to get the cheapest power, trying to run the smartest --

Jan Čapek: And anyway, it's 10% right away.

Peter McCormack: Yeah, wastes 10%; it's just illogical.

Jan Čapek: Well, especially on Bitmain, the difference is big, but maybe again to draw the whole picture, back in 2018 everything was like rainbows and unicorns, you technically owned the machine because you could install whatever you wanted on it regardless of the warranty; if you cared for the warranty, then you wouldn't do it.  But this has changed and nowadays, when you actually buy the home machine, it doesn't feel like you really own it because the firmware that's on there is basically locked.

So, they will not let you log into the machine and do whatever you want with it, but also you were not able to boot an alternative firmware easily because it's using a scheme called Secure boot, so essentially the machine or hardware level checks if the image that you want to load into it is signed by the manufacturer.  So in an ideal world, we would like to have a deal with the manufacturers and become sort of the endorsed aftermarket firmware provider at some point, but that's very difficult to deal with.

Peter McCormack: I don't know, man, I'm a salesman, I reckon I could do it with you.

Jan Čapek: Okay.

Peter McCormack: Yeah, I would just get out there and see them.

Pavel Moravec: You'll get a nice cut.

Peter McCormack: Okay.  Man, if I had the time, I would get out there and sell that for you; this is an absolute no-brainer.

Jan Čapek: It sounds good.

Pavel Moravec: This is our struggle for so many years; it's one thing to bring a nice solution, a technical thing that makes sense, and a completely different thing is to sell it.

Peter McCormack: Yeah.  I'm a salesman, I don't get the technical shit, but I can sell it, historically.

Pavel Moravec: We complement each other in this sense a lot, I guess.

Peter McCormack: There you go.  Well, we'll share some ideas on that.  So, when you say they lock it, but have you still found a way around their locks?

Pavel Moravec: Yeah, we cannot talk about this publicly.

Peter McCormack: No, good, but I like it.

Pavel Moravec: But there is some magic.

Peter McCormack: Magic internet.

Pavel Moravec: This just works somehow.

Jan Čapek: Or let's say the solution is not ergonomic as you would expect, for example, it requires an SD card to be plugged into the machine, which is fine for a home miner, but that doesn't scale for a big operation.  Like, we're able to produce 20,000 SD cards, that's not a problem, but if you count the cost for just sticking the SD cards in and making sure every SD card works, that becomes prohibitive for big farms, so even if you have solutions in some ways -- so, for some of the machines we're stuck with this, for some of the machines we do have a solution, this can be like remotely installed, for example.

Peter McCormack: I still think, at 10% to 20%, it makes sense.

Jan Čapek: Sure, yeah, there's a strong incentive for that.

Peter McCormack: Interesting.

Pavel Moravec: Yeah, basic arithmetic should win in this case.

Peter McCormack: It's a fascinating business you guys are building, or have built, continue to build.

Pavel Moravec: That's true.  Yeah, it is very nuanced, there are a lot of small details, troubles everywhere, but at the same time you're participating in something that really makes a difference or it makes sense.  The whole mining aspect of Bitcoin is sometimes overlooked.  It tends to be technical for a lot of people, too technical, but it's the foundation.  Mining is the distinguishing factor in different money schemes you can create; if there is no mining, the biggest single difference of Bitcoin to everything else disappears.  Mining brings the capability of distributed consensus.

Peter McCormack: Love it, man.

Pavel Moravec: So, it is something that has a big idea behind it, but at the same time it allows you to work on a lot of small technical details in trying to push it further, so you get both of the worlds.  So, yeah, it's nice to work in mining.

Peter McCormack: That was a very profound way, I think, to bring this to a close.  Is there anything I've not asked you about that you wish I had?

Jan Čapek: Ask me about this book, it's free.

Peter McCormack: What's that free book you have over there?

Jan Čapek: This free book is an intro to Bitcoin mining; it can be downloaded from our website, and you can have this copy if you want.

Peter McCormack: Bitcoin Mining Handbook.

Jan Čapek: Actually, we have it in Spanish and English translation. 

Peter McCormack: This is amazing.

Jan Čapek: So, that's like for the beginners to get the concepts; it also shows the solar stuff and wind, alternative energy sources, the economy of running the miners.

Peter McCormack: Jesus!

Jan Čapek: That's a collection of our blogposts.  So, actually, on the conferences lately we haven't been giving away T-shirts, but the books, the books feel really good.

Peter McCormack: How many of these have you got?

Jan Čapek: Good question, hundreds.

Peter McCormack: How many have you got here in the UK right now?

Jan Čapek: Probably like 20.

Peter McCormack: Let's give them out, put them in the goodie bags.

Danny Knowles: That's a great idea, yeah.

Peter McCormack: Yeah, we've got a goodie bag for our event; it's a shame we haven't got 30.  Well, fuck it --

Danny Knowles: Ten people get unlucky.

Peter McCormack: Yeah, they get unlucky.

Jan Čapek: Oh, cool.

Peter McCormack: Yeah, but that's cool, yeah, we'll give them out to people at our event.

Jan Čapek: Oh yeah, that's good.

Peter McCormack: I'm going to make my son read this as well, get him into this.  That's very cool, thank you.  Okay, listen, if any miners out there who aren't using this software who should be using this software are listening and want to get in touch, they'll speak to me, I'll sell them that shit.  No, where do you want them to go?

Jan Čapek: Braiins.com, and on Twitter, follow us on Twitter.

Pavel Moravec: Any way how to contact us if somebody is interested, we will be pick up the contact and go forward from that.  It's not difficult to get us contacted.

Peter McCormack: Yeah.  Well, listen, congratulations, I think it's clearly not only have you built an awesome business but you've built really important stuff for Bitcoin, and your roles in the history of the development of Bitcoin and the pools and everything you've done, it's incredible.  You've created something that's had to go out and be open sourced to a community, I think that is incredible.  I appreciate you coming in.  I'm looking forward to visiting your country in June; is it the 7th to the 9th, around then?

Jan Čapek: 6th, 7th, 8th, something like that like.

Peter McCormack: Yeah.  We're going to Prague, come and drink some good beer.

Jan Čapek: Good beers.

Peter McCormack: Yeah, come and hang out, so I'm looking forward to that, and thanks for coming all the way to the home of Bitcoin in the UK, which is Bedford.

Jan Čapek: Thank you.

Pavel Moravec: Thanks for having us, thank you very much.