Data output (OP_RETURN)

Published by Martin Schuster on

A special kind of script is the Null Data script. These scripts cannot be unlocked, so any bitcoin that is used in a translation with this op_code OP_RETURN will forever be locked in this transaction, or burned for that matter. OP_RETRUN immediately ends the execution and marks it as invalid. These transactions are mostly used for data storage. Before OP_RETURN was introduced, people that wanted to store data on the blockchain used the P2PKH script and store the data where the public hash would be written. This would unnecessarily bloat the UTXO (Unspent transaction output) Database. Blockchain is not meant for data storage, but there is no way to stop people from doing it, so OP_RETURN was introduced as a kind of compromise to stop bloating the UTXO Database.