Bitcoin Institute

RFC: Remove mining from bitcoin?

2 messages BitcoinTalk Jeff Garzik, Momchil Georgiev November 7, 2010 — November 8, 2010

The difficulty is now so high that it might take a couple weeks for a beefy multi-core CPU to generate a single block.

Therefore, I conclude that the existing CPU-based code in bitcoin is largely pointless, as GPU miners continue to win blocks.  And GPU miners obviously require running a fork of bitcoin, rather than 100% upstream bitcoin.  Therefore, it can be said that the overwhelming majority of today’s generated blocks are generated by forked source code and not upstream bitcoin.

Here’s a radical proposal:

  • Move the current CPU miner code to a separate program, bitcoin-minerd.
  • Listen on TCP port 8334 for incoming connections (w/ applicable IP address whitelist).  When work arrives via P2P network, broadcast new work to all connected miners.  Miners submit potential solutions via this same TCP connection.

This “remote mining” scheme with active TCP connections is superior to the polled ‘getwork’ method in use by some GPU miners.  Incorporating remote mining into upstream will also provide a very strong incentive for GPU miner authors to use upstream bitcoin without modification (a win for open source, IMO).

Moving CPU mining out of bitcoin, to a separate process, ends the current practice of teasing users with a “Generate coins?” option that will waste electricity for months on end, without generating any blocks, given the current difficulty level.  That is not a friendly experience for first-time bitcoin.exe users.

Quote from: jgarzik on November 07, 2010, 7:19:04 PM UTC

This “remote mining” scheme with active TCP connections is superior to the polled ‘getwork’ method in use by some GPU miners.  Incorporating remote mining into upstream will also provide a very strong incentive for GPU miner authors to use upstream bitcoin without modification (a win for open source, IMO).

I definitely agree. Push-based work distribution is the way to go. I just wanted to make as few changes as possible using existing RPC server. My hope was that BTC developers will evaluate the idea and make something better to get in the mainline. Perhaps we should just implement this 8334 push patch and propose it for inclusion?

Also, it’s OK to have CPU generation in mainline. Just let the user decide how much resources he is willing to give. Something like how many lottery tickets he is willing to buy.