<p>The first coinbase transaction that has an OP_RETURN output is in block <a href="https://mempool.space/block/000000000000000a6913ee4ada3b92bed9f1398ad8f22f4f944a5d5593197d68" rel="noreferrer">246816</a>. The transaction has 288 outputs in total, and the OP_RETURN is the last one.</p>

CC BY-SA 4.0
2023-12-20T11:38:38.110Z
Thanks! How did you find it?
Sjors Provoost
CC BY-SA 4.0
2023-12-20T12:35:52.807Z
I wrote a script that goes through every block in order until it finds one whose coinbase transaction has an output whose output script starts with the byte `6a`.
Vojtěch Strnad
CC BY-SA 4.0
2024-04-05T17:18:47.907Z
BIP30 kicked in on 2012-03-15, BIP34 at 227,835 on 2023-03-24. Block 246,816 was mined four months later on ‎2013-07-16.
Sjors Provoost
CC BY-SA 4.0
2023-12-20T10:14:15.977Z
2023-12-20T10:14:15.977Z
Vojtěch Strnad
<p>One way to deal with the <em><a href="https://en.bitcoin.it/wiki/BIP_0034" rel="nofollow noreferrer">BIP34</a> does not imply <a href="https://en.bitcoin.it/wiki/BIP_0030" rel="nofollow noreferrer">BIP30</a></em> issue, aka the <a href="https://bitcoin.stackexchange.com/questions/120834/what-is-the-block-1-983-702-problem">Block 1,983,702 Problem</a>, is a soft-fork that makes the SegWit commitment mandatory. [0]</p>
<p>There are no <code>OP_RETURN</code> outputs in any of the coinbase transactions before BIP34 activated (unless my script is wrong [1]), let alone <code>OP_RETURN</code> outputs starting with the SegWit magic bytes <code>0x6a24aa21a9ed.</code></p>
<p>Nowadays <code>OP_RETURN</code> outputs in the coinbase transaction are very common, used not just for the SegWit commitment, but also by sidechain(ish) protocols.</p>
<p>When was the first instance of this?</p>
<p>[0] <a href="https://twitter.com/kcalvinalvinn/status/1733008287887659266" rel="nofollow noreferrer">https://twitter.com/kcalvinalvinn/status/1733008287887659266</a></p>
<p>[1] <a href="https://gist.github.com/Sjors/018f764b28efdf29fda60e47f19615a5" rel="nofollow noreferrer">https://gist.github.com/Sjors/018f764b28efdf29fda60e47f19615a5</a></p>

<coinbase-transaction><op-return><soft-fork><bip-34><bip-30>
When was the first OP_RETURN output in a coinbase?
Sjors Provoost
# When was the first OP_RETURN output in a coinbase?

(Asked by: username_0 on 2023-12-20)

One way to deal with the *[BIP34](https://en.bitcoin.it/wiki/BIP_0034) does not imply [BIP30](https://en.bitcoin.it/wiki/BIP_0030)* issue, aka the [Block 1,983,702 Problem](https://bitcoin.stackexchange.com/questions/120834/what-is-the-block-1-983-702-problem), is a soft-fork that makes the SegWit commitment mandatory. [0]

There are no `OP_RETURN` outputs in any of the coinbase transactions before BIP34 activated (unless my script is wrong [1]), let alone `OP_RETURN` outputs starting with the SegWit magic bytes `0x6a24aa21a9ed.`

Nowadays `OP_RETURN` outputs in the coinbase transaction are very common, used not just for the SegWit commitment, but also by sidechain(ish) protocols.

When was the first instance of this?

[0] <https://twitter.com/kcalvinalvinn/status/1733008287887659266>

[1] <https://gist.github.com/Sjors/018f764b28efdf29fda60e47f19615a5>

**Tags:** coinbase-transaction, op-return, soft-fork, bip-34, bip-30


---

## 1 answers

### Answer by username_1 on 2023-12-20. Score: 6 | Accepted answer

The first coinbase transaction that has an OP\_RETURN output is in block [246816](https://mempool.space/block/000000000000000a6913ee4ada3b92bed9f1398ad8f22f4f944a5d5593197d68). The transaction has 288 outputs in total, and the OP\_RETURN is the last one.

> **Comments:**
> **username_0**: Thanks! How did you find it?  
> **username_1**: I wrote a script that goes through every block in order until it finds one whose coinbase transaction has an output whose output script starts with the byte `6a`.  
> **username_0**: BIP30 kicked in on 2012-03-15, BIP34 at 227,835 on 2023-03-24. Block 246,816 was mined four months later on ‎2013-07-16.  

---

