<p>Bitcoin Core still includes a bit of mining code. It's not as optimized as the code once used for actual CPU mining because it's meant to be used on regtest where the mining difficulty is permanently low, but nothing stops you from using it on mainnet, and since finding a block with a CPU is basically impossible today even with optimized code it doesn't really matter.</p>
<p>All you need to do is run the command <code>generatetoaddress</code> with your own address. By default it will try 1,000,000 different nonces before stopping, but you can set it to more. If my numbers are correct, letting it run for a few hours on a reasonably new CPU should be enough to get you to a 1 in 100 trillion chance of finding a block.</p>

CC BY-SA 4.0
2024-09-03T18:10:25.463Z
I got the same numbers too. CPU is capable of something like 7 MH/s, so yeah, 1 in 100 trillian
CoinZwischenzug
CC BY-SA 4.0
2024-09-03T18:11:32.240Z
I'll try generatetoaddress let me see if it does what I'm looking for.
CoinZwischenzug
CC BY-SA 4.0
2024-09-03T18:19:00.273Z
It will do nothing, but since you're looking to mine on a CPU that's really all you can expect.
Vojtěch Strnad
CC BY-SA 4.0
2024-09-03T17:42:38.000Z
2024-09-03T17:42:38.000Z
Vojtěch Strnad
<p>I'm trying to figure out how to use mining software on my computer with a full node.</p>
<p>The API's seem configurable to allow my cpu to mine, there's just no longer direct support for such a method anymore, to my understanding.</p>
<p>I know I'll basically have a 1 in 100 Trillion odds of mining each block, but I still want to configure the option to turn mining on/off with a auxiliary system that does the final hashing when given all the header info.</p>
<p>What would I need to do to set up some software that does the basic functions of block construction and hashing, and then uses the api to submit the blocks?</p>
<p>I'm curious if downloading and transferring over some of the .12 bitcoin core software would work.</p>
<p>I'm not concerned with profit, or any return, I just want to know how to set up mining software without specific hardware (other than built in CPU).</p>
<p>I just want it to be able to do these two functions:</p>
<ol>
<li><p>input address -&gt; use bitcoin-cli to output block header &amp; target</p>
</li>
<li><p>input success header -&gt; use bitcoin-cli to submit block to networkhash</p>
</li>
</ol>
<p>If that's something that already exits I don't want to recode it, but if it's not possible to find something that does that I'll just have to code it I guess which is fine.</p>

CC BY-SA 4.0
2024-09-03T17:19:18.707Z
This question is similar to: [In the ASIC-age, is it worth starting mining Bitcoin at home?](https://bitcoin.stackexchange.com/questions/41276/in-the-asic-age-is-it-worth-starting-mining-bitcoin-at-home). If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.
Vojtěch Strnad
CC BY-SA 4.0
2024-09-03T17:28:50.150Z
Given the meager odds, would mining some blocks on e.g. Testnet 4 sate your curiosity?
Murch
CC BY-SA 4.0
2024-09-03T17:49:27.770Z
@VojtěchStrnad Hi, Thanks for the response. The difference I'd say is that I'm not curious about the profitability or anything with it. I'm not trying to make money, just run a computer solo node in which I can also enable mining. I'm already set on it, I just want to find out how to do without a separate mining device, solo from the laptop, with portability for mining attachment.
CoinZwischenzug
CC BY-SA 4.0
2024-09-03T18:00:42.277Z
@Murch I'm afraid it's not just about the curiosity element. More than anything, I want software that's specialized just to the first function of receiving input (previous header, array of transaction requests, miner address) and generating output (hash-ready header) and a second function of receiving input (complete valid header) and then submitting a block to the network.
CoinZwischenzug
<bitcoin-core><bitcoind><full-node><bitcoin-cli><miner-configuration>
Is there a way to salvage the old mining software originally included in bitcoin core to mine with just a standalone computer - no asic?
CoinZwischenzug
# Is there a way to salvage the old mining software originally included in bitcoin core to mine with just a standalone computer - no asic?

(Asked by: username_0 on 2024-09-03)

I'm trying to figure out how to use mining software on my computer with a full node.

The API's seem configurable to allow my cpu to mine, there's just no longer direct support for such a method anymore, to my understanding.

I know I'll basically have a 1 in 100 Trillion odds of mining each block, but I still want to configure the option to turn mining on/off with a auxiliary system that does the final hashing when given all the header info.

What would I need to do to set up some software that does the basic functions of block construction and hashing, and then uses the api to submit the blocks?

I'm curious if downloading and transferring over some of the .12 bitcoin core software would work.

I'm not concerned with profit, or any return, I just want to know how to set up mining software without specific hardware (other than built in CPU).

I just want it to be able to do these two functions:

1. input address -> use bitcoin-cli to output block header & target
2. input success header -> use bitcoin-cli to submit block to networkhash

If that's something that already exits I don't want to recode it, but if it's not possible to find something that does that I'll just have to code it I guess which is fine.

**Tags:** bitcoin-core, bitcoind, full-node, bitcoin-cli, miner-configuration

> **Comments:**
> **username_1**: This question is similar to: [In the ASIC-age, is it worth starting mining Bitcoin at home?](https://bitcoin.stackexchange.com/questions/41276/in-the-asic-age-is-it-worth-starting-mining-bitcoin-at-home). If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.  
> **username_2**: Given the meager odds, would mining some blocks on e.g. Testnet 4 sate your curiosity?  
> **username_0**: @VojtěchStrnad Hi, Thanks for the response. The difference I'd say is that I'm not curious about the profitability or anything with it. I'm not trying to make money, just run a computer solo node in which I can also enable mining. I'm already set on it, I just want to find out how to do without a separate mining device, solo from the laptop, with portability for mining attachment.  
> **username_0**: @username_2 I'm afraid it's not just about the curiosity element. More than anything, I want software that's specialized just to the first function of receiving input (previous header, array of transaction requests, miner address) and generating output (hash-ready header) and a second function of receiving input (complete valid header) and then submitting a block to the network.  

---

## 1 answers

### Answer by username_1 on 2024-09-03. Score: 2

Bitcoin Core still includes a bit of mining code. It's not as optimized as the code once used for actual CPU mining because it's meant to be used on regtest where the mining difficulty is permanently low, but nothing stops you from using it on mainnet, and since finding a block with a CPU is basically impossible today even with optimized code it doesn't really matter.

All you need to do is run the command `generatetoaddress` with your own address. By default it will try 1,000,000 different nonces before stopping, but you can set it to more. If my numbers are correct, letting it run for a few hours on a reasonably new CPU should be enough to get you to a 1 in 100 trillion chance of finding a block.

> **Comments:**
> **username_0**: I got the same numbers too. CPU is capable of something like 7 MH/s, so yeah, 1 in 100 trillian  
> **username_0**: I'll try generatetoaddress let me see if it does what I'm looking for.  
> **username_1**: It will do nothing, but since you're looking to mine on a CPU that's really all you can expect.  

---

