Can bitcoind still do CPU-based mining or was that feature removed?

3

I'm seeing conflicting claims about whether bitcoind can still do CPU-based mining. As far back as 2011 people were saying that feature was going to "soon" be removed. Was mining removed? By the way if mining is removed from bitcoind, what are the things it can still do?

Friendly

Posted 2013-11-04T20:40:49.387

Reputation: 303

Answers

2

It is still there as of version 0.8.5, but just a reference implementation. It's not optimized, doesn't support pooled mining, and is not exposed via the Qt GUI.

To enable, start with the -gen option. But other than testnet (and even there...), it's utterly pointless.

Pieter Wuille

Posted 2013-11-04T20:40:49.387

Reputation: 54 032

Is there a miner that supports pooled mining that still uses the CPU? It appears cgminer will not, nor bfgminer.Friendly 2013-11-04T21:51:20.767

I'm mining at about 2 Gh/s at testnet using setgenerate true 1 the last number is how many cores to use, you can check your hashrate with hashespersecJonas Oestman 2013-11-04T21:54:59.957

@Jonas What is testnet? Where is hashespersec?Friendly 2013-11-04T21:59:17.357

If you want to try experimenting you should not do it with real bitcoins, thats where testnet comes in. bitcoind -testnet it will create a "testnet3" folder, and will not overwrite your "mainnet" files :-)Jonas Oestman 2013-11-04T22:06:22.597

By the way I am periodically getting "error: no response from server". I run "bitcoind -gen &" and then a while later "bitcoind getinfo" and I get this error. Any idea what causes it?Friendly 2013-11-04T22:13:48.817

OK when I run "bitcoind -testnet" and try to getinfo, the error changes to: "error: couldn't connect to server".Friendly 2013-11-04T22:15:30.390

I am running Bitcoin-QT, and enter the commands in the console. Not sure if this answer is up to date http://bitcoin.stackexchange.com/questions/5841/bitcoind-getmininginfo-says-hashespersec-is-0

Jonas Oestman 2013-11-04T22:16:55.367

If your running linux try ps aux | grep bitcoind that will give you a list of any bitcoind processesJonas Oestman 2013-11-04T22:19:03.703

@JonasOestman Pretty sure that's 2 Mh/s.Pieter Wuille 2013-11-04T22:20:57.480

OK, it appears my config file had something in it that was messing things up. I reverted to just rpcuser/pass and now it works. However "bitcoind gethashespersec" is returning a value of 0 when I'm running "bitcoin-qt --server". However when I run "bitcoind -gen &" and then gethashespersec I do get 1931863.Friendly 2013-11-04T22:21:39.653

But my question is still not entirely answered. If I run "bitcoind -gen" without testnet, am I actually able to generate bitcoins (even if very slowly), which will end up in my wallet.dat?Friendly 2013-11-04T23:12:38.623

1If you find a block (which, with a decent desktop CPU, at the current difficulty, would happen once every ~10000 years), you'll get 25 BTC in your wallet. If you don't, nothing will happen except higher electricity bill, and wear and tear on your computer.Pieter Wuille 2013-11-06T01:53:21.750

@Friendly: bfgminer does support it, though you may have to compile from source. There is a note that the cpu mining support is disabled in some of the binary distributions.Nate Eldredge 2013-11-06T16:10:24.737

1

As of version 0.13.0, CPU mining has been removed from Bitcoin Core.

Since which version the mining functionality removed from wallet?

Nate Eldredge

Posted 2013-11-04T20:40:49.387

Reputation: 21 420

Here's the release note with the corresponding section: Bitcoin Core 0.13.0 removed the internal mining capability

Murch 2017-02-12T15:59:26.697