Summarizing the best questions and answers from our recent AMA about Stratum V2 on r/Bitcoin.

Last November, Slush Pool published the initial specification for Stratum V2 — a new mining protocol that improves how miners and mining pools work together to secure the Bitcoin network. This project has been several years in the making, and its impact on the future of Bitcoin mining can be huge.

In an effort to help the general Bitcoin community understand the significance of V2, Jan Capek and Pavel Moravec of Slush Pool were joined by contributors Matt Corallo and Peter Todd for an AMA on r/Bitcoin. Some of the interesting points discussed include:

Incentives and possible timeline for widespread adoption of the new mining protocol

Significance of the security improvements made in V2 vs. V1

How Stratum V2 improves a key area of decentralization in the Bitcoin mining industry

We’ll summarize those answers and much more below, so keep reading. (Note that the questions and answers below are paraphrased from the AMA to be more concise. For the full text, check out the original post.)

Experts Spotlight

Stratum V2 is being led by Jan Capek and Pavel Moravec, the co-founders and co-CEOs of Braiins and Slush Pool. Braiins was founded in 2010 and has been operating Slush Pool since 2013, so they were able to design V2 to solve some of the biggest problems pools and miners face with the original protocol.

Matt Corallo is a long-time Bitcoin developer who has made regular contributions to Bitcoin Core as well as numerous other projects in the Bitcoin ecosystem. He currently works for Square Crypto, who sponsored Matt’s trip to Prague to work with Jan and Pavel on the V2 specification.

Peter Todd is another long-time Bitcoin developer who has made noteworthy contributions to Bitcoin Core. He is an applied cryptography consultant, which in simpler terms means that he is a security expert who has valuable insights in making V2 secure against man-in-the-middle attacks.

How does Stratum V2 improve Bitcoin’s decentralization

Q: Stratum V2 gives end miners the possibility to mine their own block instead of mining one proposed by the pool. How might this affect mining centralization concerns? What’s the practical performance difference of using this feature?

Matt Corallo: This is huge 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.

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

Pavel Moravec: 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 signaling 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.

Q: Do pools have veto power on valid transactions?

Pavel Moravec: 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.

How does Stratum V2 improve security for Bitcoin miners and pools?

Q: What are the main benefits of using encryption in V2?

Peter Todd: 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.”

Q: How much overhead does encryption add?

Peter Todd: 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

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

Jan Capek: 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.

Matt Corallo: 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 hash power. Encryption in V2 solves this.

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

Jan Capek: 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.

Questions or feedback?

Stratum V2 may not be the sexiest development going on in the Bitcoin world, but it is an important step forward in Bitcoin’s maturity. The benefits are clear for both pool operators and the end miners themselves, so it will be interesting to observe how quickly adoption takes place and what impact that has on the mining industry going forward.