<blockquote>
<p>what is the difference between:</p>
<p>bitcoin-cli getblocktemplate '{&quot;rules&quot;: [&quot;segwit&quot;]}'</p>
</blockquote>
<p>This implements the GBT protocol, specified in BIP21, for letting mining hardware and (in practice, mostly) pool software communicate with Bitcoin Core.</p>
<p>It outsources the mining computation to software/hardware external to Bitcoin Core. It is the only practical option for mining BTC on mainnet today.</p>
<blockquote>
<p>and</p>
<p>bitcoin-cli generatetoaddress 11 &quot;myaddress&quot;</p>
</blockquote>
<p>This is a slow, unoptimized, test-only, simplistic way of constructing a block directly by Bitcoin Core. It will mine 11 blocks, with whatever transactions Bitcoin Core knows about in its mempool, and pay out the proceeds to the specified address.</p>
<p>It is only practical to use this on test networks, like testnet and regtest. On mainnet it would <em>literally</em> take a billion years before it found anything.</p>
<blockquote>
<p>what's the best option for solo mining bitcoin core wallet without extern miner software.</p>
</blockquote>
<p>Don't.</p>

CC BY-SA 4.0
2021-10-13T00:02:21.987Z
thank you this answeres my question perfectly ;-)
BG media
CC BY-SA 4.0
2021-10-12T23:54:48.773Z
2021-10-12T23:54:48.773Z
Pieter Wuille
<p>What is the difference between</p>
<pre><code>bitcoin-cli getblocktemplate '{&quot;rules&quot;: [&quot;segwit&quot;]}'
</code></pre>
<p>and</p>
<pre><code>bitcoin-cli generatetoaddress 11 &quot;myaddress&quot;
</code></pre>
<p>as I understand both are for mining?</p>
<p>What's the best option for solo mining bitcoin core wallet without extern miner software?</p>
<p>like in the past <code>set generate true</code>.</p>
<p>any help would be appreciated</p>

<bitcoin-cli><solo-mining>
what is the difference in bitcoin core between ? getblocktemplate or generatetoaddress?
BG media
# what is the difference in bitcoin core between ? getblocktemplate or generatetoaddress?

(Asked by: username_0 on 2021-10-12)

What is the difference between

```
bitcoin-cli getblocktemplate '{"rules": ["segwit"]}'

```

and

```
bitcoin-cli generatetoaddress 11 "myaddress"

```

as I understand both are for mining?

What's the best option for solo mining bitcoin core wallet without extern miner software?

like in the past `set generate true`.

any help would be appreciated

**Tags:** bitcoin-cli, solo-mining


---

## 1 answers

### Answer by username_1 on 2021-10-12. Score: 1 | Accepted answer

> what is the difference between:
>
> bitcoin-cli getblocktemplate '{"rules": ["segwit"]}'

This implements the GBT protocol, specified in BIP21, for letting mining hardware and (in practice, mostly) pool software communicate with Bitcoin Core.

It outsources the mining computation to software/hardware external to Bitcoin Core. It is the only practical option for mining BTC on mainnet today.

> and
>
> bitcoin-cli generatetoaddress 11 "myaddress"

This is a slow, unoptimized, test-only, simplistic way of constructing a block directly by Bitcoin Core. It will mine 11 blocks, with whatever transactions Bitcoin Core knows about in its mempool, and pay out the proceeds to the specified address.

It is only practical to use this on test networks, like testnet and regtest. On mainnet it would *literally* take a billion years before it found anything.

> what's the best option for solo mining bitcoin core wallet without extern miner software.

Don't.

> **Comments:**
> **username_0**: thank you this answeres my question perfectly ;-)  

---

