Translation of an interview with Jan Čapek about the state of Bitcoin ASIC firmwares and the Braiins open-source initiative. This article is a translation of an interview Jan Čapek did for the Czech media publication, lupa.cz
The problem started with the first bitcoin mining software that ran on general purpose CPUs, leaving minimal options for customization. Soon after CPU miners, bitcoin mining was performed with GPU chips, which is a more specialized type of hardware meant to perform specific tasks. These chips are traditionally found in gaming computers to handle heavy graphic renderings. The software for GPUs was mostly open-source, but it used proprietary kernels which people kept the lid on.
Then dedicated hardware, ASICs (Application Specific Integrated Circuits), for bitcoin mining started to emerge around 2013. The idea was to program SHA-256 hashing for FPGAs and connect to a software program called cgminer. However, as more ASIC manufacturers joined the market, they saw a competitive edge in keeping their software closed source. Although the components that made up the ASICs were issued under GPL (general public license), ASIC manufacturers knowingly violated it without consequence because there were no competitive alternatives that miners could turn to.
As a result, miners have been forced to trust hardware manufacturers to not have backdoors or hidden features in the firmware. Considering that the entire Bitcoin industry and a core concept of Bitcoin itself is trust-minimization for 3rd parties, mining straid far from that original ethos.
At first we contemplated whether to make the FPGA code public. Mining logic had already been moving away from cgminer, which became a “trivial” operating device. Meanwhile, mining device manufacturers continued maintaining control over the mining logic which had become important proprietary knowledge.
During this time, another mediating layer (FPGA) was inserted between the mining software (e.g. cgminer) and the hashing chips. An example of this would be the Bitmain Antminer S9. Here, the manufacturer made the mistake of keeping a significant amount of the mining logic in the compiler without telling anyone. Due to this, we could publish our AsicBoost report in 2018. In this report, we proved that the miners have capabilities the manufacturer hadn’t informed anyone about.
Today, manufacturers have stopped publishing the source code even for parts that are under the GPL, thus violating the essence of this license. We believe that the owners of mining hardware should have more transparency and choice about what firmware is running on their devices.
We primarily changed the operating software which is a type of Linux distribution. We also changed the mining logic. About 90 percent is a variation of cgminer.
It’s unfortunate that ASIC manufacturers’ claim to “protect” customers by keeping the software closed source. They give the excuse that it ensures the ASICs “work correctly” and are “secure”. Users are only able to access the software in a restricted mode via an API designed by the manufacturer. This is very limiting for users and it motivates people to figure out ways to “jailbreak” their devices so that they can tweak it in order to reach its full capabilities.
It is a very interesting question as to why manufacturers choose to protect their software. The whole system seems rather complex at first sight but really it’s nothing more than a compiler of the Bitcoin mining protocol.
This means all ASICs are doing is simply translating the information that mining pools and mining hardware need to operate efficiently. The interface of the mining hardware itself is technically not surprising in any way. It consists of simple integrated circuits that communicate through the standard protocol.
Nothing truly is innovative with how the ASICs operate. It is still necessary to prepare the mining job and distribute it to the hashing chips which compute it and send out the result. There is of course some adjusting – tuning the frequency (how fast the chip should be working) — as some chips are capable of measuring temperature and the like. That said, you cannot come up with anything significant here.
The only truly valuable proprietary knowledge that can be copied is the way in which the physical hashboards are designed. However, that’s something the manufacturers already do to each other anyway, as anybody can simply buy an ASIC device and take it apart. Some of the manufacturers have even confirmed this to us in unofficial conversation.
Next, you would need to figure out how individual ASIC chips function on the inside and obtain them on scale. For the ordinary person, this is completely inaccessible because of huge upfront investments.
Even if you could reverse engineer the chip and wanted to base your business on this success, this is not a chip that can be easily manufactured. The chips used by the ASIC devices today are the cutting edge of what is used in mobile phones. Anyone interested would have to consider the whole thing as a fully-fledged investment project with significant risks.
To summarize, the important intellectual property lies at the level of the hardware, which is unprotected but still extremely intensive to “copy”. Meanwhile, the ASIC software and firmware code often falls under GPL which is meant to be open-source and publicly available. However, manufacturers haven’t complied with the GPL and the miners are the ones who end up with less control and more risk when they purchase hardware.
We still have the chip design. Designing a chip’s logic is just the first part of the task. Then there's the other part, which is finding a company that would take responsibility for its physical design (it is similar to designing a printed circuit, only everything is in nanometres) and commissioning a renowned company (such as GlobalFounders) to create the chip.
That might sound simple enough, however, it is an investment which carries many risks. Designing ASIC chips entails more than just the computing logic itself. The chips must also be capable of functioning in very harsh environments such as freezing cold Siberia or hot and humid Texas. Mining equipment includes many dozens of chips that all need to be powered to operate efficiently. That is certainly not a standard computer system development task as it required deep technical engineering on chip design.
To put it simply, we know that a miner has two parts – hardware and mining software. We already know the easier of the two tasks – creating a full-fledged open-source mining operating system capable of running on other miners – needs to be taken care of first. Only after we’ve supported a wide range of ASIC devices to give miners more choices will it make sense to potentially pursue the hardware avenue.
It started when we discovered the efficiency improvement called “AsicBoost."
In 2017, new devices with AsicBoost support started to appear on the market. We took up the task of creating an open-source firmware with AsicBoost capability for one of the most prominent miners on the market, the Dragomint T1. We naively believed that the manufacturer might like an open-source solution.
The manufacturer didn’t like the idea, though. Therefore, the original plan to include Braiins OS in the devices straight from the production line wasn’t implemented. However, because we already had the code ready and tested on those devices, we started thinking about what to do next. We decided to create a port for the Antminer S9 and began our whole adventure with the AsicBoost. It was then that the official name Braiins OS was created.
Two researchers by the names Timo Hanke and Sergio Lerner came up with the idea on how to make ASIC chips operate more efficiently. They essentially figured out how to tweak the chips so that they can operate at a 10-20% increase in efficiency. The solution is based on certain properties of the Bitcoin block header. It enabled the ASIC miners to save energy or to make the equipment produce higher hashrates (increasing BTC/TH/day revenue). They got their invention patented and some manufacturers implemented it in their ASIC miners.
At the time, one of the most wildly successful ASIC miners on the market was the Antminer S9 manufactured by Bitmain. It was suspected that this model had the capability of AsicBoost, however, Bitmain claimed it did not.
During this time, we had been working on Braiins OS support for the Antminer S9, and part of the research was to determine whether AsicBoost was capable of running on this model. We concluded that it was.
The problem was that Bitmain failed to provide practically any documentation of their mining logic. For this reason (and for licencing reasons as well), we decided to remove this logic altogether and to write our own mining code.
Subsequently, we published an analytical report outlining how the ASICs could support AsicBoost. In this report, we explained that the miners supported AsicBoost in theory, however, the present FPGA code does not allow it. We had explained that we were working on our own open-source version, and if Bitmain did not publish an update in a reasonable timeframe, we would publish Braiins OS with AsicBoost support.
To our surprise, Bitmain responded within a week with a new firmware. What was funny about this was that the first release of their amended firmware contained a mistake, and so in the end we had a functional AsicBoost before Bitmain.
Beginning in 2017 (before AsicBoost), there was a hidden software component called “Antbleed'' that came with all ASIC miners created by Bitmain. It enabled Bitmain remote access to the miner at any given time. Bitmain argued that this “feature” was used as a management diagnostic tool, while the reality was that it could be used to shut off the miner remotely at any time. As people started to learn about this capability, they became very concerned that Bitmain might take advantage of this “feature”.
Therefore, the shady usage of Antbleed gave us another reason to publish our own open-source mining software for miners.
Our last big official Braiins OS release was in July 2019. We told ourselves we would halt development for the time being and focus on the cgminer replacement (this is connected to the Stratum V2 support). The next big milestone came in before Christmas 2019 when we released a fully-fledged preview of the Braiins OS for Antminer S9 on SD cards.
This newest release included our open-source FPGA code for operating mining chips. Our goal is to create a universal system for all miners. To do this, we took the upstream API from all manufacturers and built an extension for each particular hardware (first on the Antminer S9). Now we are finishing some parts on the frontend of the mining software itself so that it offers an API compatible with the cgminer.
It’s true that firmware development is resource intensive. In fact, there is a potential business model that we can pursue, which is autotuning. In simple terms, autotuning is an ASIC optimization which calibrates the frequencies and voltages on the hashing chips to make each chip run as efficiently as possible at a given power setting. We can potentially offer this as a proprietary solution on top of our Braiins OS open-source foundation. This would help us fund continuous development of the firmware for many more devices and accomplish the goal of providing alternatives to the stock firmwares that many miners have grown weary of.
Bitcoin mining software company: Braiins Pool, Braiins OS+ & Stratum V2.
By miners, for miners.
Increase hashrate on your Bitcoin ASICs, improve efficiency as much as 25%, and mine on any pool or get 0% pool fees on Braiins Pool.
Reduce data transmission between your farm and pool by 95%. Configure parallel usage of multiple pools. Set a backup pool for the whole farm.
It focuses on making data transfers more efficient, reducing physical infrastructure requirements for mining operations, and increasing security
Industry leaders in transparency and innovation, with more than 1.25 million BTC mined since 2010.