FeaturesStratum V2BraiinsOS & BOSminer

BTC MINING STACK
UPGRADE

Our mission is to give you complete control of your Bitcoin mining operation —  from the firmware on your machines to the transactions in the blocks you mine.

Updated
mining firmware
Rewritten
Mining software
Redesigned
Mining protocol
Security
Man-in-the-middle attack prevention.

Data transfers can be encrypted to ensure their integrity and confidentiality. This hardens the protocol against man-in-the-middle attack vectors, namely hashrate hijacking in which an attacker intercepts a miner’s shares and submits them as their own in order to steal the payouts.

Efficiency
Going binary to optimize data transmission.

V2 has a fully binary format and eliminates unnecessary data transfers. This saves “a bit” of network bandwidth (about 2-3x times in comparison with Stratum V1) and decreases latencies.

Besides lowering infrastructure costs, Improved efficiency reduces hashrate variance by allowing higher submission rates, resulting in fewer stale share submissions.

Flexibility
Built to fit the needs of any sized mining operation.

Whether you operate a huge mining farm or just a couple of ASICs in your garage, Stratum V2 will make your life easier. Features like simplified header-only mining, zero-time backend switching, and many more allow for all sorts of unique setups

At the same time, Stratum V2 is designed to be easily extensible so that it can evolve to meet the needs of the mining industry for years and maybe even decades to come.

Decentralization
Censorship resistance on par with the era of solo-mining.

We were inspired by the BetterHash proposal to give users the option of freely selecting their own transaction set. By providing a custom job selection mechanism, we’ve integrated the idea into Stratum V2.

At the same time, the protocol gives mining pools the ability to reject externally negotiated mining jobs that are invalid, all while ensuring that mining rewards will be fair and that security is not sacrificed.

We currently have a working prototype of the mining software (BOSminer) with Stratum V2 protocol support. It is written in the ‘memory-safety-first’ Rust language. Plus there is a Stratum V2->V1 translation proxy enabling communication with pools that only support Stratum V1 (requires version rolling for now).

Play video

how does v2 stack up

how does v2 stack up

Lower overhead costs for miners

Save miners money by reducing data usage and enabling simpler setups (e.g. header-only mining), while also decreasing hash rate variance.

more
less

Lower overhead costs for pools

Save pools money by reducing frequency and size of data transfers and reducing amount of work validation necessary for shares submitted by miners who do header-only mining.

more
less

Easier protocol upgrades

Makes Bitcoin protocol upgrades easier through greater standardization and a simplified mining mode called header-only mining which eliminates the need for mining firmware and protocols to be updated in conjunction with full nodes.

more
less

Easy extensibility

Supports vendor-specific extensions that don’t pollute the main mining protocol or complicate pool implementations.

more
less

Hashrate hijacking prevention

Stratum V2 uses authenticated encryption with associated data (AEAD), which provides confidentiality and ensures data integrity so that hashrate cannot be stolen from miners. BetterHash proposed to use pre-message signing, which also addressed MiTM attack vectors although not as thoroughly as AEAD.

more
less

Custom work selection

Miners can select their own work (i.e. transaction set), meaning that mining will more closely resemble the pre-stratum era of solo mining while miners will still benefit from decreased variance through pools.

more
less

Separate protocol for work selection

BetterHash’s implementation of work selection was not feasible to be implemented by pools. Stratum V2 solves this by making work selection a separate group of sub-protocols and allowing pools to reject invalid blocks proposed by miners.

more
less

Has a full firmware implementation

A full implementation of Stratum V2 is part of BOSminer, which is a free and open-source project developed by Braiins. This means that any miner can download BOSminer and easily begin benefiting from V2 in their operations.

more
less

Empty-block elimination

Stratum V2 separates the ‘prevhash’ message from the rest of the block template so that full blocks can be prepared and sent to miners ahead of time, eliminating the incentive to send empty blocks immediately after a new block has been found.

more
less

Zero-time backend switching

Stratum V2 is designed to enable miners to connect to multiple pools or mine multiple coins simultaneously, and to switch between them instantly. This improves the efficiency of functions such as coin switching.

more
less
in detail

& BOSminer

Proposing a new protocol for pooled mining is one thing, but actually pushing widespread adoption of it throughout the Bitcoin mining industry is something else. With Braiins OS and BOSminer, we’re providing an open-source reference implementation that will allow any miner to implement V2 from the day it officially goes live.

Help us launch
a new open
standard

Are you an industrial miner, creator of mining software/hardware, or simply someone who knows a lot about this topic?

We really want to hear your insights and suggestions about the full mining stack! This may be just one small release of the software, but we think it’ll be one giant leap forward in Bitcoin mining.

Get in touch

FAQ

Decentralization

How does Stratum V2 improve Bitcoin’s decentralization?

