<p>There are two reasons why you should prefer a scriptPubKey of <code>OP_RETURN &lt;data&gt;</code> over <code>&lt;data&gt;</code>.</p>

<p>The first reason is that the non-OP_RETURN output is not prunable, and is actually anyone-can-spend if the data is non-zero. Non-prunable outputs make the unspent transaction set larger, which slows down initial block verification and block propagation times.</p>

<p>The second reason is that the non-OP_RETURN output is nonstandard, meaning that not all miners will mine it. Therefore, it will take longer to get into the blockchain.</p>

CC BY-SA 3.0
2017-01-07T20:41:15.777Z
2017-01-07T20:41:15.777Z
Nick ODell
<p>I've read this great <a href="https://bitcoin.stackexchange.com/questions/29554/explanation-of-what-an-op-return-transaction-looks-like">Explanation of what an OP_RETURN transaction looks like</a> and now I have only one question. Imagine that someone want to store some data in Bitcoin's blockchain. <strong>Why</strong> should he use <code>OP_RETURN</code>?</p>

<p>I mean, I know that it's impolite to store a lot of data in blockchain as it is, because it makes blockchain bigger, pollutes it, etc. But in fact, is there any hindrance, which makes it at least difficult?</p>

<p>For example, is it possible to store string like <code>&gt;&gt;&gt; "123123" * 100</code> in transaction locking script field? Why?</p>

<raw-data><block-size-increase><op-return>
Why OP_RETURN should be used instead of raw data?
Sergey Potekhin
# Why OP_RETURN should be used instead of raw data?

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

I've read this great [Explanation of what an OP\_RETURN transaction looks like](https://bitcoin.stackexchange.com/questions/29554/explanation-of-what-an-op-return-transaction-looks-like) and now I have only one question. Imagine that someone want to store some data in Bitcoin's blockchain. **Why** should he use `OP_RETURN`?

I mean, I know that it's impolite to store a lot of data in blockchain as it is, because it makes blockchain bigger, pollutes it, etc. But in fact, is there any hindrance, which makes it at least difficult?

For example, is it possible to store string like `>>> "123123" * 100` in transaction locking script field? Why?

**Tags:** raw-data, block-size-increase, op-return


---

## 1 answers

### Answer by username_1 on 2017-01-07. Score: 3 | Accepted answer

There are two reasons why you should prefer a scriptPubKey of `OP_RETURN <data>` over `<data>`.

The first reason is that the non-OP\_RETURN output is not prunable, and is actually anyone-can-spend if the data is non-zero. Non-prunable outputs make the unspent transaction set larger, which slows down initial block verification and block propagation times.

The second reason is that the non-OP\_RETURN output is nonstandard, meaning that not all miners will mine it. Therefore, it will take longer to get into the blockchain.


---

