0

I've been working on a bitcoin miner that uses BIP-0034 (block v2).

I'm confused about the coinbase transaction of block v2. Does block v2 only accept P2PKH type of address to allow me to receive a reward for solving a block? Because the first block v2 uses P2PKH address on the coinbase tx.

So my question is can I use other types of address for coinbase transaction inside block v2 or I can only use the P2PKH address?

0

1 Answer 1

2

No, there is no restriction. Any transaction (including coinbase transactions) can create any output type. The block reward can be spent to P2PK, P2PKH, P2SH, P2SH-P2WPKH, P2SH-P2WSH, P2WPKH, P2WSH, P2TR, or even a bare script regardless of the version of the block.

4
  • wdym sir? sorry, i dont understand Jan 10 at 15:46
  • 1
    The answer to your question is "no": there is no restriction on the type of outputs/ardresses a coinbase transaction can pay to, in BIP34 or elsewhere. Jan 10 at 16:22
  • so thats mean i can only use P2PKH only right? Jan 11 at 6:54
  • 1
    No, you can use any type of address.
    – Murch
    Jan 11 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.