This is immense for mining centralization. Instead of focusing on the centralization of pools, we can now focus on centralization of actual miners/farm owners. You can see how this can change hash rate distribution in the chart below from Matt Corallo’s presentation about consensus group centralization. As for performance, it’s complicated. With a properly-optimized client and reasonably good internet connection, it can be faster than receiving work from the pool. But pools have to put a lot of work into properly optimizing their setups to make this possible.

What are the incentives for a miner to negotiate their own transaction set with the pool?

Pools currently act as very large miners controlling a significant part of the total hash rate. This means that pools can try to prevent (i.e. censor) some transactions from getting into the blockchain or they can strongly influence the BIP activation process, as we saw with SegWit signalling in 2017. Miners who negotiate their own blocks can prevent this power centralization in pools, similarly to if they were solo mining. At the same time, miners can continue to benefit from decreased variance in payouts by mining with a pool.

Do pools have veto power on valid transactions?

In V2, pools can always actively reject a whole block proposed by a miner, but they can’t reject individual transactions within a block. I.e. pools do full block validation and reject any blocks that contain invalid transactions.

Security

What are the main benefits of using encryption in V2?

Authentication is really important. Without it, an adversary can try a man-in-the-middle attack (MITM) to quite simply steal money by redirecting hashing power to another pool. Public key signature authentication isn’t ideal because it’s quite slow, so verifying a signature for every message would be very inefficient.

Modern authentication encryption schemes provide exactly what’s needed: an authenticated channel between two parties where one relatively expensive signature operation is used to create a shared secret, which can then be used by much faster symmetric key authentication schemes. Modern implementations are really fast, well researched, and unlikely to run into engineering surprises.

In V1, an attacker can steal and modify job assignments before they reach miners, then intercept the work when the miner tries to submit it — all without the pool or miner being able to know it’s happening! V2 prevents this kind of attack, called “hashrate hijacking.”

How much overhead does encryption add?

The pool-to-miner overhead is about 5%, rather insignificant. For miner-to-pool communication it adds 16 bytes (more than 50%), but it’s important to put in context. Even with encryption, share submission messages in V2 are more than 50% lighter than V1. Furthermore, the total amount of transfers is reduced such that ultimately we’re not actually talking about much additional data due to encryption.

Stratum V2 adoption

What are the incentives for various types of mining operations to upgrade to V2?

One of the biggest incentives for miners is the bandwidth efficiency improvements, which now makes it possible to operate even without really great internet connections. At the same time, this can improve submission rates which in turn reduces the variance in a miner’s hashrate (and thus their rewards in score-based reward systems such as PPLNS). Also on the efficiency front, the ability for pools to distribute future block templates to miners ahead of time (separately from the ‘SetNewPrevHash’ message) should eliminate empty block mining. Finally, the switch from JSON-based (i.e. human readable) code to a fully binary (i.e. machine readable) codebase significantly reduces the size of data transfers.

Another incentive that can’t be understated is cryptographic authentication. If you’re mining today, it’s entirely possible that your ISP is silently stealing 1% of your hashpower.

Encryption in V2 solves this.

What are the timeframes for implementation, deployment, and adoption?

There is a baseline for a reference implementation in the Braiins open-source repository which is currently being updated to reflect the latest version of the specification. We estimate that it will take at least 3-5 months to address any possible issues before it’s ready for deployment at scale. As for the implementation, it’s fairly straightforward. Farms can use a V1 to V2 translation proxy on sight and pools may also use V2 to V1 proxies as their first level of adoption before implementing the support directly into stratum.

The reference implementation is part of BOSminer, our replacement for the outdated CGMiner.

Braiins OS and BOSminer

What was the motivation for developing Braiins OS?

Bitcoin ASIC manufacturers have increasingly kept their firmware closed-source, even making it difficult for their customers to change to another firmware if they want to. Considering how few manufacturers there are, we saw this as a centralized point of failure. By providing open-source firmware for ASICs, we help mitigate the risk of attacks by giving miners the ability to control their own hardware instead of being forced to trust HW manufacturers.

What was the motivation for developing BOSminer?

BOSminer is a replacement for CGMiner. The reason that CGMiner needs to be replaced is that — although it was an open-source project — hardware manufacturers have been developing their own CGMiner codebases behind closed doors. They often don’t commit their code to the open codebase until months or years after they start using it, by which time it’s no longer relevant. This makes it more complex to support new generations of ASICs with 3rd party firmware, as the firmware must adapt to different (and closed-source) versions of CGMiner on each machine. By building BOSminer and maintaining its open-source codebase, it will significantly reduce the complexity of firmware development for new ASIC machines.

Why are BOSminer and Braiins OS built in Rust language?

You can read all about our reasons for building with Rust here.

FeaturesStratum V2Braiins OS & BOSminer
Intro
Features
Stratum V2
Braiins OS
BOSminer
FAQ