<p>The mainnet mining capability was removed in 0.13.0, The release note is dated 23 August 2016</p>
<p><a href="https://bitcoin.org/en/release/v0.13.0#removal-of-internal-miner" rel="nofollow noreferrer">https://bitcoin.org/en/release/v0.13.0#removal-of-internal-miner</a></p>
<blockquote>
<h2>Removal of internal miner</h2>
<p>As CPU mining has been useless for a long time, the internal miner has
been removed in this release, and replaced with a simpler
implementation for the test framework.</p>
<p>The overall result of this is that <code>setgenerate</code> RPC call has been
removed, as well as the <code>-gen</code> and <code>-genproclimit</code> command-line options.</p>
<p>For testing, the <code>generate</code> call can still be used to mine a block, and
a new RPC call <code>generatetoaddress</code> has been added to mine to a specific
address. This works with wallet disabled.</p>
</blockquote>

CC BY-SA 4.0
2022-07-30T16:42:07.627Z
2022-07-30T16:42:07.627Z
RedGrittyBrick
<p>Arguably, never: Bitcoin Core still has a rudimentary mining function built-in, as it is used for testing purposes (on testing networks where the difficulty is lower). CPU mining has however been entirely pointless since GPU mining became ubiquitous, around the end of 2010. Since then, features and optimizations related to CPU mining have been removed from, and moved out of, Bitcoin Core.</p>
<p>There have roughly 5 different ways to interact with the mining functionality:</p>
<ul>
<li>The built-in background miner, accessed through <strong>GUI</strong>, by just enabling a checkbox &quot;generate&quot;. This was available in the <strong>very first release</strong>. I'm not sure when it was removed, but at the latest in <strong>2016</strong>.</li>
<li>The built-in background miner, accessed through the <strong><code>setgenerate</code> RPC</strong>. This RPC was added on <strong>2010 Feb 23</strong>, and removed on <strong>2016 Mar 14</strong>.</li>
<li>The <strong>synchronous miner</strong>, accessed through RPCs like <code>generate</code> and <code>generatetoaddress</code>, which don't run in the background, but just run a relatively small number of POW operations, and return the constructed blocks through RPC. The purposes is testing, and using these on mainnet will almost certainly just fail to construct anything. The <code>generate</code> RPC call was introduced on <strong>2015 Apr 9</strong>, and while that specific RPC doesn't exist anymore, more recent incarnations of it like <code>generatetoaddress</code> <strong>still exist</strong> in the codebase today.</li>
<li>The <strong><code>getwork</code> RPC</strong> protocol allows mining in an external process was introduced on <strong>2010 Nov 23</strong>, and removed on <strong>2014 Jun 21</strong>, as it was superseded by <code>getblocktemplate</code>.</li>
<li>The more advanced <strong><code>getblocktemplate</code> (BIP22) RPC</strong> protocol was added on <strong>2012 May 12</strong>, <strong>still exists</strong> in the codebase today, and is the primary way through which mining pools interact with the Bitcoin network.</li>
</ul>
<p>After 2010, various optimizations for faster CPU mining that existed in the codebase have also been gradually removed, as they were irrelevant for mining for test purposes, and added a maintenance burden.</p>

CC BY-SA 4.0
2022-07-30T22:24:38.593Z
2022-07-30T22:24:38.593Z
Pieter Wuille
<p>I understand that bitcoin clients originally allowed users to run their own node <em>and</em> mine. This was back when mining was mainly GPU-based.</p>
<p>When was the mining functionality removed from Bitcoin Core?</p>

<bitcoin-core><history><gpu-mining><mining-setup>
When did Bitcoin Core deprecate the mining function?
StatsScared
# When did Bitcoin Core deprecate the mining function?

(Asked by: username_0 on 2022-07-30)

I understand that bitcoin clients originally allowed users to run their own node *and* mine. This was back when mining was mainly GPU-based.

When was the mining functionality removed from Bitcoin Core?

**Tags:** bitcoin-core, history, gpu-mining, mining-setup


---

## 2 answers

### Answer by username_2 on 2022-07-30. Score: 6 | Accepted answer

Arguably, never: Bitcoin Core still has a rudimentary mining function built-in, as it is used for testing purposes (on testing networks where the difficulty is lower). CPU mining has however been entirely pointless since GPU mining became ubiquitous, around the end of 2010. Since then, features and optimizations related to CPU mining have been removed from, and moved out of, Bitcoin Core.

There have roughly 5 different ways to interact with the mining functionality:

* The built-in background miner, accessed through **GUI**, by just enabling a checkbox "generate". This was available in the **very first release**. I'm not sure when it was removed, but at the latest in **2016**.
* The built-in background miner, accessed through the **`setgenerate` RPC**. This RPC was added on **2010 Feb 23**, and removed on **2016 Mar 14**.
* The **synchronous miner**, accessed through RPCs like `generate` and `generatetoaddress`, which don't run in the background, but just run a relatively small number of POW operations, and return the constructed blocks through RPC. The purposes is testing, and using these on mainnet will almost certainly just fail to construct anything. The `generate` RPC call was introduced on **2015 Apr 9**, and while that specific RPC doesn't exist anymore, more recent incarnations of it like `generatetoaddress` **still exist** in the codebase today.
* The **`getwork` RPC** protocol allows mining in an external process was introduced on **2010 Nov 23**, and removed on **2014 Jun 21**, as it was superseded by `getblocktemplate`.
* The more advanced **`getblocktemplate` (BIP22) RPC** protocol was added on **2012 May 12**, **still exists** in the codebase today, and is the primary way through which mining pools interact with the Bitcoin network.

After 2010, various optimizations for faster CPU mining that existed in the codebase have also been gradually removed, as they were irrelevant for mining for test purposes, and added a maintenance burden.


---

### Answer by username_1 on 2022-07-30. Score: 2

The mainnet mining capability was removed in 0.13.0, The release note is dated 23 August 2016

<https://bitcoin.org/en/release/v0.13.0#removal-of-internal-miner>

> ## Removal of internal miner
>
> As CPU mining has been useless for a long time, the internal miner has
> been removed in this release, and replaced with a simpler
> implementation for the test framework.
>
> The overall result of this is that `setgenerate` RPC call has been
> removed, as well as the `-gen` and `-genproclimit` command-line options.
>
> For testing, the `generate` call can still be used to mine a block, and
> a new RPC call `generatetoaddress` has been added to mine to a specific
> address. This works with wallet disabled.


---

