Stratum V2 Announced as a Software Evolution for Bitcoin Mining Pools

Braiins announced Stratum V2, the second generation of the Stratum mining protocol. The development of Stratum V2 was inspired by BetterHash.

To obtain a more reliable revenue stream compared to solo mining, most Bitcoin miners today mine through mining groups known as pools. This option is enabled by the “Stratum” open source mining protocol currently used by almost all mining pools.

Braiins, the company behind Slush Pool, announced Stratum V2: the second generation of the Stratum mining protocol. The Prague-based mining company believes that it has improved the first Stratum protocol (“Stratum V1”) in several key ways, which makes the new version remarkably better.

Pavel Moravec, Braiins co-CEO, said that Stratum V2 solves historical technical and safety problems, is much more efficient and allows some advanced use cases, such as work selection or easier mining farm management. He considers that that should have been done years ago.

BetterHash

Inspired by BetterHash, a proposal presented in 2018 by Chaincode Labs engineer and Bitcoin Core contributor Matt Corallo, Stratum V2 optionally reverses the Stratum V1 protocol. Instead of having a pool operator send the miners a (partial) block template, the miners can choose to send a block template to the mining pool operator.

For this to work, Braiins (with the help of Corallo) had to solve some of BetterHash’s most practical problems. Even if a miner can find a valid hash, the block itself will not be valid, thus not helping the grouping.  However, the miner himself would benefit from the valid blocks found by other miners.

To solve this problem, the grouping operator could first verify that a miner’s block template is valid before allowing him to enter the cluster. Nonetheless, in a large and public pool, this step would also have technical difficulties.

Security, efficiency and flexibility

Stratum V2 counteracts this attack by allowing pool operators to cryptographically sign partial block templates. If a miner knows the public key of the mining pool operator, he can verify that the partial block template comes with a valid signature and, therefore, is actually provided by the pool operator.

While Stratum V1 communication occurs through human readable text (JSON), Stratum V2 communication is performed in binary (computer readable code). Moravec believes that, combined with some deletion of data at the protocol level, the data shared between the grouping operators would be reduced by half or two thirds, making communication faster and cheaper.

Miners can have independent communication channels on the same connection, allowing their machines to share data on temperatures, chip voltages or their power supply. The mining pools could offer additional services based on this information, or the hash could share it with another service or servers.

Stratum V2 will also allow the pools to “guess” what the next block will be. Each time a new block is found, the mining pool needs a moment to determine which transactions were included in that block and, therefore, which transactions cannot be included in the next block.

With Stratum V2, pool operators or miners can instead make a guess as to the transactions that will be included, based on all unconfirmed transactions. In these first seconds, they can begin to extract what they think will probably be a valid next block.

Improvements

Finally, the Braiins team says that there will be more improvements that have been not been announced yet. Although the company has a working prototype, the protocol specification is not yet finalized.

Moravec said that they want to collect comments from people to finalize the proposal internally. Then, they will publish a Bitcoin Improvement Proposal (BIP), while they implement Stratum V2 in Slush Pool and launch it as part of the trial version of the Braiins operating system to get a real-life experience.

By Willmen Blanco