<p>As I understand it, OP_RETURN allows the script to exit early with a result of FALSE without evaluating the remainder of the script. That means the transaction output is non-spendable but that the whole transaction still passes normal validation tests.</p>
<p>It is designed in a way that allows a small amount of arbitrary data to be embedded in the script.</p>
<p>See</p>
<ul>
<li><a href="https://en.bitcoin.it/wiki/OP_RETURN" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/OP_RETURN</a></li>
<li><a href="https://bitcoin.stackexchange.com/q/29554/13866">Explanation of what an OP_RETURN transaction looks like</a></li>
</ul>
<p><a href="https://bitcoin.org/en/release/v0.9.0#opreturn-and-data-in-the-block-chain" rel="nofollow noreferrer">https://bitcoin.org/en/release/v0.9.0#opreturn-and-data-in-the-block-chain</a> says</p>
<blockquote>
<p>OP_RETURN and data in the block chain</p>
<hr />
<p>On OP_RETURN: There was been some confusion and misunderstanding in the community, regarding the OP_RETURN feature in 0.9 and data in the blockchain. This change is not an endorsement of storing data in the blockchain. The OP_RETURN change creates a provably-prunable output, to avoid data storage schemes – some of which were already deployed – that were storing arbitrary data such as images as forever-unspendable TX outputs, bloating bitcoin’s UTXO database.</p>
<p>Storing arbitrary data in the blockchain is still a bad idea; it is less costly and far more efficient to store non-currency data elsewhere.</p>
</blockquote>

CC BY-SA 4.0
2021-12-12T14:20:16.880Z
If it's not spendable then miners won't include it in the next block(no fees), but it is still searchable in bitcoin transaction explorer, am I right?
daisy
CC BY-SA 4.0
2021-12-12T19:11:43.727Z
There are still transaction fees even though one of the outputs of the transaction is unspendable (there is no recipient). So it will be included in a block.
RedGrittyBrick
CC BY-SA 4.0
2021-12-13T04:21:25.380Z
Understood, the unlocking script is fine, and the locking script is verified in the next transaction, so it won't affect the current transaction.
daisy
CC BY-SA 4.0
2021-12-11T12:43:19.900Z
2021-12-11T13:00:52.970Z
2021-12-11T13:00:52.970Z
RedGrittyBrick
<p>I'm reading <a href="https://blog.google/threat-analysis-group/disrupting-glupteba-operation/" rel="nofollow noreferrer">this article</a>, and quote</p>
<blockquote>
<p>The blockchain transaction’s OP_RETURN data can be decrypted using AES-256 GCM to provide a backup command and control domain name</p>
</blockquote>
<p>How did someone able to manipulate the Bitcoin transaction script without affecting the transaction?</p>

CC BY-SA 4.0
2021-12-12T03:47:35.057Z
Possible duplicate of https://bitcoin.stackexchange.com/questions/29554/explanation-of-what-an-op-return-transaction-looks-like
meshcollider
<p2sh>
Hiding data in OP_RETURN statement?
daisy
# Hiding data in OP_RETURN statement?

(Asked by: username_0 on 2021-12-11)

I'm reading [this article](https://blog.google/threat-analysis-group/disrupting-glupteba-operation/), and quote

> The blockchain transaction’s OP\_RETURN data can be decrypted using AES-256 GCM to provide a backup command and control domain name

How did someone able to manipulate the Bitcoin transaction script without affecting the transaction?

**Tags:** p2sh

> **Comments:**
> **username_1**: Possible duplicate of https://bitcoin.stackexchange.com/questions/29554/explanation-of-what-an-op-return-transaction-looks-like  

---

## 1 answers

### Answer by username_2 on 2021-12-11. Score: 1 | Accepted answer

As I understand it, OP\_RETURN allows the script to exit early with a result of FALSE without evaluating the remainder of the script. That means the transaction output is non-spendable but that the whole transaction still passes normal validation tests.

It is designed in a way that allows a small amount of arbitrary data to be embedded in the script.

See

* <https://en.bitcoin.it/wiki/OP_RETURN>
* [Explanation of what an OP\_RETURN transaction looks like](https://bitcoin.stackexchange.com/q/29554/13866)

<https://bitcoin.org/en/release/v0.9.0#opreturn-and-data-in-the-block-chain> says

> OP\_RETURN and data in the block chain
>
> ---
>
> On OP\_RETURN: There was been some confusion and misunderstanding in the community, regarding the OP\_RETURN feature in 0.9 and data in the blockchain. This change is not an endorsement of storing data in the blockchain. The OP\_RETURN change creates a provably-prunable output, to avoid data storage schemes – some of which were already deployed – that were storing arbitrary data such as images as forever-unspendable TX outputs, bloating bitcoin’s UTXO database.
>
> Storing arbitrary data in the blockchain is still a bad idea; it is less costly and far more efficient to store non-currency data elsewhere.

> **Comments:**
> **username_0**: If it's not spendable then miners won't include it in the next block(no fees), but it is still searchable in bitcoin transaction explorer, am I right?  
> **username_2**: There are still transaction fees even though one of the outputs of the transaction is unspendable (there is no recipient). So it will be included in a block.  
> **username_0**: Understood, the unlocking script is fine, and the locking script is verified in the next transaction, so it won't affect the current transaction.  

---

