5

I've been looking at coinbase transactions for fun and I came across one with two op_return outputs..

Does anyone know what the second one is?

Also, I understand the first op_return is used to embed the merkleroot of the witness tree for segwit transactions in the block.

However, I've also seen coinbase transactions with multiple op_returns such as this one. Is there a specific purpose for that 2nd op_return or is the miner simply using it for their own purpose?

1 Answer 1

9

Coinbase transactions have some special rules not shared by other transactions:

  • only one per block
  • must be the first transaction in the block
  • must have OP_RETURN output with witness commitment if block includes segwit transactions
  • must have only one input
  • the input must have the "coinbase" field instead of a scriptSig

The "coinbase" field is where miners put the extranonce, commit to a specific blockheight (see BIP-34), and mark blocks to be found by them. Although, miners often collect the block reward in a single output, beside the rules for the witness commitment, the Coinbase transaction has no special restrictions on other outputs. In fact, some mining pools used to pay out mining rewards directly from the Coinbase, see e.g. the Coinbase of 133,471 mined by Eligius creating 919 outputs. As such, the second OP_RETURN output could be anything the miner wants.

0

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.