<p>Yes, it is possible. The coinbase outputs are embedded in <code>coinbase2</code>.</p>

<p>E.g. for a regular 1-output <code>pay-to-pubkey-hash</code> coinbase tx it contains the pubkey hash which can redeem the coins.</p>

<p>Check the <a href="https://mining.bitcoin.cz/stratum-mining" rel="nofollow">stratum official documentation</a>. It has a real-world example which generated <a href="https://blockexplorer.com/testnet/rawblock/000000002076870fe65a2b6eeed84fa892c0db924f1482243a6247d931dcab32" rel="nofollow">raw block 000000002076870fe65a2b6eeed84fa892c0db924f1482243a6247d931dcab32</a>.</p>

<p>The raw transaction output[0] looks like this:</p>

<pre><code>{
  "value":"50.00000000",
  "scriptPubKey":"OP_DUP OP_HASH160 d23fcdf86f7e756a64a7a9688ef9903327048ed9 OP_EQUALVERIFY OP_CHECKSIG"
}
</code></pre>

<p>Or, in hex, <code>00f2052a010000001976a914d23fcdf86f7e756a64a7a9688ef9903327048ed988ac</code>.</p>

<p>The miner gets this parameters from stratum:</p>

<pre><code>"params": [
  /* job id    */ "bf",
  /* prevhash  */ "4d16b6f85af6e2198f44ae2a6de67f78487ae5611b77c6c0440b921e00000000",
  /* coinbase1 */ "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff20020862062f503253482f04b8864e5008",
  /* coinbase2 */ "072f736c7573682f000000000100f2052a010000001976a914d23fcdf86f7e756a64a7a9688ef9903327048ed988ac00000000",
  /* omitted, not relevant */
]
</code></pre>

<p>Notice <code>coinbase2</code> contains the hex of the block output, including <code>d23fcdf86f7e756a64a7a9688ef9903327048ed9</code>, i.e. the pubkey hash (which you can derive the address from).</p>

CC BY-SA 3.0
2014-01-14T10:56:26.033Z
2014-01-14T11:10:13.093Z
2014-01-14T11:10:13.093Z
kaoD
<p>In Stratum protocol, since the coinbase transaction has to be hashed in the miner's side, so the pool has to send coinbase1 and coinbase2 to the miners. Therefore, is it possible for the miner to decode the output address of the coinbase from coinbase1 and coinbase2? </p>

<mining-pools><mining-technical-details><stratum>
In Stratum protocol, whether the miners know the mining address?
BitThink
# In Stratum protocol, whether the miners know the mining address?

(Asked by: username_0 on 2014-01-14)

In Stratum protocol, since the coinbase transaction has to be hashed in the miner's side, so the pool has to send coinbase1 and coinbase2 to the miners. Therefore, is it possible for the miner to decode the output address of the coinbase from coinbase1 and coinbase2?

**Tags:** mining-pools, mining-technical-details, stratum


---

## 1 answers

### Answer by username_1 on 2014-01-14. Score: 1

Yes, it is possible. The coinbase outputs are embedded in `coinbase2`.

E.g. for a regular 1-output `pay-to-pubkey-hash` coinbase tx it contains the pubkey hash which can redeem the coins.

Check the [stratum official documentation](https://mining.bitcoin.cz/stratum-mining). It has a real-world example which generated [raw block 000000002076870fe65a2b6eeed84fa892c0db924f1482243a6247d931dcab32](https://blockexplorer.com/testnet/rawblock/000000002076870fe65a2b6eeed84fa892c0db924f1482243a6247d931dcab32).

The raw transaction output[0] looks like this:

```
{
  "value":"50.00000000",
  "scriptPubKey":"OP_DUP OP_HASH160 d23fcdf86f7e756a64a7a9688ef9903327048ed9 OP_EQUALVERIFY OP_CHECKSIG"
}

```

Or, in hex, `00f2052a010000001976a914d23fcdf86f7e756a64a7a9688ef9903327048ed988ac`.

The miner gets this parameters from stratum:

```
"params": [
  /* job id    */ "bf",
  /* prevhash  */ "4d16b6f85af6e2198f44ae2a6de67f78487ae5611b77c6c0440b921e00000000",
  /* coinbase1 */ "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff20020862062f503253482f04b8864e5008",
  /* coinbase2 */ "072f736c7573682f000000000100f2052a010000001976a914d23fcdf86f7e756a64a7a9688ef9903327048ed988ac00000000",
  /* omitted, not relevant */
]

```

Notice `coinbase2` contains the hex of the block output, including `d23fcdf86f7e756a64a7a9688ef9903327048ed9`, i.e. the pubkey hash (which you can derive the address from).


---

