Skip to main content
added 1290 characters in body
Source Link
kaoD
  • 988
  • 6
  • 13

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. It has a real-world example which generated raw block 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).

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.

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. It has a real-world example which generated raw block 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).

Source Link
kaoD
  • 988
  • 6
  • 13

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.