Difference between revisions of "OP RETURN"

From Bitcoin Wiki
Jump to: navigation, search
(Fixed title)
(Add quote from Bitcoin 0.9.0 release)
Line 5: Line 5:
 
== Philosophy ==
 
== Philosophy ==
 
Some members of the Bitcoin community believe that use of OP_RETURN violates the contract of Bitcoin, because Bitcoin was intended to provide a record for financial transactions, not a record for arbitrary data. Despite this, use of OP_RETURN may continue unabated because there is no easy way to stop people from embedding arbitrary data in the blockchain if they want to, and OP_RETURN is reasonably efficient in terms of [http://i.imgur.com/VAGZWBK.png data bytes stored as a fraction of blockchain space consumed]. Compared to some other ways of storing data in the blockchain, OP_RETURN has the advantage of not creating bogus UTXO entries. [https://github.com/bitcoin/bitcoin/pull/5286 Discussion on GitHub pull request]
 
Some members of the Bitcoin community believe that use of OP_RETURN violates the contract of Bitcoin, because Bitcoin was intended to provide a record for financial transactions, not a record for arbitrary data. Despite this, use of OP_RETURN may continue unabated because there is no easy way to stop people from embedding arbitrary data in the blockchain if they want to, and OP_RETURN is reasonably efficient in terms of [http://i.imgur.com/VAGZWBK.png data bytes stored as a fraction of blockchain space consumed]. Compared to some other ways of storing data in the blockchain, OP_RETURN has the advantage of not creating bogus UTXO entries. [https://github.com/bitcoin/bitcoin/pull/5286 Discussion on GitHub pull request]
 +
 +
From [https://bitcoin.org/en/release/v0.9.0#opreturn-and-data-in-the-block-chain Bitcoin Core release 0.9.0]:
 +
<blockquote>
 +
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.
 +
</blockquote>
  
 
== Resources on OP_RETURN ==
 
== Resources on OP_RETURN ==

Revision as of 14:37, 1 January 2016

OP_RETURN is a script opcode used to mark a transaction output as invalid. Since the data after OP_RETURN are irrelevant to Bitcoin payments, arbitrary data can be added into the transaction by following the OP_RETURN with an OP_PUSHDATA. Since any outputs with OP_RETURN are provably unspendable, OP_RETURN outputs can be used to burn bitcoins.

Currently, the default Bitcoin client relays OP_RETURN transactions up to 80 bytes [1], but does not provide a way for users to create OP_RETURN transactions.

Philosophy

Some members of the Bitcoin community believe that use of OP_RETURN violates the contract of Bitcoin, because Bitcoin was intended to provide a record for financial transactions, not a record for arbitrary data. Despite this, use of OP_RETURN may continue unabated because there is no easy way to stop people from embedding arbitrary data in the blockchain if they want to, and OP_RETURN is reasonably efficient in terms of data bytes stored as a fraction of blockchain space consumed. Compared to some other ways of storing data in the blockchain, OP_RETURN has the advantage of not creating bogus UTXO entries. Discussion on GitHub pull request

From Bitcoin Core release 0.9.0:

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.

Resources on OP_RETURN

OP_RETURN prefixes

Often, OP_RETURN transactions include a prefix to identify which protocol they belong to. There is no standardized method of claiming OP_RETURN prefixes, and not all OP_RETURN transactions use prefixes. At the time of writing, this wiki page is probably the most complete list of OP_RETURN prefixes. Note that this table is an attempt to catalog OP_RETURN prefixes that are already in use, *not* a system for reserving OP_RETURN prefixes!

Prefix Protocol
SPK CoinSpark
DOCPROOF Proof of Existence
CryptoTests- Crypto Copyright
CryptoProof- [Crypto Copyright http://crypto-copyright.com/
BS BlockSign
OA Open Assets
STAMPD## stampd
Factom!! Factom
FACTOM00 Factom
Fa Factom
FA Factom
tradle Tradle
LaPreuve LaPreuve
hex:5888 Blockstore
hex:5808 Blockstore
id Blockstore
BITPROOF Bitproof
S1 Stampery
ASCRIBE Ascribe
ProveBit ProveBit
EW Eternity Wall
CC Colu
omni Omni Layer
MG Monegraph
RMBd Remembr
RMBe Remembr
ORIGMY OriginalMy