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?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
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:
setgenerateRPC. This RPC was added on 2010 Feb 23, and removed on 2016 Mar 14.
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
generateRPC call was introduced on 2015 Apr 9, and while that specific RPC doesn't exist anymore, more recent incarnations of it like
generatetoaddressstill exist in the codebase today.
getworkRPC 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(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.
The mainnet mining capability was removed in 0.13.0, The release note is dated 23 August 2016
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
setgenerateRPC call has been removed, as well as the
For testing, the
generatecall can still be used to mine a block, and a new RPC call
generatetoaddresshas been added to mine to a specific address. This works with wallet disabled.