What does the `gen` option in bitcoin.conf do?

5

The gen option isnt copiously described in the sample bitcoin.conf file ... does that mean that the daemon started up will attempt to mine for coins?

Terrence Brannon

Posted 2011-11-10T06:51:41.867

Reputation: 383

Answers

7

That configuration parameter no longer has any effect because the CPU mining engine has been removed from the mainline client.

Earlier versions of the client did have a built in miner and the gen parameter controlled if it ran in the background. Given the much higher difficulty today the developers felt it no longer served a purpose and would be confusing to new users (who could wait months of even years without generating a single coin). It was removed from the client. The wiki should be updated to reflect that.

DeathAndTaxes

Posted 2011-11-10T06:51:41.867

Reputation: 8 269

2This is incorrect: the built in miner was removed from the GUI, but remains accessible in bitcoind.Pieter Wuille 2011-11-13T17:24:04.507

1

Your answer is now correct. RIP internal miner (see https://github.com/bitcoin/bitcoin/pull/7507)

Pieter Wuille 2016-03-16T12:46:33.307

5

Yes, with -gen=1 on the command line or in the configuration file, bitcoind will use its built-in miner to search for blocks. It is inefficient, does not support pools, and does not use GPUs. It is only left as a reference and for testing, and will probably be removed completely soon.

Pieter Wuille

Posted 2011-11-10T06:51:41.867

Reputation: 54 032

when i "setgenerate true" in bitcoin-qt console window, and then "gethashespersec" it reports my hashing power, and "getgenerate" returns true, isn't this a proof that it's mining ?Farghaly 2014-05-31T15:56:17.693

Yes, but you'll never mine anything with it. It is far too slow.Pieter Wuille 2014-06-01T07:02:07.560