<blockquote>
<p><strong>Do I need to have some kind of mining software setup? Does that software not already come with Bitcoin Core?</strong></p>
</blockquote>
<p>Bitcoin Core does not include a mining capability for mainnet, only for the valueless networks used for testing.</p>
<p>To mine Bitcoin, you need to purchase mining equipment based on ASICs.</p>

CC BY-SA 4.0
2024-09-03T15:43:05.487Z
You can definitely use Bitcoin Core to generate mainnet block templates, which is what the question is about.
Vojtěch Strnad
CC BY-SA 4.0
2024-09-03T15:52:10.243Z
@VojtěchStrnad thanks, yes, but I was addressing the second paragraph specifically. *"Does that [mining software] not already come with Bitcoin core"*. Quotation prefixed to answer to clarify this.
RedGrittyBrick
CC BY-SA 4.0
2024-09-03T11:44:21.327Z
2024-09-03T16:36:13.487Z
2024-09-03T16:36:13.487Z
RedGrittyBrick
<p>The purpose of <code>getblocktemplate</code> is to return a list of the most profitable mempool transactions and some other data (collectively called a &quot;block template&quot;) needed to try and solve the proof-of-work for the next block. This command is used by other software (that doesn't come with Bitcoin Core) that connects to your mining hardware and sends it instructions based on the block templates.</p>
<p>The reason for the error code is that the command requires a JSON parameter with an array field <code>rules</code> with at least the item <code>&quot;segwit&quot;</code>:</p>
<pre><code>getblocktemplate '{&quot;rules&quot;:[&quot;segwit&quot;]}'
</code></pre>

CC BY-SA 4.0
2024-09-03T12:45:33.983Z
2024-09-03T12:45:33.983Z
Vojtěch Strnad
<p>I tried using the command without arguments and it just returned an error code.</p>
<p>Do I need to have some kind of mining software setup? Does that software not already come with Bitcoin Core?</p>
<p>How do I go about getting this software working, either way?</p>

<bitcoin-core><bitcoind><miner-configuration><mining-software><getblocktemplate>
What do I need to have set up to have `getblocktemplate` work?
CoinZwischenzug
# What do I need to have set up to have `getblocktemplate` work?

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

I tried using the command without arguments and it just returned an error code.

Do I need to have some kind of mining software setup? Does that software not already come with Bitcoin Core?

How do I go about getting this software working, either way?

**Tags:** bitcoin-core, bitcoind, miner-configuration, mining-software, getblocktemplate


---

## 2 answers

### Answer by username_2 on 2024-09-03. Score: 3 | Accepted answer

The purpose of `getblocktemplate` is to return a list of the most profitable mempool transactions and some other data (collectively called a "block template") needed to try and solve the proof-of-work for the next block. This command is used by other software (that doesn't come with Bitcoin Core) that connects to your mining hardware and sends it instructions based on the block templates.

The reason for the error code is that the command requires a JSON parameter with an array field `rules` with at least the item `"segwit"`:

```
getblocktemplate '{"rules":["segwit"]}'

```


---

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

> **Do I need to have some kind of mining software setup? Does that software not already come with Bitcoin Core?**

Bitcoin Core does not include a mining capability for mainnet, only for the valueless networks used for testing.

To mine Bitcoin, you need to purchase mining equipment based on ASICs.

> **Comments:**
> **username_2**: You can definitely use Bitcoin Core to generate mainnet block templates, which is what the question is about.  
> **username_1**: @username_2 thanks, yes, but I was addressing the second paragraph specifically. *"Does that [mining software] not already come with Bitcoin core"*. Quotation prefixed to answer to clarify this.  

---

