<p>The witness commitment is in an OP_RETURN output of the coinbase transaction. This means that the coinbase transaction will likely have more than 1 output (although not necessarily as a miner could send the block reward to the OP_RETURN output, but they would be stupid to do so). Here is a testnet block with a witness commitment: <a href="https://live.blockcypher.com/btc-testnet/block/00000000000007972a6f786179cb42dbc59f167aafd757b203e6c2eb80d49455/" rel="nofollow noreferrer">https://live.blockcypher.com/btc-testnet/block/00000000000007972a6f786179cb42dbc59f167aafd757b203e6c2eb80d49455/</a>. All testnet blocks should have one as segwit has activated on testnet.</p>

CC BY-SA 3.0
2017-07-05T21:23:46.903Z
2017-07-05T21:23:46.903Z
Ava Chow
<p>The commitment can be in any of the coinbase's outputs. The coinbase is allowed (and has always been allowed) to contain multiple outputs. SegWit just requires that one of them has a scriptPubKey that starts with 0x6a24aa21a9ed, and that it commits to the witness root.</p>

CC BY-SA 3.0
2017-07-05T21:24:27.047Z
2017-07-05T21:24:27.047Z
Pieter Wuille
<p>BIP 141 defines the commitment structure <a href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#commitment-structure" rel="nofollow noreferrer">here</a><br>
What i am unsure about is the location of this data. I know it will be in scriptPubKey.<br>
Does this mean Coinbase tx will have more than one output?<br>
Also is there a testnet block with an example of a Coinbase tx with witness commitment?</p>

<script><segregated-witness><coinbase-transaction><witness-commitment>
SegWit witness commitment merkle root location
Albert S
# SegWit witness commitment merkle root location

(Asked by: username_0 on 2017-07-05)

BIP 141 defines the commitment structure [here](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#commitment-structure)  
What i am unsure about is the location of this data. I know it will be in scriptPubKey.  
Does this mean Coinbase tx will have more than one output?  
Also is there a testnet block with an example of a Coinbase tx with witness commitment?

**Tags:** script, segregated-witness, coinbase-transaction, witness-commitment


---

## 2 answers

### Answer by username_1 on 2017-07-05. Score: 2

The witness commitment is in an OP\_RETURN output of the coinbase transaction. This means that the coinbase transaction will likely have more than 1 output (although not necessarily as a miner could send the block reward to the OP\_RETURN output, but they would be stupid to do so). Here is a testnet block with a witness commitment: <https://live.blockcypher.com/btc-testnet/block/00000000000007972a6f786179cb42dbc59f167aafd757b203e6c2eb80d49455/>. All testnet blocks should have one as segwit has activated on testnet.


---

### Answer by username_2 on 2017-07-05. Score: 2

The commitment can be in any of the coinbase's outputs. The coinbase is allowed (and has always been allowed) to contain multiple outputs. SegWit just requires that one of them has a scriptPubKey that starts with 0x6a24aa21a9ed, and that it commits to the witness root.


---

