<p>It performs proof-of-work mining; given a block header, it finds a nonce such that the header with the nonce in it hashes to a value below the proof-of-work target.</p>
<p>Its purpose is assisting with signet creation. In signet, blocks have a small amount of proof-of-work (they're relatively low difficulty), but also require a signature by the (fixed) signers for the network. In order to assist these signers in their block-creation process, the <code>grind</code> command of <code>bitcoin-util</code> can be invoked.</p>
<p>To be clear, this feature is not useful for normal mainnet or even testnet mining:</p>
<ul>
<li>It is CPU only, unable to take advantage of specific hardware like GPUs, FPGAs, or ASICs.</li>
<li>Even for a CPU-only mining tool, it is slow. It lacks optimizations that could speed it up, in order to improve maintainability and simplicity of the code.</li>
<li>It has no interface to interact with mining protocols like Stratum or GBT.</li>
</ul>

CC BY-SA 4.0
2022-05-01T21:53:40.723Z
2022-05-01T21:53:40.723Z
Pieter Wuille
<p>What's &quot;bitcoin-util grind&quot; for?</p>
<pre><code>  grind
       Perform proof of work on hex header string
</code></pre>

<bitcoin-core-development>
Bitcoin Util Grind
Mercedes
# Bitcoin Util Grind

(Asked by: username_0 on 2022-05-01)

What's "bitcoin-util grind" for?
  grind
       Perform proof of work on hex header string

**Tags:** bitcoin-core-development


---

## 1 answers

### Answer by username_1 on 2022-05-01. Score: 1 | Accepted answer

It performs proof-of-work mining; given a block header, it finds a nonce such that the header with the nonce in it hashes to a value below the proof-of-work target.

Its purpose is assisting with signet creation. In signet, blocks have a small amount of proof-of-work (they're relatively low difficulty), but also require a signature by the (fixed) signers for the network. In order to assist these signers in their block-creation process, the `grind` command of `bitcoin-util` can be invoked.

To be clear, this feature is not useful for normal mainnet or even testnet mining:

* It is CPU only, unable to take advantage of specific hardware like GPUs, FPGAs, or ASICs.
* Even for a CPU-only mining tool, it is slow. It lacks optimizations that could speed it up, in order to improve maintainability and simplicity of the code.
* It has no interface to interact with mining protocols like Stratum or GBT.


---

