> For the complete documentation index, see [llms.txt](https://hub.bsvblockchain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hub.bsvblockchain.org/wiki/mining-and-consensus/mining/getminingcandidate.md).

# Getminingcandidate

**getminingcandidate** or GMC is a Remote Procedure Call (RPC) available in SV Node. Its purpose is to provide mining software/pools with a suitable block candidate for hashing in order to mine a block. In addition it is greatly decoupled from block size unlike its predecessor [GetBlockTemplate](/wiki/mining-and-consensus/mining/getblocktemplate-interface.md), meaning it can scale and support very large block sizes. The way it supports blocks of very large sizes is by only providing a minimal set of data required for mining hardware to hash and generate a possible block solution. If a blocksolution is found it can be returned to SV Node via the sibling RPC call **submitminingsolution**. GMCs predecessor **getblocktemplate** gave the call mining software more control, but in order to do this, it had to provide a full and complete dataset of the current block and pending transactions in the mempool. A Miner trying to mine large blocks must put a lot more strain on both SV Node and the RPC interface to transmit a record of every transaction that is in the mempool, often resulting in lack of memory and/or performance issues. GMC removes this issue by only providing the mining software with a merkle proof of included transactions, rather than a complete listing, this lowers the amount of data to be produced and transmitted to log2(blocksize). When SV Node receives a GMC request it will respond with a [JSON](https://www.json.org/json-en.html) representation of the current block candidate. A description of this response body is shown below.

1. Response body of getminingcandidate Variable Description \[uuid] id The assigned id from Bitcoind. This must be provided with submitting a potential solution (hex) prevHash Big Endian hash of the previous block (hex) Coinbase (optional) Suggested coinbase transaction is provided. Miner is free to supply their own or alter the supplied one. Altering will require parsing and splitting the coinbase in order to splice in/out data as required. Requires Wallet to be enabled. Only returned when provide\_coinbase\_tx argument is set to true. Returns error if Wallet is not enabled \[int32\_t] version The block version \[int64\_t] coinbaseValue Total funds available for the coinbase tx (in Satoshis) \[uint32\_t] nBits Compressed hexadecimal difficulty \[uint32\_t] time Current block time \[int] height The candidate block height \[array] merkleProof Merkle branch/path for the block, used to calculate the Merkle root of the block candidate. This is a list of Little-Endian hex strings ordered from top to bottom For a more technical breakdown of **GetMiningCandidate** and its implementation, see the protocol spec (<https://github.com/bitcoin-sv-specs/protocol/blob/master/rpc/GetMiningCandidate.md>)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hub.bsvblockchain.org/wiki/mining-and-consensus/mining/getminingcandidate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
