“Hosted mining” poses a systemic threat to Bitcoin’s decentralization. Due to economies of scale, it can be more cost effective to hire someone to mine for you than it is to operate a miner yourself. An example of hosted mining is
alydian.co.
The design of Bitcoin currently *encourages* hosted mining. This is a design flaw. It makes it easy to run a secure hosted mining protocol, where a Server proves it’s performing work that only benefits the Client. It does so by transmitting “shares”, where a share is a “near-miss” that commits to a coinbase transaction rewarding the Client. (This is exactly the opposite of a mining pool, where the Client does work for the Server (pool operator), but the protocol is the same.) The underlying problem is that the entity doing the work (guessing nonces and checking the hash) doesn’t necessarily get to spend the reward.
What I propose is modifying the proof-of-work protocol so that if the Server does the work, the Server can *steal* the reward for itself, in such a way that it is *undetectable* to the Client. If such a puzzle were used, then no reasonable Client would hire a hosted miner, since the hosted miner would take rewards as necessary and the Client would just seem unlucky.
There’s a way to do this that doesn’t require changing how existing mining works. It would require, however, a hard-fork that supports an additional zero-knowledge form of valid block. Ordinarily, a valid block reveals the nonce and merkleroot such that
H(prev, nonce, merkleroot) < target.
For the zero-knowledge option, the same nonce would be a solution, but you would not reveal the nonce, or the original merkleroot, to claim the block. Instead you would prove in zero-knowledge that you know a valid solution, and at the same time commit to a possibly different merkleroot’.
Reveal prev, merkleroot’.
Prove in Zero-Knowledge that you know a nonce, merkleroot, and value m, such that
H(prev, nonce, merkleroot) < target, and m = merkleroot ^ merkleroot’
Then the block would consist of this proof, and the transactions underlying merkleroot’. This does not reveal nonce or merkleroot. However, this acts as a non-malleable signature on merkleroot’ in the sense that someone who does not know merkleroot (or m) cannot create use the proof to take their reward.
General purpose ZK proofs like this could be done using
Pinocchio or
SCIP. I estimate that it would take around 20 seconds for an ordinary computer to construct such a proof. Verification would take as little as 15ms, according to the Pinocchio paper (they implemented SHA1, SHA2 is marginally slower). Note that it is not necessary for every miner to construct this zero knowledge proof - in ordinary use you can still just publish the nonce and merkleroot, like normal. But the point of this proposal is to additionally support an alternate zero-knowledge verification method, so that there is a clear temptation for hosted miners to steal the reward.
There is not currently a complete open source implementation of Pinocchio, but one could probably be made from the paper using the Pairing Based Crypto library.
This relies on an assumption that there is no effective way to 'obfuscate' SHA2, in the sense that the only way for a Server to efficiently mine is to actually know the nonce, which would let it steal the reward.
It seems like discouraging outsourcing this way would *also* discourage pooled mining. This is perhaps an unintended casualty, since pooled mining is not necessarily a systemic threat to decentralization, at least not in the same way. But maybe there's a way to support lower-variance mining while still preventing outsourcing.
Since the merkleroot' is not committed to while mining, it makes it trivial to create hundreds of 1-block forks. This doesn't affect consensus overall, since the blockhash (used as prev in the next block) *will* contain a commitment to a single merkleroot'.
***Update***: I've published a preprint of a research paper which presents improved versions of this scheme in more detail:
Nonoutsourceable Scratch-off Puzzles to Discourage Bitcoin Mining Coalitions