Company Database Listing Application

Braiins Release Stratum v2 Specifications

Braiins release the specifications for Stratum v2. The Stratum v2 specs address key security holes highlighted in Stratum v1 while also providing data efficiency benefits to miners and mining pools.

Quick take;

  • Braiins publish the specifications for their Stratum v2 protocol
  • The specifications show Stratum v2 fixes security flaws present in Stratum v1 while also lowering costs for miners and mining pools
  • Miners will also have the option to select what transactions go into a block, a feature which serves to strengthen the censorship resistance of the Bitcoin network
  • The Stratum v2 specifications are currently open to comment from the community with the Braiins team moving towards publishing a Bitcoin Improvement Proposal

Braiins, the company behind the first Bitcoin mining pool Slush Pool, has published the specifications for the mining protocol Stratum v2. The original Stratum v1 mining protocol released in 2012 has been widely adopted among miners and mining pools but the security flaws of the protocol have long been a point of discussion.

Stratum v2 addresses such limitations while also providing advantages for miners and the Bitcoin network in general. The specifications of the protocol detail how miners and mining pools can benefit from lower infrastructure costs while also using a more secure protocol where they have the option to select their own transactions.

Stratum v2 and Security

Data transferred across Statum v1 is unauthenticated. This leaves miners susceptible to several attacks such as hash rate hijacking.

This is an issue which has raised a considerable amount of concern. Matt Corallo highlighted this downside to Stratum v1 in an interview with MinerUpdate earlier this year.

“Stratum (v1) is completely unauthenticated in any meaningful way. If someone can get in the middle of the connection between devices and pools, they can make you mine something else but they can also cause your device to connect to a different pool and it will stay on the other pool until the device restarts.” 

Stratum v2 is built to protect against such attacks. The protocol is cryptographically authenticated and data transferred across the protocol is heavily encrypted.

Stratum v1 also lacked a clear specification document. This resulted in a messy environment where miners and pools use custom extensions for their specific needs. Pavel Moravec, co-CEO of Braiins, told MinerUpdate that “Stratum is cleaning the space with all the various arbitrary extensions and it allows the introduction of well-defined vendor-specific extensions for the protocol.”

The Option for Miners to Select Transactions

The power which Stratum v1 places with pools has been another key downside highlighted with the protocol. Stratum v1 enables mining pools to choose all transactions, decide which blocks to append on, and theoretically choose to censor certain types of transactions in their selection.

Stratum v2 introduces a way for miners to participate in the transaction selection process if they wish to do so. This is an opt-in feature for miners with Jan Čapek, co-CEO of Braiins, foreseeing the “transaction selection feature as a censorship countermeasure that people can use if they feel censorship is happening.”

Such a feature has huge ramifications for Bitcoin. With censorship resistance being a fundamental property of the Bitcoin network, the ability for miners to choose their own transactions safeguards this property.

Greater Efficiency for Miners

Stratum v2 was also designed to make data transfer between miners and mining pools more efficient. Stratum v2 was built in computer-readable binary code making the costs with transferring data significantly less than Stratum v1 which was built in human-readable JSON code.

“human-readable [messages] in Stratum V1 resulted in some messages being approximately 2-3 times heavier than necessary, and those have now been reduced to a minimum size in V2.”

Stratum v2 Specifications Document

This is just one of several features which reduce infrastructure costs for miners and mining pools using Stratum v2. Other efficiency benefits are possible through faster block propagation.

Miners can even begin work on blocks before the prior block has been found as pools using Stratum v2 can send work to miners based on what they estimate the next block will be. Mining pools can estimate what the next block will be based on unconfirmed transactions and communicate this information to miners.

What About Adoption?

Developing an improved protocol than the one which is currently dominant in the marketplace is one challenge. An entirely different challenge is how the protocol is going to achieve adoption and displace the incumbent.

Jan Čapek noted that for “a new protocol, the basic problem is how you are going to deploy it. How are you going to make the manufacturers adopt it?.” Braiins already have some advantages from the adoption standpoint.

With hundreds of mining hardware reported to be using Braiins software stack (Braiins OS), the transition to Stratum v2 will be straightforward for these devices. Releasing Stratum v2 with Braiins OS so users can start experiencing the mining protocol is on the near-term roadmap for Braiins.

Mining devices not using Braiins OS and other mining pools can use a proxy to transition from Stratum v1 to Stratum v2. The proxy also means that mining devices can use Stratum v2 to connect to a pool which is using Stratum v1 and vice-versa.

I don’t know the exact numbers but we have roughly hundreds of thousands of Braiins OS deployed. The switch to the new protocol for those specific units will be extremely simple. For other hardware, they can use the proxy to get the benefits of Stratum v2. One great feature of the protocol is the data efficiency of the communication between the farm and the pool.

Next Steps for Stratum v2

The specifications are currently open for feedback. The Braiins team have noted they are open to changing the design of the mining protocol based on feedback.

“It should also be noted that we don’t claim the current draft of the protocol is the final version… We would love to see the response from any industry partner who could improve the protocol. We don’t believe there is any major issue with the draft but we are ready to change it if there is reasonable input.”

Following this, the team has noted that they will work to put together a Bitcoin Improvement Proposal which will likely catalyze another round of discussions. Pavel Moravec detailed the next steps for Stratum v2 in an interview with Bitcoin Magazine.

“We now want to gather feedback from people to finalize the proposal internally, then a Bitcoin Improvement Proposal will be published. I guess this will cause another round of discussions … and in the meantime we will deploy Stratum V2 to Slush Pool, and release it as part of testing version of Braiins OS to get real life experience… We’re implementing it as fast as possible to get everybody something to play with soon.”

See More
ASIC Miners to Fork if Ethereum ProgPow Goes Ahead?