P2Pool and Stratum v2 for Zcash

Questions:

  1. Has there ever been any work on a P2Pool decentralized pool mining implementation for Zcash?

  2. Has the Zcash mining ecosystem adopted Stratum v2?

Explanation: Both of these are important to censorship-resistance.

[0] P2Pool is a decentralized, trustless, noncustodial mining pool, with no pool administrator. Unfortunately, in Bitcoin, a usable implementation has proved to be of unexpectedly high difficulty—so to speak. There has been proposals for an efficient Bitcoin P2Pool using payment channels, but AFAIK (?) this has not been implemented. The Zcash competitor based on mixins recently (onion) built its own P2Pool.

I think that recursive zero-knowledge proofs could probably be used to solve some of the major problems in building a P2Pool. As the zk-SNARK pioneer with domain experts in both ECC and ZF, and as (AFAIK) the only serious POW-mined ZKP privacy coin, Zcash is ideally positioned to solve some of the problems with decentralized pool mining. I expect that a Zcash P2Pool with ZKP roll-ups of shares and a ZKP-based payout mechanism could be far superior to any existing P2Pool implementation (including Monero’s), and maybe even competitive with an hypothetical channel-based P2Pool.

[1] offers everyone (including pool operators) important security and efficiency upgrades from v1; and Stratum v2 has an optional feature for job selection by end miners. If used by a pool, this feature increases censorship-resistance. If end miners demand it, then they will shift their hashrate from pools that don’t offer it to pools that do.

There is much danger in forgetting the purpose of things. The purpose of mining is to have a decentralized way to set the order of transactions. The principal purpose of mining is not to give away money, as some people seem to imagine—and the purpose of mining is absolutely NOT to validate the network!

For reason of its actual purpose, decentralization of mining is important to security and to censorship-resistance. Centralization of mining threatens the security of the network, and it facilitates the schemes of those who may wish to censor transactions and break fungibility.

(By the way, I am surprised at how many people don’t realize that miners can omit any transactions they want to omit, based on any criteria of their choosing. I saw some of that misunderstanding in recent discussions of the spam attack, but didn’t have time to correct it point by point. Validators (full nodes) enforce consensus rules on what transactions miners are allowed to confirm; but it is theoretically impossible to enforce a rule that forbids the omission of valid transactions.)

A decentralized P2Pool has all the benefits of a decentralized system, while (theoretically) offering to small miners the revenue-variance-reduction advantages of joining a pool. Stratum v2 provides a way for centralized pool operators to follow the Principle of Least Authority, while incentivizing adoption with important benefits needed by everyone including pool operators. A POW ecosystem with a functioning, healthy P2Pool, plus widespread Stratum v2 adoption, could approach the most important practical effects of the totally decentralized block generation envisioned in the Bitcoin Whitepaper.

2 Likes

@daira, @str4d, @ebfull, I respectfully request your technical opinions about this. (I have a number of ideas for new applications of ZKP to solve big practical problems—including things that would be in high demand outside the “privacy coin” niche; this just happened to come up first.) Also, @tromp, if you are still around, I think you would be interested in this thread. It’s an intellectually fascinating challenge, and it could be a way to solve a problem that has plagued POW mining for the past eleven years:

I began to write up a handwavy sort of brainstorm about this… Maybe later, if there is interest. It’s very tricky, but the design space offers so many ways that zero-knowledge proofs could be applied here. Alas, I am a rank n00b with actually developing the constraints for these things. I have a decent idea of what can be done; doing it is a different matter!

I believe that the ECC team could deliver a P2Pool so good that it makes the whole concept of centralized mining pools obsolete. Even purely profit-driven miners who don’t care about decentralization would switch. A pool with 0% fee, low-difficulty shares, flexible payouts self-controlled by miners, excellent scalability—it would blow all of the centralized pools away!

If only I had thought of this a few years ago, it would have been a wildly popular idea here. Well, why shouldn’t it be now?


For the historical record, the concept of a ZKP-based P2Pool is my original idea. I believe that it will be someday significant. First mentioned by me here on 2022-07-23—it was something that just popped into my head, as I was asking if anyone has ever tried to build a Zcash P2Pool.

2 Likes