Stratum V2: More Censorship-Resistant and Efficient Mining Protocol?
What is Stratum V2?
Why is it important and why should you care as a Bitcoiner or a Bitcoin miner?
Bitcoin Is Not Fully Censorship-Resistant Money!
Large mining pools control the majority of the hashrate and therefore can censor transactions!
This reality stems from the deficiencies in the mining protocol that most miners currently use called "Stratum" or "Stratum V1".
Stratum V1
Stratum V1 was created in 2012, but was designed for a time when Bitcoin mining wasn't as big of an industrial undertaking as it is now.
Stratum V1 gives a lot of power to mining pools and places trust on them to be "good actors".
The reason why individual miners pool their hashrate together is because they can get mining rewards in a more predictable way.
When a mining pool wins a block reward, the payouts are divided between the individual miners in proportion to the hashrate they have provided.
How Does a Mining Protocol Work in General?
It's a set of communication rules between mining devices, proxies, and pools to contribute hashing power to the Bitcoin network.
For example, in Stratum V1:
Miners connect to a server called proxy.
A proxy aggregates connections from the miners and sends these connections to a mining pool.
A mining pool puts together all transactions in a Bitcoin block and propagates them to the Bitcoin network.
Stratum V2 Shifts Power From Mining Pools to Individual Miners
One significant downside of Stratum V1 is that it doesn't let miners create block templates (i.e. decide the set of transactions in a block).
If mining pools become compromised, e.g. if a government tells them to censor transactions, you might not ever get your tx through!
Build Your Own Block!
In Stratum V2, the protocol gives individual miners the option to build their own candidate block, taking this power away from the pool.
The pool will not be able to exclude blacklisted transactions from a block, nor will it be able to engage in denial-of-service attacks by writing empty blocks.
The responsibility of writing a block will shift from the pool to all of its miners.
The pool can still censor, but then a miner can find an alternative pool.
If a transaction is still censored by an alternative pool, the miner will continue to fall back, trying to find another pool, eventually resorting to solo mining.
Granted, solo mining is generally not feasible or profitable because payouts are so rare.
But mining pools are often businesses as well and they don't want to lose the hashrate that individual miners bring.
Stratum V2 is trying to change the incentives affecting mining censorship.
The question remains though whether large, corporate individual miners would be forced to censor as well.
Then Stratum V2's censorship-resistant features would be less effective.
However, a few large mining pools would give less enforcement points for a censoring government, whereas with a large presence of individual miners, enforcing could be more difficult.
From Braiins' Brainchild to an Open-Source Reference Implementation
Stratum V2 was developed in 2019 by Braiins mining pool founders Pavel Moravec and Jan Čapek in collaboration with Matt Corallo @TheBlueMatt and other industry experts.
Braiins wanted to decentralize the development of Stratum V2, and in March 2024, a group of developers released an open-source reference implementation called SRI (furthering the work on the protocol and adding additional features).
Stratum V2 consists of the mining protocol itself, and additional sub-protocols that allow different configurations about how the protocol can be used.
Miners can connect to V2 with their V1 firmware through a translation proxy, such as DEMAND pool.
BraiinsOS, by Braiins, by contrast, allows connecting directly to a V2 pool through a V2 proxy with V2 firmware.
Why Switch to Stratum V2?
Why would mining pools adopt Stratum V2 then?
Why would they voluntarily give away the power of selecting the transaction set?
Well, if Bitcoin is not censorship-resistant, its value proposition disappears.
Miners tend to be mercenaries, the foot soldiers of the network, working in a very cut-throat high time preference environment.
By default, they care more about short-term profits than the future of a decentralized, censorship-resistant Bitcoin network.
This applies to mining pools as well.
But there are many benefits for using Stratum V2.
Improved Security and Performance
Apart from decentralizing block construction, Stratum V2 also improves the security and performance of mining.
These features can attract more miners to join pools using Stratum V2.
In Stratum V1, communications between protocol entities are not encrypted.
This can lead to man-in-the-middle attacks and hashrate hijacking.
Stratum V1 also uses human-readable code instead of binary (as in Stratum V2).
Binary code improves efficiency because less packets of data have to be transmitted in a specific time frame.
This is important because being able to provide more proof of work can be decisive when competing for the block reward.
Every piece of inefficiency counts if you're not mining as efficiently as you can!
To give an example, there are on average 600 seconds in a Bitcoin block.
If you miss 1 second, you miss 1/600th of your revenue.
Because of bandwidth and latency improvements, also miners with weaker internet connections and less infrastructure resources will benefit.
With Stratum V2, miners can begin working on new jobs instead of waiting for pools.
This reduces the likelihood of empty blocks being mined.
What Stratum V2 Doesn't Fix
Stratum V2 doesn't address whether pools will pay miners the rightful amounts.
Ideally, pools would be non-custodial and payouts would go straight to miners.
Ideally, there would also be more transparency in the way pools calculate the amount of work miners contribute.
Benchmarking Tool
Stratum V2's open-source development group has stated that it plans to create a benchmarking tool to help miners make informed data-driven decisions regarding the benefits of shifting from Stratum V1 to V2.
What do you think about Stratum V2? Do you think it will decentralize Bitcoin mining or make it more censorship-resistant?