<p>When a miner finds a valid block, the coinbase transaction they included in their block pays out the mining reward to their own address. Mining rewards can be sent to any type of output. The only special restriction on coinbase transaction outputs is that they can only be spent after a maturation period of 100 confirmations.</p>
<p>You are looking at two different address types:</p>
<ul>
<li><code>bc1q403w7zrj74azzunk89srt2m3vuajatlmskcktm</code> is a Pay to Witness Public Key Hash (P2WPKH) address</li>
<li><code>1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY</code> is a Pay to Public Key Hash
(P2PKH) address.</li>
</ul>
<p>P2WPKH addresses are the more block weight efficient successor of P2PKH addresses. Spending funds received to P2WPKH addresses takes less than half the blockweight as spending funds received to P2PKH addresses.</p>
<blockquote>
<p>The inferred PubKey hash of the miner address is <code>c825a1ecf2a6830c4401620c3a16f1995057c2ab</code>. Would my PubKey hash be <code>abe2ef0872f57a217276396035ab71673b2eaffb</code>?</p>
</blockquote>
<p>Yes, that's correct.</p>

CC BY-SA 4.0
2021-05-01T13:00:41.103Z
Thank you for your answer! So, can I use my PubKey hash for a P2PKH output in the first output of the coinbase transaction? .. according to the example in the TxOut section in https://developer.bitcoin.org/reference/transactions.html
Andy
CC BY-SA 4.0
2021-05-01T15:33:00.827Z
Yes, you could use the same pubkey either for a P2WPKH or a P2PKH. I don't quite understand why you're asking like this, though. You could just pay out to a P2WPKH address instead as well.
Murch
CC BY-SA 4.0
2021-05-01T12:25:51.290Z
2021-05-01T12:25:51.290Z
Murch
<p>I am looking at the specific block at height <a href="https://btc.com/00000000000000000004dbd66fa71fdcd62658bf8c8e2e153521257ad5858c71?page=1&amp;order_by=tx_block_idx&amp;asc=1" rel="nofollow noreferrer">680175</a>.</p>
<p>When comparing the address which received the block reward</p>
<pre><code># bitcoin-cli validateaddress 1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY
{
  &quot;isvalid&quot;: true,
  &quot;address&quot;: &quot;1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY&quot;,
  &quot;scriptPubKey&quot;: &quot;76a914c825a1ecf2a6830c4401620c3a16f1995057c2ab88ac&quot;,
  &quot;isscript&quot;: false,
  &quot;iswitness&quot;: false
}
</code></pre>
<p>to my newly generated address</p>
<pre><code># bitcoin-cli validateaddress bc1q403w7zrj74azzunk89srt2m3vuajatlmskcktm
{
  &quot;isvalid&quot;: true,
  &quot;address&quot;: &quot;bc1q403w7zrj74azzunk89srt2m3vuajatlmskcktm&quot;,
  &quot;scriptPubKey&quot;: &quot;0014abe2ef0872f57a217276396035ab71673b2eaffb&quot;,
  &quot;isscript&quot;: false,
  &quot;iswitness&quot;: true,
  &quot;witness_version&quot;: 0,
  &quot;witness_program&quot;: &quot;abe2ef0872f57a217276396035ab71673b2eaffb&quot;
}
</code></pre>
<p>there are some differences in the scriptPubKey and the witness program. Are these differences relevant for mining?</p>
<p>The inferred PubKey hash of the miner address is <code>c825a1ecf2a6830c4401620c3a16f1995057c2ab</code>. Would my PubKey hash be <code>abe2ef0872f57a217276396035ab71673b2eaffb</code>?</p>

<mining-theory><block><mining-reward><coinbase-transaction>
Is my Bitcoin address valid for mining?
Andy
# Is my Bitcoin address valid for mining?

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

I am looking at the specific block at height 680175.
When comparing the address which received the block reward
# bitcoin-cli validateaddress 1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY
{
  "isvalid": true,
  "address": "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
  "scriptPubKey": "76a914c825a1ecf2a6830c4401620c3a16f1995057c2ab88ac",
  "isscript": false,
  "iswitness": false
}

to my newly generated address
# bitcoin-cli validateaddress bc1q403w7zrj74azzunk89srt2m3vuajatlmskcktm
{
  "isvalid": true,
  "address": "bc1q403w7zrj74azzunk89srt2m3vuajatlmskcktm",
  "scriptPubKey": "0014abe2ef0872f57a217276396035ab71673b2eaffb",
  "isscript": false,
  "iswitness": true,
  "witness_version": 0,
  "witness_program": "abe2ef0872f57a217276396035ab71673b2eaffb"
}

there are some differences in the scriptPubKey and the witness program. Are these differences relevant for mining?
The inferred PubKey hash of the miner address is c825a1ecf2a6830c4401620c3a16f1995057c2ab. Would my PubKey hash be abe2ef0872f57a217276396035ab71673b2eaffb?

**Tags:** mining-theory, block, mining-reward, coinbase-transaction


---

## 1 answers

### Answer by username_1 on 2021-05-01. Score: 2 | Accepted answer

When a miner finds a valid block, the coinbase transaction they included in their block pays out the mining reward to their own address. Mining rewards can be sent to any type of output. The only special restriction on coinbase transaction outputs is that they can only be spent after a maturation period of 100 confirmations.

You are looking at two different address types:

* `bc1q403w7zrj74azzunk89srt2m3vuajatlmskcktm` is a Pay to Witness Public Key Hash (P2WPKH) address
* `1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY` is a Pay to Public Key Hash
  (P2PKH) address.

P2WPKH addresses are the more block weight efficient successor of P2PKH addresses. Spending funds received to P2WPKH addresses takes less than half the blockweight as spending funds received to P2PKH addresses.

> The inferred PubKey hash of the miner address is `c825a1ecf2a6830c4401620c3a16f1995057c2ab`. Would my PubKey hash be `abe2ef0872f57a217276396035ab71673b2eaffb`?

Yes, that's correct.

> **Comments:**
> **username_0**: Thank you for your answer! So, can I use my PubKey hash for a P2PKH output in the first output of the coinbase transaction? .. according to the example in the TxOut section in https://developer.bitcoin.org/reference/transactions.html  
> **username_1**: Yes, you could use the same pubkey either for a P2WPKH or a P2PKH. I don't quite understand why you're asking like this, though. You could just pay out to a P2WPKH address instead as well.  

---

