
Braiin Power with Jan Capek
Discussed in this episode
Boost this Episode
Send sats directly to the creators. Value for Value.
Plus 1% to Podcast Index, 1% to Boost Bot.
Show Notes
The month of September is dedicated to pleb miners who will not unplug nor comply. The backbone of the bitcoin network, dedicated to decentralisation and freedom.
On this #PlebMinerMonth episode of the pod, Jon and I speak with @BraiinsMining co-founder and CTO, Jan Capek. Jan is an embedded devices engineer and the father of the Braiins OS firmware and BOSminer software. Jan dives deep into the development of firmware and the challenges he and his development team encounter when attempting to modify machines without the assistance of the manufacturers. We cover Braiins’ (SlushPool) role in UASF and how stratum V2 enhances security, efficiency, flexibility, and decentralization of mining. We also discuss the development of the BaiinsOS+ firmware, and the advantages it can bring to a mining operator. We discuss the rebranding of SlushPool to Braiins Pool under the Braiins brand umbrella. We dove deep on a lot of topics in this one, the only thing we didn’t cover was “when”.
The Braiins team has been a great partner in #PlebMinerMonth, they have sent swag for us to give away as prizes, several of their Bitcoin Mining Handbooks, as well as financial support to ship all of the gear and prizes out to the Pleb. A special thanks to Kristian Csepcsar for helping to organize everything and thank you to Jan and the rest of the Braiins team for your support of #PlebMinerMonth.
Show guest
twitter - @janbraiins
twitter - @braiinsnmining
website - www.braiins.com
twitter - @MaxBitbuybit
twitter - @bitbuybitpod
Website - https://ungovernablemisfits.com
As always please feel free to reach out and ask me any questions.
Today you can exchange $1 for 4999 Sats (Sale ends soon.)
Thank you Foundation Devices for sponsoring the show. Use code BITBUYBIT at check out for $10 off your purchase
Bitcoin is close to becoming worthless.
Now what's the Bitcoin? Bitcoin's like rat poison. The greatest scam in history. Let's get it.
Alright, you ungovernable misfits. I'm your host, Max. Everybody knows that Bitcoin is useless, worthless and doomed to fail. But what if everyone's wrong? What if it's the system that is doomed to fail?
Join me as I speak to some of the brightest people in the space and sliver to the deepest, darkest depths of the Bitcoin rabbit hole.
Welcome back to another day of plebminer month. Today's episode is with the CTO and co-founder of Brains, Jan Chappec. Jan is an embedded device engineer and the father of the Brains OS firmware.
In this episode, we do a deep dive on stratum V2, slush pools role in UAF, and some of the challenges the Brains team encounter while trying to modify machines without the assistance of their manufacturers.
I really enjoyed this episode and I just want to say a massive thank you to Jan, Christian, and everybody else from the Brains team that has been helping with the plebminer month. Brains have given us Bitcoin mining handbooks and a load of incredible swag.
These will be given as prizes and they also sent us a load of sat so that we can ship these to all you plebs around the world. This just would not be possible without their help, so a huge thank you to the Brains team.
Make sure to keep an eye out today. We will be running these competitions so you can win these incredible prizes. You can find them on Twitter and ungovernable misfits.com. Make sure to follow Brains @brainsmining on Twitter and check them out at brains.com. That's b-r-a-i-n-s.com.
Enjoy the show. Hello? Hey Jan, welcome to the show. Max should be dropping you soon. Very good, so how is my audio coming? It sounds really good. Cool, because I have a good road and mic, but it just scared me up because I just moved to a different house and it has a special USB cable
the one that you typically never use, the one for the printers. But I found it. All right, let me check in with Max here, see where he's at. He's the professional, I'm just the guest host for the month.
Are you guys in? Yes, we are. Sometimes these links, that was the trouble with maybe sending it to a calendar like a Christian had asked because sometimes these links just, you know how it is.
You develop firmware for a living, so I'm telling you. Yeah, sure. Actually, I think somebody was using Zencaster. I'm trying to remember who it was, but I've been using this setup with the external mic for a while for the podcast and it's been going pretty well.
So I don't remember a single issue with this platform. Yeah, it sounds good. Your mic sounds good. And I like this platform because you can download to each local device, the MP3. So something happens.
It's not all for not because one person's computer messed up. There he's coming in now. Oh, good. There you are. Yeah, sorry about that. You're already recording. We are already recording.
As is your tradition. Good to have you on. Pledmon a month. What are we? Day six. We're day six. Yep, day six of Pledmon a month. Just to give you kind of an update, Jan, as do what Max and I are doing for Pledmon a month is every day we're dropping a pod, a short podcast that Max calls
bite-sized bitcoins or FUD busters, just little educational pieces, short, sharp pieces that people can listen to in a few minutes to pick up some knowledge about mining, articles dropping every day, prizes, giveaways all throughout the month on ungovernable misfits.com and the bit by bit pod.
So we're glad to have you on board and helping us out with Pledmon a month. It's a pleasure to be here, guys. Yeah, thank you for the prizes and giveaways as well. That's awesome. Helps people get involved a bit more.
I can't imagine. So as part of the month, we're providing education not just for people that already kind of do small-scale mining or Pled mining as we call it, mining at home type of things, but people that may be new to mining or into Bitcoin but are kind of afraid to dip their toes into the mining space.
So if you could, we're trying to cover all aspects of this. We're definitely going to get into the weeds as far as brains and pools and firmware and all that stuff goes. But can you kind of give an overview for some of the new people in the audience as to what brains does and who you are?
Okay. My name is Cian. I'm one of the co-founders of brains. Brains is the company that's been providing BTC mining tools since 2013. We're the company that has been operating slush pool back then from 2013, even though the pool is slightly older.
About 2018, we came up with the idea of mining firmware to extend our software stack. In 2020, we basically made it commercial. So we had the, at that time, it was called brainsOS. So we came up with the idea of brainsOS plus.
That's, you know, that essentially builds on top of the original firmware and it's like auto tuning features. So it finds optimum settings for the mining machines. Recently, we have added a farm proxy for sites that essentially have limited bandwidth or have other issues.
And the farm proxy allows segregating the hashrate locally. And then basically you have just a couple of connections going upstream to your favorite pools. Also recently we provided something that we call farm monitoring dashboard.
And essentially it goes down the line with standardization where we see the future of the mining essentially. Currently, when you look at the machines, how they come out of the factory, they pretty much don't have any suitable interface that would allow standard monitoring, it's just the CG minor API.
So you're kind of stuck with like providing your own script. You may be able to download some open source tools, but it's like, you know, basically a hacky solution all the time. And we decided, let's change this a little bit.
And for example, brainsOS nowadays has already a primatose endpoint. So essentially there is open metrics standard that you can basically scrape the metrics data from each machine, and you can use primatose for that and have a nice graphite dashboard that we provide in the form of the form monitoring solution.
And I would like to go down this path with the product in the future as well, because obviously the next step would be how you want to manage the machines at scale. Is there some standard approach to do it?
So on, so on, so this is kind of like a long-term vision that we see in the form where the industry should move. And maybe I just gave a little bit more than just the overview of the company, but I kind of jumped into the products that I feel are important.
So essentially brains is the BTC mining tools company, and I specifically say BTC we have recently decided to drop zcash mining to fully focus just on Bitcoin, because it keeps us open to buy a hundred person all the time, and it's getting denser and denser, so we have to be really focused on stuff.
Right, and your dedication to Bitcoin and the Bitcoin network there at brains and slush, and now just specifically going to be branded everything under brains, you know, you can see it in the community.
You guys are always there helping out plebs, helping out smaller miners, and you've been there for a long time. And then going back to like 2017 and in the whole USUF debacle, can you guys kind of explain your role there and how you kind of get Bitcoin pure?
Sure, at that time, even though like when you look backwards, you would say, "Oh, that was like so obvious that it's going to work out." But like honestly, like I wasn't sure like where the real truth is and the only moment where you could tell that the truth is that most or majority
of the hash rate is going to work with UASF fork or signaling. It was only if you actually tried it. So I mean, we were convinced we were like talking to a lot of people, and at some point we just said, "Okay, there's no way around this."
And the technology upgrade needed for SegWit was something that was completely in line with what we saw like for the future development. And even though like this was slightly incompatible with things, it was just needed.
So at some point we came to a conclusion, "Okay, we're just going to support it and see what happens." So our role in that was basically providing miners with like the voting options, in the version bits, at that time you could use voting.
What was also interesting is that at some point it was sad that basically maybe bit-minus using the covered AC boost. And like that we would have to fork off to explaining what the AC boost is, but I will just really sketch the surface now just to explain the version bit.
So what was interesting that some of the like voting bits were like flipping back and forth, even though it just didn't make sense. Like they would not be like voting consistently, at least like looking back.
And that just made me think maybe they've been using the bits not really for voting, but for something else. That was the case with the covered AC boost because to explain it, the covered method would be that you would not even know like there's anything going on,
but essentially it all boils down to the fact like what are the actual capabilities of the former and miners nine. And that machine actually allowed what we call like four mid-states. So you can think of it like instead of sending it one unit of work, you send it like four units of work.
So the machine at every single point is working on like quite a root amount of work. What you get for it is saving some energy. You can get later on into the details like why it's happening.
But essentially in order to send the machine like four units of work instead of one, you somehow have to generate it. And to generate it, you have like few options. One of them is like the Overt way, which is the way we do it now.
So basically you have the version bits and some of them are not used for anything Bitcoin protocol except for the voting. So if you take two bits, two to the two, so two square is four. So you have four options, you can generate essentially four versions of the same blog header that you can.
And now I'm oversimplifying that you can hash in your control board of the machine. And then you generate those four units of work with just this little modification. But the second chunk of the work, because everybody knows that the Bitcoin blog header is 80 bytes and SHA-256 works on 64 bytes chunks.
So you essentially have to expand this 80 bytes to so that it's padded to 128. But that's a tiny detail. What is important is that the first chunk where there's the version bits field in the blog header, that's where you can do the magic and generate those four variants.
And the second part of the blog header is always the same. So that's one way of creating this quadruples of work. So these four work units and send them to the machine. And the other way would be if you think about what's the actual payload in those two chunks of data in the blog header, and you find out that there is the Merkler root
that actually starts with the first four bytes in the first chunk and then continues further. And if you shuffle transactions in the block, you can start generating different work routes.
And at some point you may be able to find a collision that starts with the same four bytes. And that's essentially your work that you can then use to send to the mining machine. It's a little bit difficult to explain.
But just to give you the idea that basically the whole point is that you can either use the other way, the version bits, or you can just hide away and just do some magic with the Merkler root calculation and find the collisions there.
But in order to find like four collisions, that's actually quite involved. But it is much easier to find just two collisions and complement this with just one bit, which was used, for example, for the voting.
So you can do like a hybrid stuff. So we had some theory that something like this could be going on. But nobody would like admit, yes, we did it this way or not. But what is for sure, at that time, that was something that was coming out of Bitmain, that they would not admit that the machines had the capability to vote in that way.
Yes, and what was interesting is that the machines, they had the feature inside of it. And that feature causes that you can actually save up to about 15 person energy. That's what we measured at the wall or the other way around.
You can use that leftover power budget to spend the machine faster because that's what the ASIC boost is. Yes, yes. I mean, this general thing is called ASIC boost. And when we get to the point of what the ASIC boost is, essentially, why explain that you're getting four units of work into each ship?
That means that you are basically saving one expansion step of the second chunk. I recommend, if your audience is interested in the details, if you Google for ASIC boost the patent or the white paper, it's very nicely explained with pictures.
How the whole mechanism works and it also nicely demonstrates how the block header is structured. So once you see the pictures, things start getting much clearer than what I just tried to explain.
So the high level message from my end is that there is some magic that causes saving of the energy. And that's like a must in today's chips, essentially the magic is that you're sharing a certain step in SHA-256 function and as the expander because what you're basically doing out of these 64 bytes, you're doing 64 words.
That's like the first step of SHA-256. And because the second chunk of data, which is like the second part of the block header plus some petting, is always the same, you are able to save this energy.
But you have to make sure that the chip has a unique work. Okay, and from my understanding, this was something that wasn't shared with the people purchasing the machines. It was something that is held back and then found later.
Assuming that people have an advantage, the insiders have an advantage of that 15%, which is pretty dramatic. And what is more interesting is that the firmware, like we actually published a paper that was explaining this, that we found out that really the S9 machine is capable of doing a sick boost.
We have enabled it with the existing firmware because we had brain saws at that time, but we were still using the FPGA code that's essentially doing this magic translation of the job, since streaming of the jobs to the hashboards.
But once you enabled it, the problem was that the machines were like technically running a sick boost. You would see drop in power consumption, but the results, like basically all the results were incorrect.
And the reason being is that there was like no documented way how you should explain to the FPGA, which is basically a component on the CPU currently on the Zing boards on S9s, to do the version running correctly.
So you would have something in your hands that almost worked, but it was not valid in terms of the Bitcoin mining protocol. So the results were not correct, but we published a paper and within a week, actually Bitmain published a new version of the firmware with this actually fixed.
And what was even more interesting is that we took the firmware and it wasn't really working. There was some issue with it. But once we took just the FPGA code part and put it into brain saws because at that time, our firmware was just built from different components.
One of them was CGMiner. We had the FPGA code from Bitmain and stuff. And then suddenly the firmware actually worked and we had, I would say, we had pretty much the first firmware that would support AC Boost on an S9.
And you're saying that's because they had changed something at Bitmain at that time. After you published it? Yes, it was within a week. That was interesting. They published a new firmware that would be, I don't know if it had AC Boost in the name.
I think they had something like low power or something like that. But it was obvious. And once you ran it, you would see right away that it's just consuming less energy. So for the S9, that was quite significant because their efficiencies is somewhere around 68, 70 joules per terra hash if you run it with AC Boost.
So that was interesting. So as you guys are developing this firmware at that time and even beyond as you guys are doing new machines, do you get anything from Bitmain? Is there any communication back and forth?
Are they just a completely closed door and you do whatever you can do? Well, my vision would be to finally get to a co-operation because it just makes sense that basically-- Their machines are an interesting piece of hardware and they could focus on just the machine themselves
and allow aftermarket firmware to exist. But this is not the case. And I think it's getting worse in a way that in the time of S9s, the whole machine was pretty much open. So you could like log into it to SSH.
You would have like full root access. There was actually sources available. CG minus sources for S9 were pretty much available. You had also like bits and pieces of the operating system. So if you were like skilled enough developer, you could like put it together even though it would be quite involved.
But nowadays it's completely changed. There's like nothing being published except for the firmware binaries and you're like losing SSH access. So actually, SSH access is available. But they limit it to like regular users.
So you're not root. So you cannot do anything you want with the machine. And it would be interesting to mention that they also enabled a feature called secure boot. And what that means. Could you pronounce that again?
Did you say secure boot? I see. I said secure boot. And it's a standard feature in embedded processors where they essentially sign their firmware and the public key that is used for verifying the firmware or its hash is stored in the CPU on the control board.
And it's like one time programmable register of users. So basically you're locked in to the factory firmware because it's not easy to switch over to anything else. And there are ways like if you plug in an SD card, you can boot our firmware for example.
But it's just it's not ergonomic anymore. It doesn't scale. So for like one to two miners or 10 miners, you don't care. Like you just flash 10 SD cards, plug them in. But like for 1000 machines in a farm, that's actually an issue.
So I would expect that this would be a topic that would make our life much easier if it didn't exist. And to me, it would make their lives easier as well. Because it makes their machines more desirable.
Do you think as far as the personality of that organization there that it's the subterfuge that the not allowing you access, the kind of locking you in to everything, is this just hubris on their part?
Or is there something more sinister? I like I've been thinking about the actual motivation and I still didn't come to a definite conclusion because it's what do you look at it? Like from from like top level perspective, you can say, okay, this is for security reasons.
But this is not security because you're relying on something that has been signed by the manufacturers. So you are not really you're not enforcing like user and security sort of like I think when you have your laptop, I think you may be able to put in a public key that you used for signing your firmware, your Linux kernel or whatever.
So essentially you have like the full, you know, boot chain under your control, but really under your control. But here it is that you are relying on the fact that the manufacturer never leaks his or their key to any attacker.
Because it's also dangerous in the other direction, right? I mean, if the key leaks at some point and an attacker would be able to sign a fake firmware, you're pretty much in the same situation like you were before.
But now you're basically stuck to the factory firmware that you need to do something with. So it's it's not secure to the level where you would expect it because I mean the only security that makes my sense to me is end user security
where you as a user generate the keys and if you don't trust your network setup or whatever you don't rely on network level security and you want something like this, then you generate your keys and you make sure that the boot chain is secured by your key that you used for signing your firmware.
So it doesn't make sense from this perspective. Then you can say, OK, they do it because of warranty. They don't want people to mess with the machine. Because their warranty support is so good.
Probably, but then I would envision a way that is I would say less harmful or maybe from my perspective is kind of acceptable. Like when you buy a cell phone, like back in the day, you would have to root your cell phone when you wanted to download and install an alternative firmware.
So nowadays when you I use Android, so when you switch to the to the bootloader on most of the cell phones, you have an option that you want to unlock the phone, but it's like a one way procedure.
And when you do it, you basically void your warranty, but you have the option to then to use alternative firmware. If you want some open source firmware image for your cell phone for whatever reason, you have the option.
And this this approach to me looks more acceptable than like the current status. I just say that about the warranty because they kind of hold that over everybody's head as to why they they don't want to modify the machines that are put them in immersion or put aftermarket firmware avoiding the warranty.
But you know, you hear these horror stories of people sending their machines and it takes two, three months where they just could have said, well, screw the warranty and send it to a more local repair shop for them to get that done.
Their behavior is odd in a lot of ways. And it kind of makes me suspicious. Like, why does Bitmain act like this? I mean, we can get into MicroBT as well a little bit later on. Like, Jan, what kind of data do you think, what kind of data do you think that Bitmain collects on their machines?
Are they collecting data or pool data or are they storing that? I wasn't even thinking about this possibly another affair that I can pull out was the end plate. That was the management feature in quotes were at that time, I would say this was a real threat to the Bitcoin network because the majority of the machines were assigned.
And this feature allowed to to shut down the machines basically remotely. So that was quite dangerous. As of now, I mean, I am not aware of any significant data collection there or something like that.
But I mean, it's not that we do a thorough analysis because we really focus on our firmware. Like we just can't spend that much time on looking at all these things. Well, the fact is that the existing firmware still violates the GPL because the components in the stock firmware are still GPL.
So my perspective, from my perspective, it looks like it's some kind of protection of, but you don't want to even call it IP because... Yeah, how can you have IP? You don't have the license for...
Right, that's the thing. And it just makes other people life more miserable. Especially yours and your support team. Right, but at the same time, I have to admit, we basically build our product on top of their product.
Yeah, sure. Yes, we can complain to whatever level we want, but at the same time, it's questionable. Until you start building your own machines, you kind of have to stay in the moment. I just don't want to sound that I'm complaining.
I'm just commenting that this is the status of core. Sometimes I even get the feel. We had some information that maybe they just did it because of us because there were some rumors. Is that a spite? Well, there were some rumors that basically somebody thought that when you run Brains OS, you have to use /pool.
So it locks you into /pool, which is not the case. Yeah, you guys are very vocal of that. That is not the case that you don't have to mind with /pool. Yes, yes, correct. And if you mind with /pool, you get discount on the pool fee.
So that's the only deal that's somehow related to /pool. Do you think this is something that will continue if we get more hardware manufacturers? Do you think it would make sense to say, well, these guys do the firmware.
They do it really, really well. So we'll allow them to do that and we'll focus on hardware. Do you see that that would be a trend in the future? I think this is the only way. When the market conditions change, that you have a choice of different manufacturers with different policies.
That's probably the only way how the situation can change and you would basically a more free market. But now we're still seeing that there are basically two major manufacturers in the game.
I'm still putting aside intel because it's in early stages, right? But in terms of the volume of machines that are operating out there, that's mostly a bit better, MicroBT and Kanan. So three, sorry.
I didn't mention all three of them. So only a larger number of manufacturers can, in my opinion, change the situation. And also, big miners can create a pressure on the manufacturers when they're ordering a batch of machines.
They can say, okay, we can go to a competition, but we would like to get your machines. But since we have this firmware provider, whoever that is, maybe Brains OS or somebody else, we would like the machines to be open so that we can run alternative firmware.
And these are like the two approaches that I would see that could change something. But I mean, we can complain about it, but I think it's better to try working on it and basically the Western world US and the companies in that area
should finally get into a point where there would be some European based or US based mining machine available at scale, which I think is finally happening, at least from what we were seeing from the various announcements.
What do you think held up the development of Western manufacturers to produce some of these machines? Why was it always, why was the market always left to these, mainly these two big companies?
I think it was probably a certain level of critical thinking. It's a very risky investment, right? If you want to go down this path. The number of failed companies in the industry is pretty high.
There's actually a page on Wikipedia or on the Bitcoin Wiki that lists like all the ASIC machines that have ever been manufactured all the different types. And when you see the list of companies, it's pretty long.
And when you look at how many companies survived until now, it's not that many. And it copies, but in a much shorter time span, the same as what happened with the chip manufacturing, speaking generally about the ASIC technology not specific to Bitcoin mining.
We now have basically TSMC and Samsung and partially Intel, capable of producing the cutting edge technology. I don't know much about global foundries, what they have now, if they are going for 7 nanometers.
But the number of companies, and then I have a SIMIC, which is the Chinese one. So basically, I mentioned one, two, three, four, five companies out of, there were like tens of companies in the chip industry 20 years ago.
So the trend is quite obvious that the more advanced process node you have, the more advanced technology that is required and the Bitcoin mining industry hit this point already. So we're not at some low end technologies.
Like the machines are using five, seven nanometers, which is currently the state of the R that's being used for the latest iPhones and MacBooks and whatever other computers. And you're competing with these big companies for the resources.
So it kind of copies the same path. You only have a few manufacturers that essentially survived. Back in 2015, when you produced an ASIC, it would be obsolete in a couple of months because the other one was exponential.
But nowadays, when you look at the lifespan of S9s, it's only now when they're like slowly going out of business, but it's not completely true because you still have use cases where you have the flower gas, like what the upstream data guys are doing in the oil fields where you basically need anything to burn the flower gas.
And if you get it for a super good price, then it still could make economical sense. And the S9s were here since 2016. I mean, this is a six year lifespan only now when it's going slowly, slowly out of business and there would be still use cases for these old machines.
So that's amazing, like what the industry did in past 10 years, it's basically a shrink version of what we have seen in ASIC development when the first silicon has been produced. And that was when like 70s or something like that.
I default to you on that one. Yeah, sure, sure, sure. And even for us, for our use cases, for being small scale miners, the S9s are a great learning tool. Handed out to people with Bitcoin meetups, lend one to people, see what you can do with it, and what kind of innovations they can come up with like home heating
or developing that aspect of Bitcoin mining where we get rid of resistance heaters and start using ASICs in order to eat things. During those kind of Wild West days of all these multiple manufacturers making machines, did any of them reach out to the brains team and say,
"Hey, would you like to help us develop the firmware for this machine?" And they just kind of do it all on their own. Back in 2017, and I actually mentioned this at about the Honeybudger, this is actually how the brain so has started, is that we were developing firmware for the Dragonman T1s.
And this was an interesting piece of hardware, because this was the first machine ever that would be like ASIC Boost only. So first thing that we had to do, we had to propose a change in Stratton V1, the old protocol that's still being used to support it so that it could negotiate different kind of jobs
and submit also the version bits and implement the version rolling in there. So this was like the game changer also for the over-tacic boost and for the S9s to officially use this and support it.
But at that time, we were like envisioning, "Okay, let's focus on the support for these machines." And then we're going to look into S9s. And the vision that we had at that time is that this would be like the first manufacturer that would be open enough and visionary enough that he would essentially want to produce
their machines without a firmware. And the firmware would be an open source thing that we would be delivering or that would be available to us and there would be some business deal between us and the manufacturer.
More details are on our blog, but that deal actually fell through. It turned out that they were, once the ASIC Boost was ready in terms of the protocol, they pretty much had an alternative component to develop a closed version of the firmware for them.
So in 2017, we were just sitting there saying, "Okay, so we now wasted like half a year getting the firmware ready and now like nothing is going to come out of it." So we came up with the idea, "Okay, let's not give up and give it some name."
We came up with the name of Brains OS, what America's name, but everything in Brains is Brains something. So why in the Brains OS? And we published it and then the whole story started, like we made support for S9s because we were thinking the machines were very close to each other.
They basically had almost the same control board, so the operating system was almost exactly the same. The communication with the Hboard was completely different, it's a tiny detail, it's just a driver abstraction.
So that was simple and it was a compilation of OpenW-R-T, which is a standard embedded Linux operating system used in your routers. If you're into open source stuff, you typically buy some router made in China and it just flush it with OpenW-R-T to make sure it's not calling home.
And a CG minor at that time, in combination with the FPGA code from Bitmine, and we had in mind that, okay, after the ASIC was discovered, we would start developing our own FPGA code so that the full stack would be open source and we decided to rewrite the CG minor from scratch in the Rust programming language.
And there were a few reasons, one of them was that the current code base of CG minor throughout that many years of contributions is very low quality and the software is very difficult to maintain, it's written in C, so it's difficult to find developers who would be interested in it.
So we decided to go with Rust, the Rust programming language currently is getting quite a bit of traction and a lot of developers who were former C++ developers are interested in working with it.
There's Rust Bitcoin community, Rust Lightning, and Rust is really resonating throughout the Bitcoin developers community. So it was an obvious choice for us to do it and that was probably like 2020 when we had the final version that would already have the commercial extension.
You were talking about the Dragon Mint T1, just to let everybody know that we are giving away a Dragon Mint T1 as part of Plaid minor month. Our friends up at Decentral Tech out of Canada, their repair shop up there, they're giving away a Dragon Mint as part of Plaid minor month.
Additionally onward, we're giving away a whole bunch of S9s to be that development tool for newer plebs. That's really cool. Maybe I have to add that at some point we had to drop support for the T1s.
The reason being that the variance in the quality of the machines was so big that it was super difficult to get some consistent results out of it. They did build it as an alternative to the S9 at the time, didn't they?
Yes, yes. Well, a better alternative. Originally it was supposed to outperform it, but in most cases it was not really the case. Unfortunately, the one that you're giving away most probably is running the original firmware.
We have some older firmware in archive, but I strongly don't recommend installing the T1 firmware image onto it because it would not perform to your liking. Okay. I think it's good to admit something, right?
Yes, I know, I appreciate it. So we made some rational decisions to drop support for it, so the recent images don't support it anymore. That's okay. Yeah, no, I appreciate the honesty. And these are really just to get into people's hands so they can start playing around and learn basically
a lot of people who are sort of putting it on the sidelines and thinking, "Well, I don't want to go out and buy a new machine and invest all of this money and time." If they're lucky enough to win one of these machines or the S9s, it just gets them to dip their toe in.
And I guess what we're hoping is that people then get the bug for it and want to start building and start playing around with this stuff, and that really is what this month is about. It's just trying to get normal people who are a little bit scared, a little bit worried, haven't done it before to jump in and have a go.
Yep. Where is the S9? It's a different story than I recommend to install it. Can we jump into Stratton V2 a little bit, please? Just like an overview of what it is and why it matters. Yes, for sure.
Roughly about the same time, probably back in 2018-19, I'm trying to find the right spot in the history, but once we made the extension to the original Stratton to support AC Boost, we started realizing that the protocol is getting super messy.
It doesn't really have one single specification. It has quite a few efficiencies. I can talk to the individual things later. We decided to start working on a new protocol, even though it's called Stratton V2, but I think it's just to show the continuity that it's going to be something related to mining,
because Stratton protocol is exclusively now associated with mining, even though not too many people know that originally the protocol was somehow related to wallets. I can't tell you exactly what project it came from, but it existed in a form.
The old protocol was essentially a set of JSON messages, so it was text-based, and there were a lot of data being sent back and forth just to explain the other party what kind of payload it is, so it was very verbous, which the benefit was that you could just connect with your telnet,
and consult to the Stratton server, and you can talk to it just by typing, and you can verify easily what it's doing. It was easy to debug, but the cost that you pay for it basically got super high on the long run.
I would say the most popular string in the internet is called mining submit. It's one of the messages anytime a miner finds a share. It's submitted, and it just says mining dot submit, and then the payload.
This string has been sent through internet billions and billions of times, so you can imagine there could be a price tag to this payload that's being transmitted all the time. First thing we were sure about is that the new protocol is going to be binary, to save bandwidth, or use that bandwidth to allow, for example,
more frequent job submission or result submission and job distribution. What the original protocol was also missing, it was any kind of security layer, so essentially the full communication was unencrypted.
If you had a bad router that you didn't flash it with OpenWRT or you had some virus in it, it could basically intercept the communication of your little farm, especially like the whole mining could be affected, right?
Because you would be using some cheap router, maybe. And if you had the virus or the router would be attacked by somebody, they could be stealing like 23% of your hash rate, which multiplied by tens of thousands of such locations, probably amounts to a reasonable hash rate, but you would not even notice it.
So it would be stealing part of your shares. To explain this, it's not like really stealing the shares, but it would just make sure that some of the jobs that your machine processes are actually not coming from your pool where you think you're mining, but from a different one.
Is this kind of like a hidden dev fee? Oh, yes. He's kind of working a similar way. Exactly. So it would be like a hidden dev fee. Essentially, it would be interleaving like regular mining jobs with the jobs selected by the virus from their favorite pool.
And it wouldn't do like 50% because it would be probably too obvious, but like 23% would be something that you may barely notice, unless you're really aware of the numbers that the machine should be reaching and stuff like that.
And this was possible because it's clear text. Is that right? It was clear text and there was no checking. There was no integrated checking of the payloads. So this was something that we decided to fix ASAP.
Then another big topic was that we decided to propose a way how a minor, if they wanted to, they could locally generate their own block templates and still submit them to the pool. So that's something that is a hot topic these days to, you know, have a mechanism to prevent any kind of censorship on the pool end,
even though this is not in production yet. There's still some path that needs to be crossed. And quite a few details, especially on the accounting side of the pool have to be sorted out. But the good point is that the proposal of having a mechanism for this
is something that I find useful on a long run, because you never know like what regulations could come in the future and whatever may be needed. So even at some point you could get into a situation where you as a pool may not be allowed essentially to generate the templates.
You would have to leave it to the users. Okay. So, I mean, you never know. So this is like another section. And there are some small like efficiency improvements. For example, when not too many people again know when occasionally an empty block is found, it's sometimes people say, "Oh, it's a bad thing.
This has been a waste of resources." But it's not really the case. The waste of resources would be if the machines didn't have anything to do. And the problem is that when a new block is found in the network, it really takes like seconds and seconds for the Bitcoin core to figure out the new template because it is not easy to compile
the current list of transactions that should go into the new block until a new block is found. I'm not sure if I'm explaining this clearly, but it's not a simple problem. So it takes seconds.
And these seconds you cannot have the machines in some idle mode. You cannot shut them down. You cannot just have them sitting there and eating energy. So what the pool does when a new block is found in the network, it immediately distributes an empty block template to all its clients so that they can start mining on it.
And in the meantime, the pool nodes are working on generating the proper template that contains actual payload of transactions in the block and then distributes this job to the miners. But with the Stratoon V2, the idea is that there would technically be two templates.
Like if you think about the mempool as a set of transactions and you would just divide it into two halves, and you would say like the most, the top priority ones, whatever the priority is because, you know, even some like low fee transactions are getting priority.
So let's say the top half is the current block template that you should be working on. And then with some small gap, imagine the bottom half is another non-empty template that should be worked on.
Once I tell you a block has been found, and I tell you that this one is still valid. So you can basically distribute a new template in advance. But this is the proposal in the protocol. So from a protocol perspective, it is there.
It's available. But what is needed are changes in the Bitcoin core that would allow like streaming jobs as you go to, to your pool node, and then you could process these templates. So that is currently being worked on by the SV to open source community project.
Okay. And that open source community project, that's a GitHub, but that's something that you guys run. We are partners of the project. We decided it would not be good. If we as a company would be like the center point of starting to development, it should be more independent.
So we decided that we are going to participate in a bigger community and essentially providing like advice and working with the developers together on the specification, because there is still quite a bit of work that needs to be done.
And you know, the polishing of the spec is the important thing. There is an independent stratum v2 code base that is, I think it's in GitHub stratum-mining and that's the root where you can find all the details.
And there's like a lot of things going on right now. And I think in upcoming month or two, there will be a website for stratum v2. We're actually giving our domain for this open source activity.
So we are part of the community. But we're not the ones steering it. I think it's better if it's like kind of like stealth steering and we are like participants in it. Or our developers from brains are participating in it and consulting the different things.
Or even submitting pull request, which is what they did in past few weeks. So it should somehow be, I would envision it as a consortium of like different mining industry actors. Should they be pool?
Should they be mining manufacturers? I mean, you name it. And whoever would be interested, they could join the community and then participate in this. That's good. That's good to see. I mean, could you explain like to kind of a small scale minor or a pleb minor?
Like how stratum v2 gives more power back to them? I only touch the surface with the security part. Sure. That's actually, I think this is the biggest achievement that we would have some standard how the minor could authenticate.
It's mining endpoint. Should that be a pool or a proxy or whatever? And then basically run a secured connection that would be encrypted and would be keeping integrity. So in the modern crypto world, it's called AEAD.
So authenticated encryption, and associated data. So essentially if whoever, if anybody touches the data stream that's flowing from the minor or back to the minor and makes some modification, the encryption scheme detects it and basically shuts down the connection because it receives some invalid frame.
So it's like, think of it as when you're communicating with your bank nowadays. Like the bank, I mean, with the bank, you have to authenticate towards the bank. But what's the more important part before you're authenticating?
Creating a huge tunnel. Right. You have to be sure that the TLS connection to your bank is authentic. So that means you are connected to the bank that you think you're connecting to. So that same principle and mechanism we have implemented into the protocol.
So essentially every pool has some public key that's publicly known. It's published on the website of the pool. And this public key is part of the URL that you basically copy to your machine.
And this public key has been used to sign the certificate of the server that you're connecting to. So it will verify that the certificate is valid and that it has an expired and then it just runs seamlessly.
We're using a noise protocol framework for this implementation. It was actually Matt's Corello idea. And this framework is one of the like modern way how to do or how to do modern crypto, right?
Because it provides an abstraction where you just defined like certain messages and essentially the critical call that's doing the handshakes and like key exchanges and everything is generated, which I don't want to say there couldn't be a bug in it, but it's like it's better than something that would be like hand written.
And there are like formal verifications for the noise protocol framework that the protocol that you design with this formal language. There's actually some like tiny language, like some small letters for the interested audience.
You can look it up noise protocol framework. It's being used in signal. I think it's even used in WhatsApp. So it has been proven as a very solid base for security. So this is like the tremendous improvement.
You don't have to be worried about the viruses in or out of whatever. The connection is simply encrypted and the data integrity is taken care of by the protocol. Second one, since you're saving a bit of bandwidth, that bandwidth can be used by the pool to lower the difficulty for you as a miner.
And that means you will have more frequent submits. And that means the hash rate that you're seeing on the pool would have less variance. So that's another improvement. Yet another one would be what I just mentioned with the empty blocks.
So technically, if once we have the support in Bitcoin Core, the number of empty blocks, which I generally don't say it's a problem, but for some people it could be identified as a problem or some people don't like it.
So the percentage of the empty blocks would drop again. Yeah. And the whole adventure with the transaction selection where the miner could potentially build their own log template. That's like the future for those miners who would be a little bit paranoid about the pool doing censorship or whatever.
Yeah. That's, I think, that's a lot of people's biggest fears at this point. Sure, sure. But like if I should say one thing for the whole miner, it would be the security. Because especially I would say the whole miners would be very prone to such attacks because it would be, it is very difficult to detect it at small scale.
So the security of the protocol is the key improvement. So we get security. We get a certain boost to efficiency. Does stratum V2 and in what way does it help the censorship resistant part of it?
You kind of touched on it. Can you go into a little bit more? Well, recently people are generally concerned about like transaction censorship. And my typical response is that when you have, let's say you have like 20 pools globally.
Why I'm saying 20, a pool that has like below four, five, four, three percent is not fulfilling its role. So maybe it's important to go back a little bit to explain what the role of the pool is.
The pool is aggregating the computing resources. But why is it doing it? The answer is that when you're trying to search for Bitcoin blocks, Bitcoin is essentially indivisible. So you can mine only four blocks.
You cannot mine like one tenth of the block because your hash trade was not big enough. So to find a four block, you can make a simple calculation. If you know the current network difficulty, how long it would take you if you do solo mining.
And the variance of your mining would be huge. So let's say you come up to a conclusion that you should find a block once a month. If your scale of operation is to that extent, let's say, but it could also be two months or three months.
And then at some point you're not really sure if you don't have some bugging your network set up or the whole farm set up. So that's why miners get together in the pools to reduce the variance and get like the same reward on a long run.
Because there's no difference in between a miner who will be mining solo and waiting like one to two, three months to find a block from a miner who will be mining with a pool because at the end it would all even out.
But the problem is some miners also have to pay their electricity bills. So they need to sell some of the coins and you can like maybe they're in a situation where they don't have the capital.
So they can really run the full operation for a year. They can really run a machine for three or four years. Yes. By the way, CK pool hit a block earlier today or last night. So there is hope.
Oh yeah, sure. Sure. I mean, that's the thing, but it depends if you're patient enough and if you can afford this risk and if you can afford running the operation without getting any reward as you go.
So this is the role of the pool. And why I mentioned like 20 pool, that's 20 pools globally. That's just a very rough approximation saying, okay, I have 100% right. So every pool has five person.
So these pools with five person, they mine probably something like five, six, seven blocks a day, right? 140 by divided by 10. So if you have 20 pools, when you think about it, like if one of the pools would be doing the censorship, the question is if they were running the advanced system where you can select your own block templates,
the question is if they would actually allow you to submit such blocks that have the transactions that are not popular in that pool. So chances are you may switch over to a different pool.
So on the long run, I would more envision this as a measure against any kind of like a government regulatory attack where the government would put responsibility on to the pool saying,
oh, you must not select or give jobs with any transactions because we have this, let's say, nice off a list or there would be some other black list of addresses. And then the companies running the pools would be constantly getting into trouble.
So, you know, I mean, they could find a circumvention in a way that the protocol could allow something like this, but I'm not saying this is like a super several bullet because then he can step one step further saying, okay, what's circumventing the law is not really what is the good thing.
So it's really questionable where we're going to get with this, but for sure, we just should not be sitting here and not doing anything. So we have to be ready for every alternative. If it's not needed at some point, that's fine, but we can say we have been ready for it.
Just for my sort of special needs brain here, what you're basically saying is that if there was a push like a regulatory push from governments to try and censor certain transactions and not allow them to go through.
This would help stop that or make it so that the pools can't be in control of censoring it because they don't have all the information to know what's going through. What are you saying? Yeah, kind of. And again, you would be in a situation where the communication between the minus and the pool will be encrypted.
So we still have to realize that I'm still kind of assuming we kind of live in a free world. So we have the freedom to get to information. What's the hell of an assumption, Jan? So I know I know I never really really hard topics on this at the conference this weekend. So I'm aware that this is not an easy thing.
And I'm actually coming from a former communist country, the Czech Republic. So, I mean, I know what the totalitarian system looks like. And I know we're not in that at all as of now, but we have some signs. I mean, nobody is being sent to jail generally. I mean, we had some we have some cases.
I go Silk Road, but we can easily get to a situation where the freedom and our human rights could get reduced to a point where we have to protect ourselves. So let's just be ready. Let's use encryption. Let's just don't be naive. And I mean, it may not be enough, but we have to do something, especially with Bitcoin.
Oh, yeah, sure. I mean, when they wake up and think it's such a such a lovely power to control the money. And if they start to see, well, there's this other system and it's taking our control away.
And the likelihood is even even a country that you would think would never go totalitarian will do very quickly. And you rise better safe than sorry, isn't it? That's my view of these things. Maybe a government trying to change Bitcoin would be really not a good idea because who says it?
Like you don't change Bitcoin, Bitcoin changes you. So what if Bitcoin changes the governments eventually at some point? So then they stop being governments. Yeah, go ahead, mess around with it. See what happens.
But Bitcoin still kind of finds its way, right? Like we have seen the ban of Bitcoin in China a few years ago, and it found its way. Now it's probably finally banned, but the question is like what the reality is, like how many miners are underground, but you can probably still use Bitcoin when you're in China.
I mean, it's like any, any oppression or repression that is exercised on Bitcoin, I think makes it stronger. I mean, if there was a mechanism to shut down Bitcoin like right now, I would be happy that to happen so that we don't have to waste the rest of our lives.
And because it would mean that the concept didn't work, but fortunately it's still not happening. And I'm hoping that it's not going to happen, but it's not about the hope. It's about the like anti fragility of the system, right? And it seems like, I mean, it died so many times, but it's still here.
So it kind of proves that maybe it's this is the concept. This is the future that can fix quite a few things globally. Yeah. And like you say, even if even if Bitcoin can't necessarily be shut down or controlled, the issue is the people.
So, you know, if you have small miners or people money from home and they don't protect themselves and things aren't encrypted and they're not taking the necessary precautions. Even if it's not today or it's not tomorrow, you've got to assume that at some point they can get a knock on the door.
And I guess what we want to do is protect those people and make sure that they can be free because it's easy for governments to go and intimidate smaller people like people who can't fight back.
And, you know, this whole thing's about freedom. So my question really is like, is there a reason that other pools or stratum V2 isn't being rolled out elsewhere because I'm not a technical guy, but from the conversation we've just had, like, it seems really fucking cool.
Like it seems like a bit of a no brainer. Why is it not spreading? Yeah, sure. Actually, I'm happy that the over excitement at the beginning, they didn't turn into like immediate mass adoption because it gave some time to prove that the protocol works.
We have been using it and testing it for a couple of years now. And actually, like now the movement is getting really strong and there's a lot of contributors and pools interested into it.
So I think it's just a matter of time and I think 2022 or end of 2022 is definitely going to be now very interesting. So, even though it looks like everything was sleeping, now it's actually waking up. So, and I'm happy about it.
Talking about ways to keep users private and safe. Is there any thoughts on integrating Paynims for payouts? Is that something that you guys would consider? And if not, is there a reason?
You mean payments to, like, pop keys? Like X-Pop, like generating the addresses for, or you mean, I'm not trying to, sorry, let me just Google it.
For like for payouts from the pool to have like a pay name for the arrow or payment codes is because when you go in and manually change, it's something that people should go and do and manually change their payout address so they don't have money.
You know, a lot of people don't do that. So it seems to me like it'd be quite a cool way to have Paynims set up and then people don't have this address reuse and it's better for their privacy.
You know, for people to go through all these steps to mine at home and try and do things properly so that they're getting the no KYC sets and then to reuse an address just seems like a bit of a misstep.
I mean, there's no really excuse that we are not working on this, but I would say we're like super busy with all the things related to Stratton V2 and the firmware that this was not for some time on our list.
But definitely, I do appreciate the feedback that this is something that you guys would consider and would love to see. So I'm gonna talk to our product guys about it. Yeah, it's something that everybody has been talking about lately because there is a pool that has paid in payouts.
We spoke to the pool operator last week. And it's really gotten a lot of traction and people are hungry for it. I see, I see. Yeah, sure. I mean, definitely something to look into. But again, I like to be open about it like we have not been working on this lately, considering the amount stuff.
But now, for example, when we're dropping the ZK support, that's again some safe resources that we can use for Bitcoin development. So this would be an inspiring topic, definitely.
Alright, bullish. John, Christian told us that we only have an hour with you. So we'll kind of wrap it up. You'll notice that we didn't ask the question and we're not going to ask the question. It'll happen when it happens.
Okay, thank you. I'm really happy you're very welcome. I was saying to everybody in our group, you know, we're talking to Jan Japak tomorrow. From brains. What are your questions? And they kept asking the questions. And I said, no, you children. I'm not asking that question.
I'll let you know. Do you want to kind of tell everybody, you know, it's going to be brains pool. When is it going to be brains pool? When are you guys announcing that and how difficult is it for you?
Is it going to be for you to not say slush pool anymore? Actually, we're allowed to say slush pool. It's not a problem. It's just like basically our thinking that we should have everything unified under one umbrella brand.
We bought out the last part of the pool a few years ago already. So it's kind of like time to move on. So the slush pool is going to stay as part of our history. The mining URLs from slush pool.com are going to operate indefinitely because we own the domain. So there's no issue with that.
So, I mean, I'm still tied to slush pool, but it's like a new page in the history. So, I mean, the history cannot be deleted. It's going to stay with us. So you're not going back and rewriting blocks. Yeah, sure. And that's why the proof of work algorithm is such a nice invention that we can.
We can get it fixed or whatever changed to brains signature in the block. So, I mean, it's another proof that the whole proof of work concept makes sense.
Yeah, I wanted to say just then what is just upon about mining. Well, Jan, I really appreciate you coming by for plug minor month. And it was an interesting conversation because we kind of got to get into the weeds of things and really deep.
And I feel like a lot of podcasts don't let you guys get deep into the weeds and that kind of stuff. But hopefully we provided value for a kind of entry level miners as well.
It was my pleasure to participate. Yeah, thank you. Thank you. Thanks for listening. I hope you enjoyed that and make sure to check out the giveaways for a chance to win one of these prizes provided by brains.
I want to say thank you once again to everyone involved in pleb minor month. Everyone who's been screaming sats, providing content, jumping on pods, writing articles and everything else. This month has absolutely blown me away.
My hope is more of you listening to this will be plugging in machines and adding hash rate to the network. If you've been inspired by pleb minor month, I'd love to hear the stories and make sure when you plug those machines in to check out brains.com.
That's brains with two eyes. Links to everything are in the show notes and we'll catch you on the next one.
Machine transcript; expect the odd mishearing. Click a passage to play from there.




