<p>The Bitcoin p2p network doesn't provide any methods for downloading transactions at a specific index (in this question, zero) within a block. SPV clients aren't able to perform any sort of validation of transactions that aren't their own, and only basic validation of ones paying to them, so this sort of method isn't provided. Bitcoin Core additionally doesn't maintain indexes of transactions on disk so this would require an additional one to be built for the purpose, or have the node load entire blocks and re-parse them to find transaction positions. </p>

CC BY-SA 3.0
2017-10-27T05:32:43.857Z
2017-10-27T05:32:43.857Z
Claris
<p>I want to implement a client similar to SPV client.
The client will download block headers and coinbase transactions.
There is an api of downloading block headers such as <code>getheaders</code>.
However, it seemed that there is no api of downloading only a coinbase transaction.</p>

<p>Can I download only a coinbase transaction at a specified height without downloading all transactions at the same block height?</p>

<bitcoin-core><coinbase-transaction>
Can I download only a coinbase transaction at a specified block height?
chikyukotei
# Can I download only a coinbase transaction at a specified block height?

(Asked by: username_0 on 2017-10-27)

I want to implement a client similar to SPV client.
The client will download block headers and coinbase transactions.
There is an api of downloading block headers such as `getheaders`.
However, it seemed that there is no api of downloading only a coinbase transaction.

Can I download only a coinbase transaction at a specified height without downloading all transactions at the same block height?

**Tags:** bitcoin-core, coinbase-transaction


---

## 1 answers

### Answer by username_1 on 2017-10-27. Score: 1 | Accepted answer

The Bitcoin p2p network doesn't provide any methods for downloading transactions at a specific index (in this question, zero) within a block. SPV clients aren't able to perform any sort of validation of transactions that aren't their own, and only basic validation of ones paying to them, so this sort of method isn't provided. Bitcoin Core additionally doesn't maintain indexes of transactions on disk so this would require an additional one to be built for the purpose, or have the node load entire blocks and re-parse them to find transaction positions.


---

