OP_RETURN inside TapScript



Summary:

Since the activation of Taproot, separate OP_RETURN outputs are no longer necessary to push data on-chain. Instead, "OP_RETURN" can be created as a branch in the TapScript to attach data to a transaction and store it off-chain. This allows for more than 80 bytes of data to be stored for free, as the taproot branch will never be pushed on-chain or used as an input. By using "OP_RETURN", an address with the taproot branch can be created and later used to prove that a large amount of data is connected with the taproot address. Currently, Bitcoin Core has a "data" field in "createrawtransaction". The implementation may need to be changed to place this data in a TapScript rather than creating a separate OP_RETURN output.


Updated on: 2023-05-22T17:40:44.912424+00:00