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?

Murch
  • 75,206
  • 34
  • 186
  • 622
Friendly
  • 313
  • 1
  • 3
  • 8

2 Answers2

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
  • 105,497
  • 9
  • 194
  • 308
  • Is there a miner that supports pooled mining that still uses the CPU? It appears cgminer will not, nor bfgminer. – Friendly Nov 04 '13 at 21:51
  • 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 hashespersec – Jonas Oestman Nov 04 '13 at 21:54
  • @Jonas What is testnet? Where is hashespersec? – Friendly Nov 04 '13 at 21:59
  • 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 Nov 04 '13 at 22:06
  • 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 Nov 04 '13 at 22:13
  • OK when I run "bitcoind -testnet" and try to getinfo, the error changes to: "error: couldn't connect to server". – Friendly Nov 04 '13 at 22:15
  • 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 Nov 04 '13 at 22:16
  • If your running linux try ps aux | grep bitcoind that will give you a list of any bitcoind processes – Jonas Oestman Nov 04 '13 at 22:19
  • @JonasOestman Pretty sure that's 2 Mh/s. – Pieter Wuille Nov 04 '13 at 22:20
  • 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 Nov 04 '13 at 22:21
  • 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 Nov 04 '13 at 23:12
  • 1
    If 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 Nov 06 '13 at 01:53
  • @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 Nov 06 '13 at 16:10
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
  • 23,040
  • 3
  • 40
  • 80